diff --git a/dist/xeokit-bim-viewer.es.js b/dist/xeokit-bim-viewer.es.js index ced7fb73..26a36176 100644 --- a/dist/xeokit-bim-viewer.es.js +++ b/dist/xeokit-bim-viewer.es.js @@ -8203,7 +8203,7 @@ class Component { } } -const tempVec3a$F = math.vec3(); +const tempVec3a$E = math.vec3(); /** * Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix @@ -8283,7 +8283,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) { */ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) { - const center = math.getPositionsCenter(worldPositions, tempVec3a$F); + const center = math.getPositionsCenter(worldPositions, tempVec3a$E); const rtcCenterX = Math.round(center[0] / cellSize) * cellSize; const rtcCenterY = Math.round(center[1] / cellSize) * cellSize; @@ -8319,7 +8319,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = */ function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) { const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist; - const dirNormalized = math.normalizeVec3(dir, tempVec3a$F); + const dirNormalized = math.normalizeVec3(dir, tempVec3a$E); math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos); return rtcPlanePos; } @@ -9150,52 +9150,6 @@ class Spinner extends Component { } } -/** - * @private - * @type {{WEBGL: boolean, SUPPORTED_EXTENSIONS: {}}} - */ -const WEBGL_INFO = { - WEBGL: false, - SUPPORTED_EXTENSIONS: {} -}; - -const canvas = document.createElement("canvas"); - -if (canvas) { - - const gl = canvas.getContext("webgl", {antialias: true}) || canvas.getContext("experimental-webgl", {antialias: true}); - - WEBGL_INFO.WEBGL = !!gl; - - if (WEBGL_INFO.WEBGL) { - WEBGL_INFO.ANTIALIAS = gl.getContextAttributes().antialias; - if (gl.getShaderPrecisionFormat) { - if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "highp"; - } else if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; - } else { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "lowp"; - } - } else { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; - } - WEBGL_INFO.DEPTH_BUFFER_BITS = gl.getParameter(gl.DEPTH_BITS); - WEBGL_INFO.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE); - WEBGL_INFO.MAX_CUBE_MAP_SIZE = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE); - WEBGL_INFO.MAX_RENDERBUFFER_SIZE = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE); - WEBGL_INFO.MAX_TEXTURE_UNITS = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); - WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); - WEBGL_INFO.MAX_VERTEX_ATTRIBS = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); - WEBGL_INFO.MAX_VERTEX_UNIFORM_VECTORS = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); - WEBGL_INFO.MAX_FRAGMENT_UNIFORM_VECTORS = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); - WEBGL_INFO.MAX_VARYING_VECTORS = gl.getParameter(gl.MAX_VARYING_VECTORS); - gl.getSupportedExtensions().forEach(function (ext) { - WEBGL_INFO.SUPPORTED_EXTENSIONS[ext] = true; - }); - } -} - const WEBGL_CONTEXT_NAMES = [ "webgl2", "experimental-webgl", @@ -9985,6 +9939,52 @@ class FrameContext { } } +/** + * @private + * @type {{WEBGL: boolean, SUPPORTED_EXTENSIONS: {}}} + */ +const WEBGL_INFO = { + WEBGL: false, + SUPPORTED_EXTENSIONS: {} +}; + +const canvas = document.createElement("canvas"); + +if (canvas) { + + const gl = canvas.getContext("webgl", {antialias: true}) || canvas.getContext("experimental-webgl", {antialias: true}); + + WEBGL_INFO.WEBGL = !!gl; + + if (WEBGL_INFO.WEBGL) { + WEBGL_INFO.ANTIALIAS = gl.getContextAttributes().antialias; + if (gl.getShaderPrecisionFormat) { + if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "highp"; + } else if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; + } else { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "lowp"; + } + } else { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; + } + WEBGL_INFO.DEPTH_BUFFER_BITS = gl.getParameter(gl.DEPTH_BITS); + WEBGL_INFO.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE); + WEBGL_INFO.MAX_CUBE_MAP_SIZE = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE); + WEBGL_INFO.MAX_RENDERBUFFER_SIZE = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE); + WEBGL_INFO.MAX_TEXTURE_UNITS = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); + WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); + WEBGL_INFO.MAX_VERTEX_ATTRIBS = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); + WEBGL_INFO.MAX_VERTEX_UNIFORM_VECTORS = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); + WEBGL_INFO.MAX_FRAGMENT_UNIFORM_VECTORS = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); + WEBGL_INFO.MAX_VARYING_VECTORS = gl.getParameter(gl.MAX_VARYING_VECTORS); + gl.getSupportedExtensions().forEach(function (ext) { + WEBGL_INFO.SUPPORTED_EXTENSIONS[ext] = true; + }); + } +} + /** * @desc Pick result returned by {@link Scene#pick}. * @@ -10036,16 +10036,16 @@ class PickResult { this.touchInput = false; /** - * True when snapped to the nearest vertex position. + * True when snapped to nearest edge. * @type {boolean} */ - this.snappedToVertex = false; + this.snappedToEdge = false; /** - * True when snapped to the nearest edge. + * True when snapped to nearest vertex. * @type {boolean} */ - this.snappedToEdge = false; + this.snappedToVertex = false; this._canvasPos = new Int16Array([0, 0]); this._origin = new Float64Array([0, 0, 0]); @@ -10318,8 +10318,8 @@ class PickResult { this._gotWorldNormal = false; this._gotUV = false; this.touchInput = false; - this.snappedToVertex = false; this.snappedToEdge = false; + this.snappedToVertex = false; } } @@ -10493,7 +10493,7 @@ class Program { gl.attachShader(this.handle, this._fragmentShader.handle); gl.linkProgram(this.handle); this.linked = gl.getProgramParameter(this.handle, gl.LINK_STATUS); - // HACK: Disable validation temporarily: https://github.com/xeolabs/xeokit/issues/5 + // HACK: Disable validation temporarily // Perhaps we should defer validation until render-time, when the program has values set for all inputs? this.validated = true; if (!this.linked || !this.validated) { @@ -10918,7 +10918,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]); const POINT_SIZE = 20; const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces -const tempVec3a$D = math.vec3(); +const tempVec3a$C = math.vec3(); /** * Manages occlusion testing. Private member of a Renderer. @@ -11255,7 +11255,7 @@ class OcclusionTester { gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; - gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D)); + gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C)); gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } } @@ -12189,7 +12189,7 @@ class RenderBuffer { read(pickX, pickY, glFormat = null, glType = null, arrayType = Uint8Array, arrayMultiplier = 4) { const x = pickX; - const y = (this.buffer.height || this.gl.drawingBufferHeight) - pickY; + const y = this.buffer.height ? (this.buffer.height - pickY - 1) : (this.gl.drawingBufferHeight - pickY); const pix = new arrayType(arrayMultiplier); const gl = this.gl; gl.readPixels(x, y, 1, 1, glFormat || gl.RGBA, glType || gl.UNSIGNED_BYTE, pix, 0); @@ -13296,10 +13296,10 @@ const Renderer$1 = function (scene, options) { * Picks an Entity. * @private */ - this.pick = (function () { + this.pick = (function () { const tempVec3a = math.vec3(); - const tempMat4a = math.mat4(); + math.mat4(); const tempMat4b = math.mat4(); const randomVec3 = math.vec3(); @@ -13341,13 +13341,11 @@ const Renderer$1 = function (scene, options) { // Picking with arbitrary World-space ray // Align camera along ray and fire ray through center of canvas - - const pickFrustumMatrix = math.frustumMat4(-1, 1, -1, 1, 0.01, scene.camera.project.far, tempMat4a); - + if (params.matrix) { pickViewMatrix = params.matrix; - pickProjMatrix = pickFrustumMatrix; + pickProjMatrix = scene.camera.projMatrix; } else { @@ -13364,7 +13362,7 @@ const Renderer$1 = function (scene, options) { math.cross3Vec3(worldRayDir, randomVec3, up); pickViewMatrix = math.lookAtMat4v(worldRayOrigin, look, up, tempMat4b); - pickProjMatrix = pickFrustumMatrix; + pickProjMatrix = scene.camera.projMatrix; pickResult.origin = worldRayOrigin; pickResult.direction = worldRayDir; @@ -13386,7 +13384,7 @@ const Renderer$1 = function (scene, options) { } } - const pickBuffer = renderBufferManager.getRenderBuffer("pick"); + const pickBuffer = renderBufferManager.getRenderBuffer("pick", { size: [1, 1] }); pickBuffer.bind(); @@ -13448,10 +13446,13 @@ const Renderer$1 = function (scene, options) { frameCtx.pickViewMatrix = pickViewMatrix; frameCtx.pickProjMatrix = pickProjMatrix; frameCtx.pickInvisible = !!params.pickInvisible; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); - - gl.clearColor(0, 0, 0, 0); + gl.viewport(0, 0, 1, 1); + gl.depthMask(true); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); @@ -13484,8 +13485,7 @@ const Renderer$1 = function (scene, options) { } } } - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); let pickID = pix[0] + (pix[1] * 256) + (pix[2] * 256 * 256) + (pix[3] * 256 * 256 * 256); if (pickID < 0) { @@ -13510,8 +13510,12 @@ const Renderer$1 = function (scene, options) { frameCtx.pickViewMatrix = pickViewMatrix; // Can be null frameCtx.pickProjMatrix = pickProjMatrix; // Can be null // frameCtx.pickInvisible = !!params.pickInvisible; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.viewport(0, 0, 1, 1); gl.clearColor(0, 0, 0, 0); gl.enable(gl.DEPTH_TEST); @@ -13521,8 +13525,7 @@ const Renderer$1 = function (scene, options) { pickable.drawPickTriangles(frameCtx); - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); let primIndex = pix[0] + (pix[1] * 256) + (pix[2] * 256 * 256) + (pix[3] * 256 * 256 * 256); @@ -13554,10 +13557,15 @@ const Renderer$1 = function (scene, options) { frameCtx.pickZFar = nearAndFar[1]; frameCtx.pickElementsCount = pickable.pickElementsCount; frameCtx.pickElementsOffset = pickable.pickElementsOffset; - - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; + + gl.viewport(0, 0, 1, 1); gl.clearColor(0, 0, 0, 0); + gl.depthMask(true); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); @@ -13565,8 +13573,7 @@ const Renderer$1 = function (scene, options) { pickable.drawPickDepths(frameCtx); // Draw color-encoded fragment screen-space depths - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); const screenZ = unpackDepth(pix); // Get screen-space Z at the given canvas coords @@ -13615,7 +13622,7 @@ const Renderer$1 = function (scene, options) { })(); function snapInitDepthBuf(frameCtx) { - frameCtx.snapPickLayerParams = {}; + frameCtx.snapPickLayerParams = []; frameCtx.snapPickLayerNumber = 0; for (let type in drawableTypeInfo) { const drawableInfo = drawableTypeInfo[type]; @@ -13633,8 +13640,8 @@ const Renderer$1 = function (scene, options) { } function snapPickDrawSnapDepths(frameCtx) { - frameCtx.snapPickLayerParams = {}; - frameCtx.snapPickLayerNumber = 0; + frameCtx.snapPickLayerParams = frameCtx.snapPickLayerParams || []; + frameCtx.snapPickLayerNumber = frameCtx.snapPickLayerParams.length; for (let type in drawableTypeInfo) { const drawableInfo = drawableTypeInfo[type]; const drawableList = drawableInfo.drawableList; @@ -13660,12 +13667,17 @@ const Renderer$1 = function (scene, options) { /** * @param {[number, number]} canvasPos - * @param {number} snapRadiusInPixels - * @param {"vertex"|"edge"} snapMode + * @param {number} [snapRadiusInPixels=30] + * @param {boolean} [snapToVertex=true] + * @param {boolean} [snapToEdge=true] * - * @returns {{worldPos:number[],snappedWorldPos:null|number[],snappedCanvasPos:null|number[]}} + * @returns {{worldPos:number[],snappedWorldPos:null|number[],snappedCanvasPos:null|number[], snapType:null|"vertex"|"edge"}} */ - this.snapPick = function (canvasPos, snapRadiusInPixels = 50, snapMode = "vertex") { + this.snapPick = function (canvasPos, snapRadiusInPixels = 30, snapToVertex = true, snapToEdge = true) { + + if (!snapToVertex && !snapToEdge) { + return this.pick({canvasPos, pickSurface: true}); + } frameCtx.reset(); frameCtx.backfaces = true; @@ -13691,8 +13703,6 @@ const Renderer$1 = function (scene, options) { gl.drawingBufferHeight / (2 * snapRadiusInPixels), ]; - frameCtx.snapMode = snapMode; - // Bind and clear the snap render target vertexPickBuffer.bind(gl.RGBA32I); @@ -13729,7 +13739,26 @@ const Renderer$1 = function (scene, options) { const layerParamsSurface = snapInitDepthBuf(frameCtx); // b) snap-pick - const layerParamsSnap = snapPickDrawSnapDepths(frameCtx); + const layerParamsSnap = []; + frameCtx.snapPickLayerParams = layerParamsSnap; + + gl.depthMask(false); + + if (snapToVertex && snapToEdge) { + frameCtx.snapMode = "edge"; + snapPickDrawSnapDepths(frameCtx); + + frameCtx.snapMode = "vertex"; + frameCtx.snapPickLayerNumber++; + + snapPickDrawSnapDepths(frameCtx); + } else { + frameCtx.snapMode = snapToVertex ? "vertex" : "edge"; + + snapPickDrawSnapDepths(frameCtx); + } + + gl.depthMask(true); // Read and decode the snapped coordinates @@ -13747,7 +13776,7 @@ const Renderer$1 = function (scene, options) { const pickResultMiddleXY = snapPickResultArray.slice(middleIndex, middleIndex + 4); if (pickResultMiddleXY[3] !== 0) { - const pickedLayerParmasSurface = layerParamsSurface[Math.abs(pickResultMiddleXY[3])]; + const pickedLayerParmasSurface = layerParamsSurface[Math.abs(pickResultMiddleXY[3]) % layerParamsSurface.length]; const origin = pickedLayerParmasSurface.origin; const scale = pickedLayerParmasSurface.coordinateScale; worldPos = [ @@ -13765,7 +13794,6 @@ const Renderer$1 = function (scene, options) { if (snapPickResultArray[i + 3] > 0) { const pixelNumber = Math.floor(i / 4); const w = vertexPickBuffer.size[0]; - vertexPickBuffer.size[1]; const x = pixelNumber % w - Math.floor(w / 2); const y = Math.floor(pixelNumber / w) - Math.floor(w / 2); const dist = (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))); @@ -13773,6 +13801,7 @@ const Renderer$1 = function (scene, options) { x, y, dist, + isVertex: snapToVertex && snapToEdge ? snapPickResultArray[i + 3] > layerParamsSnap.length / 2 : snapToVertex, result: [ snapPickResultArray[i + 0], snapPickResultArray[i + 1], @@ -13784,12 +13813,19 @@ const Renderer$1 = function (scene, options) { } let snappedWorldPos = null; + let snapType = null; if (snapPickResult.length > 0) { + // vertex snap first, then edge snap snapPickResult.sort((a, b) => { - return a.dist - b.dist + if (a.isVertex !== b.isVertex) { + return a.isVertex ? -1 : 1; + } else { + return a.dist - b.dist; + } }); + snapType = snapPickResult[0].isVertex ? "vertex" : "edge"; snapPickResult = snapPickResult[0].result; const pickedLayerParmas = layerParamsSnap[snapPickResult[3]]; @@ -13815,6 +13851,9 @@ const Renderer$1 = function (scene, options) { } return { + snapType, + snappedToVertex: snapType === "vertex", + snappedToEdge: snapType === "edge", worldPos, snappedWorldPos, snappedCanvasPos @@ -13835,21 +13874,34 @@ const Renderer$1 = function (scene, options) { frameCtx.pickOrigin = pickResult.origin; frameCtx.pickViewMatrix = pickViewMatrix; frameCtx.pickProjMatrix = pickProjMatrix; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + const pickNormalBuffer = renderBufferManager.getRenderBuffer("pick-normal", { size: [3, 3] }); + + pickNormalBuffer.bind(gl.RGBA32I); + + gl.viewport(0, 0, pickNormalBuffer.size[0], pickNormalBuffer.size[1]); - gl.clearColor(0, 0, 0, 0); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + gl.clear(gl.DEPTH_BUFFER_BIT); + gl.clearBufferiv(gl.COLOR, 0, new Int32Array([0, 0, 0, 0])); pickable.drawPickNormals(frameCtx); // Draw color-encoded fragment World-space normals - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickNormalBuffer.read(1, 1, gl.RGBA_INTEGER, gl.INT, Int32Array, 4); + + pickNormalBuffer.unbind(); - const worldNormal = [(pix[0] / 256.0) - 0.5, (pix[1] / 256.0) - 0.5, (pix[2] / 256.0) - 0.5]; + const worldNormal = [ + pix[0] / math.MAX_INT, + pix[1] / math.MAX_INT, + pix[2] / math.MAX_INT, + ]; math.normalizeVec3(worldNormal); @@ -16639,10 +16691,10 @@ class CustomProjection extends Component { } const tempVec3$7 = math.vec3(); -const tempVec3b$q = math.vec3(); -const tempVec3c$m = math.vec3(); -const tempVec3d$g = math.vec3(); -const tempVec3e$8 = math.vec3(); +const tempVec3b$r = math.vec3(); +const tempVec3c$n = math.vec3(); +const tempVec3d$h = math.vec3(); +const tempVec3e$4 = math.vec3(); const tempVec3f$2 = math.vec3(); const tempVec4a$d = math.vec4(); const tempVec4b$c = math.vec4(); @@ -16952,9 +17004,9 @@ class Camera extends Component { orbitYaw(angleInc) { let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$7); math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat); - lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q); - this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector - this.up = math.transformPoint3(tempMat, this._up, tempVec3d$g); // Rotate 'up' vector + lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$r); + this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$n); // Set eye position as 'look' plus 'eye' vector + this.up = math.transformPoint3(tempMat, this._up, tempVec3d$h); // Rotate 'up' vector } /** @@ -16970,10 +17022,10 @@ class Camera extends Component { } } let eye2 = math.subVec3(this._eye, this._look, tempVec3$7); - const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m)); + const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$r), math.normalizeVec3(this._up, tempVec3c$n)); math.rotationMat4v(angleInc * 0.0174532925, left, tempMat); - eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$g); - this.up = math.transformPoint3(tempMat, this._up, tempVec3e$8); + eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$h); + this.up = math.transformPoint3(tempMat, this._up, tempVec3e$4); this.eye = math.addVec3(eye2, this._look, tempVec3f$2); } @@ -16985,10 +17037,10 @@ class Camera extends Component { yaw(angleInc) { let look2 = math.subVec3(this._look, this._eye, tempVec3$7); math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat); - look2 = math.transformPoint3(tempMat, look2, tempVec3b$q); - this.look = math.addVec3(look2, this._eye, tempVec3c$m); + look2 = math.transformPoint3(tempMat, look2, tempVec3b$r); + this.look = math.addVec3(look2, this._eye, tempVec3c$n); if (this._gimbalLock) { - this.up = math.transformPoint3(tempMat, this._up, tempVec3d$g); + this.up = math.transformPoint3(tempMat, this._up, tempVec3d$h); } } @@ -17005,11 +17057,11 @@ class Camera extends Component { } } let look2 = math.subVec3(this._look, this._eye, tempVec3$7); - const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m)); + const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$r), math.normalizeVec3(this._up, tempVec3c$n)); math.rotationMat4v(angleInc * 0.0174532925, left, tempMat); this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2); - look2 = math.transformPoint3(tempMat, look2, tempVec3d$g); - this.look = math.addVec3(look2, this._eye, tempVec3e$8); + look2 = math.transformPoint3(tempMat, look2, tempVec3d$h); + this.look = math.addVec3(look2, this._eye, tempVec3e$4); } /** @@ -17022,25 +17074,25 @@ class Camera extends Component { const vec = [0, 0, 0]; let v; if (pan[0] !== 0) { - const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$q)); + const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$r)); v = math.mulVec3Scalar(left, pan[0]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } if (pan[1] !== 0) { - v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]); + v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$n), pan[1]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } if (pan[2] !== 0) { - v = math.mulVec3Scalar(math.normalizeVec3(eye2, tempVec3d$g), pan[2]); + v = math.mulVec3Scalar(math.normalizeVec3(eye2, tempVec3d$h), pan[2]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } - this.eye = math.addVec3(this._eye, vec, tempVec3e$8); + this.eye = math.addVec3(this._eye, vec, tempVec3e$4); this.look = math.addVec3(this._look, vec, tempVec3f$2); } @@ -17051,13 +17103,13 @@ class Camera extends Component { */ zoom(delta) { const vec = math.subVec3(this._eye, this._look, tempVec3$7); - const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$q)); + const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$r)); const newLenLook = Math.abs(lenLook + delta); if (newLenLook < 0.5) { return; } - const dir = math.normalizeVec3(vec, tempVec3c$m); - this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$g); + const dir = math.normalizeVec3(vec, tempVec3c$n); + this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$h); } /** @@ -22720,116 +22772,6 @@ class LinesMaterial extends Material { } } -const tempVec3a$C = math.vec3(); -const tempVec3b$p = math.vec3(); -const tempMat4a$g = math.mat4(); - -/** - * @private - */ -class FrustumPlane { - - constructor() { - this.normal = math.vec3(); - this.offset = 0; - this.testVertex = math.vec3(); - } - - set(nx, ny, nz, offset) { - const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz); - this.normal[0] = nx * s; - this.normal[1] = ny * s; - this.normal[2] = nz * s; - this.offset = offset * s; - this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0; - this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0; - this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0; - } -} - -/** - * @private - */ -class Frustum { - constructor() { - this.planes = [ - new FrustumPlane(), new FrustumPlane(), new FrustumPlane(), - new FrustumPlane(), new FrustumPlane(), new FrustumPlane() - ]; - } -} - -Frustum.INSIDE = 0; -Frustum.INTERSECT = 1; -Frustum.OUTSIDE = 2; - -/** @private */ -function setFrustum(frustum, viewMat, projMat) { - - const m = math.mulMat4(projMat, viewMat, tempMat4a$g); - - const m0 = m[0]; - const m1 = m[1]; - const m2 = m[2]; - const m3 = m[3]; - const m4 = m[4]; - const m5 = m[5]; - const m6 = m[6]; - const m7 = m[7]; - const m8 = m[8]; - const m9 = m[9]; - const m10 = m[10]; - const m11 = m[11]; - const m12 = m[12]; - const m13 = m[13]; - const m14 = m[14]; - const m15 = m[15]; - - frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12); - frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12); - frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13); - frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13); - frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14); - frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14); -} - -/** @private */ -function frustumIntersectsAABB3(frustum, aabb) { - - let ret = Frustum.INSIDE; - - const min = tempVec3a$C; - const max = tempVec3b$p; - - min[0] = aabb[0]; - min[1] = aabb[1]; - min[2] = aabb[2]; - max[0] = aabb[3]; - max[1] = aabb[4]; - max[2] = aabb[5]; - - const bminmax = [min, max]; - - for (let i = 0; i < 6; ++i) { - const plane = frustum.planes[i]; - if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) + - (plane.normal[1] * bminmax[plane.testVertex[1]][1]) + - (plane.normal[2] * bminmax[plane.testVertex[2]][2]) + - (plane.offset)) < 0.0) { - return Frustum.OUTSIDE; - } - - if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) + - (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) + - (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) + - (plane.offset)) < 0.0) { - ret = Frustum.INTERSECT; - } - } - - return ret; -} - /** * Data structure containing pre-initialized `LOD` data. * @@ -22838,6 +22780,18 @@ function frustumIntersectsAABB3(frustum, aabb) { * @private */ + +const neverCullTypes = { + "IfcWall": true, + "IfcSlab": true, + "IfcFloor": true, + "IfcRoof": true, + "IfcSpace": true, + "IfcBeam": true, + "IfcStair": true, + "IfcPlate":true +}; + class LODState { /** @@ -22919,19 +22873,24 @@ class LODState { if (entityList.length === 0) { return; } + const metaScene = sceneModel.scene.viewer.metaScene; const entitiesInLOD = {}; const primCountInLOD = {}; + const maxSize = 20; + const minComplexity = 25; for (let i = 0, len = entityList.length; i < len; i++) { const entity = entityList[i]; - entity.numPrimitives; - math.getAABB3Diag(entity.aabb); -// // const isCullable = ((minComplexity <= entityComplexity) && (entitySize <= maxSize)); -// const isCullable = ( (entitySize <= maxSize)); -// -// if (!isCullable) { -// continue; -// } + const metaObject = metaScene.metaObjects[entity.id]; + if (metaObject && neverCullTypes[metaObject.type]) { + continue; + } + const entityComplexity = entity.numPrimitives; + const entitySize = math.getAABB3Diag(entity.aabb); + const isCullable = ((minComplexity <= entityComplexity) && (entitySize <= maxSize)); + if (!isCullable) { + continue; + } let lodLevel = 0, len; for (lodLevel = 0, len = this.primLODLevels.length; lodLevel < len; lodLevel++) { if (entity.numPrimitives >= this.primLODLevels [lodLevel]) { @@ -22976,7 +22935,6 @@ class LODCullingManager { } const entitiesInLOD = lodState.entitiesInLOD [lodState.primLODLevels[lodState.lodLevelIndex]] || []; for (let i = 0, len = entitiesInLOD.length; i < len; i++) { - entitiesInLOD[i].culledLOD = true; } lodState.lodLevelIndex++; @@ -23012,12 +22970,12 @@ class LODCullingManager { let lodState = this.lodState; let retVal = false; if (currentFPS < lodState.targetFps) { - if (++lodState.consecutiveFramesWithoutTargetFps > 0) { + if (++lodState.consecutiveFramesWithoutTargetFps > 5) { lodState.consecutiveFramesWithoutTargetFps = 0; retVal = this._increaseLODLevelIndex(); } } else if (currentFPS > (lodState.targetFps + 4)) { - if (++lodState.consecutiveFramesWithTargetFps > 1) { + if (++lodState.consecutiveFramesWithTargetFps > 5) { lodState.consecutiveFramesWithTargetFps = 0; retVal = this._decreaseLODLevelIndex(); } @@ -23165,6 +23123,32 @@ class LOD extends Component { return this._targetFPS; } + /** + * Sets the {@link MetaObject} types that are never culled. + * + * Default value is ````[]````. + * + * @type {string[]} + */ + set neverCullTypes(value) { + if (value === undefined || value === null) { + value = []; + } + this._neverCullTypes = value; + // this.glRedraw(); + } + + /** + * Gets the {@link MetaObject} types that are never culled. + * + * Default value is ````[]````. + * + * @type {string[]} + */ + get neverCullTypes() { + return this._neverCullTypes; + } + /** * Called within SceneModel constructors * @private @@ -27243,13 +27227,15 @@ class Scene extends Component { * @param {Object} params Picking parameters. * @param {Number[]} [params.canvasPos] Canvas-space coordinates. When ray-picking, this will override the **origin** and ** direction** parameters and will cause the ray to be fired through the canvas at this position, directly along the negative View-space Z-axis. * @param {Number} [params.snapRadius=30] The snap radius, in canvas pixels - * @param {"vertex"|"edge"} [params.snapMode="vertex"] Whether to snap to vertex or edge. + * @param {boolean} [params.snapToVertex=true] Whether to snap to vertex. + * @param {boolean} [params.snapToEdge=true] Whether to snap to edge. */ snapPick(params) { return this._renderer.snapPick( params.canvasPos, params.snapRadius || 30, - params.snapMode || "vertex" + params.snapToVertex, + params.snapToEdge, ); } @@ -31503,6 +31489,16 @@ function buildVertex$3(mesh) { src.push(" mat[2][2] =1.0;"); src.push("}"); } + + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(" clipPos.xy -= pickClipPos;"); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("void main(void) {"); src.push("vec4 localPosition = vec4(position, 1.0); "); if (quantizedGeometry) { @@ -31529,7 +31525,7 @@ function buildVertex$3(mesh) { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); return src; } @@ -31732,6 +31728,8 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) { const r = pickID & 0xFF; gl.uniform4f(this._uPickColor, r / 255, g / 255, b / 255, a / 255); + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + if (geometryState.indicesBuf) { gl.drawElements(geometryState.primitive, geometryState.indicesBuf.numItems, geometryState.indicesBuf.itemType, 0); frameCtx.drawElements++; @@ -31765,6 +31763,7 @@ PickMeshRenderer.prototype._allocate = function (mesh) { this._aPosition = program.getAttribute("position"); this._uClippable = program.getLocation("clippable"); this._uPickColor = program.getLocation("pickColor"); + this._uPickClipPos = program.getLocation("pickClipPos"); this._uOffset = program.getLocation("offset"); if (scene.logarithmicDepthBufferEnabled ) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); @@ -31802,8 +31801,6 @@ function buildVertex$2(mesh) { const scene = mesh.scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; const quantizedGeometry = !!mesh._geometry._state.compressGeometry; - mesh._state.billboard; - mesh._state.stationary; const src = []; src.push('#version 300 es'); src.push("// Surface picking vertex shader"); @@ -31825,6 +31822,16 @@ function buildVertex$2(mesh) { src.push("}"); src.push("out float isPerspective;"); } + + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(" clipPos.xy -= pickClipPos;"); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("out vec4 vColor;"); if (quantizedGeometry) { src.push("uniform mat4 positionsDecodeMatrix;"); @@ -31846,7 +31853,7 @@ function buildVertex$2(mesh) { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); return src; } @@ -32039,6 +32046,9 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) { } else { this._aPosition.bindArrayBuffer(positionsBuf); } + + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + pickColorsBuf.bind(); gl.enableVertexAttribArray(this._aColor.location); gl.vertexAttribPointer(this._aColor.location, pickColorsBuf.itemSize, pickColorsBuf.itemType, true, 0, 0); // Normalize @@ -32070,6 +32080,7 @@ PickTriangleRenderer.prototype._allocate = function (mesh) { } this._aPosition = program.getAttribute("position"); this._aColor = program.getAttribute("color"); + this._uPickClipPos = program.getLocation("pickClipPos"); this._uClippable = program.getLocation("clippable"); this._uOffset = program.getLocation("offset"); if (scene.logarithmicDepthBufferEnabled ) { @@ -40503,8 +40514,8 @@ class LineSet extends Component { const tempVec3$5 = math.vec3(); const tempVec3a$v = math.vec3(); -const tempVec3b$o = math.vec3(); -const tempVec3c$l = math.vec3(); +const tempVec3b$q = math.vec3(); +const tempVec3c$m = math.vec3(); /** * {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects. @@ -41129,7 +41140,7 @@ class BCFViewpointsPlugin extends Plugin { scene.clearSectionPlanes(); - if (bcfViewpoint.clipping_planes) { + if (bcfViewpoint.clipping_planes && bcfViewpoint.clipping_planes.length > 0) { bcfViewpoint.clipping_planes.forEach(function (e) { let pos = xyzObjectToArray(e.location, tempVec3$5); let dir = xyzObjectToArray(e.direction, tempVec3$5); @@ -41149,7 +41160,7 @@ class BCFViewpointsPlugin extends Plugin { scene.clearLines(); - if (bcfViewpoint.lines) { + if (bcfViewpoint.lines && bcfViewpoint.lines.length > 0) { const positions = []; const indices = []; let i = 0; @@ -41179,13 +41190,13 @@ class BCFViewpointsPlugin extends Plugin { scene.clearBitmaps(); - if (bcfViewpoint.bitmaps) { + if (bcfViewpoint.bitmaps && bcfViewpoint.bitmaps.length > 0) { bcfViewpoint.bitmaps.forEach(function (e) { const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png" const bitmap_data = e.bitmap_data; // base64 let location = xyzObjectToArray(e.location, tempVec3a$v); - let normal = xyzObjectToArray(e.normal, tempVec3b$o); - let up = xyzObjectToArray(e.up, tempVec3c$l); + let normal = xyzObjectToArray(e.normal, tempVec3b$q); + let up = xyzObjectToArray(e.up, tempVec3c$m); let height = e.height || 1; if (!bitmap_type) { return; @@ -41448,6 +41459,428 @@ function colorizeToRGB(color) { math.vec3(); +/** + * {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching + * the Viewer to faster, lower-quality rendering modes whenever we interact. + * + * [](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin) + * + * FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas + * resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those + * rendering features and the original canvas scale, after a configured delay. + * + * Depending on how we configure FastNavPlugin, we essentially switch to a smooth-rendering low-quality view while + * interacting, then return to the normal higher-quality view after we stop, following an optional delay. + * + * Down-scaling the canvas resolution gives particularly good results. For example, scaling by ````0.5```` means that + * we're rendering a quarter of the pixels while interacting, which can make the Viewer noticeably smoother with big models. + * + * The screen capture above shows FastNavPlugin in action. In this example, whenever we move the Camera or resize the Canvas, + * FastNavPlugin switches off enhanced edges and ambient shadows (SAO), and down-scales the canvas, making it slightly + * blurry. When ````0.5```` seconds passes with no interaction, the plugin shows edges and SAO again, and restores the + * original canvas scale. + * + * # Usage + * + * In the example below, we'll create a {@link Viewer}, add a {@link FastNavPlugin}, then use an {@link XKTLoaderPlugin} to load a model. + * + * Whenever we interact with the Viewer, our FastNavPlugin will: + * + * * hide edges, + * * hide ambient shadows (SAO), + * * hide physically-based materials (switching to non-PBR), + * * hide transparent objects, and + * * scale the canvas resolution by 0.5, causing the GPU to render 75% less pixels. + *
+ * + * We'll also configure a 0.5 second delay before we transition back to high-quality each time we stop ineracting, so that we're + * not continually flipping between low and high quality as we interact. Since we're only rendering ambient shadows when not interacting, we'll also treat ourselves + * to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect. + * + * * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin)] + * + * ````javascript + * import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js"; + * + * // Create a Viewer with PBR and SAO enabled + * + * const viewer = new Viewer({ + * canvasId: "myCanvas", + * transparent: true, + * pbr: true, // Enable physically-based rendering for Viewer + * sao: true // Enable ambient shadows for Viewer + * }); + * + * viewer.scene.camera.eye = [-66.26, 105.84, -281.92]; + * viewer.scene.camera.look = [42.45, 49.62, -43.59]; + * viewer.scene.camera.up = [0.05, 0.95, 0.15]; + * + * // Higher-quality SAO settings + * + * viewer.scene.sao.enabled = true; + * viewer.scene.sao.numSamples = 60; + * viewer.scene.sao.kernelRadius = 170; + * + * // Install a FastNavPlugin + * + * new FastNavPlugin(viewer, { + * hideEdges: true, // Don't show edges while we interact (default is true) + * hideSAO: true, // Don't show ambient shadows while we interact (default is true) + * hideColorTexture: true, // No color textures while we interact (default is true) + * hidePBR: true, // No physically-based rendering while we interact (default is true) + * hideTransparentObjects: true, // Hide transparent objects while we interact (default is false) + * scaleCanvasResolution: true, // Scale canvas resolution while we interact (default is false) + * scaleCanvasResolutionFactor: 0.5, // Factor by which we scale canvas resolution when we interact (default is 0.6) + * delayBeforeRestore: true, // When we stop interacting, delay before restoring normal render (default is true) + * delayBeforeRestoreSeconds: 0.5 // The delay duration, in seconds (default is 0.5) + * }); + * + * // Load a BIM model from XKT + * + * const xktLoader = new XKTLoaderPlugin(viewer); + * + * const model = xktLoader.load({ + * id: "myModel", + * src: "./models/xkt/HolterTower.xkt", + * sao: true, // Enable ambient shadows for this model + * pbr: true // Enable physically-based rendering for this model + * }); + * ```` + * + * @class FastNavPlugin + */ +class FastNavPlugin extends Plugin { + + /** + * @constructor + * @param {Viewer} viewer The Viewer. + * @param {Object} cfg FastNavPlugin configuration. + * @param {String} [cfg.id="FastNav"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. + * @param {Boolean} [cfg.hideColorTexture=true] Whether to temporarily hide color textures whenever we interact with the Viewer. + * @param {Boolean} [cfg.hidePBR=true] Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideSAO=true] Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideEdges=true] Whether to temporarily hide edges whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideTransparentObjects=false] Whether to temporarily hide transparent objects whenever we interact with the Viewer. + * @param {Number} [cfg.scaleCanvasResolution=false] Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. + * @param {Number} [cfg.scaleCanvasResolutionFactor=0.6] The factor by which we downscale the canvas resolution whenever we interact with the Viewer. + * @param {Boolean} [cfg.delayBeforeRestore=true] Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. + * @param {Number} [cfg.delayBeforeRestoreSeconds=0.5] Delay in seconds before restoring normal rendering after we stop interacting with the Viewer. + */ + constructor(viewer, cfg = {}) { + + super("FastNav", viewer); + + this._hideColorTexture = cfg.hideColorTexture !== false; + this._hidePBR = cfg.hidePBR !== false; + this._hideSAO = cfg.hideSAO !== false; + this._hideEdges = cfg.hideEdges !== false; + this._hideTransparentObjects = !!cfg.hideTransparentObjects; + this._scaleCanvasResolution = !!cfg.scaleCanvasResolution; + this._scaleCanvasResolutionFactor = cfg.scaleCanvasResolutionFactor || 0.6; + this._delayBeforeRestore = (cfg.delayBeforeRestore !== false); + this._delayBeforeRestoreSeconds = cfg.delayBeforeRestoreSeconds || 0.5; + + let timer = this._delayBeforeRestoreSeconds * 1000; + let fastMode = false; + + const switchToLowQuality = () => { + timer = (this._delayBeforeRestoreSeconds * 1000); + if (!fastMode) { + viewer.scene._renderer.setColorTextureEnabled(!this._hideColorTexture); + viewer.scene._renderer.setPBREnabled(!this._hidePBR); + viewer.scene._renderer.setSAOEnabled(!this._hideSAO); + viewer.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects); + viewer.scene._renderer.setEdgesEnabled(!this._hideEdges); + if (this._scaleCanvasResolution) { + viewer.scene.canvas.resolutionScale = this._scaleCanvasResolutionFactor; + } else { + viewer.scene.canvas.resolutionScale = 1; + } + fastMode = true; + } + }; + + const switchToHighQuality = () => { + viewer.scene.canvas.resolutionScale = 1; + viewer.scene._renderer.setEdgesEnabled(true); + viewer.scene._renderer.setColorTextureEnabled(true); + viewer.scene._renderer.setPBREnabled(true); + viewer.scene._renderer.setSAOEnabled(true); + viewer.scene._renderer.setTransparentEnabled(true); + fastMode = false; + }; + + this._onCanvasBoundary = viewer.scene.canvas.on("boundary", switchToLowQuality); + this._onCameraMatrix = viewer.scene.camera.on("matrix", switchToLowQuality); + + this._onSceneTick = viewer.scene.on("tick", (tickEvent) => { + if (!fastMode) { + return; + } + timer -= tickEvent.deltaTime; + if ((!this._delayBeforeRestore) || timer <= 0) { + switchToHighQuality(); + } + }); + + let down = false; + + this._onSceneMouseDown = viewer.scene.input.on("mousedown", () => { + down = true; + }); + + this._onSceneMouseUp = viewer.scene.input.on("mouseup", () => { + down = false; + }); + + this._onSceneMouseMove = viewer.scene.input.on("mousemove", () => { + if (!down) { + return; + } + switchToLowQuality(); + }); + } + + /** + * Gets whether to temporarily hide color textures whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding color textures. + */ + get hideColorTexture() { + return this._hideColorTexture; + } + + /** + * Sets whether to temporarily hide color textures whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideColorTexture ````true```` to hide color textures. + */ + set hideColorTexture(hideColorTexture) { + this._hideColorTexture = hideColorTexture; + } + + /** + * Gets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding PBR. + */ + get hidePBR() { + return this._hidePBR; + } + + /** + * Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hidePBR ````true```` to hide PBR. + */ + set hidePBR(hidePBR) { + this._hidePBR = hidePBR; + } + + /** + * Gets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding SAO. + */ + get hideSAO() { + return this._hideSAO; + } + + /** + * Sets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideSAO ````true```` to hide SAO. + */ + set hideSAO(hideSAO) { + this._hideSAO = hideSAO; + } + + /** + * Gets whether to temporarily hide edges whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding edges. + */ + get hideEdges() { + return this._hideEdges; + } + + /** + * Sets whether to temporarily hide edges whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideEdges ````true```` to hide edges. + */ + set hideEdges(hideEdges) { + this._hideEdges = hideEdges; + } + + /** + * Gets whether to temporarily hide transparent objects whenever we interact with the Viewer. + * + * Does not hide X-rayed, selected, highlighted objects. + * + * Default is ````false````. + * + * @return {Boolean} ````true```` if hiding transparent objects. + */ + get hideTransparentObjects() { + return this._hideTransparentObjects + } + + /** + * Sets whether to temporarily hide transparent objects whenever we interact with the Viewer. + * + * Does not hide X-rayed, selected, highlighted objects. + * + * Default is ````false````. + * + * @param {Boolean} hideTransparentObjects ````true```` to hide transparent objects. + */ + set hideTransparentObjects(hideTransparentObjects) { + this._hideTransparentObjects = (hideTransparentObjects !== false); + } + + /** + * Gets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. + * + * Default is ````false````. + * + * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. + * + * @return {Boolean} ````true```` if scaling the canvas resolution. + */ + get scaleCanvasResolution() { + return this._scaleCanvasResolution; + } + + /** + * Sets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. + * + * Default is ````false````. + * + * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. + * + * @param {Boolean} scaleCanvasResolution ````true```` to scale the canvas resolution. + */ + set scaleCanvasResolution(scaleCanvasResolution) { + this._scaleCanvasResolution = scaleCanvasResolution; + } + + /** + * Gets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. + * + * Default is ````0.6````. + * + * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. + * + * @return {Number} Factor by which we scale the canvas resolution. + */ + get scaleCanvasResolutionFactor() { + return this._scaleCanvasResolutionFactor; + } + + /** + * Sets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. + * + * Accepted range is ````[0.0 .. 1.0]````. + * + * Default is ````0.6````. + * + * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. + * + * @param {Number} scaleCanvasResolutionFactor Factor by which we scale the canvas resolution. + */ + set scaleCanvasResolutionFactor(scaleCanvasResolutionFactor) { + this._scaleCanvasResolutionFactor = scaleCanvasResolutionFactor || 0.6; + } + + /** + * Gets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. + * + * Default is ````true````. + * + * @return {Boolean} Whether to have a delay. + */ + get delayBeforeRestore() { + return this._delayBeforeRestore; + } + + /** + * Sets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. + * + * Default is ````true````. + * + * @param {Boolean} delayBeforeRestore Whether to have a delay. + */ + set delayBeforeRestore(delayBeforeRestore) { + this._delayBeforeRestore = delayBeforeRestore; + } + + /** + * Gets the delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. + * + * Default is ````0.5```` seconds. + * + * @return {Number} Delay in seconds. + */ + get delayBeforeRestoreSeconds() { + return this._delayBeforeRestoreSeconds; + } + + /** + * Sets the delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. + * + * Default is ````0.5```` seconds. + * + * @param {Number} delayBeforeRestoreSeconds Delay in seconds. + */ + set delayBeforeRestoreSeconds(delayBeforeRestoreSeconds) { + this._delayBeforeRestoreSeconds = delayBeforeRestoreSeconds !== null && delayBeforeRestoreSeconds !== undefined ? delayBeforeRestoreSeconds : 0.5; + } + + /** + * @private + */ + send(name, value) { + } + + /** + * Destroys this plugin. + */ + destroy() { + this.viewer.scene.camera.off(this._onCameraMatrix); + this.viewer.scene.canvas.off(this._onCanvasBoundary); + this.viewer.scene.input.off(this._onSceneMouseDown); + this.viewer.scene.input.off(this._onSceneMouseUp); + this.viewer.scene.input.off(this._onSceneMouseMove); + this.viewer.scene.off(this._onSceneTick); + super.destroy(); + } +} + /** * @desc Localization service for a {@link Viewer}. * @@ -42911,6 +43344,116 @@ math.vec3(); math.vec3([0, -1, 0]); math.vec4([0, 0, 0, 1]); +const tempVec3a$t = math.vec3(); +const tempVec3b$o = math.vec3(); +const tempMat4a$h = math.mat4(); + +/** + * @private + */ +class FrustumPlane { + + constructor() { + this.normal = math.vec3(); + this.offset = 0; + this.testVertex = math.vec3(); + } + + set(nx, ny, nz, offset) { + const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz); + this.normal[0] = nx * s; + this.normal[1] = ny * s; + this.normal[2] = nz * s; + this.offset = offset * s; + this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0; + this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0; + this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0; + } +} + +/** + * @private + */ +class Frustum { + constructor() { + this.planes = [ + new FrustumPlane(), new FrustumPlane(), new FrustumPlane(), + new FrustumPlane(), new FrustumPlane(), new FrustumPlane() + ]; + } +} + +Frustum.INSIDE = 0; +Frustum.INTERSECT = 1; +Frustum.OUTSIDE = 2; + +/** @private */ +function setFrustum(frustum, viewMat, projMat) { + + const m = math.mulMat4(projMat, viewMat, tempMat4a$h); + + const m0 = m[0]; + const m1 = m[1]; + const m2 = m[2]; + const m3 = m[3]; + const m4 = m[4]; + const m5 = m[5]; + const m6 = m[6]; + const m7 = m[7]; + const m8 = m[8]; + const m9 = m[9]; + const m10 = m[10]; + const m11 = m[11]; + const m12 = m[12]; + const m13 = m[13]; + const m14 = m[14]; + const m15 = m[15]; + + frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12); + frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12); + frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13); + frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13); + frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14); + frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14); +} + +/** @private */ +function frustumIntersectsAABB3(frustum, aabb) { + + let ret = Frustum.INSIDE; + + const min = tempVec3a$t; + const max = tempVec3b$o; + + min[0] = aabb[0]; + min[1] = aabb[1]; + min[2] = aabb[2]; + max[0] = aabb[3]; + max[1] = aabb[4]; + max[2] = aabb[5]; + + const bminmax = [min, max]; + + for (let i = 0; i < 6; ++i) { + const plane = frustum.planes[i]; + if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) + + (plane.normal[1] * bminmax[plane.testVertex[1]][1]) + + (plane.normal[2] * bminmax[plane.testVertex[2]][2]) + + (plane.offset)) < 0.0) { + return Frustum.OUTSIDE; + } + + if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) + + (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) + + (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) + + (plane.offset)) < 0.0) { + ret = Frustum.INTERSECT; + } + } + + return ret; +} + const color$3 = math.vec3(); /** @@ -43431,10 +43974,9 @@ const defaultColor$2 = new Float32Array([1, 1, 1, 1]); const edgesDefaultColor = new Float32Array([0, 0, 0, 1]); const tempVec4 = math.vec4(); -const tempVec3a$t = math.vec3(); -math.vec3(); -const tempVec3c$k = math.vec3(); -const tempMat4a$f = math.mat4(); +const tempVec3a$s = math.vec3(); +const tempVec3c$l = math.vec3(); +const tempMat4a$g = math.mat4(); class VBOSceneModelRenderer { constructor(scene, withSAO = false, {instancing = false, edges = false} = {}) { @@ -43505,6 +44047,23 @@ class VBOSceneModelRenderer { return src; } + _addRemapClipPosLines(src, viewportSize = 1) { + src.push("uniform vec2 drawingBufferSize;"); + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + if (viewportSize === 1) { + src.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"); + } else { + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${viewportSize}));`); + } + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + return src; + } + getValid() { return this._hash === this._getHash(); } @@ -43528,7 +44087,7 @@ class VBOSceneModelRenderer { const sectionPlane = sectionPlanes[sectionPlaneIndex]; const origin = layer._state.origin; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -43638,6 +44197,8 @@ class VBOSceneModelRenderer { this._aPickColor = program.getAttribute("pickColor"); this._uPickZNear = program.getLocation("pickZNear"); this._uPickZFar = program.getLocation("pickZFar"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uColorMap = "uColorMap"; this._uMetallicRoughMap = "uMetallicRoughMap"; @@ -43678,7 +44239,6 @@ class VBOSceneModelRenderer { const program = this._program; const lightsState = scene._lightsState; const lights = lightsState.lights; - const project = scene.camera.project; program.bind(); @@ -43688,6 +44248,10 @@ class VBOSceneModelRenderer { gl.uniform4fv(this._uLightAmbient, lightsState.getAmbientColorAndIntensity()); } + if (this._uGammaFactor) { + gl.uniform1f(this._uGammaFactor, scene.gammaFactor); + } + for (let i = 0, len = lights.length; i < len; i++) { const light = lights[i]; @@ -43705,43 +44269,6 @@ class VBOSceneModelRenderer { gl.uniform3fv(this._uLightDir[i], light.dir); } } - - if (this._withSAO) { - const sao = scene.sao; - const saoEnabled = sao.possible; - if (saoEnabled) { - const viewportWidth = gl.drawingBufferWidth; - const viewportHeight = gl.drawingBufferHeight; - tempVec4[0] = viewportWidth; - tempVec4[1] = viewportHeight; - tempVec4[2] = sao.blendCutoff; - tempVec4[3] = sao.blendFactor; - gl.uniform4fv(this._uSAOParams, tempVec4); - this._program.bindTexture(this._uOcclusionTexture, frameCtx.occlusionTexture, 0); - } - } - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(project.far + 1.0) / Math.LN2); - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } - - if (this._uGammaFactor) { - gl.uniform1f(this._uGammaFactor, scene.gammaFactor); - } - - if (this._uPickInvisible) { - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - } - - - if (this._uShadowViewMatrix) { - gl.uniformMatrix4fv(this._uShadowViewMatrix, false, frameCtx.shadowViewMatrix); - } - - if (this._uShadowProjMatrix) { - gl.uniformMatrix4fv(this._uShadowProjMatrix, false, frameCtx.shadowProjMatrix); - } } _makeVAO(state) { @@ -43773,14 +44300,14 @@ class VBOSceneModelRenderer { } - this._aPosition.bindArrayBuffer(this._instancing ? state.positionsBuf : state.positionsBuf); + this._aPosition.bindArrayBuffer(state.positionsBuf); if (this._aUV) { - this._aUV.bindArrayBuffer(this._instancing ? state.uvBuf : state.uvBuf); + this._aUV.bindArrayBuffer(state.uvBuf); } if (this._aNormal) { - this._aNormal.bindArrayBuffer(this._instancing ? state.normalsBuf : state.normalsBuf); + this._aNormal.bindArrayBuffer(state.normalsBuf); } if (this._aMetallicRoughness) { @@ -43791,7 +44318,7 @@ class VBOSceneModelRenderer { } if (this._aColor) { - this._aColor.bindArrayBuffer(state.colorsBuf ? state.colorsBuf : state.colorsBuf); + this._aColor.bindArrayBuffer(state.colorsBuf); if (this._instancing && state.colorsBuf) { gl.vertexAttribDivisor(this._aColor.location, 1); } @@ -43879,9 +44406,9 @@ class VBOSceneModelRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$t; + const rtcOrigin = tempVec3a$s; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$l); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -43893,7 +44420,7 @@ class VBOSceneModelRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - this._matricesUniformBlockBufferData.set(createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$f), offset += mat4Size); + this._matricesUniformBlockBufferData.set(createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$g), offset += mat4Size); } else { this._matricesUniformBlockBufferData.set(viewMatrix, offset += mat4Size); } @@ -43938,12 +44465,16 @@ class VBOSceneModelRenderer { gl.uniform1f(this._uPickZFar, frameCtx.pickZFar); } - if (this._uPositionsDecodeMatrix) { - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + if (this._uPickClipPos) { + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + } + + if (this._uDrawingBufferSize) { + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); } if (this._uUVDecodeMatrix) { - gl.uniformMatrix3fv(this._uUVDecodeMatrix, false, this._instancing ? state.uvDecodeMatrix : state.uvDecodeMatrix); + gl.uniformMatrix3fv(this._uUVDecodeMatrix, false, state.uvDecodeMatrix); } if (this._uIntensityRange && pointsMaterial.filterIntensity) { @@ -44104,7 +44635,7 @@ class VBOSceneModelTriangleBatchingEdgesRenderer extends VBOSceneModelTriangleBa class VBOSceneModelTriangleInstancingRenderer extends VBOSceneModelRenderer { - constructor(scene, withSAO, {edges = false} = {}) { + constructor(scene, withSAO, { edges = false} = {}) { super(scene, withSAO, {instancing: true, edges}); } @@ -45117,6 +45648,8 @@ class TrianglesBatchingPickMeshRenderer extends VBOSceneModelTriangleBatchingRen src.push("out float vFlags;"); } + this._addRemapClipPosLines(src); + src.push("out vec4 vPickColor;"); src.push("void main(void) {"); @@ -45144,7 +45677,7 @@ class TrianglesBatchingPickMeshRenderer extends VBOSceneModelTriangleBatchingRen src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45243,6 +45776,9 @@ class TrianglesBatchingPickDepthRenderer extends VBOSceneModelTriangleBatchingRe src.push("out vec4 vWorldPosition;"); src.push("out float vFlags;"); } + + this._addRemapClipPosLines(src); + src.push("out vec4 vViewPosition;"); src.push("void main(void) {"); @@ -45268,7 +45804,7 @@ class TrianglesBatchingPickDepthRenderer extends VBOSceneModelTriangleBatchingRe src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45366,6 +45902,8 @@ class TrianglesBatchingPickNormalsRenderer extends VBOSceneModelTriangleBatching this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -45410,7 +45948,7 @@ class TrianglesBatchingPickNormalsRenderer extends VBOSceneModelTriangleBatching src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45446,7 +45984,7 @@ class TrianglesBatchingPickNormalsRenderer extends VBOSceneModelTriangleBatching } } src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -45463,7 +46001,7 @@ class TrianglesBatchingPickNormalsRenderer extends VBOSceneModelTriangleBatching if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); } - src.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(vWorldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -46513,6 +47051,8 @@ class TrianglesBatchingPickNormalsFlatRenderer extends VBOSceneModelTriangleBatc this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -46546,7 +47086,7 @@ class TrianglesBatchingPickNormalsFlatRenderer extends VBOSceneModelTriangleBatc src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -46581,7 +47121,7 @@ class TrianglesBatchingPickNormalsFlatRenderer extends VBOSceneModelTriangleBatc src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -46601,7 +47141,7 @@ class TrianglesBatchingPickNormalsFlatRenderer extends VBOSceneModelTriangleBatc src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -46844,6 +47384,7 @@ class TrianglesBatchingColorTextureRenderer extends VBOSceneModelTriangleBatchin src.push("vec4 colorTexel = color * sRGBToLinear(texture(uColorMap, vUV));"); } else { src.push("vec4 colorTexel = color * texture(uColorMap, vUV);"); + } src.push("float opacity = color.a;"); @@ -46963,6 +47504,23 @@ class TrianglesBatchingRenderers { } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesBatchingSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesBatchingPickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesBatchingPickDepthRenderer(this._scene); + } + } + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesBatchingColorRenderer(this._scene, false); @@ -47169,8 +47727,10 @@ function getBatchingRenderers$1(scene) { batchingRenderers = new TrianglesBatchingRenderers(scene); cachdRenderers$1[sceneId] = batchingRenderers; batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); scene.on("compile", () => { batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachdRenderers$1[sceneId]; @@ -47356,32 +47916,16 @@ function octDecodeVec2(oct) { // Decode an oct-encoded normal ]; } -const tempVec3a$s = math.vec3(); -const tempVec3b$m = math.vec3(); -const tempVec3c$j = math.vec3(); -const tempVec3d$f = math.vec3(); -const tempVec3e$7 = math.vec3(); -const tempMat4a$e = math.mat4(); +const tempVec3a$r = math.vec3(); +const tempVec3b$n = math.vec3(); +const tempVec3c$k = math.vec3(); +const tempVec3d$g = math.vec3(); +const tempMat4a$f = math.mat4(); /** * @private */ -class SnapBatchingDepthBufInitRenderer { - - constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); - } - +class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer { drawLayer(frameCtx, batchingLayer, renderPass) { if (!this._program) { @@ -47406,7 +47950,13 @@ class SnapBatchingDepthBufInitRenderer { const aabb = batchingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$s; + if (this._vaoCache.has(batchingLayer)) { + gl.bindVertexArray(this._vaoCache.get(batchingLayer)); + } else { + this._vaoCache.set(batchingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$r; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -47419,9 +47969,9 @@ class SnapBatchingDepthBufInitRenderer { let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$m; + const rtcOrigin = tempVec3b$n; if (origin) { - const rotatedOrigin = tempVec3c$j; + const rotatedOrigin = tempVec3c$k; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -47434,8 +47984,8 @@ class SnapBatchingDepthBufInitRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$e); - rtcCameraEye = tempVec3d$f; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$f); + rtcCameraEye = tempVec3d$g; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -47457,80 +48007,43 @@ class SnapBatchingDepthBufInitRenderer { gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniform1i(this._uSolid, batchingLayer.solid); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix? gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = batchingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$7); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } + + this.setSectionPlanesStateUniforms(batchingLayer); //============================================================= // TODO: Use drawElements count and offset to draw only one entity //============================================================= - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, batchingLayer._state.positionsDecodeMatrix); - this._aPosition.bindArrayBuffer(state.positionsBuf); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - } - if (this._aFlags) { - this._aFlags.bindArrayBuffer(state.flagsBuf); - } + state.indicesBuf.bind(); gl.drawElements(gl.TRIANGLES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0); state.indicesBuf.unbind(); } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uSolid = program.getLocation("solid"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -47545,13 +48058,6 @@ class SnapBatchingDepthBufInitRenderer { this._program.bind(); } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; @@ -47578,11 +48084,9 @@ class SnapBatchingDepthBufInitRenderer { } src.push("in float flags;"); src.push("uniform bool pickInvisible;"); - src.push("uniform bool solid;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -47702,28 +48206,16 @@ class SnapBatchingDepthBufInitRenderer { } } -const tempVec3a$r = math.vec3(); -const tempVec3b$l = math.vec3(); -const tempVec3c$i = math.vec3(); -const tempVec3d$e = math.vec3(); -const tempVec3e$6 = math.vec3(); -const tempMat4a$d = math.mat4(); +const tempVec3a$q = math.vec3(); +const tempVec3b$m = math.vec3(); +const tempVec3c$j = math.vec3(); +const tempVec3d$f = math.vec3(); +const tempMat4a$e = math.mat4(); /** * @private */ -class SnapBatchingDepthRenderer { - - constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - +class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{ _getHash() { return this._scene._sectionPlanesState.getHash() + (this._scene.pointsMaterial.hash); } @@ -47752,7 +48244,13 @@ class SnapBatchingDepthRenderer { const aabb = batchingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$r; + if (this._vaoCache.has(batchingLayer)) { + gl.bindVertexArray(this._vaoCache.get(batchingLayer)); + } else { + this._vaoCache.set(batchingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$q; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -47765,9 +48263,9 @@ class SnapBatchingDepthRenderer { let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$l; + const rtcOrigin = tempVec3b$m; if (origin) { - const rotatedOrigin = tempVec3c$i; + const rotatedOrigin = tempVec3c$j; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -47780,8 +48278,8 @@ class SnapBatchingDepthRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$d); - rtcCameraEye = tempVec3d$e; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$e); + rtcCameraEye = tempVec3d$f; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -47803,47 +48301,34 @@ class SnapBatchingDepthRenderer { gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix? gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = batchingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$6); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } + + this.setSectionPlanesStateUniforms(batchingLayer); + //============================================================= // TODO: Use drawElements count and offset to draw only one entity //============================================================= - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, batchingLayer._state.positionsDecodeMatrix); - this._aPosition.bindArrayBuffer(state.positionsBuf); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - } - if (this._aFlags) { - this._aFlags.bindArrayBuffer(state.flagsBuf); - } + if (frameCtx.snapMode === "edge") { state.edgeIndicesBuf.bind(); gl.drawElements(gl.LINES, state.edgeIndicesBuf.numItems, state.edgeIndicesBuf.itemType, 0); @@ -47854,39 +48339,10 @@ class SnapBatchingDepthRenderer { } _allocate() { - - const scene = this._scene; - const gl = scene.canvas.gl; - - this._program = new Program(gl, this._buildShader()); - - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -47902,13 +48358,6 @@ class SnapBatchingDepthRenderer { this._program.bind(); } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; @@ -47936,10 +48385,9 @@ class SnapBatchingDepthRenderer { } src.push("in float flags;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -48081,6 +48529,20 @@ class SnapBatchingRenderers { } } + eagerCreateRenders() { + + // Pre-initialize renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new SnapBatchingDepthBufInitRenderer(this._scene, false); + } + if (!this._snapDepthRenderer) { + this._snapDepthRenderer = new SnapBatchingDepthRenderer(this._scene); + } + } + get snapDepthBufInitRenderer() { if (!this._snapDepthBufInitRenderer) { this._snapDepthBufInitRenderer = new SnapBatchingDepthBufInitRenderer(this._scene, false); @@ -48117,8 +48579,10 @@ function getSnapBatchingRenderers(scene) { batchingRenderers = new SnapBatchingRenderers(scene); cachedRenderers$6[sceneId] = batchingRenderers; batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); scene.on("compile", () => { batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$6[sceneId]; @@ -48135,11 +48599,11 @@ const tempVec4b$b = math.vec4([0, 0, 0, 1]); math.vec4([0, 0, 0, 1]); math.OBB3(); -const tempVec3a$q = math.vec3(); -const tempVec3b$k = math.vec3(); -const tempVec3c$h = math.vec3(); -const tempVec3d$d = math.vec3(); -const tempVec3e$5 = math.vec3(); +const tempVec3a$p = math.vec3(); +const tempVec3b$l = math.vec3(); +const tempVec3c$i = math.vec3(); +const tempVec3d$e = math.vec3(); +const tempVec3e$3 = math.vec3(); const tempVec3f$1 = math.vec3(); const tempVec3g$1 = math.vec3(); @@ -49318,10 +49782,10 @@ class TrianglesBatchingLayer { const origin = state.origin; const offset = portion.offset; - const rtcRayOrigin = tempVec3a$q; - const rtcRayDir = tempVec3b$k; + const rtcRayOrigin = tempVec3a$p; + const rtcRayDir = tempVec3b$l; - rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC + rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$i) : worldRayOrigin); // World -> RTC rtcRayDir.set(worldRayDir); if (offset) { @@ -49330,8 +49794,8 @@ class TrianglesBatchingLayer { math.transformRay(this.model.worldNormalMatrix, rtcRayOrigin, rtcRayDir, rtcRayOrigin, rtcRayDir); // RTC -> local - const a = tempVec3d$d; - const b = tempVec3e$5; + const a = tempVec3d$e; + const b = tempVec3e$3; const c = tempVec3f$1; let gotIntersect = false; @@ -50354,6 +50818,8 @@ class TrianglesInstancingPickMeshRenderer extends VBOSceneModelTriangleInstancin this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50398,7 +50864,7 @@ class TrianglesInstancingPickMeshRenderer extends VBOSceneModelTriangleInstancin src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50488,6 +50954,8 @@ class TrianglesInstancingPickDepthRenderer extends VBOSceneModelTriangleInstanci this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50530,7 +50998,7 @@ class TrianglesInstancingPickDepthRenderer extends VBOSceneModelTriangleInstanci src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50633,6 +51101,8 @@ class TrianglesInstancingPickNormalsRenderer extends VBOSceneModelTriangleInstan this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50681,7 +51151,7 @@ class TrianglesInstancingPickNormalsRenderer extends VBOSceneModelTriangleInstan src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50721,7 +51191,7 @@ class TrianglesInstancingPickNormalsRenderer extends VBOSceneModelTriangleInstan } } src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -50738,7 +51208,7 @@ class TrianglesInstancingPickNormalsRenderer extends VBOSceneModelTriangleInstan if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); } - src.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(vWorldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -51799,6 +52269,8 @@ class TrianglesInstancingPickNormalsFlatRenderer extends VBOSceneModelTriangleIn this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -51837,7 +52309,7 @@ class TrianglesInstancingPickNormalsFlatRenderer extends VBOSceneModelTriangleIn src.push("vFlags = flags;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -51873,8 +52345,7 @@ class TrianglesInstancingPickNormalsFlatRenderer extends VBOSceneModelTriangleIn src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -51894,7 +52365,7 @@ class TrianglesInstancingPickNormalsFlatRenderer extends VBOSceneModelTriangleIn src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -52263,6 +52734,23 @@ class TrianglesInstancingRenderers { } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesInstancingSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesInstancingPickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesInstancingPickDepthRenderer(this._scene); + } + } + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesInstancingColorRenderer(this._scene, false); @@ -52469,8 +52957,10 @@ function getInstancingRenderers$1(scene) { instancingRenderers = new TrianglesInstancingRenderers(scene); cachedRenderers$5[sceneId] = instancingRenderers; instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); scene.on("compile", () => { instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$5[sceneId]; @@ -52480,30 +52970,19 @@ function getInstancingRenderers$1(scene) { return instancingRenderers; } -const tempVec3a$p = math.vec3(); -const tempVec3b$j = math.vec3(); -const tempVec3c$g = math.vec3(); -const tempVec3d$c = math.vec3(); -const tempVec3e$4 = math.vec3(); -const tempMat4a$c = math.mat4(); +const tempVec3a$o = math.vec3(); +const tempVec3b$k = math.vec3(); +const tempVec3c$h = math.vec3(); +const tempVec3d$d = math.vec3(); +const tempMat4a$d = math.mat4(); /** * @private */ -class SnapInstancingDepthBufInitRenderer { +class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer { constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); + super(scene, false, { instancing: true }); } drawLayer(frameCtx, instancingLayer, renderPass) { @@ -52530,7 +53009,13 @@ class SnapInstancingDepthBufInitRenderer { const aabb = instancingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$p; + if (this._vaoCache.has(instancingLayer)) { + gl.bindVertexArray(this._vaoCache.get(instancingLayer)); + } else { + this._vaoCache.set(instancingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$o; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -52542,9 +53027,9 @@ class SnapInstancingDepthBufInitRenderer { let rtcViewMatrix; let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$j; + const rtcOrigin = tempVec3b$k; if (origin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$h); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -52556,8 +53041,8 @@ class SnapInstancingDepthBufInitRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$c); - rtcCameraEye = tempVec3d$c; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$d); + rtcCameraEye = tempVec3d$d; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -52579,40 +53064,30 @@ class SnapInstancingDepthBufInitRenderer { gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = instancingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$4); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + this.setSectionPlanesStateUniforms(instancingLayer); this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf); this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf); @@ -52622,16 +53097,11 @@ class SnapInstancingDepthBufInitRenderer { gl.vertexAttribDivisor(this._aModelMatrixCol1.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol2.location, 1); - this._aPosition.bindArrayBuffer(state.positionsBuf); if (this._aFlags) { this._aFlags.bindArrayBuffer(state.flagsBuf); gl.vertexAttribDivisor(this._aFlags.location, 1); } - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - gl.vertexAttribDivisor(this._aOffset.location, 1); - } state.indicesBuf.bind(); gl.drawElementsInstanced(gl.TRIANGLES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0, state.numInstances); @@ -52650,34 +53120,10 @@ class SnapInstancingDepthBufInitRenderer { } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - this._aModelMatrixCol0 = program.getAttribute("modelMatrixCol0"); - this._aModelMatrixCol1 = program.getAttribute("modelMatrixCol1"); - this._aModelMatrixCol2 = program.getAttribute("modelMatrixCol2"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -52693,13 +53139,6 @@ class SnapInstancingDepthBufInitRenderer { } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const sectionPlanesState = scene._sectionPlanesState; @@ -52730,10 +53169,9 @@ class SnapInstancingDepthBufInitRenderer { src.push("in vec4 modelMatrixCol1;"); src.push("in vec4 modelMatrixCol2;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -52854,30 +53292,19 @@ class SnapInstancingDepthBufInitRenderer { } } -const tempVec3a$o = math.vec3(); -const tempVec3b$i = math.vec3(); -const tempVec3c$f = math.vec3(); -const tempVec3d$b = math.vec3(); -const tempVec3e$3 = math.vec3(); -const tempMat4a$b = math.mat4(); +const tempVec3a$n = math.vec3(); +const tempVec3b$j = math.vec3(); +const tempVec3c$g = math.vec3(); +const tempVec3d$c = math.vec3(); +const tempMat4a$c = math.mat4(); /** * @private */ -class SnapInstancingDepthRenderer { +class SnapInstancingDepthRenderer extends VBOSceneModelRenderer { constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); + super(scene, false, { instancing: true }); } drawLayer(frameCtx, instancingLayer, renderPass) { @@ -52904,7 +53331,13 @@ class SnapInstancingDepthRenderer { const aabb = instancingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$o; + if (this._vaoCache.has(instancingLayer)) { + gl.bindVertexArray(this._vaoCache.get(instancingLayer)); + } else { + this._vaoCache.set(instancingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$n; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -52917,9 +53350,9 @@ class SnapInstancingDepthRenderer { let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$i; + const rtcOrigin = tempVec3b$j; if (origin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -52931,8 +53364,8 @@ class SnapInstancingDepthRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b); - rtcCameraEye = tempVec3d$b; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$c); + rtcCameraEye = tempVec3d$c; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -52954,51 +53387,41 @@ class SnapInstancingDepthRenderer { gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = instancingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$3); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + this.setSectionPlanesStateUniforms(instancingLayer); + + this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf); this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf); this._aModelMatrixCol2.bindArrayBuffer(state.modelMatrixCol2Buf); gl.vertexAttribDivisor(this._aModelMatrixCol0.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol1.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol2.location, 1); - this._aPosition.bindArrayBuffer(state.positionsBuf); + this._aFlags.bindArrayBuffer(state.flagsBuf); gl.vertexAttribDivisor(this._aFlags.location, 1); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - gl.vertexAttribDivisor(this._aOffset.location, 1); - } + if (frameCtx.snapMode === "edge") { state.edgeIndicesBuf.bind(); gl.drawElementsInstanced(gl.LINES, state.edgeIndicesBuf.numItems, state.edgeIndicesBuf.itemType, 0, state.numInstances); @@ -53017,34 +53440,10 @@ class SnapInstancingDepthRenderer { } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - this._aModelMatrixCol0 = program.getAttribute("modelMatrixCol0"); - this._aModelMatrixCol1 = program.getAttribute("modelMatrixCol1"); - this._aModelMatrixCol2 = program.getAttribute("modelMatrixCol2"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -53060,13 +53459,6 @@ class SnapInstancingDepthRenderer { } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const sectionPlanesState = scene._sectionPlanesState; @@ -53097,10 +53489,9 @@ class SnapInstancingDepthRenderer { src.push("in vec4 modelMatrixCol1;"); src.push("in vec4 modelMatrixCol2;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -53241,6 +53632,20 @@ class SnapInstancingRenderers { } } + eagerCreateRenders() { + + // Pre-initialize renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new SnapInstancingDepthBufInitRenderer(this._scene, false); + } + if (!this._snapDepthRenderer) { + this._snapDepthRenderer = new SnapInstancingDepthRenderer(this._scene); + } + } + get snapDepthBufInitRenderer() { if (!this._snapDepthBufInitRenderer) { this._snapDepthBufInitRenderer = new SnapInstancingDepthBufInitRenderer(this._scene, false); @@ -53277,8 +53682,10 @@ function getSnapInstancingRenderers(scene) { instancingRenderers = new SnapInstancingRenderers(scene); cachedRenderers$4[sceneId] = instancingRenderers; instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); scene.on("compile", () => { instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$4[sceneId]; @@ -53295,10 +53702,10 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]); math.vec4([0, 0, 0, 1]); const tempVec3fa$2 = new Float32Array(3); -const tempVec3a$n = math.vec3(); -const tempVec3b$h = math.vec3(); -const tempVec3c$e = math.vec3(); -const tempVec3d$a = math.vec3(); +const tempVec3a$m = math.vec3(); +const tempVec3b$i = math.vec3(); +const tempVec3c$f = math.vec3(); +const tempVec3d$b = math.vec3(); const tempVec3e$2 = math.vec3(); const tempVec3f = math.vec3(); const tempVec3g = math.vec3(); @@ -54312,10 +54719,10 @@ class TrianglesInstancingLayer { const origin = state.origin; const offset = portion.offset; - const rtcRayOrigin = tempVec3a$n; - const rtcRayDir = tempVec3b$h; + const rtcRayOrigin = tempVec3a$m; + const rtcRayDir = tempVec3b$i; - rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC + rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$f) : worldRayOrigin); // World -> RTC rtcRayDir.set(worldRayDir); if (offset) { @@ -54326,7 +54733,7 @@ class TrianglesInstancingLayer { math.transformRay(portion.inverseMatrix, rtcRayOrigin, rtcRayDir, rtcRayOrigin, rtcRayDir); - const a = tempVec3d$a; + const a = tempVec3d$b; const b = tempVec3e$2; const c = tempVec3f; @@ -56821,6 +57228,8 @@ class PointsBatchingPickMeshRenderer extends VBOSceneModelPointBatchingRenderer this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -56862,7 +57271,7 @@ class PointsBatchingPickMeshRenderer extends VBOSceneModelPointBatchingRenderer if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -56961,6 +57370,8 @@ class PointsBatchingPickDepthRenderer extends VBOSceneModelPointBatchingRenderer this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -56999,7 +57410,7 @@ class PointsBatchingPickDepthRenderer extends VBOSceneModelPointBatchingRenderer if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -57347,8 +57758,8 @@ class PointsBatchingBuffer { } } -const tempVec3a$m = math.vec4(); -const tempVec3b$g = math.vec4(); +const tempVec3a$l = math.vec4(); +const tempVec3b$h = math.vec4(); const tempVec4a$8 = math.vec4([0, 0, 0, 1]); const tempVec4b$7 = math.vec4([0, 0, 0, 1]); math.vec4([0, 0, 0, 1]); @@ -57497,8 +57908,8 @@ class PointsBatchingLayer { const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed); - const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$m); - const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$g); + const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$l); + const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$h); worldAABB[0] = min[0]; worldAABB[1] = min[1]; @@ -58444,6 +58855,8 @@ class PointsInstancingPickMeshRenderer extends VBOSceneModelPointInstancingRende this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -58485,6 +58898,7 @@ class PointsInstancingPickMeshRenderer extends VBOSceneModelPointInstancingRende src.push(" vFlags = flags;"); } src.push("vec4 clipPos = projMatrix * viewPosition;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } @@ -58595,6 +59009,8 @@ class PointsInstancingPickDepthRenderer extends VBOSceneModelPointInstancingRend this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -58634,10 +59050,11 @@ class PointsInstancingPickDepthRenderer extends VBOSceneModelPointInstancingRend } src.push(" vViewPosition = viewPosition;"); src.push("vec4 clipPos = projMatrix * viewPosition;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -59334,6 +59751,7 @@ class PointsInstancingLayer { numInstances: 0, origin: cfg.origin ? math.vec3(cfg.origin) : null, geometry: cfg.geometry, + positionsDecodeMatrix: cfg.geometry.positionsDecodeMatrix, // So we can null the geometry for GC colorsBuf: null, flagsBuf: null, offsetsBuf: null, @@ -59472,34 +59890,46 @@ class PointsInstancingLayer { } const gl = this.model.scene.canvas.gl; const flagsLength = this._pickColors.length / 4; + const state = this._state; + const geometry = state.geometry; if (flagsLength > 0) { // Because we only build flags arrays here, // get their length from the colors array let notNormalized = false; - this._state.flagsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(flagsLength), flagsLength, 1, gl.DYNAMIC_DRAW, notNormalized); + state.flagsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(flagsLength), flagsLength, 1, gl.DYNAMIC_DRAW, notNormalized); } if (this.model.scene.entityOffsetsEnabled) { if (this._offsets.length > 0) { const notNormalized = false; - this._state.offsetsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._offsets), this._offsets.length, 3, gl.DYNAMIC_DRAW, notNormalized); + state.offsetsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._offsets), this._offsets.length, 3, gl.DYNAMIC_DRAW, notNormalized); this._offsets = []; // Release memory } } + if (geometry.positionsCompressed && geometry.positionsCompressed.length > 0) { + const normalized = false; + state.positionsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, geometry.positionsCompressed, geometry.positionsCompressed.length, 3, gl.STATIC_DRAW, normalized); + state.positionsDecodeMatrix = math.mat4(geometry.positionsDecodeMatrix); + } + if (geometry.colorsCompressed && geometry.colorsCompressed.length > 0) { + const colorsCompressed = new Uint8Array(geometry.colorsCompressed); + const notNormalized = false; + state.colorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, colorsCompressed, colorsCompressed.length, 4, gl.STATIC_DRAW, notNormalized); + } if (this._modelMatrixCol0.length > 0) { const normalized = false; - this._state.modelMatrixCol0Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol0), this._modelMatrixCol0.length, 4, gl.STATIC_DRAW, normalized); - this._state.modelMatrixCol1Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol1), this._modelMatrixCol1.length, 4, gl.STATIC_DRAW, normalized); - this._state.modelMatrixCol2Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol2), this._modelMatrixCol2.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol0Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol0), this._modelMatrixCol0.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol1Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol1), this._modelMatrixCol1.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol2Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol2), this._modelMatrixCol2.length, 4, gl.STATIC_DRAW, normalized); this._modelMatrixCol0 = []; this._modelMatrixCol1 = []; this._modelMatrixCol2 = []; } if (this._pickColors.length > 0) { const normalized = false; - this._state.pickColorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Uint8Array(this._pickColors), this._pickColors.length, 4, gl.STATIC_DRAW, normalized); + state.pickColorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Uint8Array(this._pickColors), this._pickColors.length, 4, gl.STATIC_DRAW, normalized); this._pickColors = []; // Release memory } - this._state.geometry = null; + state.geometry = null; this._finalized = true; } @@ -61461,14 +61891,14 @@ function doCheckResult(buckets, mesh) { } } -const tempVec3a$l = math.vec3(); -const tempVec3b$f = math.vec3(); -const tempVec3c$d = math.vec3(); -const tempVec3d$9 = math.vec3(); +const tempVec3a$k = math.vec3(); +const tempVec3b$g = math.vec3(); +const tempVec3c$e = math.vec3(); +const tempVec3d$a = math.vec3(); const tempVec4a$6 = math.vec4(); -const tempMat4a$a = math.mat4(); +const tempMat4a$b = math.mat4(); /** * @private @@ -61529,9 +61959,9 @@ class TrianglesDataTextureColorRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$l; + const rtcOrigin = tempVec3a$k; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$f); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$g); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -61543,8 +61973,8 @@ class TrianglesDataTextureColorRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$a); - rtcCameraEye = tempVec3c$d; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$b); + rtcCameraEye = tempVec3c$e; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -61577,7 +62007,7 @@ class TrianglesDataTextureColorRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$9); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$a); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -61869,9 +62299,6 @@ class TrianglesDataTextureColorRenderer { src.push(" return;"); // Cull vertex src.push("} else {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -61916,7 +62343,7 @@ class TrianglesDataTextureColorRenderer { // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); // src.push("vColor = vec4(vec3(1, -1, 0)*dot(normalize(position.xyz - uCameraEyeRtcInQuantizedSpace), normal), 1);") src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); @@ -61931,7 +62358,7 @@ class TrianglesDataTextureColorRenderer { src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -62093,11 +62520,11 @@ class TrianglesDataTextureColorRenderer { const defaultColor$1 = new Float32Array([1, 1, 1]); -const tempVec3a$k = math.vec3(); -const tempVec3b$e = math.vec3(); -const tempVec3c$c = math.vec3(); -const tempVec3d$8 = math.vec3(); -const tempMat4a$9 = math.mat4(); +const tempVec3a$j = math.vec3(); +const tempVec3b$f = math.vec3(); +const tempVec3c$d = math.vec3(); +const tempVec3d$9 = math.vec3(); +const tempMat4a$a = math.mat4(); /** * @private @@ -62156,9 +62583,9 @@ class TrianglesDataTextureSilhouetteRenderer { let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$k; + const rtcOrigin = tempVec3a$j; if (origin) { - const rotatedOrigin = tempVec3b$e; + const rotatedOrigin = tempVec3b$f; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -62171,8 +62598,8 @@ class TrianglesDataTextureSilhouetteRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$9); - rtcCameraEye = tempVec3c$c; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$a); + rtcCameraEye = tempVec3c$d; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -62225,7 +62652,7 @@ class TrianglesDataTextureSilhouetteRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$8); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$9); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -62558,11 +62985,11 @@ class TrianglesDataTextureSilhouetteRenderer { const defaultColor = new Float32Array([0, 0, 0, 1]); -const tempVec3a$j = math.vec3(); -const tempVec3b$d = math.vec3(); +const tempVec3a$i = math.vec3(); +const tempVec3b$e = math.vec3(); math.vec3(); -const tempVec3d$7 = math.vec3(); -const tempMat4a$8 = math.mat4(); +const tempVec3d$8 = math.vec3(); +const tempMat4a$9 = math.mat4(); /** * @private @@ -62621,9 +63048,9 @@ class TrianglesDataTextureEdgesRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$j; + const rtcOrigin = tempVec3a$i; if (gotOrigin) { - const rotatedOrigin = tempVec3b$d; + const rotatedOrigin = tempVec3b$e; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -62636,7 +63063,7 @@ class TrianglesDataTextureEdgesRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8); + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$9); } else { rtcViewMatrix = viewMatrix; } @@ -62681,7 +63108,7 @@ class TrianglesDataTextureEdgesRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$7); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$8); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -62863,8 +63290,6 @@ class TrianglesDataTextureEdgesRenderer { src.push(" return;"); // Cull vertex src.push("} else {"); - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -62890,7 +63315,7 @@ class TrianglesDataTextureEdgesRenderer { // get position src.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -62982,10 +63407,10 @@ class TrianglesDataTextureEdgesRenderer { } } -const tempVec3a$i = math.vec3(); -const tempVec3b$c = math.vec3(); -const tempVec3c$b = math.vec3(); -const tempMat4a$7 = math.mat4(); +const tempVec3a$h = math.vec3(); +const tempVec3b$d = math.vec3(); +const tempVec3c$c = math.vec3(); +const tempMat4a$8 = math.mat4(); /** * @private @@ -63043,9 +63468,9 @@ class TrianglesDataTextureEdgesColorRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$i; + const rtcOrigin = tempVec3a$h; if (gotOrigin) { - const rotatedOrigin = tempVec3b$c; + const rotatedOrigin = tempVec3b$d; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -63058,7 +63483,7 @@ class TrianglesDataTextureEdgesColorRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$7); + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8); } else { rtcViewMatrix = viewMatrix; } @@ -63081,7 +63506,7 @@ class TrianglesDataTextureEdgesColorRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$b); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$c); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -63253,9 +63678,6 @@ class TrianglesDataTextureEdgesColorRenderer { src.push("void main(void) {"); - // model matrices - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // constants src.push("int edgeIndex = gl_VertexID / 2;"); @@ -63311,7 +63733,7 @@ class TrianglesDataTextureEdgesColorRenderer { src.push(" return;"); src.push("};"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push(" vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -63403,10 +63825,10 @@ class TrianglesDataTextureEdgesColorRenderer { } } -const tempVec3a$h = math.vec3(); -const tempVec3b$b = math.vec3(); -const tempVec3c$a = math.vec3(); -const tempMat4a$6 = math.mat4(); +const tempVec3a$g = math.vec3(); +const tempVec3b$c = math.vec3(); +const tempVec3c$b = math.vec3(); +const tempMat4a$7 = math.mat4(); /** * @private @@ -63421,7 +63843,7 @@ class TrianglesDataTexturePickMeshRenderer { getValid() { return this._hash === this._getHash(); - }; + } _getHash() { return this._scene._sectionPlanesState.getHash(); @@ -63459,9 +63881,9 @@ class TrianglesDataTexturePickMeshRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$h; + const rtcOrigin = tempVec3a$g; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$b); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$c); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -63473,8 +63895,8 @@ class TrianglesDataTexturePickMeshRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$6); - rtcCameraEye = tempVec3c$a; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$7); + rtcCameraEye = tempVec3c$b; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -63482,6 +63904,8 @@ class TrianglesDataTexturePickMeshRenderer { rtcViewMatrix = camera.viewMatrix; rtcCameraEye = camera.eye; } + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); @@ -63504,7 +63928,7 @@ class TrianglesDataTexturePickMeshRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -63555,6 +63979,8 @@ class TrianglesDataTexturePickMeshRenderer { const program = this._program; this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); @@ -63566,10 +63992,6 @@ class TrianglesDataTexturePickMeshRenderer { dir: program.getLocation("sectionPlaneDir" + i) }); } - if (this._withSAO) { - this._uOcclusionTexture = "uOcclusionTexture"; - this._uSAOParams = program.getLocation("uSAOParams"); - } if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -63585,12 +64007,9 @@ class TrianglesDataTexturePickMeshRenderer { } _bindProgram(frameCtx) { - const scene = this._scene; const gl = scene.canvas.gl; - this._program.bind(); - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); } @@ -63652,6 +64071,16 @@ class TrianglesDataTexturePickMeshRenderer { src.push("out float isPerspective;"); } + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); @@ -63665,10 +64094,6 @@ class TrianglesDataTexturePickMeshRenderer { src.push("void main(void) {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - - // constants src.push("int polygonIndex = gl_VertexID / 3;"); // get packed object-id @@ -63735,7 +64160,7 @@ class TrianglesDataTexturePickMeshRenderer { // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); src.push("}"); @@ -63747,7 +64172,7 @@ class TrianglesDataTexturePickMeshRenderer { src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -63766,7 +64191,7 @@ class TrianglesDataTexturePickMeshRenderer { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -63836,11 +64261,11 @@ class TrianglesDataTexturePickMeshRenderer { } } -const tempVec3a$g = math.vec3(); -const tempVec3b$a = math.vec3(); -const tempVec3c$9 = math.vec3(); -const tempVec3d$6 = math.vec3(); -const tempMat4a$5 = math.mat4(); +const tempVec3a$f = math.vec3(); +const tempVec3b$b = math.vec3(); +const tempVec3c$a = math.vec3(); +const tempVec3d$7 = math.vec3(); +const tempMat4a$6 = math.mat4(); /** * @private @@ -63855,7 +64280,7 @@ class TrianglesDataTexturePickDepthRenderer { getValid() { return this._hash === this._getHash(); - }; + } _getHash() { return this._scene._sectionPlanesState.getHash(); @@ -63895,9 +64320,9 @@ class TrianglesDataTexturePickDepthRenderer { let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$g; + const rtcOrigin = tempVec3a$f; if (origin) { - const rotatedOrigin = tempVec3b$a; + const rotatedOrigin = tempVec3b$b; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -63910,8 +64335,8 @@ class TrianglesDataTexturePickDepthRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$5); - rtcCameraEye = tempVec3c$9; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$6); + rtcCameraEye = tempVec3c$a; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -63929,6 +64354,8 @@ class TrianglesDataTexturePickDepthRenderer { gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); gl.uniform1f(this._uPickZNear, frameCtx.pickZNear); gl.uniform1f(this._uPickZFar, frameCtx.pickZFar); gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); @@ -63952,7 +64379,7 @@ class TrianglesDataTexturePickDepthRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$6); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$7); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -64003,6 +64430,8 @@ class TrianglesDataTexturePickDepthRenderer { const program = this._program; this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uWorldMatrix = program.getLocation("worldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); @@ -64092,6 +64521,16 @@ class TrianglesDataTexturePickDepthRenderer { src.push("out float isPerspective;"); } + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); @@ -64198,7 +64637,7 @@ class TrianglesDataTexturePickDepthRenderer { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -64283,12 +64722,12 @@ class TrianglesDataTexturePickDepthRenderer { } } -const tempVec3a$f = math.vec3(); -const tempVec3b$9 = math.vec3(); -const tempVec3c$8 = math.vec3(); -const tempVec3d$5 = math.vec3(); +const tempVec3a$e = math.vec3(); +const tempVec3b$a = math.vec3(); +const tempVec3c$9 = math.vec3(); +const tempVec3d$6 = math.vec3(); const tempVec3e$1 = math.vec3(); -const tempMat4a$4 = math.mat4(); +const tempMat4a$5 = math.mat4(); /** * @private @@ -64334,7 +64773,7 @@ class TrianglesDataTextureSnapDepthRenderer { const aabb = dataTextureLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$f; + const coordinateScaler = tempVec3a$e; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -64358,9 +64797,9 @@ class TrianglesDataTextureSnapDepthRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3b$9; + const rtcOrigin = tempVec3b$a; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$8); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$9); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -64372,8 +64811,8 @@ class TrianglesDataTextureSnapDepthRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$4); - rtcCameraEye = tempVec3d$5; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$5); + rtcCameraEye = tempVec3d$6; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -64590,8 +65029,6 @@ class TrianglesDataTextureSnapDepthRenderer { src.push("{"); - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); src.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"); @@ -64608,7 +65045,7 @@ class TrianglesDataTextureSnapDepthRenderer { src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); // get position src.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); @@ -64702,12 +65139,12 @@ class TrianglesDataTextureSnapDepthRenderer { } } -const tempVec3a$e = math.vec3(); -const tempVec3b$8 = math.vec3(); -const tempVec3c$7 = math.vec3(); -const tempVec3d$4 = math.vec3(); +const tempVec3a$d = math.vec3(); +const tempVec3b$9 = math.vec3(); +const tempVec3c$8 = math.vec3(); +const tempVec3d$5 = math.vec3(); const tempVec3e = math.vec3(); -const tempMat4a$3 = math.mat4(); +const tempMat4a$4 = math.mat4(); /** * @private */ @@ -64749,7 +65186,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { const aabb = dataTextureLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$e; + const coordinateScaler = tempVec3a$d; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -64770,9 +65207,9 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3b$8; + const rtcOrigin = tempVec3b$9; if (gotOrigin) { - const rotatedOrigin = tempVec3c$7; + const rotatedOrigin = tempVec3c$8; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -64785,8 +65222,8 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$3); - rtcCameraEye = tempVec3d$4; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$4); + rtcCameraEye = tempVec3d$5; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -65001,8 +65438,6 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { src.push("{"); - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get color src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); @@ -65044,7 +65479,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push(" if (isPerspectiveMatrix(projMatrix)) {"); - src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push(" position = positions[2 - (gl_VertexID % 3)];"); src.push(" viewNormal = -viewNormal;"); @@ -65057,7 +65492,7 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { src.push(" }"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); src.push("relativeToOriginPosition = worldPosition.xyz;"); @@ -65148,12 +65583,16 @@ class TrianglesDataTextureSnapDepthBufInitRenderer { } } -const tempVec3a$d = math.vec3(); +const tempVec3a$c = math.vec3(); +const tempVec3b$8 = math.vec3(); +const tempVec3c$7 = math.vec3(); +const tempVec3d$4 = math.vec3(); +const tempMat4a$3 = math.mat4(); /** * @private */ -class TrianglesDataTexturePickNormalsRenderer { +class TrianglesDataTextureOcclusionRenderer { constructor(scene) { this._scene = scene; @@ -65178,9 +65617,14 @@ class TrianglesDataTexturePickNormalsRenderer { const state = dataTextureLayer._state; const textureState = state.textureState; const origin = dataTextureLayer._state.origin; + const {position, rotationMatrix, rotationMatrixConjugate} = model; + const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; if (!this._program) { this._allocate(dataTextureLayer); + if (this.errors) { + return; + } } if (frameCtx.lastProgramId !== this._program.id) { @@ -65193,39 +65637,45 @@ class TrianglesDataTexturePickNormalsRenderer { this._uTexturePerObjectIdPositionsDecodeMatrix, this._uTexturePerVertexIdCoordinates, this._uTexturePerObjectIdColorsAndFlags, - this._uTextureCameraMatrices, this._uTextureModelMatrices, this._uTexturePerObjectIdOffsets ); - let cameraEye = camera.eye; + let rtcViewMatrix; + let rtcCameraEye; - if (frameCtx.pickViewMatrix) { - textureState.bindPickCameraTexture( - this._program, - this._uTextureCameraMatrices - ); - cameraEye = frameCtx.pickOrigin || cameraEye; + if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { + const rtcOrigin = tempVec3a$c; + if (origin) { + const rotatedOrigin = tempVec3b$8; + math.transformPoint3(rotationMatrix, origin, rotatedOrigin); + rtcOrigin[0] = rotatedOrigin[0]; + rtcOrigin[1] = rotatedOrigin[1]; + rtcOrigin[2] = rotatedOrigin[2]; + } else { + rtcOrigin[0] = 0; + rtcOrigin[1] = 0; + rtcOrigin[2] = 0; + } + rtcOrigin[0] += position[0]; + rtcOrigin[1] += position[1]; + rtcOrigin[2] += position[2]; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$3); + rtcCameraEye = tempVec3c$7; + rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; + rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; + rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; + } else { + rtcViewMatrix = viewMatrix; + rtcCameraEye = camera.eye; } - const originCameraEye = [ - cameraEye[0] - origin[0], - cameraEye[1] - origin[1], - cameraEye[2] - origin[2], - ]; - - gl.uniform3fv(this._uCameraEyeRtc, originCameraEye); - + gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); + gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniform3fv(this._uCameraEyeRtc, originCameraEye); - - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far should be from projection matrix? - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { @@ -65240,7 +65690,7 @@ class TrianglesDataTexturePickNormalsRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$4); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -65258,10 +65708,8 @@ class TrianglesDataTexturePickNormalsRenderer { this._uTexturePerPolygonIdIndices, 8 // 8 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); } - if (state.numIndices16Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -65269,10 +65717,8 @@ class TrianglesDataTexturePickNormalsRenderer { this._uTexturePerPolygonIdIndices, 16 // 16 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); } - if (state.numIndices32Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -65280,32 +65726,26 @@ class TrianglesDataTexturePickNormalsRenderer { this._uTexturePerPolygonIdIndices, 32 // 32 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); } - frameCtx.drawElements++; } _allocate() { - const scene = this._scene; const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { this.errors = this._program.errors; return; } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); - + this._uWorldMatrix = program.getLocation("sceneModelWorldMatrix"); + this._uViewMatrix = program.getLocation("viewMatrix"); + this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { this._uSectionPlanes.push({ active: program.getLocation("sectionPlaneActive" + i), @@ -65313,11 +65753,11 @@ class TrianglesDataTexturePickNormalsRenderer { dir: program.getLocation("sectionPlaneDir" + i) }); } - + this._uPickZNear = program.getLocation("pickZNear"); + this._uPickZFar = program.getLocation("pickZFar"); if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; @@ -65331,6 +65771,11 @@ class TrianglesDataTexturePickNormalsRenderer { } _bindProgram() { + + const scene = this._scene; + scene.canvas.gl; + scene.camera.project; + this._program.bind(); } @@ -65346,7 +65791,7 @@ class TrianglesDataTexturePickNormalsRenderer { const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push("#version 300 es"); - src.push("// Triangles dataTexture pick normals vertex shader"); + src.push("// TrianglesDataTextureColorRenderer vertex shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); @@ -65368,45 +65813,29 @@ class TrianglesDataTexturePickNormalsRenderer { src.push("in vec3 offset;"); } - src.push("uniform bool pickInvisible;"); + src.push("uniform mat4 sceneModelWorldMatrix;"); + src.push("uniform mat4 viewMatrix;"); + src.push("uniform mat4 projMatrix;"); + src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); - src.push("uniform highp sampler2D uTextureCameraMatrices;"); src.push("uniform highp sampler2D uTextureModelMatrices;"); src.push("uniform vec3 uCameraEyeRtc;"); src.push("vec3 positions[3];"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("uniform float logDepthBufFC;"); - src.push("out float vFragDepth;"); - src.push("out float isPerspective;"); - } - src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); - if (clipping) { src.push("out vec4 vWorldPosition;"); - src.push("flat out uint vFlags2;"); + src.push("out vec4 vFlags2;"); } - - src.push("out vec3 vWorldNormal;"); - src.push("void main(void) {"); - // camera matrices - src.push("mat4 viewMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 0), 0));"); - src.push("mat4 projMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 2), 0));"); - - // model matrices - src.push("mat4 worldMatrix = mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // constants src.push("int polygonIndex = gl_VertexID / 3;"); @@ -65421,13 +65850,14 @@ class TrianglesDataTexturePickNormalsRenderer { src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - // flags.w = NOT_RENDERED | PICK - // renderPass = PICK + // flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT + // renderPass = COLOR_OPAQUE + // Only opaque objects can be occluders - src.push(`if (int(flags.w) != renderPass) {`); - src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex - src.push(" return;"); // Cull vertex - src.push("} else {"); + src.push(`if (int(flags.x) != renderPass) {`); + src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex + + src.push(" } else {"); // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -65454,58 +65884,51 @@ class TrianglesDataTexturePickNormalsRenderer { src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); - // get normal - src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); + // get color + src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); + src.push(`if (color.a == 0u) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); + src.push("};"); + src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); src.push("vec3 position;"); src.push("position = positions[gl_VertexID % 3];"); // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); - src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); - src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); - src.push("position = positions[2 - (gl_VertexID % 3)];"); - src.push("normal = -normal;"); - src.push("}"); - src.push("} else {"); - src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); - src.push("if (viewNormal.z < 0.0) {"); - src.push("position = positions[2 - (gl_VertexID % 3)];"); - src.push("normal = -normal;"); - src.push("}"); - src.push("}"); + src.push(" if (isPerspectiveMatrix(projMatrix)) {"); + src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); + src.push(" position = positions[2 - (gl_VertexID % 3)];"); + src.push(" }"); + src.push(" } else {"); + src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + src.push(" if (viewNormal.z < 0.0) {"); + src.push(" position = positions[2 - (gl_VertexID % 3)];"); + src.push(" }"); + src.push(" }"); src.push("}"); - src.push("normal = -normal;"); - - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); - src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); - src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - - src.push("vWorldNormal = normal.xyz;"); - - src.push("vec4 clipPos = projMatrix * viewPosition;"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("vFragDepth = 1.0 + clipPos.w;"); - src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); - } if (clipping) { src.push(" vWorldPosition = worldPosition;"); - src.push(" vFlags2 = flags2.w;"); + src.push(" vFlags2 = flags2;"); + } + src.push("vec4 clipPos = projMatrix * viewPosition;"); + if (clipping) { + src.push("vWorldPosition = worldPosition;"); + src.push("vFlags2 = flags2.r;"); } src.push("gl_Position = clipPos;"); + src.push(" }"); src.push("}"); - - src.push("}"); - return src; } @@ -65515,7 +65938,7 @@ class TrianglesDataTexturePickNormalsRenderer { const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push('#version 300 es'); - src.push("// Triangles dataTexture pick normals fragment shader"); + src.push("// TrianglesDataTextureColorRenderer fragment shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); src.push("precision highp int;"); @@ -65523,29 +65946,22 @@ class TrianglesDataTexturePickNormalsRenderer { src.push("precision mediump float;"); src.push("precision mediump int;"); src.push("#endif"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("in float isPerspective;"); - src.push("uniform float logDepthBufFC;"); - src.push("in float vFragDepth;"); - } if (clipping) { src.push("in vec4 vWorldPosition;"); - src.push("flat in uint vFlags2;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + src.push("in vec4 vFlags2;"); + for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { src.push("uniform bool sectionPlaneActive" + i + ";"); src.push("uniform vec3 sectionPlanePos" + i + ";"); src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outNormal;"); + src.push("out vec4 outColor;"); src.push("void main(void) {"); if (clipping) { - src.push(" bool clippable = vFlags2 > 0u;"); + src.push(" bool clippable = (float(vFlags2.x) > 0.0);"); src.push(" if (clippable) {"); src.push(" float dist = 0.0;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { src.push(" if (sectionPlaneActive" + i + ") {"); src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); src.push(" }"); @@ -65553,12 +65969,7 @@ class TrianglesDataTexturePickNormalsRenderer { src.push(" if (dist > 0.0) { discard; }"); src.push(" }"); } - - if (scene.logarithmicDepthBufferEnabled) { - // src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); - src.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"); - } - src.push(" outNormal = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue src.push("}"); return src; } @@ -65575,7 +65986,7 @@ class TrianglesDataTexturePickNormalsRenderer { } } -const tempVec3a$c = math.vec3(); +const tempVec3a$b = math.vec3(); const tempVec3b$7 = math.vec3(); const tempVec3c$6 = math.vec3(); const tempVec3d$3 = math.vec3(); @@ -65584,12 +65995,12 @@ const tempMat4a$2 = math.mat4(); /** * @private */ -class TrianglesDataTextureOcclusionRenderer { +class TrianglesDataTextureDepthRenderer { constructor(scene) { this._scene = scene; - this._hash = this._getHash(); this._allocate(); + this._hash = this._getHash(); } getValid() { @@ -65602,18 +66013,17 @@ class TrianglesDataTextureOcclusionRenderer { drawLayer(frameCtx, dataTextureLayer, renderPass) { - const model = dataTextureLayer.model; - const scene = model.scene; + const scene = this._scene; const camera = scene.camera; + const model = dataTextureLayer.model; const gl = scene.canvas.gl; const state = dataTextureLayer._state; const textureState = state.textureState; const origin = dataTextureLayer._state.origin; const {position, rotationMatrix, rotationMatrixConjugate} = model; - const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; if (!this._program) { - this._allocate(dataTextureLayer); + this._allocate(); if (this.errors) { return; } @@ -65621,7 +66031,7 @@ class TrianglesDataTextureOcclusionRenderer { if (frameCtx.lastProgramId !== this._program.id) { frameCtx.lastProgramId = this._program.id; - this._bindProgram(); + this._bindProgram(frameCtx, state); } textureState.bindCommonTextures( @@ -65636,11 +66046,12 @@ class TrianglesDataTextureOcclusionRenderer { let rtcViewMatrix; let rtcCameraEye; - if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$c; - if (origin) { - const rotatedOrigin = tempVec3b$7; - math.transformPoint3(rotationMatrix, origin, rotatedOrigin); + const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); + const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); + if (gotOrigin || gotPosition) { + const rtcOrigin = tempVec3a$b; + if (gotOrigin) { + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$7); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -65652,22 +66063,26 @@ class TrianglesDataTextureOcclusionRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$2); + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$2); rtcCameraEye = tempVec3c$6; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; } else { - rtcViewMatrix = viewMatrix; + rtcViewMatrix = camera.viewMatrix; rtcCameraEye = camera.eye; } + gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + if (scene.logarithmicDepthBufferEnabled) { + const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); + gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); + } const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { @@ -65693,415 +66108,6 @@ class TrianglesDataTextureOcclusionRenderer { } } - if (state.numIndices8Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 8 // 8 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); - } - if (state.numIndices16Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 16 // 16 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); - } - if (state.numIndices32Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 32 // 32 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); - } - frameCtx.drawElements++; - } - - _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uWorldMatrix = program.getLocation("sceneModelWorldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._uPickZNear = program.getLocation("pickZNear"); - this._uPickZFar = program.getLocation("pickZFar"); - if (scene.logarithmicDepthBufferEnabled) { - this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); - } - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; - this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; - this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; - this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; - this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; - this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; - this._uTextureCameraMatrices = "uTextureCameraMatrices"; - this._uTextureModelMatrices = "uTextureModelMatrices"; - this._uTexturePerObjectIdOffsets = "uTexturePerObjectIdOffsets"; - this._uCameraEyeRtc = program.getLocation("uCameraEyeRtc"); - } - - _bindProgram() { - - const scene = this._scene; - scene.canvas.gl; - scene.camera.project; - - this._program.bind(); - } - - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - - _buildVertexShader() { - const scene = this._scene; - const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; - const src = []; - src.push("#version 300 es"); - src.push("// TrianglesDataTextureColorRenderer vertex shader"); - - src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); - src.push("precision highp float;"); - src.push("precision highp int;"); - src.push("precision highp usampler2D;"); - src.push("precision highp isampler2D;"); - src.push("precision highp sampler2D;"); - src.push("#else"); - src.push("precision mediump float;"); - src.push("precision mediump int;"); - src.push("precision mediump usampler2D;"); - src.push("precision mediump isampler2D;"); - src.push("precision mediump sampler2D;"); - src.push("#endif"); - - src.push("uniform int renderPass;"); - - if (scene.entityOffsetsEnabled) { - src.push("in vec3 offset;"); - } - - src.push("uniform mat4 sceneModelWorldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - - src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); - src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); - src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); - src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); - src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); - src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); - src.push("uniform highp sampler2D uTextureModelMatrices;"); - src.push("uniform vec3 uCameraEyeRtc;"); - - src.push("vec3 positions[3];"); - src.push("bool isPerspectiveMatrix(mat4 m) {"); - src.push(" return (m[2][3] == - 1.0);"); - src.push("}"); - if (clipping) { - src.push("out vec4 vWorldPosition;"); - src.push("out vec4 vFlags2;"); - } - src.push("void main(void) {"); - - // constants - src.push("int polygonIndex = gl_VertexID / 3;"); - - // get packed object-id - src.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"); - src.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"); - - src.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"); - src.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"); - - // get flags & flags2 - src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); - src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - - // flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT - // renderPass = COLOR_OPAQUE - // Only opaque objects can be occluders - - src.push(`if (int(flags.x) != renderPass) {`); - src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex - - src.push(" } else {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - - // get vertex base - src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); - - src.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"); - - src.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"); - - src.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"); - src.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"); - - src.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"); - src.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"); - - src.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"); - src.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"); - - src.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"); - - src.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"); - - // get position - src.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); - src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); - src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); - - // get color - src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); - - src.push(`if (color.a == 0u) {`); - src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex - src.push(" return;"); - src.push("};"); - - src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); - src.push("vec3 position;"); - src.push("position = positions[gl_VertexID % 3];"); - - // when the geometry is not solid, if needed, flip the triangle winding - src.push("if (solid != 1u) {"); - src.push(" if (isPerspectiveMatrix(projMatrix)) {"); - src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); - src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); - src.push(" position = positions[2 - (gl_VertexID % 3)];"); - src.push(" }"); - src.push(" } else {"); - src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); - src.push(" if (viewNormal.z < 0.0) {"); - src.push(" position = positions[2 - (gl_VertexID % 3)];"); - src.push(" }"); - src.push(" }"); - src.push("}"); - - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); - - // get XYZ offset - src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); - src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); - src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - if (clipping) { - src.push(" vWorldPosition = worldPosition;"); - src.push(" vFlags2 = flags2;"); - } - src.push("vec4 clipPos = projMatrix * viewPosition;"); - if (clipping) { - src.push("vWorldPosition = worldPosition;"); - src.push("vFlags2 = flags2.r;"); - } - src.push("gl_Position = clipPos;"); - src.push(" }"); - src.push("}"); - return src; - } - - _buildFragmentShader() { - const scene = this._scene; - const sectionPlanesState = scene._sectionPlanesState; - const clipping = sectionPlanesState.sectionPlanes.length > 0; - const src = []; - src.push('#version 300 es'); - src.push("// TrianglesDataTextureColorRenderer fragment shader"); - src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); - src.push("precision highp float;"); - src.push("precision highp int;"); - src.push("#else"); - src.push("precision mediump float;"); - src.push("precision mediump int;"); - src.push("#endif"); - if (clipping) { - src.push("in vec4 vWorldPosition;"); - src.push("in vec4 vFlags2;"); - for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push("uniform bool sectionPlaneActive" + i + ";"); - src.push("uniform vec3 sectionPlanePos" + i + ";"); - src.push("uniform vec3 sectionPlaneDir" + i + ";"); - } - } - src.push("out vec4 outColor;"); - src.push("void main(void) {"); - if (clipping) { - src.push(" bool clippable = (float(vFlags2.x) > 0.0);"); - src.push(" if (clippable) {"); - src.push(" float dist = 0.0;"); - for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push(" if (sectionPlaneActive" + i + ") {"); - src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); - src.push(" }"); - } - src.push(" if (dist > 0.0) { discard; }"); - src.push(" }"); - } - src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue - src.push("}"); - return src; - } - - webglContextRestored() { - this._program = null; - } - - destroy() { - if (this._program) { - this._program.destroy(); - } - this._program = null; - } -} - -const tempVec3a$b = math.vec3(); -const tempVec3b$6 = math.vec3(); -const tempVec3c$5 = math.vec3(); -const tempVec3d$2 = math.vec3(); -const tempMat4a$1 = math.mat4(); - -/** - * @private - */ -class TrianglesDataTextureDepthRenderer { - - constructor(scene) { - this._scene = scene; - this._allocate(); - this._hash = this._getHash(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); - } - - drawLayer(frameCtx, dataTextureLayer, renderPass) { - - const scene = this._scene; - const camera = scene.camera; - const model = dataTextureLayer.model; - const gl = scene.canvas.gl; - const state = dataTextureLayer._state; - const textureState = state.textureState; - const origin = dataTextureLayer._state.origin; - const {position, rotationMatrix, rotationMatrixConjugate} = model; - - if (!this._program) { - this._allocate(); - if (this.errors) { - return; - } - } - - if (frameCtx.lastProgramId !== this._program.id) { - frameCtx.lastProgramId = this._program.id; - this._bindProgram(frameCtx, state); - } - - textureState.bindCommonTextures( - this._program, - this._uTexturePerObjectIdPositionsDecodeMatrix, - this._uTexturePerVertexIdCoordinates, - this._uTexturePerObjectIdColorsAndFlags, - this._uTextureModelMatrices, - this._uTexturePerObjectIdOffsets - ); - - let rtcViewMatrix; - let rtcCameraEye; - - const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); - const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); - if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$b; - if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$6); - rtcOrigin[0] = rotatedOrigin[0]; - rtcOrigin[1] = rotatedOrigin[1]; - rtcOrigin[2] = rotatedOrigin[2]; - } else { - rtcOrigin[0] = 0; - rtcOrigin[1] = 0; - rtcOrigin[2] = 0; - } - rtcOrigin[0] += position[0]; - rtcOrigin[1] += position[1]; - rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$1); - rtcCameraEye = tempVec3c$5; - rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; - rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; - rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; - } else { - rtcViewMatrix = camera.viewMatrix; - rtcCameraEye = camera.eye; - } - - gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); - gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); - gl.uniform1i(this._uRenderPass, renderPass); - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } - - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$2); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - if (state.numIndices8Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -66155,7 +66161,6 @@ class TrianglesDataTextureDepthRenderer { this._uRenderPass = program.getLocation("renderPass"); this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; @@ -66292,9 +66297,6 @@ class TrianglesDataTextureDepthRenderer { src.push(" return;"); // Cull vertex src.push("} else {"); - // model matrices - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -66339,7 +66341,7 @@ class TrianglesDataTextureDepthRenderer { // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); src.push("viewNormal = -viewNormal;"); @@ -66352,7 +66354,7 @@ class TrianglesDataTextureDepthRenderer { src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -66451,10 +66453,10 @@ class TrianglesDataTextureDepthRenderer { } const tempVec3a$a = math.vec3(); -const tempVec3b$5 = math.vec3(); -const tempVec3c$4 = math.vec3(); -const tempVec3d$1 = math.vec3(); -const tempMat4a = math.mat4(); +const tempVec3b$6 = math.vec3(); +const tempVec3c$5 = math.vec3(); +const tempVec3d$2 = math.vec3(); +const tempMat4a$1 = math.mat4(); /** * @private @@ -66506,7 +66508,7 @@ class TrianglesDataTextureNormalsRenderer { if (gotOrigin || gotPosition) { const rtcOrigin = tempVec3a$a; if (gotOrigin) { - const rotatedOrigin = tempVec3b$5; + const rotatedOrigin = tempVec3b$6; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -66519,8 +66521,8 @@ class TrianglesDataTextureNormalsRenderer { rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a); - rtcCameraEye = tempVec3c$4; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$1); + rtcCameraEye = tempVec3c$5; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -66551,7 +66553,7 @@ class TrianglesDataTextureNormalsRenderer { if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$1); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$2); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -66788,14 +66790,22 @@ class TrianglesDataTextureNormalsRenderer { } const tempVec3a$9 = math.vec3(); +const tempVec3b$5 = math.vec3(); +const tempVec3c$4 = math.vec3(); +const tempVec3d$1 = math.vec3(); + +math.vec4(); + +const tempMat4a = math.mat4(); /** * @private */ class TrianglesDataTexturePickNormalsFlatRenderer { - constructor(scene) { + constructor(scene, withSAO) { this._scene = scene; + this._withSAO = withSAO; this._hash = this._getHash(); this._allocate(); } @@ -66805,90 +66815,82 @@ class TrianglesDataTexturePickNormalsFlatRenderer { }; _getHash() { - return this._scene._sectionPlanesState.getHash(); + const scene = this._scene; + return [scene._lightsState.getHash(), scene._sectionPlanesState.getHash(), (this._withSAO ? "sao" : "nosao")].join(";"); } drawLayer(frameCtx, dataTextureLayer, renderPass) { - const model = dataTextureLayer.model; - const scene = model.scene; + + const scene = this._scene; const camera = scene.camera; + const model = dataTextureLayer.model; const gl = scene.canvas.gl; const state = dataTextureLayer._state; + const textureState = state.textureState; const origin = dataTextureLayer._state.origin; + const {position, rotationMatrix, rotationMatrixConjugate} = model; if (!this._program) { - this._allocate(dataTextureLayer); + this._allocate(); + if (this.errors) { + return; + } } if (frameCtx.lastProgramId !== this._program.id) { frameCtx.lastProgramId = this._program.id; - this._bindProgram(); + this._bindProgram(frameCtx, state); } - this._program.bindTexture( - this._uTexturePerObjectIdPositionsDecodeMatrix, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerObjectIdPositionsDecodeMatrix); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 1 - ); - - this._program.bindTexture( - this._uTexturePerVertexIdCoordinates, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerVertexIdCoordinates); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 2 - ); - - this._program.bindTexture( + textureState.bindCommonTextures( + this._program, + this._uTexturePerObjectIdPositionsDecodeMatrix, + this._uTexturePerVertexIdCoordinates, this._uTexturePerObjectIdColorsAndFlags, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerObjectIdColorsAndFlags); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 3 - ); - - gl.uniform1i(this._uRenderPass, renderPass); - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - - gl.uniformMatrix4fv(this._uWorldMatrix, false, model.worldMatrix); - - const pickViewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const viewMatrix = origin ? createRTCViewMat(pickViewMatrix, origin) : pickViewMatrix; + this._uTextureModelMatrices, + this._uTexturePerObjectIdOffsets + ); - gl.uniformMatrix4fv(this._uViewMatrix, false, viewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, frameCtx.pickProjMatrix); + let rtcViewMatrix; + let rtcCameraEye; + const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); + const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); + if (gotOrigin || gotPosition) { + const rtcOrigin = tempVec3a$9; + if (gotOrigin) { + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$5); + rtcOrigin[0] = rotatedOrigin[0]; + rtcOrigin[1] = rotatedOrigin[1]; + rtcOrigin[2] = rotatedOrigin[2]; + } else { + rtcOrigin[0] = 0; + rtcOrigin[1] = 0; + rtcOrigin[2] = 0; + } + rtcOrigin[0] += position[0]; + rtcOrigin[1] += position[1]; + rtcOrigin[2] += position[2]; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a); + rtcCameraEye = tempVec3c$4; + rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; + rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; + rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; + } else { + rtcViewMatrix = camera.viewMatrix; // TODO: make pickMatrix + rtcCameraEye = camera.eye; + } + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); // TODO: pickProjMatrix + gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); + gl.uniform1i(this._uRenderPass, renderPass); if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far should be from projection matrix? + const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { const sectionPlanes = scene._sectionPlanesState.sectionPlanes; @@ -66896,159 +66898,73 @@ class TrianglesDataTexturePickNormalsFlatRenderer { const renderFlags = model.renderFlags; for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); + if (sectionPlaneUniforms) { + const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; + gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); + if (active) { + const sectionPlane = sectionPlanes[sectionPlaneIndex]; + if (origin) { + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$1); + gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); + } else { + gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); + } + gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } } } - //============================================================= - // TODO: Use drawElements count and offset to draw only one entity - //============================================================= - if (state.numIndices8Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds8Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices8Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 8 // 8 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); } if (state.numIndices16Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds16Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices16Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 16 // 16 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); } if (state.numIndices32Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds32Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices32Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 32 // 32 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); } - frameCtx.drawElements++; } _allocate() { - const scene = this._scene; const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { this.errors = this._program.errors; return; } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); + this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { this._uSectionPlanes.push({ active: program.getLocation("sectionPlaneActive" + i), @@ -67056,24 +66972,30 @@ class TrianglesDataTexturePickNormalsFlatRenderer { dir: program.getLocation("sectionPlaneDir" + i) }); } - - this._aPackedVertexId = program.getAttribute("packedVertexId"); - - if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } - - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; - this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; - this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; - this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; - this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; - this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; + this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; + this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; + this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; + this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; + this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; + this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; + this._uTextureModelMatrices = "uTextureModelMatrices"; + this._uTexturePerObjectIdOffsets = "uTexturePerObjectIdOffsets"; + this._uCameraEyeRtc = program.getLocation("uCameraEyeRtc"); } - _bindProgram() { - this._program.bind(); + _bindProgram(frameCtx) { + const scene = this._scene; + const gl = scene.canvas.gl; + const program = this._program; + const project = scene.camera.project; + program.bind(); + if (scene.logarithmicDepthBufferEnabled) { + const logDepthBufFC = 2.0 / (Math.log(project.far + 1.0) / Math.LN2); + gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); + } } _buildShader() { @@ -67085,10 +67007,12 @@ class TrianglesDataTexturePickNormalsFlatRenderer { _buildVertexShader() { const scene = this._scene; - const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; + const sectionPlanesState = scene._sectionPlanesState; + scene._lightsState; + const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push("#version 300 es"); - src.push("// Triangles dataTexture pick flat normals vertex shader"); + src.push("// trianglesDatatextureNormalsRenderer vertex shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); @@ -67106,112 +67030,147 @@ class TrianglesDataTexturePickNormalsFlatRenderer { src.push("uniform int renderPass;"); - src.push("in uvec3 packedVertexId;"); - if (scene.entityOffsetsEnabled) { src.push("in vec3 offset;"); } - src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); + src.push("uniform mat4 sceneModelWorldMatrix;"); src.push("uniform mat4 viewMatrix;"); src.push("uniform mat4 projMatrix;"); - // src.push("uniform sampler2D uOcclusionTexture;"); - src.push("uniform sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); - src.push("uniform usampler2D uTexturePerObjectIdColorsAndFlags;"); - src.push("uniform usampler2D uTexturePerVertexIdCoordinates;"); - src.push("uniform usampler2D uTexturePerPolygonIdIndices;"); - src.push("uniform isampler2D uTexturePerPolygonIdNormals;"); - src.push("uniform usampler2D uTexturePerPolygonIdPortionIds;"); + + src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); + src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); + src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); + src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); + src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); + src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); + src.push("uniform highp sampler2D uTextureModelMatrices;"); + src.push("uniform vec3 uCameraEyeRtc;"); + + src.push("vec3 positions[3];"); if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); - src.push("bool isPerspectiveMatrix(mat4 m) {"); - src.push(" return (m[2][3] == - 1.0);"); - src.push("}"); src.push("out float isPerspective;"); } + + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + + src.push("bool isPerspectiveMatrix(mat4 m) {"); + src.push(" return (m[2][3] == - 1.0);"); + src.push("}"); + src.push("out vec4 vWorldPosition;"); + if (clipping) { - src.push("out int vFlags2;"); + src.push("flat out uint vFlags2;"); } + src.push("void main(void) {"); // constants - // src.push("int objectIndex = int(packedVertexId.g) & 4095;"); src.push("int polygonIndex = gl_VertexID / 3;"); - src.push("int h_normal_index = polygonIndex & 4095;"); - src.push("int v_normal_index = polygonIndex >> 12;"); - // get packed object-id - src.push("int h_packed_object_id_index = ((polygonIndex >> 3) / 2) & 4095;"); - src.push("int v_packed_object_id_index = ((polygonIndex >> 3) / 2) >> 12;"); - - src.push("ivec3 packedObjectId = ivec3(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).rgb);"); + src.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"); + src.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"); - src.push("int objectIndex;"); - src.push("if (((polygonIndex >> 3) % 2) == 0) {"); - src.push(" objectIndex = (packedObjectId.r << 4) + (packedObjectId.g >> 4);"); - src.push("} else {"); - src.push(" objectIndex = ((packedObjectId.g & 15) << 8) + packedObjectId.b;"); - src.push("}"); + src.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"); src.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"); - // get vertex base - src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); + // get flags & flags2 + src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); + src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); // pickFlag = NOT_RENDERED | PICK - src.push("int h_index = polygonIndex & 4095;"); - src.push("int v_index = polygonIndex >> 12;"); + // renderPass = PICK + src.push(`if (int(flags.w) != renderPass) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); // Cull vertex + src.push("} else {"); + // get vertex base + src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); + src.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"); + src.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"); + src.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"); + src.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"); src.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"); src.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"); - src.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"); src.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"); - src.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"); - - // get flags & flags2 - src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); - src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - + src.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"); // get position - src.push("vec3 position1 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); - src.push("vec3 position2 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); - src.push("vec3 position3 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); + src.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); + src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); + src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); + + // get color + src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); + + src.push(`if (color.a == 0u) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); + src.push("};"); // get normal - src.push("vec3 normal = normalize(cross(position3 - position1, position2 - position1));"); - src.push("int vertexNumber = gl_VertexID % 3;"); + src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); + src.push("vec3 position;"); - src.push("if (vertexNumber == 0) position = position1;"); - src.push("else if (vertexNumber == 1) position = position2;"); - src.push("else position = position3;"); + src.push("position = positions[gl_VertexID % 3];"); + + src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + + // when the geometry is not solid, if needed, flip the triangle winding + src.push("if (solid != 1u) {"); + src.push("if (isPerspectiveMatrix(projMatrix)) {"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + // src.push("vColor = vec4(vec3(1, -1, 0)*dot(normalize(position.xyz - uCameraEyeRtcInQuantizedSpace), normal), 1);") + src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); + src.push("position = positions[2 - (gl_VertexID % 3)];"); + src.push("viewNormal = -viewNormal;"); + src.push("}"); + src.push("} else {"); + src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + src.push("if (viewNormal.z < 0.0) {"); + src.push("position = positions[2 - (gl_VertexID % 3)];"); + src.push("}"); + src.push("}"); + src.push("}"); + + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + + // get XYZ offset + src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); + + src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); + + src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - // flags.w = NOT_RENDERED | PICK - // renderPass = PICK - src.push(`if (int(flags.w) != renderPass) {`); - src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex - src.push(" } else {"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); - if (scene.entityOffsetsEnabled) { - src.push(" worldPosition.xyz = worldPosition.xyz + offset;"); - } - src.push(" vec4 viewPosition = viewMatrix * worldPosition; "); - src.push(" vWorldPosition = worldPosition;"); - if (clipping) { - src.push(" vFlags2 = flags2.r;"); - } src.push("vec4 clipPos = projMatrix * viewPosition;"); + if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); - src.push(" }"); + + src.push("vWorldPosition = worldPosition;"); + + if (clipping) { + src.push("vFlags2 = flags2.r;"); + } + src.push("gl_Position = remapClipPos(clipPos);"); + src.push("}"); src.push("}"); return src; } @@ -67221,12 +67180,8 @@ class TrianglesDataTexturePickNormalsFlatRenderer { const sectionPlanesState = scene._sectionPlanesState; const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; - src.push ('#version 300 es'); - src.push("// Triangles dataTexture pick flat normals fragment shader"); - src.push("#extension GL_OES_standard_derivatives : enable"); - if (scene.logarithmicDepthBufferEnabled) { - src.push("#extension GL_EXT_frag_depth : enable"); - } + src.push('#version 300 es'); + src.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); src.push("precision highp int;"); @@ -67241,26 +67196,28 @@ class TrianglesDataTexturePickNormalsFlatRenderer { } src.push("in vec4 vWorldPosition;"); if (clipping) { - src.push("in int vFlags2;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + src.push("flat in uint vFlags2;"); + for (let i = 0, len = sectionPlanesState.sectionPlanes.length; i < len; i++) { src.push("uniform bool sectionPlaneActive" + i + ";"); src.push("uniform vec3 sectionPlanePos" + i + ";"); src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("out vec4 outNormal;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { - src.push(" bool clippable = vFlags2 > 0;"); + src.push(" bool clippable = vFlags2 > 0u;"); src.push(" if (clippable) {"); - src.push(" float dist = 0.0;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push(" if (sectionPlaneActive" + i + ") {"); - src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); - src.push(" }"); + src.push(" float dist = 0.0;"); + for (let i = 0, len = sectionPlanesState.sectionPlanes.length; i < len; i++) { + src.push("if (sectionPlaneActive" + i + ") {"); + src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); + src.push("}"); } - src.push(" if (dist > 0.0) { discard; }"); + src.push(" if (dist > 0.0) { "); + src.push(" discard;"); src.push(" }"); + src.push("}"); } if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); @@ -67268,7 +67225,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer { src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outNormal = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -67365,6 +67322,33 @@ class TrianglesDataTextureRenderers { } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesDataTextureSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesDataTexturePickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesDataTexturePickDepthRenderer(this._scene); + } + if (!this._pickNormalsRenderer) { + this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene); + } + if (!this._vertexDepthRenderer) { + this._vertexDepthRenderer = new TrianglesDataTextureSnapDepthRenderer(this._scene); + } + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new TrianglesDataTextureSnapDepthBufInitRenderer(this._scene); + } + } + + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesDataTextureColorRenderer(this._scene, false); @@ -67380,9 +67364,9 @@ class TrianglesDataTextureRenderers { } get colorQualityRendererWithSAO() { - if (!this._colorQualityRendererWithSAO) { - this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true); - } + // if (!this._colorQualityRendererWithSAO) { + // this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true); + // } return this._colorQualityRendererWithSAO; } @@ -67430,7 +67414,7 @@ class TrianglesDataTextureRenderers { get pickNormalsRenderer() { if (!this._pickNormalsRenderer) { - this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsRenderer(this._scene); + this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene); } return this._pickNormalsRenderer; } @@ -67537,8 +67521,10 @@ function getDataTextureRenderers(scene) { dataTextureRenderers = new TrianglesDataTextureRenderers(scene); cachdRenderers[sceneId] = dataTextureRenderers; dataTextureRenderers._compile(); + dataTextureRenderers.eagerCreateRenders(); scene.on("compile", () => { dataTextureRenderers._compile(); + dataTextureRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachdRenderers[sceneId]; @@ -67788,32 +67774,13 @@ class DataTextureState { 3 // webgl texture unit ); - this.textureModelMatrices.bindTexture( - glProgram, - modelMatricesShaderName, - 4 // webgl texture unit - ); - this.texturePerObjectIdOffsets.bindTexture( glProgram, objectOffsetsShaderName, - 5 // webgl texture unit + 4 // webgl texture unit ); } - /** - * - * @param {Program} glProgram - * @param {string} cameraMatricesShaderName - */ - bindPickCameraTexture(glProgram, cameraMatricesShaderName) { - // this.texturePickCameraMatrices.bindTexture( - // glProgram, - // cameraMatricesShaderName, - // 4 // webgl texture unit - // ); - } - /** * * @param {Program} glProgram @@ -67830,13 +67797,13 @@ class DataTextureState { this.indicesPortionIdsPerBitnessTextures[textureBitness].bindTexture( glProgram, portionIdsShaderName, - 6 // webgl texture unit + 5 // webgl texture unit ); this.indicesPerBitnessTextures[textureBitness].bindTexture( glProgram, polygonIndicesShaderName, - 7 // webgl texture unit + 6 // webgl texture unit ); } @@ -67856,13 +67823,13 @@ class DataTextureState { this.edgeIndicesPortionIdsPerBitnessTextures[textureBitness].bindTexture( glProgram, edgePortionIdsShaderName, - 6 // webgl texture unit + 5 // webgl texture unit ); this.edgeIndicesPerBitnessTextures[textureBitness].bindTexture( glProgram, edgeIndicesShaderName, - 7 // webgl texture unit + 6 // webgl texture unit ); } } @@ -67972,188 +67939,6 @@ class DataTextureGenerator { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); } - /** - * Generate and return a `camera data texture`. - * - * The texture will automatically update its contents before each render when the camera matrix is dirty, - * and to do so will use the following events: - * - * - `scene.rendering` event will be used to know that the camera texture should be updated - * - `camera.matrix` event will be used to know that the camera matices changed - * - * @param {WebGL2RenderingContext} gl - * @param {Camera} camera - * @param {Scene} scene - * @param {null|number[3]} origin - * @returns {BindableDataTexture} - */ - generateCameraDataTexture(gl, camera, scene, origin) { - const textureWidth = 4; - const textureHeight = 3; // space for 3 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - const cameraTexture = new BindableDataTexture(gl, texture, textureWidth, textureHeight); - let cameraDirty = true; - cameraTexture.updateViewMatrix = (viewMatrix, projMatrix) => { - gl.bindTexture(gl.TEXTURE_2D, cameraTexture._texture); - // Camera's "view matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 0, // 1st matrix: camera view matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array((origin) ? createRTCViewMat(viewMatrix, origin) : viewMatrix) - ); - - // Camera's "view normal matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 1, // 2nd matrix: camera view normal matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(camera.viewNormalMatrix) - ); - - // Camera's "project matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 2, // 3rd matrix: camera project matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(projMatrix) - ); - }; - const onCameraMatrix = () => { - if (!cameraDirty) { - return; - } - cameraDirty = false; - cameraTexture.updateViewMatrix(camera.viewMatrix, camera.project.matrix); - }; - camera.on("matrix", () => cameraDirty = true); - scene.on("rendering", onCameraMatrix); - onCameraMatrix(); - return cameraTexture; - } - - /** - * Generate and return a texture containing camera view and projection - * matrices for picking, relative to the given RTC coordinate system origin. - * - * @param {WebGL2RenderingContext} gl - * @param {Camera} camera - * @param {null|number[3]} origin - * @returns {BindableDataTexture} - */ - generatePickCameraDataTexture(gl, camera, origin) { - const textureWidth = 4; - const textureHeight = 3; // space for 3 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - const cameraTexture = new BindableDataTexture(gl, texture, textureWidth, textureHeight); - cameraTexture.updateViewMatrix = (viewMatrix, projMatrix) => { - gl.bindTexture(gl.TEXTURE_2D, cameraTexture._texture); - // Camera's "view matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 0, // 1st matrix: pick camera view matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array((origin) ? createRTCViewMat(viewMatrix, origin) : viewMatrix) - ); - - // Camera's "view normal matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 1, // 2nd matrix: pick camera view normal matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(camera.viewNormalMatrix) - ); - - // Camera's "project matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 2, // 3rd matrix: pick camera project matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(projMatrix) - ); - }; - return cameraTexture; - } - - /** - * Generate and return a `model data texture`. - * - * @param {WebGL2RenderingContext} gl - * @param {DataTextureSceneModel} model - * - * @returns {BindableDataTexture} - */ - generateModelTexture(gl, model) { - const textureWidth = 4; - const textureHeight = 2; // space for 2 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, // x-offset - 0, // y-offset (model world matrix) - 4, // data width (4x4 values) - 1, // data height (1 matrix) - gl.RGBA, - gl.FLOAT, - new Float32Array(model.worldMatrix) - ); - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, // x-offset - 1, // y-offset (model normal matrix) - 4, // data width (4x4 values) - 1, // data height (1 matrix) - gl.RGBA, - gl.FLOAT, - new Float32Array(model.worldNormalMatrix) - ); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - return new BindableDataTexture(gl, texture, textureWidth, textureHeight); - } - /** * This will generate an RGBA texture for: * - colors @@ -69128,34 +68913,6 @@ class TrianglesDataTextureLayer { buffer.edgeIndices32Bits); } - // if (buffer.metallicRoughness.length > 0) { - // const metallicRoughness = new Uint8Array(buffer.metallicRoughness); - // let normalized = false; - // state.metallicRoughnessBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, metallicRoughness, buffer.metallicRoughness.length, 2, gl.STATIC_DRAW, normalized); - // } - - // Model matrices texture - if (!this.model._modelMatricesTexture) { - this.model._modelMatricesTexture = this._dataTextureGenerator.generateModelTexture(gl, this.model); - } - - textureState.textureModelMatrices = this.model._modelMatricesTexture; - - // Camera textures - - textureState.cameraTexture = this._dataTextureGenerator.generateCameraDataTexture( - this.model.scene.canvas.gl, - this.model.scene.camera, - this.model.scene, - this._state.origin.slice()); - - textureState.textureCameraMatrices = textureState.cameraTexture; - - textureState.texturePickCameraMatrices = this._dataTextureGenerator.generatePickCameraDataTexture( - this.model.scene.canvas.gl, - this.model.scene.camera, - this._state.origin.slice()); - textureState.finalize(); // Free up memory @@ -69537,14 +69294,12 @@ class TrianglesDataTextureLayer { // object flags textureState.texturePerObjectIdColorsAndFlags._textureData.set(tempUint8Array4, subPortionId * 32 + 8); if (this._deferredSetFlagsActive || deferred) { - console.info("_subPortionSetFlags set flags defer"); this._deferredSetFlagsDirty = true; return; } if (++this._numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE) { this._beginDeferredFlags(); // Subsequent flags updates now deferred } - console.info("_subPortionSetFlags set flags write through"); gl.bindTexture(gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture); gl.texSubImage2D( gl.TEXTURE_2D, @@ -69591,7 +69346,6 @@ class TrianglesDataTextureLayer { if (++this._numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE) { this._beginDeferredFlags(); // Subsequent flags updates now deferred } - console.info("_subPortionSetFlags2 set flags write through"); gl.bindTexture(gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture); gl.texSubImage2D( gl.TEXTURE_2D, @@ -69830,10 +69584,10 @@ class TrianglesDataTextureLayer { //---- PICKING ---------------------------------------------------------------------------------------------------- setPickMatrices(pickViewMatrix, pickProjMatrix) { - if (this._numVisibleLayerPortions === 0) { - return; - } - this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(pickViewMatrix, pickProjMatrix); + // if (this._numVisibleLayerPortions === 0) { + // return; + // } + // this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(pickViewMatrix, pickProjMatrix); } drawPickMesh(renderFlags, frameCtx) { @@ -72508,6 +72262,10 @@ class SceneModel extends Component { return null; } + if (cfg.normals) { // HACK + cfg.normals = null; + } + const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")); cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin; @@ -72780,7 +72538,8 @@ class SceneModel extends Component { countIndices += cfg.positions ? cfg.positions.length : cfg.positionsCompressed.length; break; case VBO_INSTANCED: - countIndices += cfg.positions ? cfg.positions.length : cfg.positionsCompressed.length; + const geometry = cfg.geometry; + countIndices += geometry.positions ? geometry.positions.length : geometry.positionsCompressed.length; break; } return Math.round(countIndices); @@ -74257,7 +74016,8 @@ class PickController { const snapPickResult = this._scene.snapPick({ canvasPos: this.pickCursorPos, snapRadius: this._configs.snapRadius, - snapMode: this._configs.snapMode, + snapToVertex: this._configs.snapToVertex, + snapToEdge: this._configs.snapToEdge, }); if (snapPickResult && snapPickResult.snappedWorldPos) { this.snapPickResult = snapPickResult; @@ -74348,20 +74108,19 @@ class PickController { if (this.hoveredSnappedOrSurfaceOff) { this._cameraControl.fire("hoverSnapOrSurfaceOff", { - canvasPos: this.pickCursorPos + canvasPos: this.pickCursorPos, + cursorPos : this.pickCursorPos }, true); } if (this.snappedOrPicked) { if (this.snapPickResult) { const pickResult = new PickResult(); + pickResult.snappedToVertex = this.snapPickResult.snappedToVertex; + pickResult.snappedToEdge = this.snapPickResult.snappedToEdge; pickResult.worldPos = this.snapPickResult.snappedWorldPos; + pickResult.cursorPos = this.pickCursorPos; pickResult.canvasPos = this.snapPickResult.snappedCanvasPos; - if (this._configs.snapMode === "vertex") { - pickResult.snappedToVertex = true; - } else { - pickResult.snappedToEdge = true; - } this._cameraControl.fire("hoverSnapOrSurface", pickResult, true); this.snapPickResult = null; } else { @@ -74424,7 +74183,7 @@ class PickController { const canvasPos = math.vec2(); -const getCanvasPosFromEvent$4 = function (event, canvasPos) { +const getCanvasPosFromEvent$3 = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -74673,7 +74432,7 @@ class MousePanRotateDollyHandler { } switch (e.which) { case 3: // Right button - getCanvasPosFromEvent$4(e, canvasPos); + getCanvasPosFromEvent$3(e, canvasPos); const x = canvasPos[0]; const y = canvasPos[1]; if (Math.abs(x - lastXDown) < 3 && Math.abs(y - lastYDown) < 3) { @@ -75744,14 +75503,14 @@ class MouseMiscHandler { }); document.addEventListener("mousemove", this._mouseMoveHandler = (e) => { - getCanvasPosFromEvent$3(e, canvas, states.pointerCanvasPos); + getCanvasPosFromEvent$2(e, canvas, states.pointerCanvasPos); }); canvas.addEventListener("mousedown", this._mouseDownHandler = (e) => { if (!(configs.active && configs.pointerEnabled)) { return; } - getCanvasPosFromEvent$3(e, canvas, states.pointerCanvasPos); + getCanvasPosFromEvent$2(e, canvas, states.pointerCanvasPos); states.mouseover = true; }); @@ -75777,7 +75536,7 @@ class MouseMiscHandler { } } -function getCanvasPosFromEvent$3(event, canvas, canvasPos) { +function getCanvasPosFromEvent$2(event, canvas, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -75790,7 +75549,7 @@ function getCanvasPosFromEvent$3(event, canvas, canvasPos) { return canvasPos; } -const getCanvasPosFromEvent$2 = function (event, canvasPos) { +const getCanvasPosFromEvent$1 = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -75852,7 +75611,7 @@ class TouchPanRotateAndDollyHandler { if (touches.length === 1 && changedTouches.length === 1) { - getCanvasPosFromEvent$2(touches[0], tapStartCanvasPos); + getCanvasPosFromEvent$1(touches[0], tapStartCanvasPos); if (configs.followPointer) { @@ -75892,7 +75651,7 @@ class TouchPanRotateAndDollyHandler { } for (let i = 0, len = touches.length; i < len; ++i) { - getCanvasPosFromEvent$2(touches[i], lastCanvasTouchPosList[i]); + getCanvasPosFromEvent$1(touches[i], lastCanvasTouchPosList[i]); } numTouches = touches.length; @@ -75936,7 +75695,7 @@ class TouchPanRotateAndDollyHandler { if (numTouches === 1) { - getCanvasPosFromEvent$2(touches[0], tapCanvasPos0); + getCanvasPosFromEvent$1(touches[0], tapCanvasPos0); //----------------------------------------------------------------------------------------------- // Drag rotation @@ -75973,8 +75732,20 @@ class TouchPanRotateAndDollyHandler { } } else { - updates.rotateDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation - updates.rotateDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // if (!absorbTinyFirstDrag) { + updates.rotateDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation + updates.rotateDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // } else { + // firstDragDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation + // firstDragDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // if (Math.abs(firstDragDeltaX) > 5 || Math.abs(firstDragDeltaY) > 5) { + // updates.rotateDeltaX += firstDragDeltaX; + // updates.rotateDeltaY += firstDragDeltaY; + // firstDragDeltaX = 0; + // firstDragDeltaY = 0; + // absorbTinyFirstDrag = false; + // } + // } } } else if (numTouches === 2) { @@ -75982,8 +75753,8 @@ class TouchPanRotateAndDollyHandler { const touch0 = touches[0]; const touch1 = touches[1]; - getCanvasPosFromEvent$2(touch0, tapCanvasPos0); - getCanvasPosFromEvent$2(touch1, tapCanvasPos1); + getCanvasPosFromEvent$1(touch0, tapCanvasPos0); + getCanvasPosFromEvent$1(touch1, tapCanvasPos1); const lastMiddleTouch = math.geometricMeanVec2(lastCanvasTouchPosList[0], lastCanvasTouchPosList[1]); const currentMiddleTouch = math.geometricMeanVec2(tapCanvasPos0, tapCanvasPos1); @@ -76031,7 +75802,7 @@ class TouchPanRotateAndDollyHandler { } for (let i = 0; i < numTouches; ++i) { - getCanvasPosFromEvent$2(touches[i], lastCanvasTouchPosList[i]); + getCanvasPosFromEvent$1(touches[i], lastCanvasTouchPosList[i]); } }); } @@ -76052,7 +75823,7 @@ const TAP_INTERVAL = 150; const DBL_TAP_INTERVAL = 325; const TAP_DISTANCE_THRESHOLD = 4; -const getCanvasPosFromEvent$1 = function (event, canvasPos) { +const getCanvasPosFromEvent = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -76131,7 +75902,7 @@ class TouchPickHandler { if (touches.length === 1 && changedTouches.length === 1) { tapStartTime = touchStartTime; - getCanvasPosFromEvent$1(touches[0], tapStartPos); + getCanvasPosFromEvent(touches[0], tapStartPos); const rightClickClientX = tapStartPos[0]; const rightClickClientY = tapStartPos[1]; @@ -76158,7 +75929,7 @@ class TouchPickHandler { } for (let i = 0, len = touches.length; i < len; ++i) { - getCanvasPosFromEvent$1(touches[i], activeTouches[i]); + getCanvasPosFromEvent(touches[i], activeTouches[i]); } activeTouches.length = touches.length; @@ -76193,7 +75964,7 @@ class TouchPickHandler { // Double-tap - getCanvasPosFromEvent$1(changedTouches[0], pickController.pickCursorPos); + getCanvasPosFromEvent(changedTouches[0], pickController.pickCursorPos); pickController.schedulePickEntity = true; pickController.schedulePickSurface = pickedSurfaceSubs; @@ -76225,7 +75996,7 @@ class TouchPickHandler { // Single-tap - getCanvasPosFromEvent$1(changedTouches[0], pickController.pickCursorPos); + getCanvasPosFromEvent(changedTouches[0], pickController.pickCursorPos); pickController.schedulePickEntity = true; pickController.schedulePickSurface = pickedSurfaceSubs; @@ -76280,6 +76051,8 @@ class TouchPickHandler { } const DEFAULT_SNAP_PICK_RADIUS = 30; +const DEFAULT_SNAP_VERTEX = true; +const DEFAULT_SNAP_EDGE = true; /** * @desc Controls the {@link Camera} with user input, and fires events when the user interacts with pickable {@link Entity}s. @@ -76907,7 +76680,8 @@ class CameraControl extends Component { smartPivot: false, doubleClickTimeFrame: 250, - snapMode: "vertex", + snapToVertex: DEFAULT_SNAP_VERTEX, + snapToEdge: DEFAULT_SNAP_EDGE, snapRadius: DEFAULT_SNAP_PICK_RADIUS, // Rotation @@ -77144,7 +76918,10 @@ class CameraControl extends Component { * @param {Boolean} value Set ````true```` to activate this ````CameraControl````. */ set active(value) { - this._configs.active = value !== false; + value = value !== false; + this._configs.active = value; + this._handlers[1]._active = value; + this._handlers[5]._active = value; } /** @@ -77161,32 +76938,39 @@ class CameraControl extends Component { } /** - * Sets the current snap mode for "hoverSnapOrSurface" events, to specify whether the pointer - * snaps to the nearest vertex or the nearest edge. + * Sets whether the pointer snap to vertex. * - * Accepted values are: + * @param {boolean} snapToVertex + */ + set snapToVertex(snapToVertex) { + this._configs.snapToVertex = !!snapToVertex; + } + + /** + * Gets whether the pointer snap to vertex. * - * * "vertex" - (default) snap to the nearest vertex, or - * * "edge" - snap to the nearest edge. + * @returns {boolean} + */ + get snapToVertex() { + return this._configs.snapToVertex; + } + + /** + * Sets whether the pointer snap to edge. * - * @param {String} snapMode The snap mode: "vertex" or "edge". + * @param {boolean} snapToEdge */ - set snapMode(snapMode) { - snapMode = snapMode || "vertex"; - if (snapMode !== "vertex" && snapMode !== "edge") { - this.error("Unsupported value for snapMode: " + snapMode + " - supported values are 'vertex' and 'edge' - defaulting to 'vertex'"); - snapMode = "vertex"; - } - this._configs.snapMode = snapMode; + set snapToEdge(snapToEdge) { + this._configs.snapToEdge = !!snapToEdge; } /** - * Gets the current snap mode. + * Gets whether the pointer snap to edge. * - * @returns {String} The snap mode: "vertex" or "edge". + * @returns {boolean} */ - get snapMode() { - return this._configs.snapMode; + get snapToEdge() { + return this._configs.snapToEdge; } /** @@ -87401,428 +87185,6 @@ class Viewer { } } -/** - * {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching - * the Viewer to faster, lower-quality rendering modes whenever we interact. - * - * [](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin) - * - * FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas - * resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those - * rendering features and the original canvas scale, after a configured delay. - * - * Depending on how we configure FastNavPlugin, we essentially switch to a smooth-rendering low-quality view while - * interacting, then return to the normal higher-quality view after we stop, following an optional delay. - * - * Down-scaling the canvas resolution gives particularly good results. For example, scaling by ````0.5```` means that - * we're rendering a quarter of the pixels while interacting, which can make the Viewer noticeably smoother with big models. - * - * The screen capture above shows FastNavPlugin in action. In this example, whenever we move the Camera or resize the Canvas, - * FastNavPlugin switches off enhanced edges and ambient shadows (SAO), and down-scales the canvas, making it slightly - * blurry. When ````0.5```` seconds passes with no interaction, the plugin shows edges and SAO again, and restores the - * original canvas scale. - * - * # Usage - * - * In the example below, we'll create a {@link Viewer}, add a {@link FastNavPlugin}, then use an {@link XKTLoaderPlugin} to load a model. - * - * Whenever we interact with the Viewer, our FastNavPlugin will: - * - * * hide edges, - * * hide ambient shadows (SAO), - * * hide physically-based materials (switching to non-PBR), - * * hide transparent objects, and - * * scale the canvas resolution by 0.5, causing the GPU to render 75% less pixels. - *
- * - * We'll also configure a 0.5 second delay before we transition back to high-quality each time we stop ineracting, so that we're - * not continually flipping between low and high quality as we interact. Since we're only rendering ambient shadows when not interacting, we'll also treat ourselves - * to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect. - * - * * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin)] - * - * ````javascript - * import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js"; - * - * // Create a Viewer with PBR and SAO enabled - * - * const viewer = new Viewer({ - * canvasId: "myCanvas", - * transparent: true, - * pbr: true, // Enable physically-based rendering for Viewer - * sao: true // Enable ambient shadows for Viewer - * }); - * - * viewer.scene.camera.eye = [-66.26, 105.84, -281.92]; - * viewer.scene.camera.look = [42.45, 49.62, -43.59]; - * viewer.scene.camera.up = [0.05, 0.95, 0.15]; - * - * // Higher-quality SAO settings - * - * viewer.scene.sao.enabled = true; - * viewer.scene.sao.numSamples = 60; - * viewer.scene.sao.kernelRadius = 170; - * - * // Install a FastNavPlugin - * - * new FastNavPlugin(viewer, { - * hideEdges: true, // Don't show edges while we interact (default is true) - * hideSAO: true, // Don't show ambient shadows while we interact (default is true) - * hideColorTexture: true, // No color textures while we interact (default is true) - * hidePBR: true, // No physically-based rendering while we interact (default is true) - * hideTransparentObjects: true, // Hide transparent objects while we interact (default is false) - * scaleCanvasResolution: true, // Scale canvas resolution while we interact (default is false) - * scaleCanvasResolutionFactor: 0.5, // Factor by which we scale canvas resolution when we interact (default is 0.6) - * delayBeforeRestore: true, // When we stop interacting, delay before restoring normal render (default is true) - * delayBeforeRestoreSeconds: 0.5 // The delay duration, in seconds (default is 0.5) - * }); - * - * // Load a BIM model from XKT - * - * const xktLoader = new XKTLoaderPlugin(viewer); - * - * const model = xktLoader.load({ - * id: "myModel", - * src: "./models/xkt/HolterTower.xkt", - * sao: true, // Enable ambient shadows for this model - * pbr: true // Enable physically-based rendering for this model - * }); - * ```` - * - * @class FastNavPlugin - */ -class FastNavPlugin extends Plugin { - - /** - * @constructor - * @param {Viewer} viewer The Viewer. - * @param {Object} cfg FastNavPlugin configuration. - * @param {String} [cfg.id="FastNav"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. - * @param {Boolean} [cfg.hideColorTexture=true] Whether to temporarily hide color textures whenever we interact with the Viewer. - * @param {Boolean} [cfg.hidePBR=true] Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideSAO=true] Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideEdges=true] Whether to temporarily hide edges whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideTransparentObjects=false] Whether to temporarily hide transparent objects whenever we interact with the Viewer. - * @param {Number} [cfg.scaleCanvasResolution=false] Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. - * @param {Number} [cfg.scaleCanvasResolutionFactor=0.6] The factor by which we downscale the canvas resolution whenever we interact with the Viewer. - * @param {Boolean} [cfg.delayBeforeRestore=true] Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. - * @param {Number} [cfg.delayBeforeRestoreSeconds=0.5] Delay in seconds before restoring normal rendering after we stop interacting with the Viewer. - */ - constructor(viewer, cfg = {}) { - - super("FastNav", viewer); - - this._hideColorTexture = cfg.hideColorTexture !== false; - this._hidePBR = cfg.hidePBR !== false; - this._hideSAO = cfg.hideSAO !== false; - this._hideEdges = cfg.hideEdges !== false; - this._hideTransparentObjects = !!cfg.hideTransparentObjects; - this._scaleCanvasResolution = !!cfg.scaleCanvasResolution; - this._scaleCanvasResolutionFactor = cfg.scaleCanvasResolutionFactor || 0.6; - this._delayBeforeRestore = (cfg.delayBeforeRestore !== false); - this._delayBeforeRestoreSeconds = cfg.delayBeforeRestoreSeconds || 0.5; - - let timer = this._delayBeforeRestoreSeconds * 1000; - let fastMode = false; - - const switchToLowQuality = () => { - timer = (this._delayBeforeRestoreSeconds * 1000); - if (!fastMode) { - viewer.scene._renderer.setColorTextureEnabled(!this._hideColorTexture); - viewer.scene._renderer.setPBREnabled(!this._hidePBR); - viewer.scene._renderer.setSAOEnabled(!this._hideSAO); - viewer.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects); - viewer.scene._renderer.setEdgesEnabled(!this._hideEdges); - if (this._scaleCanvasResolution) { - viewer.scene.canvas.resolutionScale = this._scaleCanvasResolutionFactor; - } else { - viewer.scene.canvas.resolutionScale = 1; - } - fastMode = true; - } - }; - - const switchToHighQuality = () => { - viewer.scene.canvas.resolutionScale = 1; - viewer.scene._renderer.setEdgesEnabled(true); - viewer.scene._renderer.setColorTextureEnabled(true); - viewer.scene._renderer.setPBREnabled(true); - viewer.scene._renderer.setSAOEnabled(true); - viewer.scene._renderer.setTransparentEnabled(true); - fastMode = false; - }; - - this._onCanvasBoundary = viewer.scene.canvas.on("boundary", switchToLowQuality); - this._onCameraMatrix = viewer.scene.camera.on("matrix", switchToLowQuality); - - this._onSceneTick = viewer.scene.on("tick", (tickEvent) => { - if (!fastMode) { - return; - } - timer -= tickEvent.deltaTime; - if ((!this._delayBeforeRestore) || timer <= 0) { - switchToHighQuality(); - } - }); - - let down = false; - - this._onSceneMouseDown = viewer.scene.input.on("mousedown", () => { - down = true; - }); - - this._onSceneMouseUp = viewer.scene.input.on("mouseup", () => { - down = false; - }); - - this._onSceneMouseMove = viewer.scene.input.on("mousemove", () => { - if (!down) { - return; - } - switchToLowQuality(); - }); - } - - /** - * Gets whether to temporarily hide color textures whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding color textures. - */ - get hideColorTexture() { - return this._hideColorTexture; - } - - /** - * Sets whether to temporarily hide color textures whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideColorTexture ````true```` to hide color textures. - */ - set hideColorTexture(hideColorTexture) { - this._hideColorTexture = hideColorTexture; - } - - /** - * Gets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding PBR. - */ - get hidePBR() { - return this._hidePBR; - } - - /** - * Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hidePBR ````true```` to hide PBR. - */ - set hidePBR(hidePBR) { - this._hidePBR = hidePBR; - } - - /** - * Gets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding SAO. - */ - get hideSAO() { - return this._hideSAO; - } - - /** - * Sets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideSAO ````true```` to hide SAO. - */ - set hideSAO(hideSAO) { - this._hideSAO = hideSAO; - } - - /** - * Gets whether to temporarily hide edges whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding edges. - */ - get hideEdges() { - return this._hideEdges; - } - - /** - * Sets whether to temporarily hide edges whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideEdges ````true```` to hide edges. - */ - set hideEdges(hideEdges) { - this._hideEdges = hideEdges; - } - - /** - * Gets whether to temporarily hide transparent objects whenever we interact with the Viewer. - * - * Does not hide X-rayed, selected, highlighted objects. - * - * Default is ````false````. - * - * @return {Boolean} ````true```` if hiding transparent objects. - */ - get hideTransparentObjects() { - return this._hideTransparentObjects - } - - /** - * Sets whether to temporarily hide transparent objects whenever we interact with the Viewer. - * - * Does not hide X-rayed, selected, highlighted objects. - * - * Default is ````false````. - * - * @param {Boolean} hideTransparentObjects ````true```` to hide transparent objects. - */ - set hideTransparentObjects(hideTransparentObjects) { - this._hideTransparentObjects = (hideTransparentObjects !== false); - } - - /** - * Gets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. - * - * Default is ````false````. - * - * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. - * - * @return {Boolean} ````true```` if scaling the canvas resolution. - */ - get scaleCanvasResolution() { - return this._scaleCanvasResolution; - } - - /** - * Sets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. - * - * Default is ````false````. - * - * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. - * - * @param {Boolean} scaleCanvasResolution ````true```` to scale the canvas resolution. - */ - set scaleCanvasResolution(scaleCanvasResolution) { - this._scaleCanvasResolution = scaleCanvasResolution; - } - - /** - * Gets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. - * - * Default is ````0.6````. - * - * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. - * - * @return {Number} Factor by which we scale the canvas resolution. - */ - get scaleCanvasResolutionFactor() { - return this._scaleCanvasResolutionFactor; - } - - /** - * Sets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. - * - * Accepted range is ````[0.0 .. 1.0]````. - * - * Default is ````0.6````. - * - * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. - * - * @param {Number} scaleCanvasResolutionFactor Factor by which we scale the canvas resolution. - */ - set scaleCanvasResolutionFactor(scaleCanvasResolutionFactor) { - this._scaleCanvasResolutionFactor = scaleCanvasResolutionFactor || 0.6; - } - - /** - * Gets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. - * - * Default is ````true````. - * - * @return {Boolean} Whether to have a delay. - */ - get delayBeforeRestore() { - return this._delayBeforeRestore; - } - - /** - * Sets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. - * - * Default is ````true````. - * - * @param {Boolean} delayBeforeRestore Whether to have a delay. - */ - set delayBeforeRestore(delayBeforeRestore) { - this._delayBeforeRestore = delayBeforeRestore; - } - - /** - * Gets the delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. - * - * Default is ````0.5```` seconds. - * - * @return {Number} Delay in seconds. - */ - get delayBeforeRestoreSeconds() { - return this._delayBeforeRestoreSeconds; - } - - /** - * Sets the delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. - * - * Default is ````0.5```` seconds. - * - * @param {Number} delayBeforeRestoreSeconds Delay in seconds. - */ - set delayBeforeRestoreSeconds(delayBeforeRestoreSeconds) { - this._delayBeforeRestoreSeconds = delayBeforeRestoreSeconds !== null && delayBeforeRestoreSeconds !== undefined ? delayBeforeRestoreSeconds : 0.5; - } - - /** - * @private - */ - send(name, value) { - } - - /** - * Destroys this plugin. - */ - destroy() { - this.viewer.scene.camera.off(this._onCameraMatrix); - this.viewer.scene.canvas.off(this._onCanvasBoundary); - this.viewer.scene.input.off(this._onSceneMouseDown); - this.viewer.scene.input.off(this._onSceneMouseUp); - this.viewer.scene.input.off(this._onSceneMouseMove); - this.viewer.scene.off(this._onSceneTick); - super.destroy(); - } -} - const isBrowser$4 = Boolean(typeof process !== 'object' || String(process) !== '[object process]' || process.browser); const matches$1 = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version); matches$1 && parseFloat(matches$1[1]) || 0; diff --git a/dist/xeokit-bim-viewer.min.es.js b/dist/xeokit-bim-viewer.min.es.js index 484ae9b7..13e4e8fc 100644 --- a/dist/xeokit-bim-viewer.min.es.js +++ b/dist/xeokit-bim-viewer.min.es.js @@ -1,4 +1,4 @@ -class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const t=new e;class s{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class i{constructor(){this.items=[]}}class r{constructor(e,t,s,i,r){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=i,this.getShown=r,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class o{constructor(e={}){this._id=t.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,i=s.length;e{const o=this._getNextId(),n=new s(o);for(let s=0,o=e.length;s0,h=this._getNextId(),c=s.getTitle||(()=>s.title||""),A=s.doAction||s.callback||(()=>{}),u=s.getEnabled||(()=>!0),p=s.getShown||(()=>!0),d=new r(h,c,A,u,p);if(d.parentMenu=n,a.items.push(d),l){const e=t(i);d.subMenu=e,e.parentItem=d}this._itemList.push(d),this._itemMap[d.id]=d}}return this._menuList.push(n),this._menuMap[n.id]=n,n};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,i=s.length;t'),s.push("
    "),t)for(let e=0,i=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const i=s.join("");document.body.insertAdjacentHTML("beforeend",i);const r=document.querySelector("."+e.id);e.menuElement=r,r.style["border-radius"]="4px",r.style.display="none",r.style["z-index"]=3e5,r.style.background="white",r.style.border="1px solid black",r.style["box-shadow"]="0 4px 5px 0 gray",r.oncontextmenu=e=>{e.preventDefault()};const o=this;let n=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(n&&(o._hideMenu(n.id),n=null));if(n&&n.id!==s.id&&(o._hideMenu(n.id),n=null),!1===t.enabled)return;const i=t.itemElement,r=s.menuElement,a=i.getBoundingClientRect();r.getBoundingClientRect();a.right+200>window.innerWidth?o._showMenu(s.id,a.left-200,a.top-1):o._showMenu(s.id,a.right-5,a.top-1),n=s})),i||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),o._context&&!1!==t.enabled&&(t.doAction&&t.doAction(o._context),this._hideOnAction?o.hide():(o._updateItemsTitles(),o._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(o._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-i),t+r>window.innerWidth&&(t=window.innerWidth-r),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class n{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[t];r?this._eventSubsNum[t]++:(r={},this._eventSubs[t]=r,this._eventSubsNum[t]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=t;const n=this._events[t];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}let a=!0,l=a?Float64Array:Float32Array;const h=new l(16),c=new l(16),A=new l(4),u={setDoublePrecisionEnabled(e){a=e,l=a?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>a,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new l(e||2),vec3:e=>new l(e||3),vec4:e=>new l(e||4),mat3:e=>new l(e||9),mat3ToMat4:(e,t=new l(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new l(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const i=new l(2);for(let r=0,o=e.length;r{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&i|128]}${e[i>>8&255]}-${e[i>>16&255]}${e[i>>24&255]}${e[255&r]}${e[r>>8&255]}${e[r>>16&255]}${e[r>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new l(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],i=e[1],r=e[2],o=t[0],n=t[1],a=t[2];return[i*a-r*n,r*o-s*a,s*n-i*o,0]},cross3Vec3(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=t[0],a=t[1],l=t[2];return s[0]=r*l-o*a,s[1]=o*n-i*l,s[2]=i*a-r*n,s},sqLenVec4:e=>u.dotVec4(e,e),lenVec4:e=>Math.sqrt(u.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>u.dotVec3(e,e),sqLenVec2:e=>u.dotVec2(e,e),lenVec3:e=>Math.sqrt(u.sqLenVec3(e)),distVec3:(()=>{const e=new l(3);return(t,s)=>u.lenVec3(u.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(u.sqLenVec2(e)),distVec2:(()=>{const e=new l(2);return(t,s)=>u.lenVec2(u.subVec2(t,s,e))})(),rcpVec3:(e,t)=>u.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/u.lenVec4(e);return u.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/u.lenVec3(e);return u.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/u.lenVec2(e);return u.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=u.dotVec3(e,t)/Math.sqrt(u.sqLenVec3(e)*u.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new l(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=u.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=u.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=u.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,i=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||u.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>u.m4s(0),setMat4ToOnes:()=>u.m4s(1),diagonalMat4v:e=>new l([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,i)=>u.diagonalMat4v([e,t,s,i]),diagonalMat4s:e=>u.diagonalMat4c(e,e,e,e),identityMat4:(e=new l(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new l(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>u.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=e[3],a=e[4],l=e[5],h=e[6],c=e[7],A=e[8],u=e[9],p=e[10],d=e[11],f=e[12],E=e[13],m=e[14],y=e[15],g=t[0],I=t[1],v=t[2],T=t[3],_=t[4],R=t[5],P=t[6],D=t[7],N=t[8],b=t[9],C=t[10],O=t[11],S=t[12],x=t[13],w=t[14],B=t[15];return s[0]=g*i+I*a+v*A+T*f,s[1]=g*r+I*l+v*u+T*E,s[2]=g*o+I*h+v*p+T*m,s[3]=g*n+I*c+v*d+T*y,s[4]=_*i+R*a+P*A+D*f,s[5]=_*r+R*l+P*u+D*E,s[6]=_*o+R*h+P*p+D*m,s[7]=_*n+R*c+P*d+D*y,s[8]=N*i+b*a+C*A+O*f,s[9]=N*r+b*l+C*u+O*E,s[10]=N*o+b*h+C*p+O*m,s[11]=N*n+b*c+C*d+O*y,s[12]=S*i+x*a+w*A+B*f,s[13]=S*r+x*l+w*u+B*E,s[14]=S*o+x*h+w*p+B*m,s[15]=S*n+x*c+w*d+B*y,s},mulMat3(e,t,s){s||(s=new l(9));const i=e[0],r=e[3],o=e[6],n=e[1],a=e[4],h=e[7],c=e[2],A=e[5],u=e[8],p=t[0],d=t[3],f=t[6],E=t[1],m=t[4],y=t[7],g=t[2],I=t[5],v=t[8];return s[0]=i*p+r*E+o*g,s[3]=i*d+r*m+o*I,s[6]=i*f+r*y+o*v,s[1]=n*p+a*E+h*g,s[4]=n*d+a*m+h*I,s[7]=n*f+a*y+h*v,s[2]=c*p+A*E+u*g,s[5]=c*d+A*m+u*I,s[8]=c*f+A*y+u*v,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=u.vec4()){const i=t[0],r=t[1],o=t[2],n=t[3];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12]*n,s[1]=e[1]*i+e[5]*r+e[9]*o+e[13]*n,s[2]=e[2]*i+e[6]*r+e[10]*o+e[14]*n,s[3]=e[3]*i+e[7]*r+e[11]*o+e[15]*n,s},transposeMat4(e,t){const s=e[4],i=e[14],r=e[8],o=e[13],n=e[12],a=e[9];if(!t||e===t){const t=e[1],l=e[2],h=e[3],c=e[6],A=e[7],u=e[11];return e[1]=s,e[2]=r,e[3]=n,e[4]=t,e[6]=a,e[7]=o,e[8]=l,e[9]=c,e[11]=i,e[12]=h,e[13]=A,e[14]=u,e}return t[0]=e[0],t[1]=s,t[2]=r,t[3]=n,t[4]=e[1],t[5]=e[5],t[6]=a,t[7]=o,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=i,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],n=e[5],a=e[6],l=e[7],h=e[8],c=e[9],A=e[10],u=e[11],p=e[12],d=e[13],f=e[14],E=e[15];return p*c*a*r-h*d*a*r-p*n*A*r+o*d*A*r+h*n*f*r-o*c*f*r-p*c*i*l+h*d*i*l+p*s*A*l-t*d*A*l-h*s*f*l+t*c*f*l+p*n*i*u-o*d*i*u-p*s*a*u+t*d*a*u+o*s*f*u-t*n*f*u-h*n*i*E+o*c*i*E+h*s*a*E-t*c*a*E-o*s*A*E+t*n*A*E},inverseMat4(e,t){t||(t=e);const s=e[0],i=e[1],r=e[2],o=e[3],n=e[4],a=e[5],l=e[6],h=e[7],c=e[8],A=e[9],u=e[10],p=e[11],d=e[12],f=e[13],E=e[14],m=e[15],y=s*a-i*n,g=s*l-r*n,I=s*h-o*n,v=i*l-r*a,T=i*h-o*a,_=r*h-o*l,R=c*f-A*d,P=c*E-u*d,D=c*m-p*d,N=A*E-u*f,b=A*m-p*f,C=u*m-p*E,O=1/(y*C-g*b+I*N+v*D-T*P+_*R);return t[0]=(a*C-l*b+h*N)*O,t[1]=(-i*C+r*b-o*N)*O,t[2]=(f*_-E*T+m*v)*O,t[3]=(-A*_+u*T-p*v)*O,t[4]=(-n*C+l*D-h*P)*O,t[5]=(s*C-r*D+o*P)*O,t[6]=(-d*_+E*I-m*g)*O,t[7]=(c*_-u*I+p*g)*O,t[8]=(n*b-a*D+h*R)*O,t[9]=(-s*b+i*D-o*R)*O,t[10]=(d*T-f*I+m*y)*O,t[11]=(-c*T+A*I-p*y)*O,t[12]=(-n*N+a*P-l*R)*O,t[13]=(s*N-i*P+r*R)*O,t[14]=(-d*v+f*g-E*y)*O,t[15]=(c*v-A*g+u*y)*O,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||u.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||u.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new l(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,u.translationMat4v(e,r))})(),translationMat4s:(e,t)=>u.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>u.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,i){const r=i[3];i[0]+=r*e,i[1]+=r*t,i[2]+=r*s;const o=i[7];i[4]+=o*e,i[5]+=o*t,i[6]+=o*s;const n=i[11];i[8]+=n*e,i[9]+=n*t,i[10]+=n*s;const a=i[15];return i[12]+=a*e,i[13]+=a*t,i[14]+=a*s,i},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const i=u.normalizeVec4([t[0],t[1],t[2],0],[]),r=Math.sin(e),o=Math.cos(e),n=1-o,a=i[0],l=i[1],h=i[2];let c,A,p,d,f,E;return c=a*l,A=l*h,p=h*a,d=a*r,f=l*r,E=h*r,(s=s||u.mat4())[0]=n*a*a+o,s[1]=n*c+E,s[2]=n*p-f,s[3]=0,s[4]=n*c-E,s[5]=n*l*l+o,s[6]=n*A+d,s[7]=0,s[8]=n*p+f,s[9]=n*A-d,s[10]=n*h*h+o,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,i,r)=>u.rotationMat4v(e,[t,s,i],r),scalingMat4v:(e,t=u.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=u.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new l(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,u.scalingMat4v(e,r))})(),scaleMat4c:(e,t,s,i)=>(i[0]*=e,i[4]*=t,i[8]*=s,i[1]*=e,i[5]*=t,i[9]*=s,i[2]*=e,i[6]*=t,i[10]*=s,i[3]*=e,i[7]*=t,i[11]*=s,i),scaleMat4v(e,t){const s=e[0],i=e[1],r=e[2];return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,t},scalingMat4s:e=>u.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=u.mat4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=i+i,l=r+r,h=o+o,c=i*a,A=i*l,p=i*h,d=r*l,f=r*h,E=o*h,m=n*a,y=n*l,g=n*h;return s[0]=1-(d+E),s[1]=A+g,s[2]=p-y,s[3]=0,s[4]=A-g,s[5]=1-(c+E),s[6]=f+m,s[7]=0,s[8]=p+y,s[9]=f-m,s[10]=1-(c+d),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=u.vec4()){const i=u.clamp,r=e[0],o=e[4],n=e[8],a=e[1],l=e[5],h=e[9],c=e[2],A=e[6],p=e[10];return"XYZ"===t?(s[1]=Math.asin(i(n,-1,1)),Math.abs(n)<.99999?(s[0]=Math.atan2(-h,p),s[2]=Math.atan2(-o,r)):(s[0]=Math.atan2(A,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(n,p),s[2]=Math.atan2(a,l)):(s[1]=Math.atan2(-c,r),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(i(A,-1,1)),Math.abs(A)<.99999?(s[1]=Math.atan2(-c,p),s[2]=Math.atan2(-o,l)):(s[1]=0,s[2]=Math.atan2(a,r))):"ZYX"===t?(s[1]=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(s[0]=Math.atan2(A,p),s[2]=Math.atan2(a,r)):(s[0]=0,s[2]=Math.atan2(-o,l))):"YZX"===t?(s[2]=Math.asin(i(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-h,l),s[1]=Math.atan2(-c,r)):(s[0]=0,s[1]=Math.atan2(n,p))):"XZY"===t&&(s[2]=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(A,l),s[1]=Math.atan2(n,r)):(s[0]=Math.atan2(-h,p),s[1]=0)),s},composeMat4:(e,t,s,i=u.mat4())=>(u.quaternionToRotationMat4(t,i),u.scaleMat4v(s,i),u.translateMat4v(e,i),i),decomposeMat4:(()=>{const e=new l(3),t=new l(16);return function(s,i,r,o){e[0]=s[0],e[1]=s[1],e[2]=s[2];let n=u.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const a=u.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=u.lenVec3(e);u.determinantMat4(s)<0&&(n=-n),i[0]=s[12],i[1]=s[13],i[2]=s[14],t.set(s);const h=1/n,c=1/a,A=1/l;return t[0]*=h,t[1]*=h,t[2]*=h,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=A,t[9]*=A,t[10]*=A,u.mat4ToQuaternion(t,r),o[0]=n,o[1]=a,o[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,i){i||(i=u.mat4());const r=e[0],o=e[1],n=e[2],a=s[0],l=s[1],h=s[2],c=t[0],A=t[1],p=t[2];if(r===c&&o===A&&n===p)return u.identityMat4();let d,f,E,m,y,g,I,v,T,_;return d=r-c,f=o-A,E=n-p,_=1/Math.sqrt(d*d+f*f+E*E),d*=_,f*=_,E*=_,m=l*E-h*f,y=h*d-a*E,g=a*f-l*d,_=Math.sqrt(m*m+y*y+g*g),_?(_=1/_,m*=_,y*=_,g*=_):(m=0,y=0,g=0),I=f*g-E*y,v=E*m-d*g,T=d*y-f*m,_=Math.sqrt(I*I+v*v+T*T),_?(_=1/_,I*=_,v*=_,T*=_):(I=0,v=0,T=0),i[0]=m,i[1]=I,i[2]=d,i[3]=0,i[4]=y,i[5]=v,i[6]=f,i[7]=0,i[8]=g,i[9]=T,i[10]=E,i[11]=0,i[12]=-(m*r+y*o+g*n),i[13]=-(I*r+v*o+T*n),i[14]=-(d*r+f*o+E*n),i[15]=1,i},lookAtMat4c:(e,t,s,i,r,o,n,a,l)=>u.lookAtMat4v([e,t,s],[i,r,o],[n,a,l],[]),orthoMat4c(e,t,s,i,r,o,n){n||(n=u.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2/l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=-2/h,n[11]=0,n[12]=-(e+t)/a,n[13]=-(i+s)/l,n[14]=-(o+r)/h,n[15]=1,n},frustumMat4v(e,t,s){s||(s=u.mat4());const i=[e[0],e[1],e[2],0],r=[t[0],t[1],t[2],0];u.addVec4(r,i,h),u.subVec4(r,i,c);const o=2*i[2],n=c[0],a=c[1],l=c[2];return s[0]=o/n,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o/a,s[6]=0,s[7]=0,s[8]=h[0]/n,s[9]=h[1]/a,s[10]=-h[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-o*r[2]/l,s[15]=0,s},frustumMat4(e,t,s,i,r,o,n){n||(n=u.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2*r/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2*r/l,n[6]=0,n[7]=0,n[8]=(t+e)/a,n[9]=(i+s)/l,n[10]=-(o+r)/h,n[11]=-1,n[12]=0,n[13]=0,n[14]=-o*r*2/h,n[15]=0,n},perspectiveMat4(e,t,s,i,r){const o=[],n=[];return o[2]=s,n[2]=i,n[1]=o[2]*Math.tan(e/2),o[1]=-n[1],n[0]=n[1]*t,o[0]=-n[0],u.frustumMat4v(o,n,r)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=u.vec3()){const i=t[0],r=t[1],o=t[2];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12],s[1]=e[1]*i+e[5]*r+e[9]*o+e[13],s[2]=e[2]*i+e[6]*r+e[10]*o+e[14],s},transformPoint4:(e,t,s=u.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const i=s||[],r=t.length;let o,n,a,l;const h=e[0],c=e[1],A=e[2],u=e[3],p=e[4],d=e[5],f=e[6],E=e[7],m=e[8],y=e[9],g=e[10],I=e[11],v=e[12],T=e[13],_=e[14],R=e[15];let P;for(let e=0;e{const e=new l(16),t=new l(16),s=new l(16);return function(i,r,o,n){return this.transformVec3(this.mulMat4(this.inverseMat4(r,e),this.inverseMat4(o,t),s),i,n)}})(),lerpVec3(e,t,s,i,r,o){const n=o||u.vec3(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n},lerpMat4(e,t,s,i,r,o){const n=o||u.mat4(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n[3]=i[3]+a*(r[3]-i[3]),n[4]=i[4]+a*(r[4]-i[4]),n[5]=i[5]+a*(r[5]-i[5]),n[6]=i[6]+a*(r[6]-i[6]),n[7]=i[7]+a*(r[7]-i[7]),n[8]=i[8]+a*(r[8]-i[8]),n[9]=i[9]+a*(r[9]-i[9]),n[10]=i[10]+a*(r[10]-i[10]),n[11]=i[11]+a*(r[11]-i[11]),n[12]=i[12]+a*(r[12]-i[12]),n[13]=i[13]+a*(r[13]-i[13]),n[14]=i[14]+a*(r[14]-i[14]),n[15]=i[15]+a*(r[15]-i[15]),n},flatten(e){const t=[];let s,i,r,o,n;for(s=0,i=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=u.vec4()){const i=e[0]*u.DEGTORAD/2,r=e[1]*u.DEGTORAD/2,o=e[2]*u.DEGTORAD/2,n=Math.cos(i),a=Math.cos(r),l=Math.cos(o),h=Math.sin(i),c=Math.sin(r),A=Math.sin(o);return"XYZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"YXZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"ZXY"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"ZYX"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"YZX"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l-h*c*A):"XZY"===t&&(s[0]=h*a*l-n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l+h*c*A),s},mat4ToQuaternion(e,t=u.vec4()){const s=e[0],i=e[4],r=e[8],o=e[1],n=e[5],a=e[9],l=e[2],h=e[6],c=e[10];let A;const p=s+n+c;return p>0?(A=.5/Math.sqrt(p+1),t[3]=.25/A,t[0]=(h-a)*A,t[1]=(r-l)*A,t[2]=(o-i)*A):s>n&&s>c?(A=2*Math.sqrt(1+s-n-c),t[3]=(h-a)/A,t[0]=.25*A,t[1]=(i+o)/A,t[2]=(r+l)/A):n>c?(A=2*Math.sqrt(1+n-s-c),t[3]=(r-l)/A,t[0]=(i+o)/A,t[1]=.25*A,t[2]=(a+h)/A):(A=2*Math.sqrt(1+c-s-n),t[3]=(o-i)/A,t[0]=(r+l)/A,t[1]=(a+h)/A,t[2]=.25*A),t},vec3PairToQuaternion(e,t,s=u.vec4()){const i=Math.sqrt(u.dotVec3(e,e)*u.dotVec3(t,t));let r=i+u.dotVec3(e,t);return r<1e-8*i?(r=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):u.cross3Vec3(e,t,s),s[3]=r,u.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=u.vec4()){const s=e[3]/2,i=Math.sin(s);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new l(16);return(t,s,i)=>(i=i||u.vec3(),u.quaternionToRotationMat4(t,e),u.mat4ToEuler(e,s,i),i)})(),mulQuaternions(e,t,s=u.vec4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=t[0],l=t[1],h=t[2],c=t[3];return s[0]=n*a+i*c+r*h-o*l,s[1]=n*l+r*c+o*a-i*h,s[2]=n*h+o*c+i*l-r*a,s[3]=n*c-i*a-r*l-o*h,s},vec3ApplyQuaternion(e,t,s=u.vec3()){const i=t[0],r=t[1],o=t[2],n=e[0],a=e[1],l=e[2],h=e[3],c=h*i+a*o-l*r,A=h*r+l*i-n*o,p=h*o+n*r-a*i,d=-n*i-a*r-l*o;return s[0]=c*h+d*-n+A*-l-p*-a,s[1]=A*h+d*-a+p*-n-c*-l,s[2]=p*h+d*-l+c*-a-A*-n,s},quaternionToMat4(e,t){t=u.identityMat4(t);const s=e[0],i=e[1],r=e[2],o=e[3],n=2*s,a=2*i,l=2*r,h=n*o,c=a*o,A=l*o,p=n*s,d=a*s,f=l*s,E=a*i,m=l*i,y=l*r;return t[0]=1-(E+y),t[1]=d+A,t[2]=f-c,t[4]=d-A,t[5]=1-(p+y),t[6]=m+h,t[8]=f+c,t[9]=m-h,t[10]=1-(p+E),t},quaternionToRotationMat4(e,t){const s=e[0],i=e[1],r=e[2],o=e[3],n=s+s,a=i+i,l=r+r,h=s*n,c=s*a,A=s*l,u=i*a,p=i*l,d=r*l,f=o*n,E=o*a,m=o*l;return t[0]=1-(u+d),t[4]=c-m,t[8]=A+E,t[1]=c+m,t[5]=1-(h+d),t[9]=p-f,t[2]=A-E,t[6]=p+f,t[10]=1-(h+u),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=u.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>u.normalizeQuaternion(u.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=u.vec4()){const s=(e=u.normalizeQuaternion(e,A))[3],i=2*Math.acos(s),r=Math.sqrt(1-s*s);return r<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r),t[3]=i,t},AABB3:e=>new l(e||6),AABB2:e=>new l(e||4),OBB3:e=>new l(e||32),OBB2:e=>new l(e||16),Sphere3:(e,t,s,i)=>new l([e,t,s,i]),transformOBB3(e,t,s=t){let i;const r=t.length;let o,n,a;const l=e[0],h=e[1],c=e[2],A=e[3],u=e[4],p=e[5],d=e[6],f=e[7],E=e[8],m=e[9],y=e[10],g=e[11],I=e[12],v=e[13],T=e[14],_=e[15];for(i=0;i{const e=new l(3),t=new l(3),s=new l(3);return i=>(e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5],u.subVec3(t,e,s),Math.abs(u.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(i,r)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5];const o=u.subVec3(t,e,s),n=r[0]-i[0],a=i[3]-r[0],l=r[1]-i[1],h=i[4]-r[1],c=r[2]-i[2],A=i[5]-r[2];return o[0]+=n>a?n:a,o[1]+=l>h?l:h,o[2]+=c>A?c:A,Math.abs(u.lenVec3(o))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||u.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||u.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=u.AABB3())=>(e[0]=u.MAX_DOUBLE,e[1]=u.MAX_DOUBLE,e[2]=u.MAX_DOUBLE,e[3]=u.MIN_DOUBLE,e[4]=u.MIN_DOUBLE,e[5]=u.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=u.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new l(3);return(t,s,i)=>{s=s||u.AABB3();let r,o,n,a=u.MAX_DOUBLE,l=u.MAX_DOUBLE,h=u.MAX_DOUBLE,c=u.MIN_DOUBLE,A=u.MIN_DOUBLE,p=u.MIN_DOUBLE;for(let s=0,d=t.length;sc&&(c=r),o>A&&(A=o),n>p&&(p=n);return s[0]=a,s[1]=l,s[2]=h,s[3]=c,s[4]=A,s[5]=p,s}})(),OBB3ToAABB3(e,t=u.AABB3()){let s,i,r,o=u.MAX_DOUBLE,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE,c=u.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToAABB3(e,t=u.AABB3()){let s,i,r,o=u.MAX_DOUBLE,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE,c=u.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToSphere3:(()=>{const e=new l(3);return(t,s)=>{s=s||u.vec4();let i,r=0,o=0,n=0;const a=t.length;for(i=0;ih&&(h=l);return s[3]=h,s}})(),positions3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,i)=>{i=i||u.vec4();let r,o=0,n=0,a=0;const l=s.length;let h=0;for(r=0;rh&&(h=A);return i[3]=h,i}})(),OBB3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,i)=>{i=i||u.vec4();let r,o=0,n=0,a=0;const l=s.length,h=l/4;for(r=0;rA&&(A=c);return i[3]=A,i}})(),getSphere3Center:(e,t=u.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=u.vec3()){let s=0,i=0,r=0;for(var o=0,n=e.length;o(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>i&&(e[1]=i),e[2]>r&&(e[2]=r),e[3](e[0]=u.MAX_DOUBLE,e[1]=u.MAX_DOUBLE,e[2]=u.MIN_DOUBLE,e[3]=u.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(i=e[0]*s[0],r=e[0]*s[3]):(i=e[0]*s[3],r=e[0]*s[0]),e[1]>0?(i+=e[1]*s[1],r+=e[1]*s[4]):(i+=e[1]*s[4],r+=e[1]*s[1]),e[2]>0?(i+=e[2]*s[2],r+=e[2]*s[5]):(i+=e[2]*s[5],r+=e[2]*s[2]);if(i<=-t&&r<=-t)return-1;return i>=-t&&r>=-t?1:0},OBB3ToAABB2(e,t=u.AABB2()){let s,i,r,o,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE;for(let t=0,c=e.length;tl&&(l=s),i>h&&(h=i);return t[0]=n,t[1]=a,t[2]=l,t[3]=h,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(i-s),tangentQuadraticBezier3:(e,t,s,i,r)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*i*(1-e)-3*e*e*i+3*e*e*r,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,i,r){const o=.5*(s-e),n=.5*(i-t),a=r*r;return(2*t-2*s+o+n)*(r*a)+(-3*t+3*s-2*o-n)*a+o*r+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,i){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,i)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,i,r){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,i)+this.b3p3(e,r)},triangleNormal(e,t,s,i=u.vec3()){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=s[0]-e[0],l=s[1]-e[1],h=s[2]-e[2],c=o*h-n*l,A=n*a-r*h,p=r*l-o*a,d=Math.sqrt(c*c+A*A+p*p);return 0===d?(i[0]=0,i[1]=0,i[2]=0):(i[0]=c/d,i[1]=A/d,i[2]=p/d),i},rayTriangleIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3);return(o,n,a,l,h,c)=>{c=c||u.vec3();const A=u.subVec3(l,a,e),p=u.subVec3(h,a,t),d=u.cross3Vec3(n,p,s),f=u.dotVec3(A,d);if(f<1e-6)return null;const E=u.subVec3(o,a,i),m=u.dotVec3(E,d);if(m<0||m>f)return null;const y=u.cross3Vec3(E,A,r),g=u.dotVec3(n,y);if(g<0||m+g>f)return null;const I=u.dotVec3(p,y)/f;return c[0]=o[0]+I*n[0],c[1]=o[1]+I*n[1],c[2]=o[2]+I*n[2],c}})(),rayPlaneIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),i=new l(3);return(r,o,n,a,l,h)=>{h=h||u.vec3(),o=u.normalizeVec3(o,e);const c=u.subVec3(a,n,t),A=u.subVec3(l,n,s),p=u.cross3Vec3(c,A,i);u.normalizeVec3(p,p);const d=-u.dotVec3(n,p),f=-(u.dotVec3(r,p)+d)/u.dotVec3(o,p);return h[0]=r[0]+f*o[0],h[1]=r[1]+f*o[1],h[2]=r[2]+f*o[2],h}})(),cartesianToBarycentric:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(i,r,o,n,a)=>{const l=u.subVec3(n,r,e),h=u.subVec3(o,r,t),c=u.subVec3(i,r,s),A=u.dotVec3(l,l),p=u.dotVec3(l,h),d=u.dotVec3(l,c),f=u.dotVec3(h,h),E=u.dotVec3(h,c),m=A*f-p*p;if(0===m)return null;const y=1/m,g=(f*d-p*E)*y,I=(A*E-p*d)*y;return a[0]=1-g-I,a[1]=I,a[2]=g,a}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,i,r=u.vec3()){const o=e[0],n=e[1],a=e[2];return r[0]=t[0]*o+s[0]*n+i[0]*a,r[1]=t[1]*o+s[1]*n+i[1]*a,r[2]=t[2]*o+s[2]*n+i[2]*a,r},mergeVertices(e,t,s,i){const r={},o=[],n=[],a=t?[]:null,l=s?[]:null,h=[];let c,A,u,p;const d=1e4;let f,E,m=0;for(f=0,E=e.length;f{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3),o=new l(3);return(n,a,l)=>{let h,c;const A=new Array(n.length/3);let p,d,f,E,m,y,g;for(h=0,c=a.length;h{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3),o=new l(3),n=new l(3);return(a,l,h)=>{const c=new Float32Array(a.length);for(let A=0;A>24&255,c=u>>16&255,h=u>>8&255,l=255&u,a=t[s],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+1],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+2],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,u++;return{positions:r,colors:o}},faceToVertexNormals(e,t,s={}){const i=s.smoothNormalsAngleThreshold||20,r={},o=[],n={};let a,l,h,c,A;const p=1e4;let d,f,E,m,y,g;for(f=0,m=e.length;f{const e=new l(4),t=new l(4);return(s,i,r,o,n)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=1,u.transformVec4(s,e,t),o[0]=t[0],o[1]=t[1],o[2]=t[2],e[0]=r[0],e[1]=r[1],e[2]=r[2],u.transformVec3(s,e,t),u.normalizeVec3(t),n[0]=t[0],n[1]=t[1],n[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new l(16),t=new l(16),s=new l(4),i=new l(4),r=new l(4),o=new l(4);return(n,a,l,h,c,A)=>{const p=u.mulMat4(l,a,e),d=u.inverseMat4(p,t),f=n.width,E=n.height,m=(h[0]-f/2)/(f/2),y=-(h[1]-E/2)/(E/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,u.transformVec4(d,s,i),u.mulVec4Scalar(i,1/i[3]),r[0]=m,r[1]=y,r[2]=1,r[3]=1,u.transformVec4(d,r,o),u.mulVec4Scalar(o,1/o[3]),c[0]=o[0],c[1]=o[1],c[2]=o[2],u.subVec3(o,i,A),u.normalizeVec3(A)}})(),canvasPosToLocalRay:(()=>{const e=new l(3),t=new l(3);return(s,i,r,o,n,a,l)=>{u.canvasPosToWorldRay(s,i,r,n,e,t),u.worldRayToLocalRay(o,e,t,a,l)}})(),worldRayToLocalRay:(()=>{const e=new l(16),t=new l(4),s=new l(4);return(i,r,o,n,a)=>{const l=u.inverseMat4(i,e);t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=1,u.transformVec4(l,t,s),n[0]=s[0],n[1]=s[1],n[2]=s[2],u.transformVec3(l,o,a)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,i,r,o){const n=new l(6),a={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:n};let h,c;for(n[0]=n[1]=n[2]=Number.POSITIVE_INFINITY,n[3]=n[4]=n[5]=Number.NEGATIVE_INFINITY,h=0,c=s.length;hn[3]&&(n[3]=r[t]),r[t+1]n[4]&&(n[4]=r[t+1]),r[t+2]n[5]&&(n[5]=r[t+2])}}if(s.length<20||o>10)return a.triangles=s,a.leaf=!0,a;e[0]=n[3]-n[0],e[1]=n[4]-n[1],e[2]=n[5]-n[2];let u=0;e[1]>e[u]&&(u=1),e[2]>e[u]&&(u=2),a.splitDim=u;const p=(n[u]+n[u+3])/2,d=new Array(s.length);let f=0;const E=new Array(s.length);let m=0;for(h=0,c=s.length;h{const i=e.length/3,r=new Array(i);for(let e=0;e=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t},octDecodeVec2s(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t}};u.buildEdgeIndices=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(w=s[C.index1],B=s[C.index2],(!F&&w>65535||B>65535)&&(F=!0),v.push(w),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const p={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var d=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),i=s+e[1],r=s;r{};t=t||i,s=s||i;var r=new XMLHttpRequest;r.overrideMimeType("application/json"),r.open("GET",e,!0),r.addEventListener("load",(function(e){var i=e.target.response;if(200===this.status){var r;try{r=JSON.parse(i)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(r)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(i))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),r.addEventListener("error",(function(e){s(e)}),!1),r.send(null)},loadArraybuffer:function(e,t,s){var i=e=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}},v={sceneId:null,time:null,startTime:null,prevTime:null,deltaTime:null},T=[];let _,R=0,P=0;const D=new function(){this.version="1.0.0",this.scenes={},this._superTypes={},this._addScene=function(e){if(e.id){if(D.scenes[e.id])return void console.error(`[ERROR] Scene ${m.inQuotes(e.id)} already exists`)}else e.id=g.addItem({});D.scenes[e.id]=e;const t=e.ticksPerOcclusionTest,s=e.ticksPerRender;y[e.id]={ticksPerOcclusionTest:t,ticksPerRender:s,renderCountdown:s},p.components.scenes++,e.once("destroyed",(()=>{g.removeItem(e.id),delete D.scenes[e.id],delete y[e.id],p.components.scenes--}))},this.clear=function(){let e;for(const t in D.scenes)D.scenes.hasOwnProperty(t)&&(e=D.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete D.scenes[e.id]))},this.scheduleTask=function(e,t){I.push(e),I.push(t)},this.runTasks=function(e=-1){let t,s,i=(new Date).getTime(),r=0;for(;I.length>0&&(e<0||i0&&_>0){var t=1e3/_;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),p.frame.fps=Math.round(P/T.length)}!function(e){const t=D.runTasks(e+10),s=D.getNumTasks();p.frame.tasksRun=t,p.frame.tasksScheduled=s,p.frame.tasksBudget=10}(e),function(e){for(var t in v.time=e,D.scenes)if(D.scenes.hasOwnProperty(t)){var s=D.scenes[t];v.sceneId=t,v.startTime=s.startTime,v.deltaTime=null!=v.prevTime?v.time-v.prevTime:0,s.fire("tick",v,!0)}v.prevTime=e}(e),function(){const e=D.scenes,t=!1;let s,i,r,o,n;for(n in e)e.hasOwnProperty(n)&&(s=e[n],i=y[n],i||(i=y[n]={}),r=s.ticksPerOcclusionTest,i.ticksPerOcclusionTest!==r&&(i.ticksPerOcclusionTest=r,i.renderCountdown=r),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=r),o=s.ticksPerRender,i.ticksPerRender!==o&&(i.ticksPerRender=o,i.renderCountdown=o),0==--i.renderCountdown&&(s.render(t),i.renderCountdown=o))}(),R=e,void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(N):requestAnimationFrame(N)};void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(N):requestAnimationFrame(N);class b{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof b))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[t];r?this._eventSubsNum[t]++:(r={},this._eventSubs[t]=r,this._eventSubsNum[t]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=t;const n=this._events[t];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+m.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const i=e.sceneDefault,r=e.sceneSingleton,o=e.type,n=e.on,a=!1!==e.recompiles;if(s&&(m.isNumeric(s)||m.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+m.inQuotes(e))}if(!s)if(!0===r){const e=this.scene.types[o];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===i&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+m.inQuotes(s.id));if(o&&!s.isType(o))return void this.error("Expected a "+o+" type or subtype: "+s.type+" "+m.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let h,c,A;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(h=e.subs,c=0,A=h.length;c{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():D.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,i,r,o;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,i=t.subs,r=0,o=i.length;r0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let i=255;if(t){if(e<0?e=0:e>1&&(e=1),i=Math.floor(255*e),s===i)return}else if(i=255,s===i)return;for(let e=0,t=this.meshes.length;e
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const Y={WEBGL:!1,SUPPORTED_EXTENSIONS:{}},X=document.createElement("canvas");if(X){const e=X.getContext("webgl",{antialias:!0})||X.getContext("experimental-webgl",{antialias:!0});Y.WEBGL=!!e,Y.WEBGL&&(Y.ANTIALIAS=e.getContextAttributes().antialias,e.getShaderPrecisionFormat?e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0?Y.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?Y.FS_MAX_FLOAT_PRECISION="mediump":Y.FS_MAX_FLOAT_PRECISION="lowp":Y.FS_MAX_FLOAT_PRECISION="mediump",Y.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),Y.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),Y.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),Y.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),Y.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Y.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Y.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),Y.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),Y.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),Y.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){Y.SUPPORTED_EXTENSIONS[e]=!0})))}const Z=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class q extends b{constructor(e,t={}){super(e,t),this._backgroundColor=u.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let i=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(i=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{i&&(i=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new K(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+u.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),i=s.style;i.height="100%",i.width="100%",i.padding="0",i.margin="0",i.background="rgba(0,0,0,0);",i.float="left",i.left="0",i.top="0",i.position="absolute",i.opacity="1.0",i["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0&&"/"===s.charAt(i+1)&&(s=s.substring(0,i)),t.push(s);return t.join("\n")}function oe(e){console.error(e.join("\n"))}class ne{constructor(e,t){this.id=ie.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new ee(e,e.VERTEX_SHADER,re(this.source.vertex)),this._fragmentShader=new ee(e,e.FRAGMENT_SHADER,re(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void oe(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void oe(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void oe(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void oe(this.errors);let t,s,i,r,o;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void oe(this.errors);const n=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class le{constructor(e,t){this.scene=e,this.aabb=u.AABB3(),this.origin=u.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const n=s.canvasPos,a=n[0],l=n[1];a+10<0||l+10<0||a-10>i||l-10>r?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[o++]=a,this.pixels[o++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new le(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let i=this._occlusionLayers[s];i||(i=new le(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),i.addMarker(e),this._markersToOcclusionLayersMap[e.id]=i}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// OcclusionTester fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),i.push("}"),i}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new ne(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=i.sectionPlanes;for(let i=0;i{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=u.mat4();return()=>(e&&u.inverseMat4(i.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,i=this._scene,r=i.sao,o=t.drawingBufferWidth,n=t.drawingBufferHeight,a=i.camera.project._state,l=a.near,h=a.far,c=a.matrix,A=this._getInverseProjectMat(),p=Math.random(),d="perspective"===i.camera.projection;ue[0]=o,ue[1]=n,t.viewport(0,0,o,n),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,h),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,c),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,A),t.uniform1i(this._uPerspective,d),t.uniform1f(this._uScale,r.scale*(h/5)),t.uniform1f(this._uIntensity,r.intensity),t.uniform1f(this._uBias,r.bias),t.uniform1f(this._uKernelRadius,r.kernelRadius),t.uniform1f(this._uMinResolution,r.minResolution),t.uniform2fv(this._uViewport,ue),t.uniform1f(this._uRandomSeed,p);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new ne(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const i=new Float32Array([1,1,0,1,0,0,1,0]),r=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),o=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new ae(s,s.ARRAY_BUFFER,r,r.length,3,s.STATIC_DRAW),this._uvBuf=new ae(s,s.ARRAY_BUFFER,i,i.length,2,s.STATIC_DRAW),this._indicesBuf=new ae(s,s.ELEMENT_ARRAY_BUFFER,o,o.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const de=new Float32Array(Ie(17,[0,1])),fe=new Float32Array(Ie(17,[1,0])),Ee=new Float32Array(function(e,t){const s=[];for(let i=0;i<=e;i++)s.push(ge(i,t));return s}(17,4)),me=new Float32Array(2);class ye{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new ne(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),i=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new ae(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new ae(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new ae(e,e.ELEMENT_ARRAY_BUFFER,i,i.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=u.mat4();return()=>(e&&u.inverseMat4(o.camera.projMatrix,t),t)})());const i=this._scene.canvas.gl,r=this._program,o=this._scene,n=i.drawingBufferWidth,a=i.drawingBufferHeight,l=o.camera.project._state,h=l.near,c=l.far;i.viewport(0,0,n,a),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),r.bind(),me[0]=n,me[1]=a,i.uniform2fv(this._uViewport,me),i.uniform1f(this._uCameraNear,h),i.uniform1f(this._uCameraFar,c),i.uniform1f(this._uDepthCutoff,.01),0===s?i.uniform2fv(this._uSampleOffsets,fe):i.uniform2fv(this._uSampleOffsets,de),i.uniform1fv(this._uSampleWeights,Ee);const A=e.getDepthTexture(),p=t.getTexture();r.bindTexture(this._uDepthTexture,A,0),r.bindTexture(this._uOcclusionTexture,p,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function ge(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function Ie(e,t){const s=[];for(let i=0;i<=e;i++)s.push(t[0]*i),s.push(t[1]*i);return s}class ve{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(e=null){if(this._touch(e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}_touch(e=null){let t,s;const i=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=i.drawingBufferWidth,s=i.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;i.deleteTexture(this.buffer.texture),i.deleteFramebuffer(this.buffer.framebuf),i.deleteRenderbuffer(this.buffer.renderbuf)}const r=i.createTexture();let o;i.bindTexture(i.TEXTURE_2D,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e?i.texStorage2D(i.TEXTURE_2D,1,e,t,s):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,s,0,i.RGBA,i.UNSIGNED_BYTE,null),this._hasDepthTexture&&(o=i.createTexture(),i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texImage2D(i.TEXTURE_2D,0,i.DEPTH_COMPONENT32F,t,s,0,i.DEPTH_COMPONENT,i.FLOAT,null));const n=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,n),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_COMPONENT32F,t,s);const a=i.createFramebuffer();if(i.bindFramebuffer(i.FRAMEBUFFER,a),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,r,0),this._hasDepthTexture?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,o,0):i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n),i.bindTexture(i.TEXTURE_2D,null),i.bindRenderbuffer(i.RENDERBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,a),!i.isFramebuffer(a))throw"Invalid framebuffer";i.bindFramebuffer(i.FRAMEBUFFER,null);const l=i.checkFramebufferStatus(i.FRAMEBUFFER);switch(l){case i.FRAMEBUFFER_COMPLETE:break;case i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case i.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:a,renderbuf:n,texture:r,depthTexture:o,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,i=null,r=Uint8Array,o=4){const n=e,a=(this.buffer.height||this.gl.drawingBufferHeight)-t,l=new r(o),h=this.gl;return h.readPixels(n,a,1,1,s||h.RGBA,i||h.UNSIGNED_BYTE,l,0),l}readArray(e=null,t=null,s=Uint8Array,i=4){const r=new s(this.buffer.width*this.buffer.height*i),o=this.gl;return o.readPixels(0,0,this.buffer.width,this.buffer.height,e||o.RGBA,t||o.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,i=t.canvas,r=t.imageData,o=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const n=this.buffer.width,a=this.buffer.height,l=a/2|0,h=4*n,c=new Uint8Array(4*n);for(let e=0;e0)for(i.withSAO=!0,x=0;x0)for(x=0;x0)for(x=0;x0)for(x=0;x0||j>0||U>0||H>0){if(o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):(o.blendEquation(o.FUNC_ADD),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA)),i.backfaces=!1,a||o.depthMask(!1),(U>0||H>0)&&o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),H>0)for(x=0;x0)for(x=0;x0)for(x=0;x0)for(x=0;x0||W>0){if(i.lastProgramId=null,t.highlightMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),W>0)for(x=0;x0)for(x=0;x0||K>0||Q>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),o.enable(o.CULL_FACE),K>0)for(x=0;x0)for(x=0;x0||Z>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),Z>0)for(x=0;x0)for(x=0;x0||J>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),J>0)for(x=0;x0)for(x=0;x0){const t=Math.floor(e/4),s=n.size[0];n.size[1];const i=t%s-Math.floor(s/2),r=Math.floor(t/s)-Math.floor(s/2),o=Math.sqrt(Math.pow(i,2)+Math.pow(r,2));y.push({x:i,y:r,dist:o,result:[d[e+0],d[e+1],d[e+2],d[e+3]]})}let g=null;if(y.length>0){y.sort(((e,t)=>e.dist-t.dist)),y=y[0].result;const e=p[y[3]],t=e.origin,s=e.coordinateScale;g=[y[0]*s[0]+t[0],y[1]*s[1]+t[1],y[2]*s[2]+t[2]]}if(null===f&&null==g)return null;let I=null;return null!==g&&(I=t.camera.projectWorldPos(g)),{worldPos:f,snappedWorldPos:g,snappedCanvasPos:I}},this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Ae(t,v),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){P(),this._occlusionTester.bindRenderBuf(),i.reset(),i.backfaces=!0,i.frontface=!0,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.clearColor(0,0,0,0),o.enable(o.DEPTH_TEST),o.disable(o.CULL_FACE),o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT);for(let e in h)if(h.hasOwnProperty(e)){const t=h[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),this.element.addEventListener("mousemove",this._mouseMoveListener=e=>{this.enabled&&(this._getMouseCanvasPos(e),this.fire("mousemove",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault())}),this.element.addEventListener("wheel",this._mouseWheelListener=(e,t)=>{if(!this.enabled)return;const s=Math.max(-1,Math.min(1,40*-e.deltaY));this.fire("mousewheel",s,!0)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(i=>{e>=i[0]-s&&e<=i[0]+s&&t>=i[1]-s&&t<=i[1]+s&&this.fire("mouseclicked",i,!0)}))}this._eventsBound=!0}}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,i=0;for(;t.offsetParent;)s+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-i}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const De=new e({});class Ne{constructor(e){this.id=De.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){De.removeItem(this.id)}}class be extends b{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new Ne({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class Ce extends b{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let i=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(i/=t),i=Math.min(i,120),u.perspectiveMat4(i*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class Oe extends b{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,i=s[2],r=s[3],o=i/r;let n,a,l,h;i>r?(n=-t,a=t,l=t/o,h=-t/o):(n=-t*o,a=t*o,l=t,h=-t),u.orthoMat4c(n,a,h,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class Se extends b{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){u.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class xe extends b{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy()}}const we=u.vec3(),Be=u.vec3(),Fe=u.vec3(),Me=u.vec3(),Le=u.vec3(),Ue=u.vec3(),He=u.vec4(),Ge=u.vec4(),ke=u.vec4(),Ve=u.mat4(),je=u.mat4(),Qe=u.vec3(),We=u.vec3(),ze=u.vec3(),Ke=u.vec3();class Ye extends b{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new Ne({deviceMatrix:u.mat4(),hasDeviceMatrix:!1,matrix:u.mat4(),normalMatrix:u.mat4(),inverseMatrix:u.mat4()}),this._perspective=new Ce(this),this._ortho=new Oe(this),this._frustum=new Se(this),this._customProjection=new xe(this),this._project=this._perspective,this._eye=u.vec3([0,0,10]),this._look=u.vec3([0,0,0]),this._up=u.vec3([0,1,0]),this._worldUp=u.vec3([0,1,0]),this._worldRight=u.vec3([1,0,0]),this._worldForward=u.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(u.subVec3(this._eye,this._look,Qe),u.normalizeVec3(Qe,We),u.mulVec3Scalar(We,1e3,ze),u.addVec3(this._look,ze,Ke),t=Ke):t=this._eye,e.hasDeviceMatrix?(u.lookAtMat4v(t,this._look,this._up,je),u.mulMat4(e.deviceMatrix,je,e.matrix)):u.lookAtMat4v(t,this._look,this._up,e.matrix),u.inverseMat4(this._state.matrix,this._state.inverseMatrix),u.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=u.subVec3(this._eye,this._look,we);u.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,Ve),t=u.transformPoint3(Ve,t,Be),this.eye=u.addVec3(this._look,t,Fe),this.up=u.transformPoint3(Ve,this._up,Me)}orbitPitch(e){if(this._constrainPitch&&(e=u.dotVec3(this._up,this._worldUp)/u.DEGTORAD)<1)return;let t=u.subVec3(this._eye,this._look,we);const s=u.cross3Vec3(u.normalizeVec3(t,Be),u.normalizeVec3(this._up,Fe));u.rotationMat4v(.0174532925*e,s,Ve),t=u.transformPoint3(Ve,t,Me),this.up=u.transformPoint3(Ve,this._up,Le),this.eye=u.addVec3(t,this._look,Ue)}yaw(e){let t=u.subVec3(this._look,this._eye,we);u.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,Ve),t=u.transformPoint3(Ve,t,Be),this.look=u.addVec3(t,this._eye,Fe),this._gimbalLock&&(this.up=u.transformPoint3(Ve,this._up,Me))}pitch(e){if(this._constrainPitch&&(e=u.dotVec3(this._up,this._worldUp)/u.DEGTORAD)<1)return;let t=u.subVec3(this._look,this._eye,we);const s=u.cross3Vec3(u.normalizeVec3(t,Be),u.normalizeVec3(this._up,Fe));u.rotationMat4v(.0174532925*e,s,Ve),this.up=u.transformPoint3(Ve,this._up,Ue),t=u.transformPoint3(Ve,t,Me),this.look=u.addVec3(t,this._eye,Le)}pan(e){const t=u.subVec3(this._eye,this._look,we),s=[0,0,0];let i;if(0!==e[0]){const r=u.cross3Vec3(u.normalizeVec3(t,[]),u.normalizeVec3(this._up,Be));i=u.mulVec3Scalar(r,e[0]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]}0!==e[1]&&(i=u.mulVec3Scalar(u.normalizeVec3(this._up,Fe),e[1]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),0!==e[2]&&(i=u.mulVec3Scalar(u.normalizeVec3(t,Me),e[2]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),this.eye=u.addVec3(this._eye,s,Le),this.look=u.addVec3(this._look,s,Ue)}zoom(e){const t=u.subVec3(this._eye,this._look,we),s=Math.abs(u.lenVec3(t,Be)),i=Math.abs(s+e);if(i<.5)return;const r=u.normalizeVec3(t,Fe);this.eye=u.addVec3(this._look,u.mulVec3Scalar(r,i),Me)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=u.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return u.lenVec3(u.subVec3(this._look,this._eye,we))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=He,s=Ge,i=ke;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,u.mulMat4v4(this.viewMatrix,t,s),u.mulMat4v4(this.projMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1;const r=this.scene.canvas.canvas,o=r.offsetWidth/2,n=r.offsetHeight/2;return[i[0]*o+o,i[1]*n+n]}destroy(){super.destroy(),this._state.destroy()}}class Xe extends b{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Ze extends Xe{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new Ne({type:"dir",dir:u.vec3([1,1,1]),color:u.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=u.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,i=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],r=[0,1,0];u.lookAtMat4v(i,s,r,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=u.identityMat4()),u.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new ve(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class qe extends Xe{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:u.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class Je extends b{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),p.memory.meshes++}destroy(){super.destroy(),p.memory.meshes--}}var $e=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(w=s[C.index1],B=s[C.index2],(!F&&w>65535||B>65535)&&(F=!0),v.push(w),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const et=function(){const e=u.mat4(),t=u.mat4();return function(s,i){i=i||u.mat4();const r=s[0],o=s[1],n=s[2],a=s[3]-r,l=s[4]-o,h=s[5]-n,c=65535;return u.identityMat4(e),u.translationMat4v(s,e),u.identityMat4(t),u.scalingMat4v([a/c,l/c,h/c],t),u.mulMat4(e,t,i),i}}();var tt=function(){const e=u.mat4(),t=u.mat4();return function(s,i,r){const o=new Uint16Array(s.length),n=new Float32Array([r[0]!==i[0]?65535/(r[0]-i[0]):0,r[1]!==i[1]?65535/(r[1]-i[1]):0,r[2]!==i[2]?65535/(r[2]-i[2]):0]);let a;for(a=0;a=0?1:-1),t=(1-Math.abs(r))*(o>=0?1:-1);r=e,o=t}return new Int8Array([Math[s](127.5*r+(r<0?-1:0)),Math[i](127.5*o+(o<0?-1:0))])}function rt(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}function ot(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const nt={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let i,r;for(i=0;i<3;i++)t[i]=Number.MAX_VALUE,s[i]=-Number.MAX_VALUE;for(i=0;in&&(r=s,n=o),s=it(e,a,"floor","ceil"),i=rt(s),o=ot(e,a,i),o>n&&(r=s,n=o),s=it(e,a,"ceil","ceil"),i=rt(s),o=ot(e,a,i),o>n&&(r=s,n=o),t[a]=r[0],t[a+1]=r[1];return t},decompressNormals:function(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t},decompressNormal:function(e,t){let s=e[0],i=e[1];s=(2*s+1)/255,i=(2*i+1)/255;const r=1-Math.abs(s)-Math.abs(i);r<0&&(s=(1-Math.abs(i))*(s>=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t}},at=p.memory,lt=u.AABB3();class ht extends Je{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ne({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=nt.getPositionsBounds(t.positions),i=nt.compressPositions(t.positions,e.min,e.max);s.positions=i.quantized,s.positionsDecodeMatrix=i.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=nt.getUVBounds(t.uv),i=nt.compressUVs(t.uv,e.min,e.max);s.uv=i.quantized,s.uvDecodeMatrix=i.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=nt.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),at.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),at.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new ae(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),at.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new ae(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),at.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new ae(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),at.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new ae(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),at.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=$e(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),at.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=u.buildPickTriangles(e.positions,e.indices,e.compressGeometry),i=s.positions,r=s.colors;this._pickTrianglePositionsBuf=new ae(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,4,t.STATIC_DRAW,!0),at.positions+=this._pickTrianglePositionsBuf.numItems,at.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),nt.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=nt.getPositionsBounds(e),i=nt.compressPositions(e,s.min,s.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),nt.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),nt.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=u.AABB3()),u.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=u.OBB3()),u.positions3ToAABB3(this._state.positions,lt,this._state.positionsDecodeMatrix),u.AABB3ToOBB3(lt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),at.meshes--}}function ct(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let i=e.zSize||1;i<0&&(console.error("negative zSize not allowed - will invert"),i*=-1);const r=e.center,o=r?r[0]:0,n=r?r[1]:0,a=r?r[2]:0,l=-t+o,h=-s+n,c=-i+a,A=t+o,u=s+n,p=i+a;return m.apply(e,{positions:[A,u,p,l,u,p,l,h,p,A,h,p,A,u,p,A,h,p,A,h,c,A,u,c,A,u,p,A,u,c,l,u,c,l,u,p,l,u,p,l,u,c,l,h,c,l,h,p,l,h,c,A,h,c,A,h,p,l,h,p,A,h,c,l,h,c,l,u,c,A,u,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class At extends b{get type(){return"Material"}constructor(e,t={}){super(e,t),p.memory.materials++}destroy(){super.destroy(),p.memory.materials--}}const ut={opaque:0,mask:1,blend:2},pt=["opaque","mask","blend"];class dt extends At{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new Ne({type:"PhongMaterial",ambient:u.vec3([1,1,1]),diffuse:u.vec3([1,1,1]),specular:u.vec3([1,1,1]),emissive:u.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=ut[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return pt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const ft={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[.4577854573726654,.529411792755127,.4100345969200134],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Et extends At{get type(){return"EmphasisMaterial"}get presets(){return ft}constructor(e,t={}){super(e,t),this._state=new Ne({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=ft[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ft).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const mt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class yt extends At{get type(){return"EdgeMaterial"}get presets(){return mt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=mt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(mt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const gt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class It extends b{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=u.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return gt}set units(e){e||(e="meters");gt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=u.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=u.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class vt extends b{constructor(e,t={}){super(e,t),this._supported=Y.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const Tt={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class _t extends At{get type(){return"PointsMaterial"}get presets(){return Tt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=Tt[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Tt).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Rt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Pt extends At{get type(){return"LinesMaterial"}get presets(){return Rt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=Rt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Rt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Dt=u.vec3(),Nt=u.vec3(),bt=u.mat4();class Ct{constructor(){this.normal=u.vec3(),this.offset=0,this.testVertex=u.vec3()}set(e,t,s,i){const r=1/Math.sqrt(e*e+t*t+s*s);this.normal[0]=e*r,this.normal[1]=t*r,this.normal[2]=s*r,this.offset=i*r,this.testVertex[0]=this.normal[0]>=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class Ot{constructor(){this.planes=[new Ct,new Ct,new Ct,new Ct,new Ct,new Ct]}}function St(e,t){let s=Ot.INSIDE;const i=Dt,r=Nt;i[0]=t[0],i[1]=t[1],i[2]=t[2],r[0]=t[3],r[1]=t[4],r[2]=t[5];const o=[i,r];for(let t=0;t<6;++t){const i=e.planes[t];if(i.normal[0]*o[i.testVertex[0]][0]+i.normal[1]*o[i.testVertex[1]][1]+i.normal[2]*o[i.testVertex[2]][2]+i.offset<0)return Ot.OUTSIDE;i.normal[0]*o[1-i.testVertex[0]][0]+i.normal[1]*o[1-i.testVertex[1]][1]+i.normal[2]*o[1-i.testVertex[2]][2]+i.offset<0&&(s=Ot.INTERSECT)}return s}Ot.INSIDE=0,Ot.INTERSECT=1,Ot.OUTSIDE=2;class xt{constructor(e,t){this.primLODLevels=e,this.entitiesInLOD={},this.primCountInLOD={},this.targetFps=t,this.lodLevelIndex=0,this.consecutiveFramesWithTargetFps=0,this.consecutiveFramesWithoutTargetFps=0}initializeLodState(e){const t=Object.values(e.objects);if(0===t.length)return;const s={},i={};for(let e=0,r=t.length;e=this.primLODLevels[n]);n++);const a=this.primLODLevels[n]||0;a in s||(s[a]=[]),s[a].push(r),a in i||(i[a]=0),i[a]+=r.numPrimitives}this.entitiesInLOD=s,this.primCountInLOD=i}}class wt{constructor(e,t,s,i){this.id=t.id,this.scene=e,this.sceneModel=t,this.lodState=new xt(s,i),this.lodState.initializeLodState(t)}_increaseLODLevelIndex(){const e=this.lodState;if(e.lodLevelIndex===e.primLODLevels.length)return!1;const t=e.entitiesInLOD[e.primLODLevels[e.lodLevelIndex]]||[];for(let e=0,s=t.length;e0&&(t.consecutiveFramesWithoutTargetFps=0,s=this._increaseLODLevelIndex()):e>t.targetFps+4&&++t.consecutiveFramesWithTargetFps>1&&(t.consecutiveFramesWithTargetFps=0,s=this._decreaseLODLevelIndex()),s}resetLodCulling(){let e=!1,t=!1;do{e|=t=this._decreaseLODLevelIndex()}while(t);return e}}class Bt extends b{constructor(e,t={}){super(e,t),this._scene=e,this._lodLevels=[2e3,600,150,80,20],this._lodManagers={},this._lodManagerList=[],this.enabled=t.enabled,this.targetFPS=t.targetFPS,this._init()}_init(){const e=new Array(4);let t=0,s=-1,i=Date.now(),r=0,o=0,n=o;this._scene.on("rendering",(()=>{if(-1!==s)for(let e=0,t=this._lodManagerList.length;e{i=Date.now(),window.requestAnimationFrame((()=>{t++;const o=Date.now();r=o-i,i=o,e[t%4]=r;let n=0;if(t>4){for(let t=0;t<4;t++)n+=e[t];s=4/n*1e3}}))})),this._scene.camera.on("matrix",(()=>{n=o})),this._scene.on("tick",(()=>{if(o-n>3)for(let e=0,t=this._lodManagerList.length;e=e.minX&&t.maxY>=e.minY&&t.maxZ>=e.minZ},s.boxRayIntersects=function(e,t,s,i,r,o,n){var a=(e.minX-t)*r,l=(e.maxX-t)*r,h=(e.minY-s)*o,c=(e.maxY-s)*o,A=(e.minZ-i)*n,u=(e.maxZ-i)*n,p=Math.min(A,u),d=Math.max(A,u),f=Math.min(h,c),E=Math.max(h,c),m=Math.min(a,l),y=Math.max(a,l),g=Math.max(0,m,f,p);return Math.min(y,E,d)>=g?g:1/0};var v=function(e,t,s,r,o){for(var n,a=[t,s];a.length;)(s=a.pop())-(t=a.pop())<=r||(n=t+Math.ceil((s-t)/r/2)*r,i(e,n,t,s,o),a.push(t,n,n,s))},T=function(e,t){return e.minX-t.minX},_=function(e,t){return e.minY-t.minY},R=function(e,t){return e.minZ-t.minZ},P=function(){function e(e){void 0===e&&(e=16),this.maxEntries=Math.max(e,8),this.minEntries=Math.max(4,Math.ceil(.4*this.maxEntries)),this.clear()}return e.alloc=function(){return this.pool.pop()||new this},e.free=function(e){e.clear(),this.pool.push(e)},e.prototype.searchCustom=function(e,t){var s=this.data,i=[];if(!e(s,A(s)))return i;for(var r=[];s;){for(var o=0,n=s.children.length;o1){for(d=0,f=(c=c[c.length-1]).length;d=t)break;var r=i+1;if(r0;){var i=s-1>>1;if(p[i].dist<=p[s].dist)break;d(s,i),s=i}},m=a;p.length&&p[0].dist=t;a--){l=e.children[a];f(o,l),n+=m(o)}return n},e.prototype.adjustParentBBoxes=function(e,t,s){for(var i=s;i>=0;i--)f(t[i],e)},e.prototype.condense=function(e){for(var t=e.length-1,s=void 0;t>=0;t--)0===e[t].children.length?t>0?((s=e[t-1].children).splice(s.indexOf(e[t]),1),o(e[t])):this.clear():p(e[t])},e.prototype._insert=function(e,t,s){var i=[],r=this.chooseSubtree(e,this.data,t,i);for(r.children.push(e),f(r,e);t>=0&&i[t].children.length>this.maxEntries;)this.split(i,t),t--;this.adjustParentBBoxes(e,i,t)},e.pool=[],e}();s.RBush3D=P},{quickselect:2}],2:[function(e,t,s){!function(e,i){"object"==typeof s&&void 0!==t?t.exports=i():e.quickselect=i()}(this,(function(){function e(s,i,r,o,n){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),A=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/a+A)),Math.min(o,Math.floor(i+(a-l)*c/a+A)),n)}var u=s[i],p=r,d=o;for(t(s,r,i),n(s[o],u)>0&&t(s,r,o);p0;)d--}0===n(s[r],u)?t(s,r,d):t(s,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return et?1:0}return function(t,i,r,o,n){e(t,i,r||0,o||t.length-1,n||s)}}))},{}]},{},[1])(1)}));var Lt=Ft.exports.RBush3D,Ut=function(e){function t(e){var t=0;return e.meshes.forEach((function(e){t+=e.numPrimitives})),t}function s(e,t){var s={pos:{x:0,y:0},left:0,right:e,top:0,bottom:t,dir:0};function i(){(0==s.dir&&s.pos.x+1>=s.right||1==s.dir&&s.pos.y+1>=s.bottom||2==s.dir&&s.pos.x-1<=s.left-1||3==s.dir&&s.pos.y-1<=s.top-1)&&(s.dir=(s.dir+1)%4,0==s.dir&&s.left++,1==s.dir&&s.top++,2==s.dir&&s.right--,3==s.dir&&s.bottom--),0==s.dir&&s.pos.x++,1==s.dir&&s.pos.y++,2==s.dir&&s.pos.x--,3==s.dir&&s.pos.y--}for(var r=[],o=e*t;r.lengthu&&(c.push(A),A=[],u=a),A.push(d),u-=f}}while(pu&&(c.push(p),p=[],u=a),p.push(e),u-=s})),p.length&&c.push(p);var d={};return c.forEach((function(e,t){e.forEach((function(e){d[e.id]=t}))})),{clusters:c,entityIdToClusterIdMapping:d}}(r.cellsX,r.cellsZ,o.maxCellsPerEntity,r.entitiesByCell,r.cellsByEntity,i.maxPolygonsPerCluster),{clusters:{total:n.clusters.length},clusteringResult:n});a+=l.clusters.total,console.log("Total clusters: "+a);var h=[];return l.clusteringResult.clusters.forEach((function(e){e.forEach((function(e){h.push(e.id)}))})),l.orderedEntityIds=h,l}; +class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const t=new e;class s{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class i{constructor(){this.items=[]}}class r{constructor(e,t,s,i,r){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=i,this.getShown=r,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class o{constructor(e={}){this._id=t.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,i=s.length;e{const o=this._getNextId(),n=new s(o);for(let s=0,o=e.length;s0,h=this._getNextId(),c=s.getTitle||(()=>s.title||""),A=s.doAction||s.callback||(()=>{}),u=s.getEnabled||(()=>!0),p=s.getShown||(()=>!0),d=new r(h,c,A,u,p);if(d.parentMenu=n,a.items.push(d),l){const e=t(i);d.subMenu=e,e.parentItem=d}this._itemList.push(d),this._itemMap[d.id]=d}}return this._menuList.push(n),this._menuMap[n.id]=n,n};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,i=s.length;t'),s.push("
    "),t)for(let e=0,i=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const i=s.join("");document.body.insertAdjacentHTML("beforeend",i);const r=document.querySelector("."+e.id);e.menuElement=r,r.style["border-radius"]="4px",r.style.display="none",r.style["z-index"]=3e5,r.style.background="white",r.style.border="1px solid black",r.style["box-shadow"]="0 4px 5px 0 gray",r.oncontextmenu=e=>{e.preventDefault()};const o=this;let n=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(n&&(o._hideMenu(n.id),n=null));if(n&&n.id!==s.id&&(o._hideMenu(n.id),n=null),!1===t.enabled)return;const i=t.itemElement,r=s.menuElement,a=i.getBoundingClientRect();r.getBoundingClientRect();a.right+200>window.innerWidth?o._showMenu(s.id,a.left-200,a.top-1):o._showMenu(s.id,a.right-5,a.top-1),n=s})),i||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),o._context&&!1!==t.enabled&&(t.doAction&&t.doAction(o._context),this._hideOnAction?o.hide():(o._updateItemsTitles(),o._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(o._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-i),t+r>window.innerWidth&&(t=window.innerWidth-r),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class n{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[t];r?this._eventSubsNum[t]++:(r={},this._eventSubs[t]=r,this._eventSubsNum[t]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=t;const n=this._events[t];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}let a=!0,l=a?Float64Array:Float32Array;const h=new l(16),c=new l(16),A=new l(4),u={setDoublePrecisionEnabled(e){a=e,l=a?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>a,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new l(e||2),vec3:e=>new l(e||3),vec4:e=>new l(e||4),mat3:e=>new l(e||9),mat3ToMat4:(e,t=new l(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new l(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const i=new l(2);for(let r=0,o=e.length;r{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&i|128]}${e[i>>8&255]}-${e[i>>16&255]}${e[i>>24&255]}${e[255&r]}${e[r>>8&255]}${e[r>>16&255]}${e[r>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new l(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],i=e[1],r=e[2],o=t[0],n=t[1],a=t[2];return[i*a-r*n,r*o-s*a,s*n-i*o,0]},cross3Vec3(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=t[0],a=t[1],l=t[2];return s[0]=r*l-o*a,s[1]=o*n-i*l,s[2]=i*a-r*n,s},sqLenVec4:e=>u.dotVec4(e,e),lenVec4:e=>Math.sqrt(u.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>u.dotVec3(e,e),sqLenVec2:e=>u.dotVec2(e,e),lenVec3:e=>Math.sqrt(u.sqLenVec3(e)),distVec3:(()=>{const e=new l(3);return(t,s)=>u.lenVec3(u.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(u.sqLenVec2(e)),distVec2:(()=>{const e=new l(2);return(t,s)=>u.lenVec2(u.subVec2(t,s,e))})(),rcpVec3:(e,t)=>u.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/u.lenVec4(e);return u.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/u.lenVec3(e);return u.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/u.lenVec2(e);return u.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=u.dotVec3(e,t)/Math.sqrt(u.sqLenVec3(e)*u.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new l(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=u.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=u.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=u.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,i=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||u.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>u.m4s(0),setMat4ToOnes:()=>u.m4s(1),diagonalMat4v:e=>new l([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,i)=>u.diagonalMat4v([e,t,s,i]),diagonalMat4s:e=>u.diagonalMat4c(e,e,e,e),identityMat4:(e=new l(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new l(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>u.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=e[3],a=e[4],l=e[5],h=e[6],c=e[7],A=e[8],u=e[9],p=e[10],d=e[11],f=e[12],E=e[13],m=e[14],y=e[15],g=t[0],I=t[1],v=t[2],T=t[3],_=t[4],R=t[5],P=t[6],D=t[7],N=t[8],C=t[9],O=t[10],b=t[11],S=t[12],w=t[13],x=t[14],B=t[15];return s[0]=g*i+I*a+v*A+T*f,s[1]=g*r+I*l+v*u+T*E,s[2]=g*o+I*h+v*p+T*m,s[3]=g*n+I*c+v*d+T*y,s[4]=_*i+R*a+P*A+D*f,s[5]=_*r+R*l+P*u+D*E,s[6]=_*o+R*h+P*p+D*m,s[7]=_*n+R*c+P*d+D*y,s[8]=N*i+C*a+O*A+b*f,s[9]=N*r+C*l+O*u+b*E,s[10]=N*o+C*h+O*p+b*m,s[11]=N*n+C*c+O*d+b*y,s[12]=S*i+w*a+x*A+B*f,s[13]=S*r+w*l+x*u+B*E,s[14]=S*o+w*h+x*p+B*m,s[15]=S*n+w*c+x*d+B*y,s},mulMat3(e,t,s){s||(s=new l(9));const i=e[0],r=e[3],o=e[6],n=e[1],a=e[4],h=e[7],c=e[2],A=e[5],u=e[8],p=t[0],d=t[3],f=t[6],E=t[1],m=t[4],y=t[7],g=t[2],I=t[5],v=t[8];return s[0]=i*p+r*E+o*g,s[3]=i*d+r*m+o*I,s[6]=i*f+r*y+o*v,s[1]=n*p+a*E+h*g,s[4]=n*d+a*m+h*I,s[7]=n*f+a*y+h*v,s[2]=c*p+A*E+u*g,s[5]=c*d+A*m+u*I,s[8]=c*f+A*y+u*v,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=u.vec4()){const i=t[0],r=t[1],o=t[2],n=t[3];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12]*n,s[1]=e[1]*i+e[5]*r+e[9]*o+e[13]*n,s[2]=e[2]*i+e[6]*r+e[10]*o+e[14]*n,s[3]=e[3]*i+e[7]*r+e[11]*o+e[15]*n,s},transposeMat4(e,t){const s=e[4],i=e[14],r=e[8],o=e[13],n=e[12],a=e[9];if(!t||e===t){const t=e[1],l=e[2],h=e[3],c=e[6],A=e[7],u=e[11];return e[1]=s,e[2]=r,e[3]=n,e[4]=t,e[6]=a,e[7]=o,e[8]=l,e[9]=c,e[11]=i,e[12]=h,e[13]=A,e[14]=u,e}return t[0]=e[0],t[1]=s,t[2]=r,t[3]=n,t[4]=e[1],t[5]=e[5],t[6]=a,t[7]=o,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=i,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],n=e[5],a=e[6],l=e[7],h=e[8],c=e[9],A=e[10],u=e[11],p=e[12],d=e[13],f=e[14],E=e[15];return p*c*a*r-h*d*a*r-p*n*A*r+o*d*A*r+h*n*f*r-o*c*f*r-p*c*i*l+h*d*i*l+p*s*A*l-t*d*A*l-h*s*f*l+t*c*f*l+p*n*i*u-o*d*i*u-p*s*a*u+t*d*a*u+o*s*f*u-t*n*f*u-h*n*i*E+o*c*i*E+h*s*a*E-t*c*a*E-o*s*A*E+t*n*A*E},inverseMat4(e,t){t||(t=e);const s=e[0],i=e[1],r=e[2],o=e[3],n=e[4],a=e[5],l=e[6],h=e[7],c=e[8],A=e[9],u=e[10],p=e[11],d=e[12],f=e[13],E=e[14],m=e[15],y=s*a-i*n,g=s*l-r*n,I=s*h-o*n,v=i*l-r*a,T=i*h-o*a,_=r*h-o*l,R=c*f-A*d,P=c*E-u*d,D=c*m-p*d,N=A*E-u*f,C=A*m-p*f,O=u*m-p*E,b=1/(y*O-g*C+I*N+v*D-T*P+_*R);return t[0]=(a*O-l*C+h*N)*b,t[1]=(-i*O+r*C-o*N)*b,t[2]=(f*_-E*T+m*v)*b,t[3]=(-A*_+u*T-p*v)*b,t[4]=(-n*O+l*D-h*P)*b,t[5]=(s*O-r*D+o*P)*b,t[6]=(-d*_+E*I-m*g)*b,t[7]=(c*_-u*I+p*g)*b,t[8]=(n*C-a*D+h*R)*b,t[9]=(-s*C+i*D-o*R)*b,t[10]=(d*T-f*I+m*y)*b,t[11]=(-c*T+A*I-p*y)*b,t[12]=(-n*N+a*P-l*R)*b,t[13]=(s*N-i*P+r*R)*b,t[14]=(-d*v+f*g-E*y)*b,t[15]=(c*v-A*g+u*y)*b,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||u.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||u.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new l(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,u.translationMat4v(e,r))})(),translationMat4s:(e,t)=>u.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>u.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,i){const r=i[3];i[0]+=r*e,i[1]+=r*t,i[2]+=r*s;const o=i[7];i[4]+=o*e,i[5]+=o*t,i[6]+=o*s;const n=i[11];i[8]+=n*e,i[9]+=n*t,i[10]+=n*s;const a=i[15];return i[12]+=a*e,i[13]+=a*t,i[14]+=a*s,i},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const i=u.normalizeVec4([t[0],t[1],t[2],0],[]),r=Math.sin(e),o=Math.cos(e),n=1-o,a=i[0],l=i[1],h=i[2];let c,A,p,d,f,E;return c=a*l,A=l*h,p=h*a,d=a*r,f=l*r,E=h*r,(s=s||u.mat4())[0]=n*a*a+o,s[1]=n*c+E,s[2]=n*p-f,s[3]=0,s[4]=n*c-E,s[5]=n*l*l+o,s[6]=n*A+d,s[7]=0,s[8]=n*p+f,s[9]=n*A-d,s[10]=n*h*h+o,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,i,r)=>u.rotationMat4v(e,[t,s,i],r),scalingMat4v:(e,t=u.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=u.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new l(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,u.scalingMat4v(e,r))})(),scaleMat4c:(e,t,s,i)=>(i[0]*=e,i[4]*=t,i[8]*=s,i[1]*=e,i[5]*=t,i[9]*=s,i[2]*=e,i[6]*=t,i[10]*=s,i[3]*=e,i[7]*=t,i[11]*=s,i),scaleMat4v(e,t){const s=e[0],i=e[1],r=e[2];return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,t},scalingMat4s:e=>u.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=u.mat4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=i+i,l=r+r,h=o+o,c=i*a,A=i*l,p=i*h,d=r*l,f=r*h,E=o*h,m=n*a,y=n*l,g=n*h;return s[0]=1-(d+E),s[1]=A+g,s[2]=p-y,s[3]=0,s[4]=A-g,s[5]=1-(c+E),s[6]=f+m,s[7]=0,s[8]=p+y,s[9]=f-m,s[10]=1-(c+d),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=u.vec4()){const i=u.clamp,r=e[0],o=e[4],n=e[8],a=e[1],l=e[5],h=e[9],c=e[2],A=e[6],p=e[10];return"XYZ"===t?(s[1]=Math.asin(i(n,-1,1)),Math.abs(n)<.99999?(s[0]=Math.atan2(-h,p),s[2]=Math.atan2(-o,r)):(s[0]=Math.atan2(A,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(n,p),s[2]=Math.atan2(a,l)):(s[1]=Math.atan2(-c,r),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(i(A,-1,1)),Math.abs(A)<.99999?(s[1]=Math.atan2(-c,p),s[2]=Math.atan2(-o,l)):(s[1]=0,s[2]=Math.atan2(a,r))):"ZYX"===t?(s[1]=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(s[0]=Math.atan2(A,p),s[2]=Math.atan2(a,r)):(s[0]=0,s[2]=Math.atan2(-o,l))):"YZX"===t?(s[2]=Math.asin(i(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-h,l),s[1]=Math.atan2(-c,r)):(s[0]=0,s[1]=Math.atan2(n,p))):"XZY"===t&&(s[2]=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(A,l),s[1]=Math.atan2(n,r)):(s[0]=Math.atan2(-h,p),s[1]=0)),s},composeMat4:(e,t,s,i=u.mat4())=>(u.quaternionToRotationMat4(t,i),u.scaleMat4v(s,i),u.translateMat4v(e,i),i),decomposeMat4:(()=>{const e=new l(3),t=new l(16);return function(s,i,r,o){e[0]=s[0],e[1]=s[1],e[2]=s[2];let n=u.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const a=u.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=u.lenVec3(e);u.determinantMat4(s)<0&&(n=-n),i[0]=s[12],i[1]=s[13],i[2]=s[14],t.set(s);const h=1/n,c=1/a,A=1/l;return t[0]*=h,t[1]*=h,t[2]*=h,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=A,t[9]*=A,t[10]*=A,u.mat4ToQuaternion(t,r),o[0]=n,o[1]=a,o[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,i){i||(i=u.mat4());const r=e[0],o=e[1],n=e[2],a=s[0],l=s[1],h=s[2],c=t[0],A=t[1],p=t[2];if(r===c&&o===A&&n===p)return u.identityMat4();let d,f,E,m,y,g,I,v,T,_;return d=r-c,f=o-A,E=n-p,_=1/Math.sqrt(d*d+f*f+E*E),d*=_,f*=_,E*=_,m=l*E-h*f,y=h*d-a*E,g=a*f-l*d,_=Math.sqrt(m*m+y*y+g*g),_?(_=1/_,m*=_,y*=_,g*=_):(m=0,y=0,g=0),I=f*g-E*y,v=E*m-d*g,T=d*y-f*m,_=Math.sqrt(I*I+v*v+T*T),_?(_=1/_,I*=_,v*=_,T*=_):(I=0,v=0,T=0),i[0]=m,i[1]=I,i[2]=d,i[3]=0,i[4]=y,i[5]=v,i[6]=f,i[7]=0,i[8]=g,i[9]=T,i[10]=E,i[11]=0,i[12]=-(m*r+y*o+g*n),i[13]=-(I*r+v*o+T*n),i[14]=-(d*r+f*o+E*n),i[15]=1,i},lookAtMat4c:(e,t,s,i,r,o,n,a,l)=>u.lookAtMat4v([e,t,s],[i,r,o],[n,a,l],[]),orthoMat4c(e,t,s,i,r,o,n){n||(n=u.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2/l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=-2/h,n[11]=0,n[12]=-(e+t)/a,n[13]=-(i+s)/l,n[14]=-(o+r)/h,n[15]=1,n},frustumMat4v(e,t,s){s||(s=u.mat4());const i=[e[0],e[1],e[2],0],r=[t[0],t[1],t[2],0];u.addVec4(r,i,h),u.subVec4(r,i,c);const o=2*i[2],n=c[0],a=c[1],l=c[2];return s[0]=o/n,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o/a,s[6]=0,s[7]=0,s[8]=h[0]/n,s[9]=h[1]/a,s[10]=-h[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-o*r[2]/l,s[15]=0,s},frustumMat4(e,t,s,i,r,o,n){n||(n=u.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2*r/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2*r/l,n[6]=0,n[7]=0,n[8]=(t+e)/a,n[9]=(i+s)/l,n[10]=-(o+r)/h,n[11]=-1,n[12]=0,n[13]=0,n[14]=-o*r*2/h,n[15]=0,n},perspectiveMat4(e,t,s,i,r){const o=[],n=[];return o[2]=s,n[2]=i,n[1]=o[2]*Math.tan(e/2),o[1]=-n[1],n[0]=n[1]*t,o[0]=-n[0],u.frustumMat4v(o,n,r)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=u.vec3()){const i=t[0],r=t[1],o=t[2];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12],s[1]=e[1]*i+e[5]*r+e[9]*o+e[13],s[2]=e[2]*i+e[6]*r+e[10]*o+e[14],s},transformPoint4:(e,t,s=u.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const i=s||[],r=t.length;let o,n,a,l;const h=e[0],c=e[1],A=e[2],u=e[3],p=e[4],d=e[5],f=e[6],E=e[7],m=e[8],y=e[9],g=e[10],I=e[11],v=e[12],T=e[13],_=e[14],R=e[15];let P;for(let e=0;e{const e=new l(16),t=new l(16),s=new l(16);return function(i,r,o,n){return this.transformVec3(this.mulMat4(this.inverseMat4(r,e),this.inverseMat4(o,t),s),i,n)}})(),lerpVec3(e,t,s,i,r,o){const n=o||u.vec3(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n},lerpMat4(e,t,s,i,r,o){const n=o||u.mat4(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n[3]=i[3]+a*(r[3]-i[3]),n[4]=i[4]+a*(r[4]-i[4]),n[5]=i[5]+a*(r[5]-i[5]),n[6]=i[6]+a*(r[6]-i[6]),n[7]=i[7]+a*(r[7]-i[7]),n[8]=i[8]+a*(r[8]-i[8]),n[9]=i[9]+a*(r[9]-i[9]),n[10]=i[10]+a*(r[10]-i[10]),n[11]=i[11]+a*(r[11]-i[11]),n[12]=i[12]+a*(r[12]-i[12]),n[13]=i[13]+a*(r[13]-i[13]),n[14]=i[14]+a*(r[14]-i[14]),n[15]=i[15]+a*(r[15]-i[15]),n},flatten(e){const t=[];let s,i,r,o,n;for(s=0,i=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=u.vec4()){const i=e[0]*u.DEGTORAD/2,r=e[1]*u.DEGTORAD/2,o=e[2]*u.DEGTORAD/2,n=Math.cos(i),a=Math.cos(r),l=Math.cos(o),h=Math.sin(i),c=Math.sin(r),A=Math.sin(o);return"XYZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"YXZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"ZXY"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"ZYX"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"YZX"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l-h*c*A):"XZY"===t&&(s[0]=h*a*l-n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l+h*c*A),s},mat4ToQuaternion(e,t=u.vec4()){const s=e[0],i=e[4],r=e[8],o=e[1],n=e[5],a=e[9],l=e[2],h=e[6],c=e[10];let A;const p=s+n+c;return p>0?(A=.5/Math.sqrt(p+1),t[3]=.25/A,t[0]=(h-a)*A,t[1]=(r-l)*A,t[2]=(o-i)*A):s>n&&s>c?(A=2*Math.sqrt(1+s-n-c),t[3]=(h-a)/A,t[0]=.25*A,t[1]=(i+o)/A,t[2]=(r+l)/A):n>c?(A=2*Math.sqrt(1+n-s-c),t[3]=(r-l)/A,t[0]=(i+o)/A,t[1]=.25*A,t[2]=(a+h)/A):(A=2*Math.sqrt(1+c-s-n),t[3]=(o-i)/A,t[0]=(r+l)/A,t[1]=(a+h)/A,t[2]=.25*A),t},vec3PairToQuaternion(e,t,s=u.vec4()){const i=Math.sqrt(u.dotVec3(e,e)*u.dotVec3(t,t));let r=i+u.dotVec3(e,t);return r<1e-8*i?(r=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):u.cross3Vec3(e,t,s),s[3]=r,u.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=u.vec4()){const s=e[3]/2,i=Math.sin(s);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new l(16);return(t,s,i)=>(i=i||u.vec3(),u.quaternionToRotationMat4(t,e),u.mat4ToEuler(e,s,i),i)})(),mulQuaternions(e,t,s=u.vec4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=t[0],l=t[1],h=t[2],c=t[3];return s[0]=n*a+i*c+r*h-o*l,s[1]=n*l+r*c+o*a-i*h,s[2]=n*h+o*c+i*l-r*a,s[3]=n*c-i*a-r*l-o*h,s},vec3ApplyQuaternion(e,t,s=u.vec3()){const i=t[0],r=t[1],o=t[2],n=e[0],a=e[1],l=e[2],h=e[3],c=h*i+a*o-l*r,A=h*r+l*i-n*o,p=h*o+n*r-a*i,d=-n*i-a*r-l*o;return s[0]=c*h+d*-n+A*-l-p*-a,s[1]=A*h+d*-a+p*-n-c*-l,s[2]=p*h+d*-l+c*-a-A*-n,s},quaternionToMat4(e,t){t=u.identityMat4(t);const s=e[0],i=e[1],r=e[2],o=e[3],n=2*s,a=2*i,l=2*r,h=n*o,c=a*o,A=l*o,p=n*s,d=a*s,f=l*s,E=a*i,m=l*i,y=l*r;return t[0]=1-(E+y),t[1]=d+A,t[2]=f-c,t[4]=d-A,t[5]=1-(p+y),t[6]=m+h,t[8]=f+c,t[9]=m-h,t[10]=1-(p+E),t},quaternionToRotationMat4(e,t){const s=e[0],i=e[1],r=e[2],o=e[3],n=s+s,a=i+i,l=r+r,h=s*n,c=s*a,A=s*l,u=i*a,p=i*l,d=r*l,f=o*n,E=o*a,m=o*l;return t[0]=1-(u+d),t[4]=c-m,t[8]=A+E,t[1]=c+m,t[5]=1-(h+d),t[9]=p-f,t[2]=A-E,t[6]=p+f,t[10]=1-(h+u),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=u.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>u.normalizeQuaternion(u.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=u.vec4()){const s=(e=u.normalizeQuaternion(e,A))[3],i=2*Math.acos(s),r=Math.sqrt(1-s*s);return r<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r),t[3]=i,t},AABB3:e=>new l(e||6),AABB2:e=>new l(e||4),OBB3:e=>new l(e||32),OBB2:e=>new l(e||16),Sphere3:(e,t,s,i)=>new l([e,t,s,i]),transformOBB3(e,t,s=t){let i;const r=t.length;let o,n,a;const l=e[0],h=e[1],c=e[2],A=e[3],u=e[4],p=e[5],d=e[6],f=e[7],E=e[8],m=e[9],y=e[10],g=e[11],I=e[12],v=e[13],T=e[14],_=e[15];for(i=0;i{const e=new l(3),t=new l(3),s=new l(3);return i=>(e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5],u.subVec3(t,e,s),Math.abs(u.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(i,r)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5];const o=u.subVec3(t,e,s),n=r[0]-i[0],a=i[3]-r[0],l=r[1]-i[1],h=i[4]-r[1],c=r[2]-i[2],A=i[5]-r[2];return o[0]+=n>a?n:a,o[1]+=l>h?l:h,o[2]+=c>A?c:A,Math.abs(u.lenVec3(o))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||u.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||u.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=u.AABB3())=>(e[0]=u.MAX_DOUBLE,e[1]=u.MAX_DOUBLE,e[2]=u.MAX_DOUBLE,e[3]=u.MIN_DOUBLE,e[4]=u.MIN_DOUBLE,e[5]=u.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=u.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new l(3);return(t,s,i)=>{s=s||u.AABB3();let r,o,n,a=u.MAX_DOUBLE,l=u.MAX_DOUBLE,h=u.MAX_DOUBLE,c=u.MIN_DOUBLE,A=u.MIN_DOUBLE,p=u.MIN_DOUBLE;for(let s=0,d=t.length;sc&&(c=r),o>A&&(A=o),n>p&&(p=n);return s[0]=a,s[1]=l,s[2]=h,s[3]=c,s[4]=A,s[5]=p,s}})(),OBB3ToAABB3(e,t=u.AABB3()){let s,i,r,o=u.MAX_DOUBLE,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE,c=u.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToAABB3(e,t=u.AABB3()){let s,i,r,o=u.MAX_DOUBLE,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE,c=u.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToSphere3:(()=>{const e=new l(3);return(t,s)=>{s=s||u.vec4();let i,r=0,o=0,n=0;const a=t.length;for(i=0;ih&&(h=l);return s[3]=h,s}})(),positions3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,i)=>{i=i||u.vec4();let r,o=0,n=0,a=0;const l=s.length;let h=0;for(r=0;rh&&(h=A);return i[3]=h,i}})(),OBB3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,i)=>{i=i||u.vec4();let r,o=0,n=0,a=0;const l=s.length,h=l/4;for(r=0;rA&&(A=c);return i[3]=A,i}})(),getSphere3Center:(e,t=u.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=u.vec3()){let s=0,i=0,r=0;for(var o=0,n=e.length;o(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>i&&(e[1]=i),e[2]>r&&(e[2]=r),e[3](e[0]=u.MAX_DOUBLE,e[1]=u.MAX_DOUBLE,e[2]=u.MIN_DOUBLE,e[3]=u.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(i=e[0]*s[0],r=e[0]*s[3]):(i=e[0]*s[3],r=e[0]*s[0]),e[1]>0?(i+=e[1]*s[1],r+=e[1]*s[4]):(i+=e[1]*s[4],r+=e[1]*s[1]),e[2]>0?(i+=e[2]*s[2],r+=e[2]*s[5]):(i+=e[2]*s[5],r+=e[2]*s[2]);if(i<=-t&&r<=-t)return-1;return i>=-t&&r>=-t?1:0},OBB3ToAABB2(e,t=u.AABB2()){let s,i,r,o,n=u.MAX_DOUBLE,a=u.MAX_DOUBLE,l=u.MIN_DOUBLE,h=u.MIN_DOUBLE;for(let t=0,c=e.length;tl&&(l=s),i>h&&(h=i);return t[0]=n,t[1]=a,t[2]=l,t[3]=h,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(i-s),tangentQuadraticBezier3:(e,t,s,i,r)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*i*(1-e)-3*e*e*i+3*e*e*r,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,i,r){const o=.5*(s-e),n=.5*(i-t),a=r*r;return(2*t-2*s+o+n)*(r*a)+(-3*t+3*s-2*o-n)*a+o*r+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,i){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,i)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,i,r){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,i)+this.b3p3(e,r)},triangleNormal(e,t,s,i=u.vec3()){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=s[0]-e[0],l=s[1]-e[1],h=s[2]-e[2],c=o*h-n*l,A=n*a-r*h,p=r*l-o*a,d=Math.sqrt(c*c+A*A+p*p);return 0===d?(i[0]=0,i[1]=0,i[2]=0):(i[0]=c/d,i[1]=A/d,i[2]=p/d),i},rayTriangleIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3);return(o,n,a,l,h,c)=>{c=c||u.vec3();const A=u.subVec3(l,a,e),p=u.subVec3(h,a,t),d=u.cross3Vec3(n,p,s),f=u.dotVec3(A,d);if(f<1e-6)return null;const E=u.subVec3(o,a,i),m=u.dotVec3(E,d);if(m<0||m>f)return null;const y=u.cross3Vec3(E,A,r),g=u.dotVec3(n,y);if(g<0||m+g>f)return null;const I=u.dotVec3(p,y)/f;return c[0]=o[0]+I*n[0],c[1]=o[1]+I*n[1],c[2]=o[2]+I*n[2],c}})(),rayPlaneIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),i=new l(3);return(r,o,n,a,l,h)=>{h=h||u.vec3(),o=u.normalizeVec3(o,e);const c=u.subVec3(a,n,t),A=u.subVec3(l,n,s),p=u.cross3Vec3(c,A,i);u.normalizeVec3(p,p);const d=-u.dotVec3(n,p),f=-(u.dotVec3(r,p)+d)/u.dotVec3(o,p);return h[0]=r[0]+f*o[0],h[1]=r[1]+f*o[1],h[2]=r[2]+f*o[2],h}})(),cartesianToBarycentric:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(i,r,o,n,a)=>{const l=u.subVec3(n,r,e),h=u.subVec3(o,r,t),c=u.subVec3(i,r,s),A=u.dotVec3(l,l),p=u.dotVec3(l,h),d=u.dotVec3(l,c),f=u.dotVec3(h,h),E=u.dotVec3(h,c),m=A*f-p*p;if(0===m)return null;const y=1/m,g=(f*d-p*E)*y,I=(A*E-p*d)*y;return a[0]=1-g-I,a[1]=I,a[2]=g,a}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,i,r=u.vec3()){const o=e[0],n=e[1],a=e[2];return r[0]=t[0]*o+s[0]*n+i[0]*a,r[1]=t[1]*o+s[1]*n+i[1]*a,r[2]=t[2]*o+s[2]*n+i[2]*a,r},mergeVertices(e,t,s,i){const r={},o=[],n=[],a=t?[]:null,l=s?[]:null,h=[];let c,A,u,p;const d=1e4;let f,E,m=0;for(f=0,E=e.length;f{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3),o=new l(3);return(n,a,l)=>{let h,c;const A=new Array(n.length/3);let p,d,f,E,m,y,g;for(h=0,c=a.length;h{const e=new l(3),t=new l(3),s=new l(3),i=new l(3),r=new l(3),o=new l(3),n=new l(3);return(a,l,h)=>{const c=new Float32Array(a.length);for(let A=0;A>24&255,c=u>>16&255,h=u>>8&255,l=255&u,a=t[s],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+1],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+2],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,u++;return{positions:r,colors:o}},faceToVertexNormals(e,t,s={}){const i=s.smoothNormalsAngleThreshold||20,r={},o=[],n={};let a,l,h,c,A;const p=1e4;let d,f,E,m,y,g;for(f=0,m=e.length;f{const e=new l(4),t=new l(4);return(s,i,r,o,n)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=1,u.transformVec4(s,e,t),o[0]=t[0],o[1]=t[1],o[2]=t[2],e[0]=r[0],e[1]=r[1],e[2]=r[2],u.transformVec3(s,e,t),u.normalizeVec3(t),n[0]=t[0],n[1]=t[1],n[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new l(16),t=new l(16),s=new l(4),i=new l(4),r=new l(4),o=new l(4);return(n,a,l,h,c,A)=>{const p=u.mulMat4(l,a,e),d=u.inverseMat4(p,t),f=n.width,E=n.height,m=(h[0]-f/2)/(f/2),y=-(h[1]-E/2)/(E/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,u.transformVec4(d,s,i),u.mulVec4Scalar(i,1/i[3]),r[0]=m,r[1]=y,r[2]=1,r[3]=1,u.transformVec4(d,r,o),u.mulVec4Scalar(o,1/o[3]),c[0]=o[0],c[1]=o[1],c[2]=o[2],u.subVec3(o,i,A),u.normalizeVec3(A)}})(),canvasPosToLocalRay:(()=>{const e=new l(3),t=new l(3);return(s,i,r,o,n,a,l)=>{u.canvasPosToWorldRay(s,i,r,n,e,t),u.worldRayToLocalRay(o,e,t,a,l)}})(),worldRayToLocalRay:(()=>{const e=new l(16),t=new l(4),s=new l(4);return(i,r,o,n,a)=>{const l=u.inverseMat4(i,e);t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=1,u.transformVec4(l,t,s),n[0]=s[0],n[1]=s[1],n[2]=s[2],u.transformVec3(l,o,a)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,i,r,o){const n=new l(6),a={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:n};let h,c;for(n[0]=n[1]=n[2]=Number.POSITIVE_INFINITY,n[3]=n[4]=n[5]=Number.NEGATIVE_INFINITY,h=0,c=s.length;hn[3]&&(n[3]=r[t]),r[t+1]n[4]&&(n[4]=r[t+1]),r[t+2]n[5]&&(n[5]=r[t+2])}}if(s.length<20||o>10)return a.triangles=s,a.leaf=!0,a;e[0]=n[3]-n[0],e[1]=n[4]-n[1],e[2]=n[5]-n[2];let u=0;e[1]>e[u]&&(u=1),e[2]>e[u]&&(u=2),a.splitDim=u;const p=(n[u]+n[u+3])/2,d=new Array(s.length);let f=0;const E=new Array(s.length);let m=0;for(h=0,c=s.length;h{const i=e.length/3,r=new Array(i);for(let e=0;e=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t},octDecodeVec2s(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t}};u.buildEdgeIndices=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(x=s[O.index1],B=s[O.index2],(!F&&x>65535||B>65535)&&(F=!0),v.push(x),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const p={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var d=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),i=s+e[1],r=s;r{};t=t||i,s=s||i;var r=new XMLHttpRequest;r.overrideMimeType("application/json"),r.open("GET",e,!0),r.addEventListener("load",(function(e){var i=e.target.response;if(200===this.status){var r;try{r=JSON.parse(i)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(r)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(i))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),r.addEventListener("error",(function(e){s(e)}),!1),r.send(null)},loadArraybuffer:function(e,t,s){var i=e=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}},v={sceneId:null,time:null,startTime:null,prevTime:null,deltaTime:null},T=[];let _,R=0,P=0;const D=new function(){this.version="1.0.0",this.scenes={},this._superTypes={},this._addScene=function(e){if(e.id){if(D.scenes[e.id])return void console.error(`[ERROR] Scene ${m.inQuotes(e.id)} already exists`)}else e.id=g.addItem({});D.scenes[e.id]=e;const t=e.ticksPerOcclusionTest,s=e.ticksPerRender;y[e.id]={ticksPerOcclusionTest:t,ticksPerRender:s,renderCountdown:s},p.components.scenes++,e.once("destroyed",(()=>{g.removeItem(e.id),delete D.scenes[e.id],delete y[e.id],p.components.scenes--}))},this.clear=function(){let e;for(const t in D.scenes)D.scenes.hasOwnProperty(t)&&(e=D.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete D.scenes[e.id]))},this.scheduleTask=function(e,t){I.push(e),I.push(t)},this.runTasks=function(e=-1){let t,s,i=(new Date).getTime(),r=0;for(;I.length>0&&(e<0||i0&&_>0){var t=1e3/_;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),p.frame.fps=Math.round(P/T.length)}!function(e){const t=D.runTasks(e+10),s=D.getNumTasks();p.frame.tasksRun=t,p.frame.tasksScheduled=s,p.frame.tasksBudget=10}(e),function(e){for(var t in v.time=e,D.scenes)if(D.scenes.hasOwnProperty(t)){var s=D.scenes[t];v.sceneId=t,v.startTime=s.startTime,v.deltaTime=null!=v.prevTime?v.time-v.prevTime:0,s.fire("tick",v,!0)}v.prevTime=e}(e),function(){const e=D.scenes,t=!1;let s,i,r,o,n;for(n in e)e.hasOwnProperty(n)&&(s=e[n],i=y[n],i||(i=y[n]={}),r=s.ticksPerOcclusionTest,i.ticksPerOcclusionTest!==r&&(i.ticksPerOcclusionTest=r,i.renderCountdown=r),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=r),o=s.ticksPerRender,i.ticksPerRender!==o&&(i.ticksPerRender=o,i.renderCountdown=o),0==--i.renderCountdown&&(s.render(t),i.renderCountdown=o))}(),R=e,void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(N):requestAnimationFrame(N)};void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(N):requestAnimationFrame(N);class C{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof C))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[t];r?this._eventSubsNum[t]++:(r={},this._eventSubs[t]=r,this._eventSubsNum[t]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=t;const n=this._events[t];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+m.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const i=e.sceneDefault,r=e.sceneSingleton,o=e.type,n=e.on,a=!1!==e.recompiles;if(s&&(m.isNumeric(s)||m.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+m.inQuotes(e))}if(!s)if(!0===r){const e=this.scene.types[o];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===i&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+m.inQuotes(s.id));if(o&&!s.isType(o))return void this.error("Expected a "+o+" type or subtype: "+s.type+" "+m.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let h,c,A;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(h=e.subs,c=0,A=h.length;c{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():D.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,i,r,o;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,i=t.subs,r=0,o=i.length;r0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let i=255;if(t){if(e<0?e=0:e>1&&(e=1),i=Math.floor(255*e),s===i)return}else if(i=255,s===i)return;for(let e=0,t=this.meshes.length;e
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const Y=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class X extends C{constructor(e,t={}){super(e,t),this._backgroundColor=u.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let i=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(i=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{i&&(i=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new K(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+u.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),i=s.style;i.height="100%",i.width="100%",i.padding="0",i.margin="0",i.background="rgba(0,0,0,0);",i.float="left",i.left="0",i.top="0",i.position="absolute",i.opacity="1.0",i["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?q.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?q.FS_MAX_FLOAT_PRECISION="mediump":q.FS_MAX_FLOAT_PRECISION="lowp":q.FS_MAX_FLOAT_PRECISION="mediump",q.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),q.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),q.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),q.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),q.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),q.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),q.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),q.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),q.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),q.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){q.SUPPORTED_EXTENSIONS[e]=!0})))}class ${constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._canvasPos=new Int16Array([0,0]),this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class ee{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),i=[];for(let e=0;e0&&"/"===s.charAt(i+1)&&(s=s.substring(0,i)),t.push(s);return t.join("\n")}function oe(e){console.error(e.join("\n"))}class ne{constructor(e,t){this.id=ie.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new ee(e,e.VERTEX_SHADER,re(this.source.vertex)),this._fragmentShader=new ee(e,e.FRAGMENT_SHADER,re(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void oe(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void oe(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void oe(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void oe(this.errors);let t,s,i,r,o;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void oe(this.errors);const n=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class le{constructor(e,t){this.scene=e,this.aabb=u.AABB3(),this.origin=u.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const n=s.canvasPos,a=n[0],l=n[1];a+10<0||l+10<0||a-10>i||l-10>r?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[o++]=a,this.pixels[o++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new le(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let i=this._occlusionLayers[s];i||(i=new le(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),i.addMarker(e),this._markersToOcclusionLayersMap[e.id]=i}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// OcclusionTester fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),i.push("}"),i}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new ne(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=i.sectionPlanes;for(let i=0;i{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=u.mat4();return()=>(e&&u.inverseMat4(i.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,i=this._scene,r=i.sao,o=t.drawingBufferWidth,n=t.drawingBufferHeight,a=i.camera.project._state,l=a.near,h=a.far,c=a.matrix,A=this._getInverseProjectMat(),p=Math.random(),d="perspective"===i.camera.projection;ue[0]=o,ue[1]=n,t.viewport(0,0,o,n),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,h),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,c),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,A),t.uniform1i(this._uPerspective,d),t.uniform1f(this._uScale,r.scale*(h/5)),t.uniform1f(this._uIntensity,r.intensity),t.uniform1f(this._uBias,r.bias),t.uniform1f(this._uKernelRadius,r.kernelRadius),t.uniform1f(this._uMinResolution,r.minResolution),t.uniform2fv(this._uViewport,ue),t.uniform1f(this._uRandomSeed,p);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new ne(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const i=new Float32Array([1,1,0,1,0,0,1,0]),r=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),o=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new ae(s,s.ARRAY_BUFFER,r,r.length,3,s.STATIC_DRAW),this._uvBuf=new ae(s,s.ARRAY_BUFFER,i,i.length,2,s.STATIC_DRAW),this._indicesBuf=new ae(s,s.ELEMENT_ARRAY_BUFFER,o,o.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const de=new Float32Array(Ie(17,[0,1])),fe=new Float32Array(Ie(17,[1,0])),Ee=new Float32Array(function(e,t){const s=[];for(let i=0;i<=e;i++)s.push(ge(i,t));return s}(17,4)),me=new Float32Array(2);class ye{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new ne(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),i=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new ae(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new ae(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new ae(e,e.ELEMENT_ARRAY_BUFFER,i,i.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=u.mat4();return()=>(e&&u.inverseMat4(o.camera.projMatrix,t),t)})());const i=this._scene.canvas.gl,r=this._program,o=this._scene,n=i.drawingBufferWidth,a=i.drawingBufferHeight,l=o.camera.project._state,h=l.near,c=l.far;i.viewport(0,0,n,a),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),r.bind(),me[0]=n,me[1]=a,i.uniform2fv(this._uViewport,me),i.uniform1f(this._uCameraNear,h),i.uniform1f(this._uCameraFar,c),i.uniform1f(this._uDepthCutoff,.01),0===s?i.uniform2fv(this._uSampleOffsets,fe):i.uniform2fv(this._uSampleOffsets,de),i.uniform1fv(this._uSampleWeights,Ee);const A=e.getDepthTexture(),p=t.getTexture();r.bindTexture(this._uDepthTexture,A,0),r.bindTexture(this._uOcclusionTexture,p,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function ge(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function Ie(e,t){const s=[];for(let i=0;i<=e;i++)s.push(t[0]*i),s.push(t[1]*i);return s}class ve{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(e=null){if(this._touch(e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}_touch(e=null){let t,s;const i=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=i.drawingBufferWidth,s=i.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;i.deleteTexture(this.buffer.texture),i.deleteFramebuffer(this.buffer.framebuf),i.deleteRenderbuffer(this.buffer.renderbuf)}const r=i.createTexture();let o;i.bindTexture(i.TEXTURE_2D,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e?i.texStorage2D(i.TEXTURE_2D,1,e,t,s):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,s,0,i.RGBA,i.UNSIGNED_BYTE,null),this._hasDepthTexture&&(o=i.createTexture(),i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texImage2D(i.TEXTURE_2D,0,i.DEPTH_COMPONENT32F,t,s,0,i.DEPTH_COMPONENT,i.FLOAT,null));const n=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,n),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_COMPONENT32F,t,s);const a=i.createFramebuffer();if(i.bindFramebuffer(i.FRAMEBUFFER,a),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,r,0),this._hasDepthTexture?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,o,0):i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n),i.bindTexture(i.TEXTURE_2D,null),i.bindRenderbuffer(i.RENDERBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,a),!i.isFramebuffer(a))throw"Invalid framebuffer";i.bindFramebuffer(i.FRAMEBUFFER,null);const l=i.checkFramebufferStatus(i.FRAMEBUFFER);switch(l){case i.FRAMEBUFFER_COMPLETE:break;case i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case i.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:a,renderbuf:n,texture:r,depthTexture:o,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,i=null,r=Uint8Array,o=4){const n=e,a=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,l=new r(o),h=this.gl;return h.readPixels(n,a,1,1,s||h.RGBA,i||h.UNSIGNED_BYTE,l,0),l}readArray(e=null,t=null,s=Uint8Array,i=4){const r=new s(this.buffer.width*this.buffer.height*i),o=this.gl;return o.readPixels(0,0,this.buffer.width,this.buffer.height,e||o.RGBA,t||o.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,i=t.canvas,r=t.imageData,o=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const n=this.buffer.width,a=this.buffer.height,l=a/2|0,h=4*n,c=new Uint8Array(4*n);for(let e=0;e0)for(i.withSAO=!0,w=0;w0)for(w=0;w0)for(w=0;w0)for(w=0;w0||j>0||U>0||H>0){if(o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):(o.blendEquation(o.FUNC_ADD),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA)),i.backfaces=!1,a||o.depthMask(!1),(U>0||H>0)&&o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),H>0)for(w=0;w0)for(w=0;w0)for(w=0;w0)for(w=0;w0||W>0){if(i.lastProgramId=null,t.highlightMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),W>0)for(w=0;w0)for(w=0;w0||K>0||Q>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),o.enable(o.CULL_FACE),K>0)for(w=0;w0)for(w=0;w0||X>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),X>0)for(w=0;w0)for(w=0;w0||J>0){if(i.lastProgramId=null,t.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),J>0)for(w=0;w0)for(w=0;w0){const t=Math.floor(e/4),s=a.size[0],i=t%s-Math.floor(s/2),o=Math.floor(t/s)-Math.floor(s/2),l=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));m.push({x:i,y:o,dist:l,isVertex:r&&n?p[e+3]>u.length/2:r,result:[p[e+0],p[e+1],p[e+2],p[e+3]]})}let y=null,g=null;if(m.length>0){m.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),g=m[0].isVertex?"vertex":"edge",m=m[0].result;const e=u[m[3]],t=e.origin,s=e.coordinateScale;y=[m[0]*s[0]+t[0],m[1]*s[1]+t[1],m[2]*s[2]+t[2]]}if(null===d&&null==y)return null;let I=null;return null!==y&&(I=t.camera.projectWorldPos(y)),{snapType:g,snappedToVertex:"vertex"===g,snappedToEdge:"edge"===g,worldPos:d,snappedWorldPos:y,snappedCanvasPos:I}},this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Ae(t,v),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){P(),this._occlusionTester.bindRenderBuf(),i.reset(),i.backfaces=!0,i.frontface=!0,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.clearColor(0,0,0,0),o.enable(o.DEPTH_TEST),o.disable(o.CULL_FACE),o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT);for(let e in h)if(h.hasOwnProperty(e)){const t=h[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),this.element.addEventListener("mousemove",this._mouseMoveListener=e=>{this.enabled&&(this._getMouseCanvasPos(e),this.fire("mousemove",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault())}),this.element.addEventListener("wheel",this._mouseWheelListener=(e,t)=>{if(!this.enabled)return;const s=Math.max(-1,Math.min(1,40*-e.deltaY));this.fire("mousewheel",s,!0)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(i=>{e>=i[0]-s&&e<=i[0]+s&&t>=i[1]-s&&t<=i[1]+s&&this.fire("mouseclicked",i,!0)}))}this._eventsBound=!0}}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,i=0;for(;t.offsetParent;)s+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-i}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const De=new e({});class Ne{constructor(e){this.id=De.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){De.removeItem(this.id)}}class Ce extends C{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new Ne({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class Oe extends C{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let i=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(i/=t),i=Math.min(i,120),u.perspectiveMat4(i*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class be extends C{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,i=s[2],r=s[3],o=i/r;let n,a,l,h;i>r?(n=-t,a=t,l=t/o,h=-t/o):(n=-t*o,a=t*o,l=t,h=-t),u.orthoMat4c(n,a,h,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class Se extends C{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){u.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class we extends C{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ne({matrix:u.mat4(),inverseMatrix:u.mat4(),transposedMatrix:u.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(u.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(u.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,u.mulMat4v4(this.inverseMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,u.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy()}}const xe=u.vec3(),Be=u.vec3(),Fe=u.vec3(),Me=u.vec3(),Le=u.vec3(),Ue=u.vec3(),He=u.vec4(),Ge=u.vec4(),ke=u.vec4(),Ve=u.mat4(),je=u.mat4(),Qe=u.vec3(),We=u.vec3(),ze=u.vec3(),Ke=u.vec3();class Ye extends C{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new Ne({deviceMatrix:u.mat4(),hasDeviceMatrix:!1,matrix:u.mat4(),normalMatrix:u.mat4(),inverseMatrix:u.mat4()}),this._perspective=new Oe(this),this._ortho=new be(this),this._frustum=new Se(this),this._customProjection=new we(this),this._project=this._perspective,this._eye=u.vec3([0,0,10]),this._look=u.vec3([0,0,0]),this._up=u.vec3([0,1,0]),this._worldUp=u.vec3([0,1,0]),this._worldRight=u.vec3([1,0,0]),this._worldForward=u.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(u.subVec3(this._eye,this._look,Qe),u.normalizeVec3(Qe,We),u.mulVec3Scalar(We,1e3,ze),u.addVec3(this._look,ze,Ke),t=Ke):t=this._eye,e.hasDeviceMatrix?(u.lookAtMat4v(t,this._look,this._up,je),u.mulMat4(e.deviceMatrix,je,e.matrix)):u.lookAtMat4v(t,this._look,this._up,e.matrix),u.inverseMat4(this._state.matrix,this._state.inverseMatrix),u.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=u.subVec3(this._eye,this._look,xe);u.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,Ve),t=u.transformPoint3(Ve,t,Be),this.eye=u.addVec3(this._look,t,Fe),this.up=u.transformPoint3(Ve,this._up,Me)}orbitPitch(e){if(this._constrainPitch&&(e=u.dotVec3(this._up,this._worldUp)/u.DEGTORAD)<1)return;let t=u.subVec3(this._eye,this._look,xe);const s=u.cross3Vec3(u.normalizeVec3(t,Be),u.normalizeVec3(this._up,Fe));u.rotationMat4v(.0174532925*e,s,Ve),t=u.transformPoint3(Ve,t,Me),this.up=u.transformPoint3(Ve,this._up,Le),this.eye=u.addVec3(t,this._look,Ue)}yaw(e){let t=u.subVec3(this._look,this._eye,xe);u.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,Ve),t=u.transformPoint3(Ve,t,Be),this.look=u.addVec3(t,this._eye,Fe),this._gimbalLock&&(this.up=u.transformPoint3(Ve,this._up,Me))}pitch(e){if(this._constrainPitch&&(e=u.dotVec3(this._up,this._worldUp)/u.DEGTORAD)<1)return;let t=u.subVec3(this._look,this._eye,xe);const s=u.cross3Vec3(u.normalizeVec3(t,Be),u.normalizeVec3(this._up,Fe));u.rotationMat4v(.0174532925*e,s,Ve),this.up=u.transformPoint3(Ve,this._up,Ue),t=u.transformPoint3(Ve,t,Me),this.look=u.addVec3(t,this._eye,Le)}pan(e){const t=u.subVec3(this._eye,this._look,xe),s=[0,0,0];let i;if(0!==e[0]){const r=u.cross3Vec3(u.normalizeVec3(t,[]),u.normalizeVec3(this._up,Be));i=u.mulVec3Scalar(r,e[0]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]}0!==e[1]&&(i=u.mulVec3Scalar(u.normalizeVec3(this._up,Fe),e[1]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),0!==e[2]&&(i=u.mulVec3Scalar(u.normalizeVec3(t,Me),e[2]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),this.eye=u.addVec3(this._eye,s,Le),this.look=u.addVec3(this._look,s,Ue)}zoom(e){const t=u.subVec3(this._eye,this._look,xe),s=Math.abs(u.lenVec3(t,Be)),i=Math.abs(s+e);if(i<.5)return;const r=u.normalizeVec3(t,Fe);this.eye=u.addVec3(this._look,u.mulVec3Scalar(r,i),Me)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=u.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return u.lenVec3(u.subVec3(this._look,this._eye,xe))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=He,s=Ge,i=ke;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,u.mulMat4v4(this.viewMatrix,t,s),u.mulMat4v4(this.projMatrix,s,i),u.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1;const r=this.scene.canvas.canvas,o=r.offsetWidth/2,n=r.offsetHeight/2;return[i[0]*o+o,i[1]*n+n]}destroy(){super.destroy(),this._state.destroy()}}class Xe extends C{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Ze extends Xe{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new Ne({type:"dir",dir:u.vec3([1,1,1]),color:u.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=u.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,i=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],r=[0,1,0];u.lookAtMat4v(i,s,r,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=u.identityMat4()),u.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new ve(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class qe extends Xe{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:u.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class Je extends C{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),p.memory.meshes++}destroy(){super.destroy(),p.memory.meshes--}}var $e=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(x=s[O.index1],B=s[O.index2],(!F&&x>65535||B>65535)&&(F=!0),v.push(x),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const et=function(){const e=u.mat4(),t=u.mat4();return function(s,i){i=i||u.mat4();const r=s[0],o=s[1],n=s[2],a=s[3]-r,l=s[4]-o,h=s[5]-n,c=65535;return u.identityMat4(e),u.translationMat4v(s,e),u.identityMat4(t),u.scalingMat4v([a/c,l/c,h/c],t),u.mulMat4(e,t,i),i}}();var tt=function(){const e=u.mat4(),t=u.mat4();return function(s,i,r){const o=new Uint16Array(s.length),n=new Float32Array([r[0]!==i[0]?65535/(r[0]-i[0]):0,r[1]!==i[1]?65535/(r[1]-i[1]):0,r[2]!==i[2]?65535/(r[2]-i[2]):0]);let a;for(a=0;a=0?1:-1),t=(1-Math.abs(r))*(o>=0?1:-1);r=e,o=t}return new Int8Array([Math[s](127.5*r+(r<0?-1:0)),Math[i](127.5*o+(o<0?-1:0))])}function rt(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}function ot(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const nt={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let i,r;for(i=0;i<3;i++)t[i]=Number.MAX_VALUE,s[i]=-Number.MAX_VALUE;for(i=0;in&&(r=s,n=o),s=it(e,a,"floor","ceil"),i=rt(s),o=ot(e,a,i),o>n&&(r=s,n=o),s=it(e,a,"ceil","ceil"),i=rt(s),o=ot(e,a,i),o>n&&(r=s,n=o),t[a]=r[0],t[a+1]=r[1];return t},decompressNormals:function(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t},decompressNormal:function(e,t){let s=e[0],i=e[1];s=(2*s+1)/255,i=(2*i+1)/255;const r=1-Math.abs(s)-Math.abs(i);r<0&&(s=(1-Math.abs(i))*(s>=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t}},at=p.memory,lt=u.AABB3();class ht extends Je{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ne({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=nt.getPositionsBounds(t.positions),i=nt.compressPositions(t.positions,e.min,e.max);s.positions=i.quantized,s.positionsDecodeMatrix=i.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=nt.getUVBounds(t.uv),i=nt.compressUVs(t.uv,e.min,e.max);s.uv=i.quantized,s.uvDecodeMatrix=i.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=nt.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),at.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),at.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new ae(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),at.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new ae(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),at.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new ae(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),at.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new ae(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),at.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=$e(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),at.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=u.buildPickTriangles(e.positions,e.indices,e.compressGeometry),i=s.positions,r=s.colors;this._pickTrianglePositionsBuf=new ae(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,4,t.STATIC_DRAW,!0),at.positions+=this._pickTrianglePositionsBuf.numItems,at.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),nt.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=nt.getPositionsBounds(e),i=nt.compressPositions(e,s.min,s.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),nt.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),nt.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=u.AABB3()),u.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=u.OBB3()),u.positions3ToAABB3(this._state.positions,lt,this._state.positionsDecodeMatrix),u.AABB3ToOBB3(lt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),at.meshes--}}function ct(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let i=e.zSize||1;i<0&&(console.error("negative zSize not allowed - will invert"),i*=-1);const r=e.center,o=r?r[0]:0,n=r?r[1]:0,a=r?r[2]:0,l=-t+o,h=-s+n,c=-i+a,A=t+o,u=s+n,p=i+a;return m.apply(e,{positions:[A,u,p,l,u,p,l,h,p,A,h,p,A,u,p,A,h,p,A,h,c,A,u,c,A,u,p,A,u,c,l,u,c,l,u,p,l,u,p,l,u,c,l,h,c,l,h,p,l,h,c,A,h,c,A,h,p,l,h,p,A,h,c,l,h,c,l,u,c,A,u,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class At extends C{get type(){return"Material"}constructor(e,t={}){super(e,t),p.memory.materials++}destroy(){super.destroy(),p.memory.materials--}}const ut={opaque:0,mask:1,blend:2},pt=["opaque","mask","blend"];class dt extends At{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new Ne({type:"PhongMaterial",ambient:u.vec3([1,1,1]),diffuse:u.vec3([1,1,1]),specular:u.vec3([1,1,1]),emissive:u.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=ut[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return pt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const ft={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[.4577854573726654,.529411792755127,.4100345969200134],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Et extends At{get type(){return"EmphasisMaterial"}get presets(){return ft}constructor(e,t={}){super(e,t),this._state=new Ne({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=ft[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ft).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const mt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class yt extends At{get type(){return"EdgeMaterial"}get presets(){return mt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=mt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(mt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const gt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class It extends C{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=u.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return gt}set units(e){e||(e="meters");gt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=u.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=u.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class vt extends C{constructor(e,t={}){super(e,t),this._supported=q.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const Tt={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class _t extends At{get type(){return"PointsMaterial"}get presets(){return Tt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=Tt[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Tt).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Rt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Pt extends At{get type(){return"LinesMaterial"}get presets(){return Rt}constructor(e,t={}){super(e,t),this._state=new Ne({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=Rt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Rt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Dt={IfcWall:!0,IfcSlab:!0,IfcFloor:!0,IfcRoof:!0,IfcSpace:!0,IfcBeam:!0,IfcStair:!0,IfcPlate:!0};class Nt{constructor(e,t){this.primLODLevels=e,this.entitiesInLOD={},this.primCountInLOD={},this.targetFps=t,this.lodLevelIndex=0,this.consecutiveFramesWithTargetFps=0,this.consecutiveFramesWithoutTargetFps=0}initializeLodState(e){const t=Object.values(e.objects);if(0===t.length)return;const s=e.scene.viewer.metaScene,i={},r={};for(let e=0,o=t.length;e=this.primLODLevels[c]);c++);const A=this.primLODLevels[c]||0;A in i||(i[A]=[]),i[A].push(o),A in r||(r[A]=0),r[A]+=o.numPrimitives}this.entitiesInLOD=i,this.primCountInLOD=r}}class Ct{constructor(e,t,s,i){this.id=t.id,this.scene=e,this.sceneModel=t,this.lodState=new Nt(s,i),this.lodState.initializeLodState(t)}_increaseLODLevelIndex(){const e=this.lodState;if(e.lodLevelIndex===e.primLODLevels.length)return!1;const t=e.entitiesInLOD[e.primLODLevels[e.lodLevelIndex]]||[];for(let e=0,s=t.length;e5&&(t.consecutiveFramesWithoutTargetFps=0,s=this._increaseLODLevelIndex()):e>t.targetFps+4&&++t.consecutiveFramesWithTargetFps>5&&(t.consecutiveFramesWithTargetFps=0,s=this._decreaseLODLevelIndex()),s}resetLodCulling(){let e=!1,t=!1;do{e|=t=this._decreaseLODLevelIndex()}while(t);return e}}class Ot extends C{constructor(e,t={}){super(e,t),this._scene=e,this._lodLevels=[2e3,600,150,80,20],this._lodManagers={},this._lodManagerList=[],this.enabled=t.enabled,this.targetFPS=t.targetFPS,this._init()}_init(){const e=new Array(4);let t=0,s=-1,i=Date.now(),r=0,o=0,n=o;this._scene.on("rendering",(()=>{if(-1!==s)for(let e=0,t=this._lodManagerList.length;e{i=Date.now(),window.requestAnimationFrame((()=>{t++;const o=Date.now();r=o-i,i=o,e[t%4]=r;let n=0;if(t>4){for(let t=0;t<4;t++)n+=e[t];s=4/n*1e3}}))})),this._scene.camera.on("matrix",(()=>{n=o})),this._scene.on("tick",(()=>{if(o-n>3)for(let e=0,t=this._lodManagerList.length;e=e.minX&&t.maxY>=e.minY&&t.maxZ>=e.minZ},s.boxRayIntersects=function(e,t,s,i,r,o,n){var a=(e.minX-t)*r,l=(e.maxX-t)*r,h=(e.minY-s)*o,c=(e.maxY-s)*o,A=(e.minZ-i)*n,u=(e.maxZ-i)*n,p=Math.min(A,u),d=Math.max(A,u),f=Math.min(h,c),E=Math.max(h,c),m=Math.min(a,l),y=Math.max(a,l),g=Math.max(0,m,f,p);return Math.min(y,E,d)>=g?g:1/0};var v=function(e,t,s,r,o){for(var n,a=[t,s];a.length;)(s=a.pop())-(t=a.pop())<=r||(n=t+Math.ceil((s-t)/r/2)*r,i(e,n,t,s,o),a.push(t,n,n,s))},T=function(e,t){return e.minX-t.minX},_=function(e,t){return e.minY-t.minY},R=function(e,t){return e.minZ-t.minZ},P=function(){function e(e){void 0===e&&(e=16),this.maxEntries=Math.max(e,8),this.minEntries=Math.max(4,Math.ceil(.4*this.maxEntries)),this.clear()}return e.alloc=function(){return this.pool.pop()||new this},e.free=function(e){e.clear(),this.pool.push(e)},e.prototype.searchCustom=function(e,t){var s=this.data,i=[];if(!e(s,A(s)))return i;for(var r=[];s;){for(var o=0,n=s.children.length;o1){for(d=0,f=(c=c[c.length-1]).length;d=t)break;var r=i+1;if(r0;){var i=s-1>>1;if(p[i].dist<=p[s].dist)break;d(s,i),s=i}},m=a;p.length&&p[0].dist=t;a--){l=e.children[a];f(o,l),n+=m(o)}return n},e.prototype.adjustParentBBoxes=function(e,t,s){for(var i=s;i>=0;i--)f(t[i],e)},e.prototype.condense=function(e){for(var t=e.length-1,s=void 0;t>=0;t--)0===e[t].children.length?t>0?((s=e[t-1].children).splice(s.indexOf(e[t]),1),o(e[t])):this.clear():p(e[t])},e.prototype._insert=function(e,t,s){var i=[],r=this.chooseSubtree(e,this.data,t,i);for(r.children.push(e),f(r,e);t>=0&&i[t].children.length>this.maxEntries;)this.split(i,t),t--;this.adjustParentBBoxes(e,i,t)},e.pool=[],e}();s.RBush3D=P},{quickselect:2}],2:[function(e,t,s){!function(e,i){"object"==typeof s&&void 0!==t?t.exports=i():e.quickselect=i()}(this,(function(){function e(s,i,r,o,n){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),A=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/a+A)),Math.min(o,Math.floor(i+(a-l)*c/a+A)),n)}var u=s[i],p=r,d=o;for(t(s,r,i),n(s[o],u)>0&&t(s,r,o);p0;)d--}0===n(s[r],u)?t(s,r,d):t(s,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return et?1:0}return function(t,i,r,o,n){e(t,i,r||0,o||t.length-1,n||s)}}))},{}]},{},[1])(1)}));var wt=bt.exports.RBush3D,xt=function(e){function t(e){var t=0;return e.meshes.forEach((function(e){t+=e.numPrimitives})),t}function s(e,t){var s={pos:{x:0,y:0},left:0,right:e,top:0,bottom:t,dir:0};function i(){(0==s.dir&&s.pos.x+1>=s.right||1==s.dir&&s.pos.y+1>=s.bottom||2==s.dir&&s.pos.x-1<=s.left-1||3==s.dir&&s.pos.y-1<=s.top-1)&&(s.dir=(s.dir+1)%4,0==s.dir&&s.left++,1==s.dir&&s.top++,2==s.dir&&s.right--,3==s.dir&&s.bottom--),0==s.dir&&s.pos.x++,1==s.dir&&s.pos.y++,2==s.dir&&s.pos.x--,3==s.dir&&s.pos.y--}for(var r=[],o=e*t;r.lengthu&&(c.push(A),A=[],u=a),A.push(d),u-=f}}while(pu&&(c.push(p),p=[],u=a),p.push(e),u-=s})),p.length&&c.push(p);var d={};return c.forEach((function(e,t){e.forEach((function(e){d[e.id]=t}))})),{clusters:c,entityIdToClusterIdMapping:d}}(r.cellsX,r.cellsZ,o.maxCellsPerEntity,r.entitiesByCell,r.cellsByEntity,i.maxPolygonsPerCluster),{clusters:{total:n.clusters.length},clusteringResult:n});a+=l.clusters.total,console.log("Total clusters: "+a);var h=[];return l.clusteringResult.clusters.forEach((function(e){e.forEach((function(e){h.push(e.id)}))})),l.orderedEntityIds=h,l}; /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT @@ -7,7 +7,7 @@ class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){ * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT */ -function Ht(e,t){t.length;const s=e.length,i=[],r=[],o=e=>{for(let s=0,i=e.meshIds.length;s{const s=t[e];let i,r;if(s.positionsCompressed){const e=nt.getPositionsBounds(s.positionsCompressed);i=nt.decompressPosition(e.min,s.positionsDecodeMatrix,[]),r=nt.decompressPosition(e.max,s.positionsDecodeMatrix,[])}else{const e=nt.getPositionsBounds(s.positions);i=e.min,r=e.max}i[0]+=s.origin[0],i[1]+=s.origin[1],i[2]+=s.origin[2],r[0]+=s.origin[0],r[1]+=s.origin[1],r[2]+=s.origin[2],u.expandAABB3Point3(a,i),u.expandAABB3Point3(a,r),l+=s.numPrimitives})),i[n]={aabb:a,numPrimitives:l,entityId:s.id}}let n,a=[],l={};if(Object.keys(i).length>0){n=function(e){const t=[];for(let s=0,i=e.length;s{s=Math.max(s,e.entity.id)}));const i=new Array(s+1);t.forEach((t=>{i[t.entity.id]=e.objects[t.entity.xeokitId]})),this._internalNodesList=i,this._lastVisibleFrameOfNodes=new Array(i.length),this._lastVisibleFrameOfNodes.fill(0)}_searchVisibleNodesWithFrustumCulling(){return this._aabbTree.searchCustom(((e,t)=>this._aabbIntersectsCameraFrustum(e,t)),(e=>this._aabbContainedInCameraFrustum(e)))}_markVisibleFrameOfVisibleNodes(e,t){const s=this._lastVisibleFrameOfNodes;for(let i=0,r=e.length;ithis._frustumProps.CAM_FACTOR_1?(s|=n<0?64:128,s&=-17):s&=-33;const a=jt(u.dotVec3(r,this._frustumProps.up),o);Math.abs(a)>this._frustumProps.CAM_FACTOR_2?(s|=a<0?1024:2048,s&=-257):s&=-513}return 4&s&&8&s&&(s|=4096),64&s&&128&s&&(s|=8192),1024&s&&2048&s&&(s|=16384),e._check=s,s}}class Wt{constructor(e,t){this.sceneModel=t,this.entities=[],this.meshes=[],this.finalized=!1}addEntity(e){if(this.finalized)throw"Already finalized";this.entities.push(e)}addMesh(e){if(this.finalized)throw"Already finalized";this.meshes.push(e)}finalize(e){if(this.finalized)throw"Already finalized";this.finalized=!0,this.VFCState=new Qt,this.VFCState.initializeVFCState(this.entities,this.meshes),this.VFCState.finalize(this.sceneModel,e),this._onSceneRendering=this.sceneModel.scene.on("rendering",(()=>this.applyViewFrustumCulling.call(this)))}applyViewFrustumCulling(){this.finalized&&this.VFCState.applyViewFrustumCulling(this.sceneModel)}destroy(){this.finalized&&this.sceneModel.off(this._onSceneRendering)}}class zt extends b{constructor(e,t={}){super(e,t),this._scene=e,this._vfcManagers={},this._vfcManagerList=[],this.enabled=t.enabled,this._init()}_init(){this._scene.on("rendering",(()=>{for(let e=0,t=this._vfcManagerList.length;e{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new Re(this,{transparent:i,alphaDepthMask:r}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1;let e=null;this.getHash=function(){if(e)return e;const t=this.sectionPlanes;if(0===t.length)return this.hash=";";const s=[];for(let e=0,i=t.length;e0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),i=null,s=null},this.removeLight=function(e){for(let t=0,r=this.lights.length;t{this._renderer.imageDirty()})),this.lod=new Bt(this,{enabled:t.lodEnabled}),this.vfc=new zt(this,{enabled:t.vfcEnabled})}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+m.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=u.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const i=this.types[s];i&&(delete i[t],m.isEmptyObject(i)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_objectHighlightedUpdated(e,t=!0){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null,t&&this.fire("objectHighlighted",e,!0)}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&D.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,i=this._clearEachPass;let r,o;for(r=0;rr&&(r=e[3]),e[4]>o&&(o=e[4]),e[5]>n&&(n=e[5]),h=!0}h||(t=-100,s=-100,i=-100,r=100,o=100,n=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=i,this._aabb[3]=r,this._aabb[4]=o,this._aabb[5]=n,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Kt(this,s));const i=e.excludeEntities||e.exclude;return i&&(e.excludeEntityIds=Kt(this,i)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=this._renderer.pick(e,t))?(t.entity&&t.entity.fire&&t.entity.fire("picked",t),t):void 0}snapPick(e){return this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapMode||"vertex")}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]o&&(o=l[3]),l[4]>n&&(n=l[4]),l[5]>a&&(a=l[5]),t=!0}})),t){const e=u.AABB3();return e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=n,e[5]=a,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){m.isString(e)&&(e=[e]);let s=!1;for(let i=0,r=e.length;i0,l=!!r.compressGeometry,h=[];h.push("#version 300 es"),h.push("// Lambertian drawing vertex shader"),h.push("in vec3 position;"),h.push("uniform mat4 modelMatrix;"),h.push("uniform mat4 viewMatrix;"),h.push("uniform mat4 projMatrix;"),h.push("uniform vec4 colorize;"),h.push("uniform vec3 offset;"),l&&h.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(h.push("uniform float logDepthBufFC;"),h.push("out float vFragDepth;"),h.push("bool isPerspectiveMatrix(mat4 m) {"),h.push(" return (m[2][3] == - 1.0);"),h.push("}"),h.push("out float isPerspective;"));a&&h.push("out vec4 vWorldPosition;");if(h.push("uniform vec4 lightAmbient;"),h.push("uniform vec4 materialColor;"),h.push("uniform vec3 materialEmissive;"),r.normalsBuf){h.push("in vec3 normal;"),h.push("uniform mat4 modelNormalMatrix;"),h.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=i.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),h.push(" }"),h.push(" return normalize(v);"),h.push("}"))}h.push("out vec4 vColor;"),"points"===r.primitiveName&&h.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(h.push("void billboard(inout mat4 mat) {"),h.push(" mat[0][0] = 1.0;"),h.push(" mat[0][1] = 0.0;"),h.push(" mat[0][2] = 0.0;"),"spherical"===o&&(h.push(" mat[1][0] = 0.0;"),h.push(" mat[1][1] = 1.0;"),h.push(" mat[1][2] = 0.0;")),h.push(" mat[2][0] = 0.0;"),h.push(" mat[2][1] = 0.0;"),h.push(" mat[2][2] =1.0;"),h.push("}"));h.push("void main(void) {"),h.push("vec4 localPosition = vec4(position, 1.0); "),h.push("vec4 worldPosition;"),l&&h.push("localPosition = positionsDecodeMatrix * localPosition;");r.normalsBuf&&(l?h.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):h.push("vec4 localNormal = vec4(normal, 0.0); "),h.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),h.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));h.push("mat4 viewMatrix2 = viewMatrix;"),h.push("mat4 modelMatrix2 = modelMatrix;"),n&&h.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===o||"cylindrical"===o?(h.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),h.push("billboard(modelMatrix2);"),h.push("billboard(viewMatrix2);"),h.push("billboard(modelViewMatrix);"),r.normalsBuf&&(h.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),h.push("billboard(modelNormalMatrix2);"),h.push("billboard(viewNormalMatrix2);"),h.push("billboard(modelViewNormalMatrix);")),h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r.normalsBuf&&h.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(h.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),h.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),h.push("float lambertian = 1.0;"),r.normalsBuf)for(let e=0,t=i.lights.length;e0,o=t.gammaOutput,n=[];n.push("#version 300 es"),n.push("// Lambertian drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"));if(r){n.push("in vec4 vWorldPosition;"),n.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),n.push("}")}"points"===i.primitiveName&&(n.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),n.push("float r = dot(cxy, cxy);"),n.push("if (r > 1.0) {"),n.push(" discard;"),n.push("}"));t.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");o?n.push("outColor = linearToGamma(vColor, gammaFactor);"):n.push("outColor = vColor;");return n.push("}"),n}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,i=t._sectionPlanesState,r=e._geometry._state,o=t._lightsState;let n;const a=s.billboard,l=s.background,h=s.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),A=Jt(e),u=i.sectionPlanes.length>0,p=qt(e),d=!!r.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),d&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),u&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));o.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(A){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=o.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}c&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),d&&f.push("uniform mat3 uvDecodeMatrix;"));r.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===r.primitiveName&&f.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===a&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(p){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=o.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=o.lights.length;e0,l=Jt(e),h=i.uvBuf,c="PhongMaterial"===n.type,A="MetallicMaterial"===n.type,u="SpecularMaterial"===n.type,p=qt(e);t.gammaInput;const d=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));p&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),d&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(a){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var E=0;E0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),o.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),c&&((o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = "+Zt[o.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(A||u)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),o.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+Zt[o.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),i.colors&&f.push("in vec4 vColor;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(o.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));n.ambient&&f.push("uniform vec3 materialAmbient;");n.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==n.alpha&&null!==n.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");n.emissive&&f.push("uniform vec3 materialEmissive;");n.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==n.glossiness&&null!==n.glossiness&&f.push("uniform float materialGlossiness;");void 0!==n.shininess&&null!==n.shininess&&f.push("uniform float materialShininess;");n.specular&&f.push("uniform vec3 materialSpecular;");void 0!==n.metallic&&null!==n.metallic&&f.push("uniform float materialMetallic;");void 0!==n.roughness&&null!==n.roughness&&f.push("uniform float materialRoughness;");void 0!==n.specularF0&&null!==n.specularF0&&f.push("uniform float materialSpecularF0;");h&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));h&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));h&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));h&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&h&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&h&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&h&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));h&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));h&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&h&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&h&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&h&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=o.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===i.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),n.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");n.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):n.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");i.colors&&f.push("diffuseColor *= vColor.rgb;");n.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");n.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==n.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");i.colors&&f.push("alpha *= vColor.a;");void 0!==n.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==n.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==n.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==n.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));h&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+Zt[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));h&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+Zt[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));h&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+Zt[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));h&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+Zt[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));h&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));h&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(o.lights.length>0||o.lightMaps.length>0||o.reflectionMaps.length>0)){h&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),h&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),h&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),h&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),h&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),h&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),h&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),c&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),u&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),A&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),o.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),c&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(u||A)&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=o.lights.length;e0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),r.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,A=o.sectionPlanes.length;c0&&r.lightMaps[0].texture&&this._uLightMap&&(a.bindTexture(this._uLightMap,r.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),r.reflectionMaps.length>0&&r.reflectionMaps[0].texture&&this._uReflectionMap&&(a.bindTexture(this._uReflectionMap,r.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class is{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,i=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),r=t._sectionPlanesState.sectionPlanes.length>0,o=!!e._geometry._state.compressGeometry,n=e._state.billboard,a=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),o&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));r&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),i){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===n||"cylindrical"===n)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===n&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),o&&l.push("localPosition = positionsDecodeMatrix * localPosition;");i&&(o?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),a&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===n||"cylindrical"===n?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),i&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),i)for(let e=0,t=s.lights.length;e0,o=[];o.push("#version 300 es"),o.push("// Lambertian drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}"points"===e._geometry._state.primitiveName&&(o.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),o.push("float r = dot(cxy, cxy);"),o.push("if (r > 1.0) {"),o.push(" discard;"),o.push("}"));t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const rs=new e({}),os=u.vec3(),ns=function(e,t){this.id=rs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new is(t),this._allocate(t)},as={};ns.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=as[t];return s||(s=new ns(t,e),as[t]=s,p.memory.programs++),s._useCount++,s},ns.prototype.put=function(){0==--this._useCount&&(rs.removeItem(this.id),this._program&&this._program.destroy(),delete as[this._hash],p.memory.programs--)},ns.prototype.webglContextRestored=function(){this._program=null},ns.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl,n=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,a=t._state,l=t._geometry._state,h=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,h?e.getRTCViewMatrix(a.originHash,h):r.viewMatrix),o.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Edges drawing vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec4 edgeColor;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));s&&n.push("out vec4 vWorldPosition;");n.push("out vec4 vColor;"),("spherical"===r||"cylindrical"===r)&&(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n.push("vColor = edgeColor;"),s&&n.push("vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,i=e.scene.gammaOutput,r=s.sectionPlanes.length>0,o=[];o.push("#version 300 es"),o.push("// Edges drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const hs=new e({}),cs=u.vec3(),As=function(e,t){this.id=hs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ls(t),this._allocate(t)},us={};As.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=us[t];return s||(s=new As(t,e),us[t]=s,p.memory.programs++),s._useCount++,s},As.prototype.put=function(){0==--this._useCount&&(hs.removeItem(this.id),this._program&&this._program.destroy(),delete us[this._hash],p.memory.programs--)},As.prototype.webglContextRestored=function(){this._program=null},As.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl;let n;const a=t._state,l=t._geometry,h=l._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(a.originHash,c):r.viewMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh picking vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("out vec4 vViewPosition;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==r&&"cylindrical"!==r||(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"));n.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(r.push("uniform vec4 pickColor;"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = pickColor; "),r.push("}"),r}(e)}}const ds=u.vec3(),fs=function(e,t){this._hash=e,this._shaderSource=new ps(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Es={};fs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=Es[t];if(!s){if(s=new fs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Es[t]=s,p.memory.programs++}return s._useCount++,s},fs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Es[this._hash],p.memory.programs--)},fs.prototype.webglContextRestored=function(){this._program=null},fs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCPickViewMatrix(r.originHash,a):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t>24&255,c=l>>16&255,A=l>>8&255,u=255&l;i.uniform4f(this._uPickColor,u/255,A/255,c/255,h/255),n.indicesBuf?(i.drawElements(n.primitive,n.indicesBuf.numItems,n.indicesBuf.itemType,0),e.drawElements++):n.positions&&i.drawArrays(i.TRIANGLES,0,n.positions.numItems)},fs.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ne(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,i=!!e._geometry._state.compressGeometry;e._state.billboard,e._state.stationary;const r=[];r.push("#version 300 es"),r.push("// Surface picking vertex shader"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform vec3 offset;"),s&&(r.push("uniform bool clippable;"),r.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;"));r.push("out vec4 vColor;"),i&&r.push("uniform mat4 positionsDecodeMatrix;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),i&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push(" vec4 worldPosition = modelMatrix * localPosition; "),r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&r.push(" vWorldPosition = worldPosition;");r.push(" vColor = color;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return r.push("gl_Position = clipPos;"),r.push("}"),r}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Surface picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),r.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = vColor;"),r.push("}"),r}(e)}}const ys=u.vec3(),gs=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ms(t),this._allocate(t)},Is={};gs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Is[t];if(!s){if(s=new gs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Is[t]=s,p.memory.programs++}return s._useCount++,s},gs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Is[this._hash],p.memory.programs--)},gs.prototype.webglContextRestored=function(){this._program=null},gs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry,a=t._geometry._state,l=t.origin,h=o.backfaces,c=o.frontface,A=s.camera.project,u=n._getPickTrianglePositions(),p=n._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(A.far+1)/Math.LN2);i.uniform1f(this._uLogDepthBufFC,e)}if(i.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(r.originHash,l):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh occlusion vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push("}"),r}(e)}}const Ts=u.vec3(),_s=function(e,t){this._hash=e,this._shaderSource=new vs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Rs={};_s.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Rs[t];if(!s){if(s=new _s(t,e),s.errors)return console.log(s.errors.join("\n")),null;Rs[t]=s,p.memory.programs++}return s._useCount++,s},_s.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Rs[this._hash],p.memory.programs--)},_s.prototype.webglContextRestored=function(){this._program=null},_s.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._material._state,o=t._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){const t=r.backfaces;e.backfaces!==t&&(t?i.disable(i.CULL_FACE):i.enable(i.CULL_FACE),e.backfaces=t);const s=r.frontface;e.frontface!==s&&(s?i.frontFace(i.CCW):i.frontFace(i.CW),e.frontface=s),this._lastMaterialId=r.id}const l=s.camera;if(i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCViewMatrix(o.originHash,a):l.viewMatrix),o.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,i=[];i.push("// Mesh shadow vertex shader"),i.push("in vec3 position;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 shadowViewMatrix;"),i.push("uniform mat4 shadowProjMatrix;"),i.push("uniform vec3 offset;"),s&&i.push("uniform mat4 positionsDecodeMatrix;");t&&i.push("out vec4 vWorldPosition;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),i.push("vec4 worldPosition;"),s&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push("worldPosition = modelMatrix * localPosition;"),i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&i.push("vWorldPosition = worldPosition;");return i.push(" gl_Position = shadowProjMatrix * viewPosition;"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("// Mesh shadow fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}return r.push("outColor = encodeFloat(gl_FragCoord.z);"),r.push("}"),r}(e)}}const Ds=function(e,t){this._hash=e,this._shaderSource=new Ps(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ns={};Ds.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let i=Ns[s];if(!i){if(i=new Ds(s,e),i.errors)return console.log(i.errors.join("\n")),null;Ns[s]=i,p.memory.programs++}return i._useCount++,i},Ds.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ns[this._hash],p.memory.programs--)},Ds.prototype.webglContextRestored=function(){this._program=null},Ds.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,i=t._material._state,r=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const r=i.frontface;e.frontface!==r&&(r?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=r),e.lineWidth!==i.lineWidth&&(s.lineWidth(i.lineWidth),e.lineWidth=i.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,i.pointSize),this._lastMaterialId=i.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),r.combineGeometry){const i=t.vertexBufs;i.id!==this._lastVertexBufsId&&(i.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=i.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),r.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,r.positionsDecodeMatrix),r.combineGeometry?r.indicesBufCombined&&(r.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(r.positionsBuf,r.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),r.indicesBuf&&(r.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=r.id),r.combineGeometry?r.indicesBufCombined&&(s.drawElements(r.primitive,r.indicesBufCombined.numItems,r.indicesBufCombined.itemType,0),e.drawElements++):r.indicesBuf?(s.drawElements(r.primitive,r.indicesBuf.numItems,r.indicesBuf.itemType,0),e.drawElements++):r.positions&&(s.drawArrays(s.TRIANGLES,0,r.positions.numItems),e.drawArrays++)},Ds.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ne(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uShadowViewMatrix=i.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=i.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,r,o,n;for(let a=0,l=this._uSectionPlanes.length;a0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const Gs=function(){const e=u.vec3(),t=u.vec3(),s=u.vec3(),i=u.vec3(),r=u.vec3(),o=u.vec3(),n=u.vec4(),a=u.vec3(),l=u.vec3(),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3(),m=u.vec4(),y=u.vec4(),g=u.vec4(),I=u.vec3(),v=u.vec3(),T=u.vec3(),_=u.vec3(),R=u.vec3(),P=u.vec3(),D=u.vec3(),N=u.vec3(),b=u.vec3(),C=u.vec3(),S=u.vec3();return function(x,w,B,F){var M=F.primIndex;if(null!=M&&M>-1){const G=x.geometry._state,k=x.scene,V=k.camera,j=k.canvas;if("triangles"===G.primitiveName){F.primitive="triangle";const k=M,Q=G.indices,W=G.positions;let z,K,Y;if(Q){var L=Q[k+0],U=Q[k+1],H=Q[k+2];o[0]=L,o[1]=U,o[2]=H,F.indices=o,z=3*L,K=3*U,Y=3*H}else z=3*k,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],i[0]=W[K+0],i[1]=W[K+1],i[2]=W[K+2],r[0]=W[Y+0],r[1]=W[Y+1],r[2]=W[Y+2],G.compressGeometry){const e=G.positionsDecodeMatrix;e&&(nt.decompressPosition(s,e,s),nt.decompressPosition(i,e,i),nt.decompressPosition(r,e,r))}F.canvasPos?u.canvasPosToLocalRay(j.canvas,x.origin?O(w,x.origin):w,B,x.worldMatrix,F.canvasPos,e,t):F.origin&&F.direction&&u.worldRayToLocalRay(x.worldMatrix,F.origin,F.direction,e,t),u.normalizeVec3(t),u.rayPlaneIntersect(e,t,s,i,r,n),F.localPos=n,F.position=n,m[0]=n[0],m[1]=n[1],m[2]=n[2],m[3]=1,u.transformVec4(x.worldMatrix,m,y),a[0]=y[0],a[1]=y[1],a[2]=y[2],F.canvasPos&&x.origin&&(a[0]+=x.origin[0],a[1]+=x.origin[1],a[2]+=x.origin[2]),F.worldPos=a,u.transformVec4(V.matrix,y,g),l[0]=g[0],l[1]=g[1],l[2]=g[2],F.viewPos=l,u.cartesianToBarycentric(n,s,i,r,h),F.bary=h;const X=G.normals;if(X){if(G.compressGeometry){const e=3*L,t=3*U,s=3*H;nt.decompressNormal(X.subarray(e,e+2),c),nt.decompressNormal(X.subarray(t,t+2),A),nt.decompressNormal(X.subarray(s,s+2),p)}else c[0]=X[z],c[1]=X[z+1],c[2]=X[z+2],A[0]=X[K],A[1]=X[K+1],A[2]=X[K+2],p[0]=X[Y],p[1]=X[Y+1],p[2]=X[Y+2];const e=u.addVec3(u.addVec3(u.mulVec3Scalar(c,h[0],I),u.mulVec3Scalar(A,h[1],v),T),u.mulVec3Scalar(p,h[2],_),R);F.worldNormal=u.normalizeVec3(u.transformVec3(x.worldNormalMatrix,e,P))}const Z=G.uv;if(Z){if(d[0]=Z[2*L],d[1]=Z[2*L+1],f[0]=Z[2*U],f[1]=Z[2*U+1],E[0]=Z[2*H],E[1]=Z[2*H+1],G.compressGeometry){const e=G.uvDecodeMatrix;e&&(nt.decompressUV(d,e,d),nt.decompressUV(f,e,f),nt.decompressUV(E,e,E))}F.uv=u.addVec3(u.addVec3(u.mulVec2Scalar(d,h[0],D),u.mulVec2Scalar(f,h[1],N),b),u.mulVec2Scalar(E,h[2],C),S)}}}}}();function ks(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let i=e.height||1;i<0&&(console.error("negative height not allowed - will invert"),i*=-1);let r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<3&&(r=3);let o=e.heightSegments||1;o<0&&(console.error("negative heightSegments not allowed - will invert"),o*=-1),o<1&&(o=1);const n=!!e.openEnded;let a=e.center;const l=a?a[0]:0,h=a?a[1]:0,c=a?a[2]:0,A=i/2,u=i/o,p=2*Math.PI/r,d=1/r,f=(t-s)/o,E=[],y=[],g=[],I=[];let v,T,_,R,P,D,N,b,C,O,S;const x=(90-180*Math.atan(i/(s-t))/Math.PI)/90;for(v=0;v<=o;v++)for(P=t-v*f,D=A-v*u,T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),y.push(P*_),y.push(x),y.push(P*R),g.push(T*d),g.push(1*v/o),E.push(P*_+l),E.push(D+h),E.push(P*R+c);for(v=0;v0){for(C=E.length/3,y.push(0),y.push(1),y.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),O=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,y.push(t*_),y.push(1),y.push(t*R),g.push(O),g.push(S),E.push(t*_+l),E.push(A+h),E.push(t*R+c);for(T=0;T0){for(C=E.length/3,y.push(0),y.push(-1),y.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(0-A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),O=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,y.push(s*_),y.push(-1),y.push(s*R),g.push(O),g.push(S),E.push(s*_+l),E.push(0-A+h),E.push(s*R+c);for(T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,i=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const o=ei(s,this.wrapS);o&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,o);const n=ei(s,this.wrapT);if(n&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,n),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=ei(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}r?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,ri(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,ri(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,ei(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,ei(s,this.magFilter)));const a=ei(s,this.format,this.encoding),l=ei(s,this.type),h=ii(s,this.internalFormat,a,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,i,h,e[0].width,e[0].height);for(let t=0,i=e.length;t>t;return e+1}class li extends b{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new Ne({texture:new si({gl:this.scene.canvas.gl}),matrix:u.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=u.vec2([0,0]),this._scale=u.vec2([1,1]),this._rotate=u.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),p.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new si({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=u.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=u.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?u.mulMat4(t,s):s),0!==this._rotate&&(s=u.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?u.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=oi(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=oi(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),p.memory.textures--}}const hi=p.memory,ci=u.AABB3();class Ai extends Je{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ne({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=u.OBB3();const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var r;if(t.positionsDecodeMatrix);else{const e=nt.getPositionsBounds(t.positions),o=nt.compressPositions(t.positions,e.min,e.max);r=o.quantized,s.positionsDecodeMatrix=o.decodeMatrix,s.positionsBuf=new ae(i,i.ARRAY_BUFFER,r,r.length,3,i.STATIC_DRAW),hi.positions+=s.positionsBuf.numItems,u.positions3ToAABB3(t.positions,this._aabb),u.positions3ToAABB3(r,ci,s.positionsDecodeMatrix),u.AABB3ToOBB3(ci,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new ae(i,i.ARRAY_BUFFER,e,e.length,4,i.STATIC_DRAW),hi.colors+=s.colorsBuf.numItems}if(t.uv){const e=nt.getUVBounds(t.uv),r=nt.compressUVs(t.uv,e.min,e.max),o=r.quantized;s.uvDecodeMatrix=r.decodeMatrix,s.uvBuf=new ae(i,i.ARRAY_BUFFER,o,o.length,2,i.STATIC_DRAW),hi.uvs+=s.uvBuf.numItems}if(t.normals){const e=nt.compressNormals(t.normals);let r=s.compressGeometry;s.normalsBuf=new ae(i,i.ARRAY_BUFFER,e,e.length,3,i.STATIC_DRAW,r),hi.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,e,e.length,1,i.STATIC_DRAW),hi.indices+=s.indicesBuf.numItems;const o=$e(r,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,o,o.length,1,i.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),hi.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),hi.meshes--}}var ui={};function pi(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let i=e.xSegments||1;i<0&&(console.error("negative xSegments not allowed - will invert"),i*=-1),i<1&&(i=1);let r=e.xSegments||1;r<0&&(console.error("negative zSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const o=e.center,n=o?o[0]:0,a=o?o[1]:0,l=o?o[2]:0,h=t/2,c=s/2,A=Math.floor(i)||1,u=Math.floor(r)||1,p=A+1,d=u+1,f=t/A,E=s/u,y=new Float32Array(p*d*3),g=new Float32Array(p*d*3),I=new Float32Array(p*d*2);let v,T,_,R,P,D,N,b=0,C=0;for(v=0;v65535?Uint32Array:Uint16Array)(A*u*6);for(v=0;v360&&(o=360);const n=e.center;let a=n?n[0]:0,l=n?n[1]:0;const h=n?n[2]:0,c=[],A=[],p=[],d=[];let f,E,y,g,I,v,T,_,R,P,D,N;for(_=0;_<=r;_++)for(T=0;T<=i;T++)f=T/i*o,E=.785398+_/r*Math.PI*2,a=t*Math.cos(f),l=t*Math.sin(f),y=(t+s*Math.cos(E))*Math.cos(f),g=(t+s*Math.cos(E))*Math.sin(f),I=s*Math.sin(E),c.push(y+a),c.push(g+l),c.push(I+h),p.push(1-T/i),p.push(_/r),v=u.normalizeVec3(u.subVec3([y,g,I],[a,l,h],[]),[]),A.push(v[0]),A.push(v[1]),A.push(v[2]);for(_=1;_<=r;_++)for(T=1;T<=i;T++)R=(i+1)*_+T-1,P=(i+1)*(_-1)+T-1,D=(i+1)*(_-1)+T,N=(i+1)*_+T,d.push(R),d.push(P),d.push(D),d.push(D),d.push(N),d.push(R);return m.apply(e,{positions:c,normals:A,uv:p,indices:d})}ui.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},ui.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(ui.parse._buffToStr(e));window.location.href=s},ui.clone=function(e){return JSON.parse(JSON.stringify(e))},ui.bin={},ui.bin.f=new Float32Array(1),ui.bin.fb=new Uint8Array(ui.bin.f.buffer),ui.bin.rf=function(e,t){for(var s=ui.bin.f,i=ui.bin.fb,r=0;r<4;r++)i[r]=e[t+r];return s[0]},ui.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},ui.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},ui.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},ui.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},ui.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},ui.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},ui.parse={},ui.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",i=0;ir&&(r=l),ho&&(o=h),cn&&(n=c)}return{min:{x:t,y:s,z:i},max:{x:r,y:o,z:n}}};class fi extends b{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=u.vec3(t.pos||[0,0,0]),this._up=u.vec3(t.up||[0,1,0]),this._normal=u.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=u.vec3(),this._rtcPos=u.vec3(),this._imageSize=u.vec2(),this._texture=new li(this),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new $s(this,{matrix:u.inverseMat4(u.lookAtMat4v(this._pos,u.subVec3(this._pos,this._normal,u.mat4()),this._up,u.mat4())),children:[this._bitmapMesh=new Hs(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new ht(this,pi({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new dt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height*e,1,this._height]}}class Ei extends b{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],this._origin=u.vec3(t.origin||[0,0,0]),t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;ed.has(e.id)||E.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let i,r=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(i=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,i=Math.round(255*i).toString(16).padStart(2,"0"),r=i+r):d.has(s.id)&&(i=Math.round(255*s.opacity).toString(16).padStart(2,"0"),r=i+r),e[r]||(e[r]=[]);const o=s.id,n=s.originalSystemId,a={ifc_guid:n,originating_system:this.originatingSystem};return n!==o&&(a.authoring_tool_id=o),e[r].push(a),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));o.components.coloring=y;const g=t.objectIds,I=t.visibleObjects,v=t.visibleObjectIds,T=g.filter((e=>!I[e])),_=t.selectedObjectIds;return e.defaultInvisible||v.length{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(r++),s.push(r++))})),new Ei(i,{positions:t,indices:s,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let o=_i(e.location,yi),n=_i(e.normal,gi),a=_i(e.up,Ii),l=e.height||1;t&&s&&o&&n&&a&&(r.yUp&&(o=Pi(o),n=Pi(n),a=Pi(a)),new fi(i,{src:s,type:t,pos:o,normal:n,up:a,clippable:!1,collidable:!0,height:l}))})),a&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const r=e.components.visibility.view_setup_hints;r&&(!1===r.spaces_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!1),!1===r.openings_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!1),r.space_boundaries_visible)}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,i=0,r=!1;8===s.length&&(i=parseInt(s.substring(0,2),16)/256,i<=1&&i>=.95&&(i=1),s=s.substring(2),r=!0);const o=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=o,r&&(e.opacity=i)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let a,h,c,A;if(e.perspective_camera?(a=_i(e.perspective_camera.camera_view_point,mi),h=_i(e.perspective_camera.camera_direction,mi),c=_i(e.perspective_camera.camera_up_vector,mi),r.perspective.fov=e.perspective_camera.field_of_view,A="perspective"):(a=_i(e.orthogonal_camera.camera_view_point,mi),h=_i(e.orthogonal_camera.camera_direction,mi),c=_i(e.orthogonal_camera.camera_up_vector,mi),r.ortho.scale=e.orthogonal_camera.view_to_world_scale,A="ortho"),u.subVec3(a,l),r.yUp&&(a=Pi(a),h=Pi(h),c=Pi(c)),o){const e=i.pick({pickSurface:!0,origin:a,direction:h});h=e?e.worldPos:u.addVec3(a,h,mi)}else h=u.addVec3(a,h,mi);n?(r.eye=a,r.look=h,r.up=c,r.projection=A):s.cameraFlight.flyTo({eye:a,look:h,up:c,duration:t.duration,projection:A})}}_withBCFComponent(e,t,s){const i=this.viewer,r=i.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const o=t.authoring_tool_id,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}}if(t.ifc_guid){const o=t.ifc_guid,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}Object.keys(r.models).forEach((t=>{const n=u.globalizeObjectId(t,o),a=r.objects[n];if(a)s(a);else if(e.updateCompositeObjects){i.metaScene.metaObjects[n]&&r.withObjects(i.metaScene.getObjectIDsInSubtree(n),s)}}))}}destroy(){super.destroy()}}function Ti(e){return{x:e[0],y:e[1],z:e[2]}}function _i(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function Ri(e){return new Float64Array([e[0],-e[2],e[1]])}function Pi(e){return new Float64Array([e[0],e[2],-e[1]])}u.vec3();class Di{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const i=Ni(e,s);return i?t?bi(i,t):i:null}translatePlurals(e,t,s){const i=this._messages[this._locale];if(!i)return null;let r=Ni(e,i);return r=0===(t=parseInt(""+t,10))?r.zero:t>1?r.other:r.one,r?(r=bi(r,[t]),s&&(r=bi(r,s)),r):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];if(i)for(const e in i)if(i.hasOwnProperty(e)){i[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[t];i||(i={},this._eventSubs[t]=i);const r=this._eventSubIDMap.addItem();i[r]={callback:s},this._eventSubEvents[r]=t;const o=this._events[t];return void 0!==o&&s(o),r}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function Ni(e,t){if(t[e])return t[e];const s=e.split(".");let i=t;for(let e=0,t=s.length;i&&e=1;e>1&&(e=1);const s=this.easing?Bi._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(u.subVec3(i.eye,i.look,wi),i.eye=u.lerpVec3(s,0,1,this._eye1,this._eye2,Si),i.look=u.subVec3(Si,wi,Oi)):this._flyingLook&&(i.look=u.lerpVec3(s,0,1,this._look1,this._look2,Oi),i.up=u.lerpVec3(s,0,1,this._up1,this._up2,xi)):this._flyingEyeLookUp&&(i.eye=u.lerpVec3(s,0,1,this._eye1,this._eye2,Si),i.look=u.lerpVec3(s,0,1,this._look1,this._look2,Oi),i.up=u.lerpVec3(s,0,1,this._up1,this._up2,xi)),this._projection2){const t="ortho"===this._projection2?Bi._easeOutExpo(e,0,1,1):Bi._easeInCubic(e,0,1,1);i.customProjection.matrix=u.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();D.scheduleTask(this._update,this)}static _ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}static _easeInCubic(e,t,s,i){return s*(e/=i)*e*e+t}static _easeOutExpo(e,t,s,i){return s*(1-Math.pow(2,-10*e/i))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class Fi extends b{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new Bi(this),this._t=0,this.state=Fi.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const i=performance.now(),r=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==r)switch(this.state){case Fi.SCRUBBING:return;case Fi.PLAYING:if(this._t+=this._playingRate*r,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=Fi.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case Fi.PLAYING_TO:s=this._t+this._playingRate*r*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=Fi.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=Fi.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=Fi.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const i=s.frames[e];i?(this.state=Fi.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=Fi.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=Fi.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=Fi.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}Fi.STOPPED=0,Fi.SCRUBBING=1,Fi.PLAYING=2,Fi.PLAYING_TO=3,u.vec3(),u.vec3(),u.vec3(),u.vec3([0,-1,0]),u.vec4([0,0,0,1]);const Mi=u.vec3();class Li{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?m.apply(s,{}):null;const i=!s||s.visible,r=!s||s.edges,o=!s||s.xrayed,n=!s||s.highlighted,a=!s||s.selected,l=!s||s.clippable,h=!s||s.pickable,c=!s||s.colorize,A=!s||s.opacity,u=t.metaObjects,p=e.objects;for(let e=0,t=u.length;e0){const n=t._sectionPlanesState.sectionPlanes,a=r*o,l=i.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.sectionPlanes.length;t0&&d.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,d.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),d.lightMaps.length>0&&d.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,d.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),this._withSAO){const t=n.sao;if(t.possible){const s=a.drawingBufferWidth,i=a.drawingBufferHeight;Qi[0]=s,Qi[1]=i,Qi[2]=t.blendCutoff,Qi[3]=t.blendFactor,a.uniform4fv(this._uSAOParams,Qi),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++}}if(i){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===ki[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=n.xrayMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===ki[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=n.highlightMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===ki[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=n.selectedMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else a.uniform4fv(this._uColor,this._edges?ji:Vi)}this._draw({state:l,frameCtx:e,incrementDrawState:r}),a.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,p.memory.programs--}}class Xi extends Yi{constructor(e,t,{instancing:s=!1,edges:i=!1}={}){super(e,t,{instancing:s,edges:i})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=i.pickElementsCount||s.indicesBuf.numItems,o=i.pickElementsOffset?i.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,o),r&&i.drawElements++}}}class Zi extends Xi{constructor(e,t){super(e,t,{instancing:!1,edges:!0})}}class qi extends Yi{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++)}}class Ji extends qi{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class $i extends Yi{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),r&&i.drawArrays++}}class er extends Yi{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArraysInstanced(t.POINTS,0,s.positionsBuf.numItems,s.numInstances),r&&i.drawArrays++}}class tr extends Yi{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),r&&i.drawElements++}}class sr extends Yi{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElementsInstanced(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++}}class ir extends Xi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r;const o=[];o.push("#version 300 es"),o.push("// Triangles batching draw vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class rr extends Xi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching flat-shading draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching silhouette fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = vColor;"),o.push("}"),o}}class nr extends Zi{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class ar extends Zi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class lr extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class hr extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class cr extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class Ar extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class ur extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching depth fragment shader"),i.push("precision highp float;"),i.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}}class pr extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class dr extends Xi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class fr extends Xi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Triangles batching quality draw vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),o.push("vFragDepth = 1.0 + clipPos.w;")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Triangles batching quality draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),n.push("uniform sampler2D uAOMap;"),n.push("in vec4 vViewPosition;"),n.push("in vec3 vViewNormal;"),n.push("in vec4 vColor;"),n.push("in vec2 vUV;"),n.push("in vec2 vMetallicRoughness;"),i.lightMaps.length>0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick flat normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class mr extends Xi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,i=e._sectionPlanesState,r=i.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching color texture fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),r){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=i.sectionPlanes.length;e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=i.sectionPlanes.length;e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const vr=u.mat4(),Tr=u.mat4();function _r(e,t,s){const i=e.length,r=new Uint16Array(i),o=t[0],n=t[1],a=t[2],l=t[3]-o,h=t[4]-n,c=t[5]-a,A=65525,p=A/l,d=A/h,f=A/c,E=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1),i=e,r=t}return new Int8Array([Math[t](127.5*i+(i<0?-1:0)),Math[s](127.5*r+(r<0?-1:0))])}function Dr(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}const Nr=u.vec3(),br=u.vec3(),Cr=u.vec3(),Or=u.vec3(),Sr=u.vec3(),xr=u.mat4();class wr{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=Nr;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=br;if(l){const e=Cr;u.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=O(d,t,xr),m=Or,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform1i(this._uSolid,t.solid),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),s.push("uniform bool solid;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Br=u.vec3(),Fr=u.vec3(),Mr=u.vec3(),Lr=u.vec3(),Ur=u.vec3(),Hr=u.mat4();class Gr{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=Br;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=Fr;if(l){const e=Mr;u.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=O(d,t,Hr),m=Lr,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class kr{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new wr(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new Gr(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const Vr={};const jr=u.mat4(),Qr=u.mat4(),Wr=u.vec4([0,0,0,1]),zr=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();const Kr=u.vec3(),Yr=u.vec3(),Xr=u.vec3(),Zr=u.vec3(),qr=u.vec3(),Jr=u.vec3(),$r=u.vec3();class eo{constructor(e){console.info("Creating TrianglesBatchingLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=gr[t];return s||(s=new yr(e),gr[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete gr[t],s._destroy()}))),s}(e.model.scene),this._snapBatchingRenderers=function(e){const t=e.id;let s=Vr[t];return s||(s=new kr(e),Vr[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Vr[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Ir(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({origin:u.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=u.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=u.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.aabb=u.collapseAABB3(),this.solid=!!e.solid}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)for(let e=0,t=r.length;e0){const e=jr;E?u.inverseMat4(u.transposeMat4(E,Qr),e):u.identityMat4(e,e),function(e,t,s,i,r){function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let n,a,l,h,c,A,p=new Float32Array([0,0,0,0]),d=new Float32Array([0,0,0,0]);for(A=0;Ac&&(l=n,c=h),n=Pr(d,"floor","ceil"),a=Dr(n),h=o(d,a),h>c&&(l=n,c=h),n=Pr(d,"ceil","ceil"),a=Dr(n),h=o(d,a),h>c&&(l=n,c=h),i[r+A+0]=l[0],i[r+A+1]=l[1],i[r+A+2]=0}(e,i,i.length,I.normals,I.normals.length)}if(a)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0)for(let e=0,t=n.length;e0){const i=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):_r(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=u.mat4());if(e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const i=new Int8Array(s.normals);let r=!0;e.normalsBuf=new ae(t,t.ARRAY_BUFFER,i,s.normals.length,3,t.STATIC_DRAW,r)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.uv.length>0)if(e.uvDecodeMatrix){let i=!1;e.uvBuf=new ae(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,i)}else{const i=nt.getUVBounds(s.uv),r=nt.compressUVs(s.uv,i.min,i.max),o=r.quantized;let n=!1;e.uvDecodeMatrix=u.mat3(r.decodeMatrix),e.uvBuf=new ae(t,t.ARRAY_BUFFER,o,o.length,2,t.STATIC_DRAW,n)}if(s.metallicRoughness.length>0){const i=new Uint8Array(s.metallicRoughness);let r=!1;e.metallicRoughnessBuf=new ae(t,t.ARRAY_BUFFER,i,s.metallicRoughness.length,2,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i),o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const i=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,i=this._portions[s],r=4*i.vertsBaseIndex,o=4*i.numVerts,n=this._scratchMemory.getUInt8Array(o),a=t[0],l=t[1],h=t[2],c=t[3];for(let e=0;ey)&&(y=e,i.set(g),r&&u.triangleNormal(d,f,E,r),m=!0)}}return m&&r&&(u.transformVec3(this.model.worldNormalMatrix,r,r),u.normalizeVec3(r)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class to extends qi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r,o,n;const a=[];for(a.push("#version 300 es"),a.push("// Instancing geometry drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec2 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;"),r=0,o=s.lights.length;r= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),a.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),r=0,o=s.lights.length;r0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class so extends qi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let i,r;const o=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),o){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}for(n.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),n.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),n.push("float lambertian = 1.0;"),n.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),n.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),n.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=s.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing fill fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class ro extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class oo extends Ji{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class no extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class ao extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class lo extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class ho extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class co extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry depth drawing fragment shader"),o.push("precision highp float;"),o.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),o.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),o.push("}"),o}}class Ao extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class uo extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}const po={3e3:"linearToLinear",3001:"sRGBToLinear"};class fo extends qi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Instancing geometry quality drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push(" worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),o.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("vFragDepth = 1.0 + clipPos.w;"),o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Instancing geometry quality drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),n.push("#define PI 3.14159265359"),n.push("#define RECIPROCAL_PI 0.31830988618"),n.push("#define RECIPROCAL_PI2 0.15915494"),n.push("#define EPSILON 1e-6"),n.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),n.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),n.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),n.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),n.push(" return normalize(surf_norm );"),n.push(" }"),n.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),n.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),n.push(" vec2 st0 = dFdx( uv.st );"),n.push(" vec2 st1 = dFdy( uv.st );"),n.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),n.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),n.push(" vec3 N = normalize( surf_norm );"),n.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),n.push(" mat3 tsn = mat3( S, T, N );"),n.push(" return normalize( tsn * mapN );"),n.push("}"),n.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),n.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),n.push("}"),n.push("struct IncidentLight {"),n.push(" vec3 color;"),n.push(" vec3 direction;"),n.push("};"),n.push("struct ReflectedLight {"),n.push(" vec3 diffuse;"),n.push(" vec3 specular;"),n.push("};"),n.push("struct Geometry {"),n.push(" vec3 position;"),n.push(" vec3 viewNormal;"),n.push(" vec3 worldNormal;"),n.push(" vec3 viewEyeDir;"),n.push("};"),n.push("struct Material {"),n.push(" vec3 diffuseColor;"),n.push(" float specularRoughness;"),n.push(" vec3 specularColor;"),n.push(" float shine;"),n.push("};"),n.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),n.push(" float r = ggxRoughness + 0.0001;"),n.push(" return (2.0 / (r * r) - 2.0);"),n.push("}"),n.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),n.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),n.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),n.push("}"),i.reflectionMaps.length>0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = "+po[i.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = "+po[i.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class mo extends qi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState;let r,o;const n=s.sectionPlanes.length>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),n){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),r=0,o=i.lights.length;r0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,n=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const No=u.vec3(),bo=u.vec3(),Co=u.vec3(),Oo=u.vec3(),So=u.vec3(),xo=u.mat4();class wo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=No;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=bo;if(l){const e=u.transformPoint3(c,l,Co);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=O(d,t,xo),m=Oo,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Bo{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Do(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new wo(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const Fo={};const Mo=new Uint8Array(4),Lo=new Float32Array(1),Uo=u.vec4([0,0,0,1]),Ho=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const Go=new Float32Array(3),ko=u.vec3(),Vo=u.vec3(),jo=u.vec3(),Qo=u.vec3(),Wo=u.vec3(),zo=u.vec3(),Ko=u.vec3();class Yo{constructor(e){console.info("Creating TrianglesInstancingLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._instancingRenderers=function(e){const t=e.id;let s=go[t];return s||(s=new yo(e),go[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete go[t],s._destroy()}))),s}(e.model.scene),this._snapInstancingRenderers=function(e){const t=e.id;let s=Fo[t];return s||(s=new Bo(e),Fo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Fo[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({numInstances:0,obb:u.OBB3(),origin:u.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.aabb=u.collapseAABB3(),this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}createPortion(e){const t=e.color,s=e.metallic,i=e.roughness,r=null!==e.opacity&&void 0!==e.opacity?e.opacity:255,o=e.meshMatrix,n=e.aabb,a=e.pickColor;if(this._finalized)throw"Already finalized";const l=t[0],h=t[1],c=t[2];if(this._colors.push(l),this._colors.push(h),this._colors.push(c),this._colors.push(r),this._metallicRoughness.push(null!=s?s:0),this._metallicRoughness.push(null!=i?i:255),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(o[0]),this._modelMatrixCol0.push(o[4]),this._modelMatrixCol0.push(o[8]),this._modelMatrixCol0.push(o[12]),this._modelMatrixCol1.push(o[1]),this._modelMatrixCol1.push(o[5]),this._modelMatrixCol1.push(o[9]),this._modelMatrixCol1.push(o[13]),this._modelMatrixCol2.push(o[2]),this._modelMatrixCol2.push(o[6]),this._modelMatrixCol2.push(o[10]),this._modelMatrixCol2.push(o[14]),this._state.geometry.normals){let e=u.transposeMat4(o,u.mat4()),t=u.inverseMat4(e);this._modelNormalMatrixCol0.push(t[0]),this._modelNormalMatrixCol0.push(t[4]),this._modelNormalMatrixCol0.push(t[8]),this._modelNormalMatrixCol0.push(t[12]),this._modelNormalMatrixCol1.push(t[1]),this._modelNormalMatrixCol1.push(t[5]),this._modelNormalMatrixCol1.push(t[9]),this._modelNormalMatrixCol1.push(t[13]),this._modelNormalMatrixCol2.push(t[2]),this._modelNormalMatrixCol2.push(t[6]),this._modelNormalMatrixCol2.push(t[10]),this._modelNormalMatrixCol2.push(t[14])}this._pickColors.push(a[0]),this._pickColors.push(a[1]),this._pickColors.push(a[2]),this._pickColors.push(a[3]);const A=this._state.geometry.positionsCompressed.length,p=this._state.geometry.positionsCompressed,d=this._state.geometry.positionsDecodeMatrix;for(let e=0;e0){let t=!1;e.colorsBuf=new ae(i,i.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,i.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new ae(i,i.ARRAY_BUFFER,t,this._metallicRoughness.length,2,i.STATIC_DRAW,s)}if(o>0){let t=!1;e.flagsBuf=new ae(i,i.ARRAY_BUFFER,new Float32Array(o),o,1,i.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,i.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new ae(i,i.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,i.STATIC_DRAW,s),e.positionsDecodeMatrix=u.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),r=!1;e.colorsBuf=new ae(i,i.ARRAY_BUFFER,s,s.length,4,i.STATIC_DRAW,r)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new ae(i,i.ARRAY_BUFFER,s,s.length,2,i.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,i.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,i.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelMatrixCol1Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelMatrixCol2Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new ae(i,i.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,i.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Mo[0]=t[0],Mo[1]=t[1],Mo[2]=t[2],Mo[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Mo,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ki.NOT_RENDERED:s?ki.COLOR_TRANSPARENT:ki.COLOR_OPAQUE,A=!i||h?ki.NOT_RENDERED:n?ki.SILHOUETTE_SELECTED:o?ki.SILHOUETTE_HIGHLIGHTED:r?ki.SILHOUETTE_XRAYED:ki.NOT_RENDERED;let u=0;u=!i||h?ki.NOT_RENDERED:n?ki.EDGES_SELECTED:o?ki.EDGES_HIGHLIGHTED:r?ki.EDGES_XRAYED:a?s?ki.EDGES_COLOR_TRANSPARENT:ki.EDGES_COLOR_OPAQUE:ki.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ki.PICK:ki.NOT_RENDERED)<<12,p|=(t&L?1:0)<<16,Lo[0]=p,this._state.flagsBuf&&this._state.flagsBuf.setData(Lo,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Go[0]=t[0],Go[1]=t[1],Go[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(Go,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,i=s.geometry,r=this._portions[e];if(!r)return void this.model.error("portion not found: "+e);const o=i.quantizedPositions,n=s.origin,a=r.offset,l=n[0]+a[0],h=n[1]+a[1],c=n[2]+a[2],A=Uo,p=r.matrix,d=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=o.length;eg)&&(g=e,i.set(I),r&&u.triangleNormal(f,E,m,r),y=!0)}}return y&&r&&(u.transformVec3(a.normalMatrix,r,r),u.transformVec3(this.model.worldNormalMatrix,r,r),u.normalizeVec3(r)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class Xo extends tr{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class Zo extends tr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class qo{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Xo(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Zo(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const Jo={};class $o{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}const en=u.vec4([0,0,0,1]),tn=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();class sn{constructor(e){this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=Jo[t];return s||(s=new qo(e),Jo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Jo[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new $o(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:u.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=u.vec3(e.origin)),this.aabb=u.collapseAABB3()}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=_r(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.colors.length>0){const i=s.colors.length/4,r=new Float32Array(i);let o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2],h=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Lines instancing color fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return this._withSAO?(o.push(" float viewportWidth = uSAOParams[0];"),o.push(" float viewportHeight = uSAOParams[1];"),o.push(" float blendCutoff = uSAOParams[2];"),o.push(" float blendFactor = uSAOParams[3];"),o.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),o.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),o.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):o.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class on extends sr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class nn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new rn(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new on(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const an={};const ln=new Uint8Array(4),hn=new Float32Array(1),cn=u.vec4([0,0,0,1]),An=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const un=new Float32Array(3);class pn{constructor(e){this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._linesInstancingRenderers=function(e){const t=e.id;let s=an[t];return s||(s=new nn(e),an[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete an[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({obb:u.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],e.origin&&(this._state.origin=u.vec3(e.origin)),this._finalized=!1,this.aabb=u.collapseAABB3()}createPortion(e){const t=e.color,s=e.opacity,i=e.meshMatrix,r=e.aabb;if(this._finalized)throw"Already finalized";const o=t[0],n=t[1],a=t[2];t[3],this._colors.push(o),this._colors.push(n),this._colors.push(a),this._colors.push(s),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(i[0]),this._modelMatrixCol0.push(i[4]),this._modelMatrixCol0.push(i[8]),this._modelMatrixCol0.push(i[12]),this._modelMatrixCol1.push(i[1]),this._modelMatrixCol1.push(i[5]),this._modelMatrixCol1.push(i[9]),this._modelMatrixCol1.push(i[13]),this._modelMatrixCol2.push(i[2]),this._modelMatrixCol2.push(i[6]),this._modelMatrixCol2.push(i[10]),this._modelMatrixCol2.push(i[14]),u.collapseAABB3(r);const l=this._state.obb,h=l.length;for(let e=0;e0){let t=!1;this._state.colorsBuf=new ae(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(s>0){let t=!1;this._state.flagsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(s),s,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";ln[0]=t[0],ln[1]=t[1],ln[2]=t[2],ln[3]=t[3],this._state.colorsBuf.setData(ln,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ki.NOT_RENDERED:s?ki.COLOR_TRANSPARENT:ki.COLOR_OPAQUE,A=!i||h?ki.NOT_RENDERED:n?ki.SILHOUETTE_SELECTED:o?ki.SILHOUETTE_HIGHLIGHTED:r?ki.SILHOUETTE_XRAYED:ki.NOT_RENDERED;let u=0;u=!i||h?ki.NOT_RENDERED:n?ki.EDGES_SELECTED:o?ki.EDGES_HIGHLIGHTED:r?ki.EDGES_XRAYED:a?s?ki.EDGES_COLOR_TRANSPARENT:ki.EDGES_COLOR_OPAQUE:ki.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ki.PICK:ki.NOT_RENDERED)<<12,p|=(t&L?255:0)<<16,hn[0]=p,this._state.flagsBuf.setData(hn,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(un[0]=t[0],un[1]=t[1],un[2]=t[2],this._state.offsetsBuf.setData(un,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class dn extends $i{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial,i=[];return i.push("#version 300 es"),i.push("// Points batching color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class fn extends $i{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform vec4 color;"),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points batching silhouette vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = color;"),o.push("}"),o}}class En extends $i{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class mn extends $i{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batched pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batched pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class yn extends $i{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push(" gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),i.push("}"),i}}class gn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new dn(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new fn(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new En(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new mn(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new yn(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const In={};class vn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}const Tn=u.vec4(),_n=u.vec4(),Rn=u.vec4([0,0,0,1]),Pn=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();class Dn{constructor(e){this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._pointsBatchingRenderers=function(e){const t=e.id;let s=In[t];return s||(s=new gn(e),In[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete In[t],s._destroy()}))),s}(e.model.scene),this._buffer=new vn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:u.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=u.vec3(e.origin)),this.aabb=u.collapseAABB3()}canCreatePortion(e){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts}createPortion(e){if(this._finalized)throw"Already finalized";const t=e.positions,s=e.positionsCompressed,i=e.color,r=e.colorsCompressed,o=e.colors,n=e.meshMatrix,a=e.worldAABB,l=e.pickColor,h=this._buffer,c=h.positions.length/3;let A;if(this._preCompressedPositionsExpected){if(!s)throw"positionsCompressed expected";for(let e=0,t=s.length;e0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=_r(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i);let o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class bn extends er{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 color;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),i.push("uniform vec4 silhouetteColor;"),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class Cn extends er{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick mesh fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class On extends er{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push(" vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Sn extends er{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 color;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class xn extends er{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points instancing depth vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return o.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class wn extends er{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }"),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Bn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Nn(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new bn(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new xn(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Cn(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new On(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Sn(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new wn(this._scene)),this._shadowRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy()}}const Fn={};const Mn=new Uint8Array(4),Ln=new Float32Array(1),Un=u.vec4([0,0,0,1]),Hn=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const Gn=new Float32Array(3);class kn{constructor(e){this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._pointsInstancingRenderers=function(e){const t=e.id;let s=Fn[t];return s||(s=new Bn(e),Fn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Fn[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({obb:u.OBB3(),numInstances:0,origin:e.origin?u.vec3(e.origin):null,geometry:e.geometry,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._finalized=!1,this.aabb=u.collapseAABB3()}createPortion(e){const t=e.meshMatrix,s=e.aabb,i=e.pickColor;if(this._finalized)throw"Already finalized";this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(t[0]),this._modelMatrixCol0.push(t[4]),this._modelMatrixCol0.push(t[8]),this._modelMatrixCol0.push(t[12]),this._modelMatrixCol1.push(t[1]),this._modelMatrixCol1.push(t[5]),this._modelMatrixCol1.push(t[9]),this._modelMatrixCol1.push(t[13]),this._modelMatrixCol2.push(t[2]),this._modelMatrixCol2.push(t[6]),this._modelMatrixCol2.push(t[10]),this._modelMatrixCol2.push(t[14]),this._pickColors.push(i[0]),this._pickColors.push(i[1]),this._pickColors.push(i[2]),this._pickColors.push(i[3]),u.collapseAABB3(s);const r=this._state.obb,o=r.length;for(let e=0;e0){let s=!1;this._state.flagsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,s)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;this._state.pickColorsBuf=new ae(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Mn[0]=t[0],Mn[1]=t[1],Mn[2]=t[2],this._state.colorsBuf.setData(Mn,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ki.NOT_RENDERED:s?ki.COLOR_TRANSPARENT:ki.COLOR_OPAQUE,A=!i||h?ki.NOT_RENDERED:n?ki.SILHOUETTE_SELECTED:o?ki.SILHOUETTE_HIGHLIGHTED:r?ki.SILHOUETTE_XRAYED:ki.NOT_RENDERED;let u=0;u=!i||h?ki.NOT_RENDERED:n?ki.EDGES_SELECTED:o?ki.EDGES_HIGHLIGHTED:r?ki.EDGES_XRAYED:a?s?ki.EDGES_COLOR_TRANSPARENT:ki.EDGES_COLOR_OPAQUE:ki.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ki.PICK:ki.NOT_RENDERED)<<12,p|=(t&L?255:0)<<16,Ln[0]=p,this._state.flagsBuf.setData(Ln,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Gn[0]=t[0],Gn[1]=t[1],Gn[2]=t[2],this._state.offsetsBuf.setData(Gn,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.occlusionRenderer&&this._pointsInstancingRenderers.occlusionRenderer.drawLayer(t,this,ki.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickMeshRenderer&&this._pointsInstancingRenderers.pickMeshRenderer.drawLayer(t,this,ki.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickDepthRenderer&&this._pointsInstancingRenderers.pickDepthRenderer.drawLayer(t,this,ki.PICK)}drawPickNormals(e,t){}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}class Vn{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class jn{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const Qn={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};const Wn=new class{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==zn[e])return void zn[e].push({onLoad:t,onProgress:s,onError:i});zn[e]=[],zn[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),n=this.mimeType,a=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=zn[e],i=t.body.getReader(),r=t.headers.get("Content-Length"),o=r?parseInt(r):0,n=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then((({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:n,loaded:a,total:o});for(let e=0,t=s.length;e{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,n)));case"json":return e.json();default:if(void 0===n)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(n),s=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(s);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{Qn.add(e,t);const s=zn[e];delete zn[e];for(let e=0,i=s.length;e{const s=zn[e];if(void 0===s)throw this.manager.itemError(e),t;delete zn[e];for(let e=0,i=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Yn{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Xn=0;class Zn{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new Yn,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const i=e.capabilities;this._workerConfig={astcSupported:i.astcSupported,etc1Supported:i.etc1Supported,etc2Supported:i.etc2Supported,dxtSupported:i.dxtSupported,bptcSupported:i.bptcSupported,pvrtcSupported:i.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new Kn;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new Kn;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const i=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,i]).then((([e,t])=>{const s=Zn.BasisWorker.toString(),i=["/* constants */","let _EngineFormat = "+JSON.stringify(Zn.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Zn.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Zn.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([i])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),Xn>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Xn++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((i,r)=>{const o=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:o},e))).then((e=>{const s=e.data,{mipmaps:o,width:n,height:a,format:l,type:h,error:c,dfdTransferFn:A,dfdFlags:u}=s;if("error"===h)return r(c);t.setCompressedData({mipmaps:o,props:{format:l,minFilter:1===o.length?1006:1008,magFilter:1===o.length?1006:1008,encoding:2===A?3001:3e3,premultiplyAlpha:!!(1&u)}}),i()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Xn--}}Zn.BasisFormat={ETC1S:0,UASTC_4x4:1},Zn.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Zn.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Zn.BasisWorker=function(){let e,t,s;const i=_EngineFormat,r=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",(function(n){const c=n.data;switch(c.type){case"init":e=c.config,A=c.transcoderBinary,t=new Promise((e=>{s={wasmBinary:A,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:n,hasAlpha:A,mipmaps:u,format:p,dfdTransferFn:d,dfdFlags:f}=function(t){const n=new s.KTX2File(new Uint8Array(t));function c(){n.close(),n.delete()}if(!n.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const A=n.isUASTC()?o.UASTC_4x4:o.ETC1S,u=n.getWidth(),p=n.getHeight(),d=n.getLevels(),f=n.getHasAlpha(),E=n.getDFDTransferFunc(),m=n.getDFDFlags(),{transcoderFormat:y,engineFormat:g}=function(t,s,n,c){let A,u;const p=t===o.ETC1S?a:l;for(let i=0;i{for(let s=0,i=e.meshIds.length;s{const s=t[e];let i,r;if(s.positionsCompressed){const e=nt.getPositionsBounds(s.positionsCompressed);i=nt.decompressPosition(e.min,s.positionsDecodeMatrix,[]),r=nt.decompressPosition(e.max,s.positionsDecodeMatrix,[])}else{const e=nt.getPositionsBounds(s.positions);i=e.min,r=e.max}i[0]+=s.origin[0],i[1]+=s.origin[1],i[2]+=s.origin[2],r[0]+=s.origin[0],r[1]+=s.origin[1],r[2]+=s.origin[2],u.expandAABB3Point3(a,i),u.expandAABB3Point3(a,r),l+=s.numPrimitives})),i[n]={aabb:a,numPrimitives:l,entityId:s.id}}let n,a=[],l={};if(Object.keys(i).length>0){n=function(e){const t=[];for(let s=0,i=e.length;s{s=Math.max(s,e.entity.id)}));const i=new Array(s+1);t.forEach((t=>{i[t.entity.id]=e.objects[t.entity.xeokitId]})),this._internalNodesList=i,this._lastVisibleFrameOfNodes=new Array(i.length),this._lastVisibleFrameOfNodes.fill(0)}_searchVisibleNodesWithFrustumCulling(){return this._aabbTree.searchCustom(((e,t)=>this._aabbIntersectsCameraFrustum(e,t)),(e=>this._aabbContainedInCameraFrustum(e)))}_markVisibleFrameOfVisibleNodes(e,t){const s=this._lastVisibleFrameOfNodes;for(let i=0,r=e.length;ithis._frustumProps.CAM_FACTOR_1?(s|=n<0?64:128,s&=-17):s&=-33;const a=Ut(u.dotVec3(r,this._frustumProps.up),o);Math.abs(a)>this._frustumProps.CAM_FACTOR_2?(s|=a<0?1024:2048,s&=-257):s&=-513}return 4&s&&8&s&&(s|=4096),64&s&&128&s&&(s|=8192),1024&s&&2048&s&&(s|=16384),e._check=s,s}}class Gt{constructor(e,t){this.sceneModel=t,this.entities=[],this.meshes=[],this.finalized=!1}addEntity(e){if(this.finalized)throw"Already finalized";this.entities.push(e)}addMesh(e){if(this.finalized)throw"Already finalized";this.meshes.push(e)}finalize(e){if(this.finalized)throw"Already finalized";this.finalized=!0,this.VFCState=new Ht,this.VFCState.initializeVFCState(this.entities,this.meshes),this.VFCState.finalize(this.sceneModel,e),this._onSceneRendering=this.sceneModel.scene.on("rendering",(()=>this.applyViewFrustumCulling.call(this)))}applyViewFrustumCulling(){this.finalized&&this.VFCState.applyViewFrustumCulling(this.sceneModel)}destroy(){this.finalized&&this.sceneModel.off(this._onSceneRendering)}}class kt extends C{constructor(e,t={}){super(e,t),this._scene=e,this._vfcManagers={},this._vfcManagerList=[],this.enabled=t.enabled,this._init()}_init(){this._scene.on("rendering",(()=>{for(let e=0,t=this._vfcManagerList.length;e{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new Re(this,{transparent:i,alphaDepthMask:r}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1;let e=null;this.getHash=function(){if(e)return e;const t=this.sectionPlanes;if(0===t.length)return this.hash=";";const s=[];for(let e=0,i=t.length;e0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),i=null,s=null},this.removeLight=function(e){for(let t=0,r=this.lights.length;t{this._renderer.imageDirty()})),this.lod=new Ot(this,{enabled:t.lodEnabled}),this.vfc=new kt(this,{enabled:t.vfcEnabled})}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+m.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=u.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const i=this.types[s];i&&(delete i[t],m.isEmptyObject(i)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_objectHighlightedUpdated(e,t=!0){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null,t&&this.fire("objectHighlighted",e,!0)}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&D.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,i=this._clearEachPass;let r,o;for(r=0;rr&&(r=e[3]),e[4]>o&&(o=e[4]),e[5]>n&&(n=e[5]),h=!0}h||(t=-100,s=-100,i=-100,r=100,o=100,n=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=i,this._aabb[3]=r,this._aabb[4]=o,this._aabb[5]=n,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Vt(this,s));const i=e.excludeEntities||e.exclude;return i&&(e.excludeEntityIds=Vt(this,i)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=this._renderer.pick(e,t))?(t.entity&&t.entity.fire&&t.entity.fire("picked",t),t):void 0}snapPick(e){return this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]o&&(o=l[3]),l[4]>n&&(n=l[4]),l[5]>a&&(a=l[5]),t=!0}})),t){const e=u.AABB3();return e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=n,e[5]=a,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){m.isString(e)&&(e=[e]);let s=!1;for(let i=0,r=e.length;i0,l=!!r.compressGeometry,h=[];h.push("#version 300 es"),h.push("// Lambertian drawing vertex shader"),h.push("in vec3 position;"),h.push("uniform mat4 modelMatrix;"),h.push("uniform mat4 viewMatrix;"),h.push("uniform mat4 projMatrix;"),h.push("uniform vec4 colorize;"),h.push("uniform vec3 offset;"),l&&h.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(h.push("uniform float logDepthBufFC;"),h.push("out float vFragDepth;"),h.push("bool isPerspectiveMatrix(mat4 m) {"),h.push(" return (m[2][3] == - 1.0);"),h.push("}"),h.push("out float isPerspective;"));a&&h.push("out vec4 vWorldPosition;");if(h.push("uniform vec4 lightAmbient;"),h.push("uniform vec4 materialColor;"),h.push("uniform vec3 materialEmissive;"),r.normalsBuf){h.push("in vec3 normal;"),h.push("uniform mat4 modelNormalMatrix;"),h.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=i.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),h.push(" }"),h.push(" return normalize(v);"),h.push("}"))}h.push("out vec4 vColor;"),"points"===r.primitiveName&&h.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(h.push("void billboard(inout mat4 mat) {"),h.push(" mat[0][0] = 1.0;"),h.push(" mat[0][1] = 0.0;"),h.push(" mat[0][2] = 0.0;"),"spherical"===o&&(h.push(" mat[1][0] = 0.0;"),h.push(" mat[1][1] = 1.0;"),h.push(" mat[1][2] = 0.0;")),h.push(" mat[2][0] = 0.0;"),h.push(" mat[2][1] = 0.0;"),h.push(" mat[2][2] =1.0;"),h.push("}"));h.push("void main(void) {"),h.push("vec4 localPosition = vec4(position, 1.0); "),h.push("vec4 worldPosition;"),l&&h.push("localPosition = positionsDecodeMatrix * localPosition;");r.normalsBuf&&(l?h.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):h.push("vec4 localNormal = vec4(normal, 0.0); "),h.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),h.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));h.push("mat4 viewMatrix2 = viewMatrix;"),h.push("mat4 modelMatrix2 = modelMatrix;"),n&&h.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===o||"cylindrical"===o?(h.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),h.push("billboard(modelMatrix2);"),h.push("billboard(viewMatrix2);"),h.push("billboard(modelViewMatrix);"),r.normalsBuf&&(h.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),h.push("billboard(modelNormalMatrix2);"),h.push("billboard(viewNormalMatrix2);"),h.push("billboard(modelViewNormalMatrix);")),h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r.normalsBuf&&h.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(h.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),h.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),h.push("float lambertian = 1.0;"),r.normalsBuf)for(let e=0,t=i.lights.length;e0,o=t.gammaOutput,n=[];n.push("#version 300 es"),n.push("// Lambertian drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"));if(r){n.push("in vec4 vWorldPosition;"),n.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),n.push("}")}"points"===i.primitiveName&&(n.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),n.push("float r = dot(cxy, cxy);"),n.push("if (r > 1.0) {"),n.push(" discard;"),n.push("}"));t.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");o?n.push("outColor = linearToGamma(vColor, gammaFactor);"):n.push("outColor = vColor;");return n.push("}"),n}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,i=t._sectionPlanesState,r=e._geometry._state,o=t._lightsState;let n;const a=s.billboard,l=s.background,h=s.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),A=Kt(e),u=i.sectionPlanes.length>0,p=zt(e),d=!!r.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),d&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),u&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));o.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(A){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=o.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}c&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),d&&f.push("uniform mat3 uvDecodeMatrix;"));r.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===r.primitiveName&&f.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===a&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(p){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=o.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=o.lights.length;e0,l=Kt(e),h=i.uvBuf,c="PhongMaterial"===n.type,A="MetallicMaterial"===n.type,u="SpecularMaterial"===n.type,p=zt(e);t.gammaInput;const d=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));p&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),d&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(a){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var E=0;E0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),o.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),c&&((o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = "+Wt[o.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(A||u)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),o.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+Wt[o.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),i.colors&&f.push("in vec4 vColor;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(o.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));n.ambient&&f.push("uniform vec3 materialAmbient;");n.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==n.alpha&&null!==n.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");n.emissive&&f.push("uniform vec3 materialEmissive;");n.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==n.glossiness&&null!==n.glossiness&&f.push("uniform float materialGlossiness;");void 0!==n.shininess&&null!==n.shininess&&f.push("uniform float materialShininess;");n.specular&&f.push("uniform vec3 materialSpecular;");void 0!==n.metallic&&null!==n.metallic&&f.push("uniform float materialMetallic;");void 0!==n.roughness&&null!==n.roughness&&f.push("uniform float materialRoughness;");void 0!==n.specularF0&&null!==n.specularF0&&f.push("uniform float materialSpecularF0;");h&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));h&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));h&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));h&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&h&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&h&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&h&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));h&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));h&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&h&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&h&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&h&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=o.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===i.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),n.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");n.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):n.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");i.colors&&f.push("diffuseColor *= vColor.rgb;");n.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");n.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==n.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");i.colors&&f.push("alpha *= vColor.a;");void 0!==n.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==n.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==n.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==n.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));h&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+Wt[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));h&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+Wt[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));h&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+Wt[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));h&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+Wt[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));h&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));h&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(o.lights.length>0||o.lightMaps.length>0||o.reflectionMaps.length>0)){h&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),h&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),h&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),h&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),h&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),h&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),h&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),c&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),u&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),A&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),o.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),c&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(u||A)&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=o.lights.length;e0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),r.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,A=o.sectionPlanes.length;c0&&r.lightMaps[0].texture&&this._uLightMap&&(a.bindTexture(this._uLightMap,r.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),r.reflectionMaps.length>0&&r.reflectionMaps[0].texture&&this._uReflectionMap&&(a.bindTexture(this._uReflectionMap,r.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class Jt{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,i=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),r=t._sectionPlanesState.sectionPlanes.length>0,o=!!e._geometry._state.compressGeometry,n=e._state.billboard,a=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),o&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));r&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),i){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===n||"cylindrical"===n)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===n&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),o&&l.push("localPosition = positionsDecodeMatrix * localPosition;");i&&(o?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),a&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===n||"cylindrical"===n?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),i&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),i)for(let e=0,t=s.lights.length;e0,o=[];o.push("#version 300 es"),o.push("// Lambertian drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}"points"===e._geometry._state.primitiveName&&(o.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),o.push("float r = dot(cxy, cxy);"),o.push("if (r > 1.0) {"),o.push(" discard;"),o.push("}"));t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const $t=new e({}),es=u.vec3(),ts=function(e,t){this.id=$t.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Jt(t),this._allocate(t)},ss={};ts.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ss[t];return s||(s=new ts(t,e),ss[t]=s,p.memory.programs++),s._useCount++,s},ts.prototype.put=function(){0==--this._useCount&&($t.removeItem(this.id),this._program&&this._program.destroy(),delete ss[this._hash],p.memory.programs--)},ts.prototype.webglContextRestored=function(){this._program=null},ts.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl,n=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,a=t._state,l=t._geometry._state,h=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,h?e.getRTCViewMatrix(a.originHash,h):r.viewMatrix),o.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Edges drawing vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec4 edgeColor;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));s&&n.push("out vec4 vWorldPosition;");n.push("out vec4 vColor;"),("spherical"===r||"cylindrical"===r)&&(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n.push("vColor = edgeColor;"),s&&n.push("vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,i=e.scene.gammaOutput,r=s.sectionPlanes.length>0,o=[];o.push("#version 300 es"),o.push("// Edges drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const rs=new e({}),os=u.vec3(),ns=function(e,t){this.id=rs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new is(t),this._allocate(t)},as={};ns.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=as[t];return s||(s=new ns(t,e),as[t]=s,p.memory.programs++),s._useCount++,s},ns.prototype.put=function(){0==--this._useCount&&(rs.removeItem(this.id),this._program&&this._program.destroy(),delete as[this._hash],p.memory.programs--)},ns.prototype.webglContextRestored=function(){this._program=null},ns.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl;let n;const a=t._state,l=t._geometry,h=l._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(a.originHash,c):r.viewMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh picking vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("out vec4 vViewPosition;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("uniform vec2 pickClipPos;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy -= pickClipPos;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==r&&"cylindrical"!==r||(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"));n.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(r.push("uniform vec4 pickColor;"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = pickColor; "),r.push("}"),r}(e)}}const hs=u.vec3(),cs=function(e,t){this._hash=e,this._shaderSource=new ls(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},As={};cs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=As[t];if(!s){if(s=new cs(t,e),s.errors)return console.log(s.errors.join("\n")),null;As[t]=s,p.memory.programs++}return s._useCount++,s},cs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete As[this._hash],p.memory.programs--)},cs.prototype.webglContextRestored=function(){this._program=null},cs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCPickViewMatrix(r.originHash,a):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t>24&255,c=l>>16&255,A=l>>8&255,u=255&l;i.uniform4f(this._uPickColor,u/255,A/255,c/255,h/255),i.uniform2fv(this._uPickClipPos,e.pickClipPos),n.indicesBuf?(i.drawElements(n.primitive,n.indicesBuf.numItems,n.indicesBuf.itemType,0),e.drawElements++):n.positions&&i.drawArrays(i.TRIANGLES,0,n.positions.numItems)},cs.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ne(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,i=!!e._geometry._state.compressGeometry,r=[];r.push("#version 300 es"),r.push("// Surface picking vertex shader"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform vec3 offset;"),s&&(r.push("uniform bool clippable;"),r.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;"));r.push("uniform vec2 pickClipPos;"),r.push("vec4 remapClipPos(vec4 clipPos) {"),r.push(" clipPos.xy /= clipPos.w;"),r.push(" clipPos.xy -= pickClipPos;"),r.push(" clipPos.xy *= clipPos.w;"),r.push(" return clipPos;"),r.push("}"),r.push("out vec4 vColor;"),i&&r.push("uniform mat4 positionsDecodeMatrix;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),i&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push(" vec4 worldPosition = modelMatrix * localPosition; "),r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&r.push(" vWorldPosition = worldPosition;");r.push(" vColor = color;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return r.push("gl_Position = remapClipPos(clipPos);"),r.push("}"),r}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Surface picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),r.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = vColor;"),r.push("}"),r}(e)}}const ps=u.vec3(),ds=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new us(t),this._allocate(t)},fs={};ds.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=fs[t];if(!s){if(s=new ds(t,e),s.errors)return console.log(s.errors.join("\n")),null;fs[t]=s,p.memory.programs++}return s._useCount++,s},ds.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete fs[this._hash],p.memory.programs--)},ds.prototype.webglContextRestored=function(){this._program=null},ds.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry,a=t._geometry._state,l=t.origin,h=o.backfaces,c=o.frontface,A=s.camera.project,u=n._getPickTrianglePositions(),p=n._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(A.far+1)/Math.LN2);i.uniform1f(this._uLogDepthBufFC,e)}if(i.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(r.originHash,l):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh occlusion vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push("}"),r}(e)}}const ms=u.vec3(),ys=function(e,t){this._hash=e,this._shaderSource=new Es(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},gs={};ys.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=gs[t];if(!s){if(s=new ys(t,e),s.errors)return console.log(s.errors.join("\n")),null;gs[t]=s,p.memory.programs++}return s._useCount++,s},ys.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete gs[this._hash],p.memory.programs--)},ys.prototype.webglContextRestored=function(){this._program=null},ys.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._material._state,o=t._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){const t=r.backfaces;e.backfaces!==t&&(t?i.disable(i.CULL_FACE):i.enable(i.CULL_FACE),e.backfaces=t);const s=r.frontface;e.frontface!==s&&(s?i.frontFace(i.CCW):i.frontFace(i.CW),e.frontface=s),this._lastMaterialId=r.id}const l=s.camera;if(i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCViewMatrix(o.originHash,a):l.viewMatrix),o.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,i=[];i.push("// Mesh shadow vertex shader"),i.push("in vec3 position;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 shadowViewMatrix;"),i.push("uniform mat4 shadowProjMatrix;"),i.push("uniform vec3 offset;"),s&&i.push("uniform mat4 positionsDecodeMatrix;");t&&i.push("out vec4 vWorldPosition;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),i.push("vec4 worldPosition;"),s&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push("worldPosition = modelMatrix * localPosition;"),i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&i.push("vWorldPosition = worldPosition;");return i.push(" gl_Position = shadowProjMatrix * viewPosition;"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("// Mesh shadow fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}return r.push("outColor = encodeFloat(gl_FragCoord.z);"),r.push("}"),r}(e)}}const vs=function(e,t){this._hash=e,this._shaderSource=new Is(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ts={};vs.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let i=Ts[s];if(!i){if(i=new vs(s,e),i.errors)return console.log(i.errors.join("\n")),null;Ts[s]=i,p.memory.programs++}return i._useCount++,i},vs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ts[this._hash],p.memory.programs--)},vs.prototype.webglContextRestored=function(){this._program=null},vs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,i=t._material._state,r=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const r=i.frontface;e.frontface!==r&&(r?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=r),e.lineWidth!==i.lineWidth&&(s.lineWidth(i.lineWidth),e.lineWidth=i.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,i.pointSize),this._lastMaterialId=i.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),r.combineGeometry){const i=t.vertexBufs;i.id!==this._lastVertexBufsId&&(i.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=i.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),r.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,r.positionsDecodeMatrix),r.combineGeometry?r.indicesBufCombined&&(r.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(r.positionsBuf,r.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),r.indicesBuf&&(r.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=r.id),r.combineGeometry?r.indicesBufCombined&&(s.drawElements(r.primitive,r.indicesBufCombined.numItems,r.indicesBufCombined.itemType,0),e.drawElements++):r.indicesBuf?(s.drawElements(r.primitive,r.indicesBuf.numItems,r.indicesBuf.itemType,0),e.drawElements++):r.positions&&(s.drawArrays(s.TRIANGLES,0,r.positions.numItems),e.drawArrays++)},vs.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ne(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uShadowViewMatrix=i.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=i.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,r,o,n;for(let a=0,l=this._uSectionPlanes.length;a0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const Fs=function(){const e=u.vec3(),t=u.vec3(),s=u.vec3(),i=u.vec3(),r=u.vec3(),o=u.vec3(),n=u.vec4(),a=u.vec3(),l=u.vec3(),h=u.vec3(),c=u.vec3(),A=u.vec3(),p=u.vec3(),d=u.vec3(),f=u.vec3(),E=u.vec3(),m=u.vec4(),y=u.vec4(),g=u.vec4(),I=u.vec3(),v=u.vec3(),T=u.vec3(),_=u.vec3(),R=u.vec3(),P=u.vec3(),D=u.vec3(),N=u.vec3(),C=u.vec3(),O=u.vec3(),S=u.vec3();return function(w,x,B,F){var M=F.primIndex;if(null!=M&&M>-1){const G=w.geometry._state,k=w.scene,V=k.camera,j=k.canvas;if("triangles"===G.primitiveName){F.primitive="triangle";const k=M,Q=G.indices,W=G.positions;let z,K,Y;if(Q){var L=Q[k+0],U=Q[k+1],H=Q[k+2];o[0]=L,o[1]=U,o[2]=H,F.indices=o,z=3*L,K=3*U,Y=3*H}else z=3*k,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],i[0]=W[K+0],i[1]=W[K+1],i[2]=W[K+2],r[0]=W[Y+0],r[1]=W[Y+1],r[2]=W[Y+2],G.compressGeometry){const e=G.positionsDecodeMatrix;e&&(nt.decompressPosition(s,e,s),nt.decompressPosition(i,e,i),nt.decompressPosition(r,e,r))}F.canvasPos?u.canvasPosToLocalRay(j.canvas,w.origin?b(x,w.origin):x,B,w.worldMatrix,F.canvasPos,e,t):F.origin&&F.direction&&u.worldRayToLocalRay(w.worldMatrix,F.origin,F.direction,e,t),u.normalizeVec3(t),u.rayPlaneIntersect(e,t,s,i,r,n),F.localPos=n,F.position=n,m[0]=n[0],m[1]=n[1],m[2]=n[2],m[3]=1,u.transformVec4(w.worldMatrix,m,y),a[0]=y[0],a[1]=y[1],a[2]=y[2],F.canvasPos&&w.origin&&(a[0]+=w.origin[0],a[1]+=w.origin[1],a[2]+=w.origin[2]),F.worldPos=a,u.transformVec4(V.matrix,y,g),l[0]=g[0],l[1]=g[1],l[2]=g[2],F.viewPos=l,u.cartesianToBarycentric(n,s,i,r,h),F.bary=h;const X=G.normals;if(X){if(G.compressGeometry){const e=3*L,t=3*U,s=3*H;nt.decompressNormal(X.subarray(e,e+2),c),nt.decompressNormal(X.subarray(t,t+2),A),nt.decompressNormal(X.subarray(s,s+2),p)}else c[0]=X[z],c[1]=X[z+1],c[2]=X[z+2],A[0]=X[K],A[1]=X[K+1],A[2]=X[K+2],p[0]=X[Y],p[1]=X[Y+1],p[2]=X[Y+2];const e=u.addVec3(u.addVec3(u.mulVec3Scalar(c,h[0],I),u.mulVec3Scalar(A,h[1],v),T),u.mulVec3Scalar(p,h[2],_),R);F.worldNormal=u.normalizeVec3(u.transformVec3(w.worldNormalMatrix,e,P))}const Z=G.uv;if(Z){if(d[0]=Z[2*L],d[1]=Z[2*L+1],f[0]=Z[2*U],f[1]=Z[2*U+1],E[0]=Z[2*H],E[1]=Z[2*H+1],G.compressGeometry){const e=G.uvDecodeMatrix;e&&(nt.decompressUV(d,e,d),nt.decompressUV(f,e,f),nt.decompressUV(E,e,E))}F.uv=u.addVec3(u.addVec3(u.mulVec2Scalar(d,h[0],D),u.mulVec2Scalar(f,h[1],N),C),u.mulVec2Scalar(E,h[2],O),S)}}}}}();function Ms(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let i=e.height||1;i<0&&(console.error("negative height not allowed - will invert"),i*=-1);let r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<3&&(r=3);let o=e.heightSegments||1;o<0&&(console.error("negative heightSegments not allowed - will invert"),o*=-1),o<1&&(o=1);const n=!!e.openEnded;let a=e.center;const l=a?a[0]:0,h=a?a[1]:0,c=a?a[2]:0,A=i/2,u=i/o,p=2*Math.PI/r,d=1/r,f=(t-s)/o,E=[],y=[],g=[],I=[];let v,T,_,R,P,D,N,C,O,b,S;const w=(90-180*Math.atan(i/(s-t))/Math.PI)/90;for(v=0;v<=o;v++)for(P=t-v*f,D=A-v*u,T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),y.push(P*_),y.push(w),y.push(P*R),g.push(T*d),g.push(1*v/o),E.push(P*_+l),E.push(D+h),E.push(P*R+c);for(v=0;v0){for(O=E.length/3,y.push(0),y.push(1),y.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),b=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,y.push(t*_),y.push(1),y.push(t*R),g.push(b),g.push(S),E.push(t*_+l),E.push(A+h),E.push(t*R+c);for(T=0;T0){for(O=E.length/3,y.push(0),y.push(-1),y.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(0-A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),b=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,y.push(s*_),y.push(-1),y.push(s*R),g.push(b),g.push(S),E.push(s*_+l),E.push(0-A+h),E.push(s*R+c);for(T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,i=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const o=Xs(s,this.wrapS);o&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,o);const n=Xs(s,this.wrapT);if(n&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,n),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=Xs(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}r?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,$s(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,$s(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Xs(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Xs(s,this.magFilter)));const a=Xs(s,this.format,this.encoding),l=Xs(s,this.type),h=Js(s,this.internalFormat,a,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,i,h,e[0].width,e[0].height);for(let t=0,i=e.length;t>t;return e+1}class ii extends C{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new Ne({texture:new qs({gl:this.scene.canvas.gl}),matrix:u.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=u.vec2([0,0]),this._scale=u.vec2([1,1]),this._rotate=u.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),p.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new qs({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=u.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=u.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?u.mulMat4(t,s):s),0!==this._rotate&&(s=u.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?u.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=ei(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=ei(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),p.memory.textures--}}const ri=p.memory,oi=u.AABB3();class ni extends Je{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ne({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=u.OBB3();const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var r;if(t.positionsDecodeMatrix);else{const e=nt.getPositionsBounds(t.positions),o=nt.compressPositions(t.positions,e.min,e.max);r=o.quantized,s.positionsDecodeMatrix=o.decodeMatrix,s.positionsBuf=new ae(i,i.ARRAY_BUFFER,r,r.length,3,i.STATIC_DRAW),ri.positions+=s.positionsBuf.numItems,u.positions3ToAABB3(t.positions,this._aabb),u.positions3ToAABB3(r,oi,s.positionsDecodeMatrix),u.AABB3ToOBB3(oi,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new ae(i,i.ARRAY_BUFFER,e,e.length,4,i.STATIC_DRAW),ri.colors+=s.colorsBuf.numItems}if(t.uv){const e=nt.getUVBounds(t.uv),r=nt.compressUVs(t.uv,e.min,e.max),o=r.quantized;s.uvDecodeMatrix=r.decodeMatrix,s.uvBuf=new ae(i,i.ARRAY_BUFFER,o,o.length,2,i.STATIC_DRAW),ri.uvs+=s.uvBuf.numItems}if(t.normals){const e=nt.compressNormals(t.normals);let r=s.compressGeometry;s.normalsBuf=new ae(i,i.ARRAY_BUFFER,e,e.length,3,i.STATIC_DRAW,r),ri.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,e,e.length,1,i.STATIC_DRAW),ri.indices+=s.indicesBuf.numItems;const o=$e(r,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,o,o.length,1,i.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),ri.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),ri.meshes--}}var ai={};function li(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let i=e.xSegments||1;i<0&&(console.error("negative xSegments not allowed - will invert"),i*=-1),i<1&&(i=1);let r=e.xSegments||1;r<0&&(console.error("negative zSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const o=e.center,n=o?o[0]:0,a=o?o[1]:0,l=o?o[2]:0,h=t/2,c=s/2,A=Math.floor(i)||1,u=Math.floor(r)||1,p=A+1,d=u+1,f=t/A,E=s/u,y=new Float32Array(p*d*3),g=new Float32Array(p*d*3),I=new Float32Array(p*d*2);let v,T,_,R,P,D,N,C=0,O=0;for(v=0;v65535?Uint32Array:Uint16Array)(A*u*6);for(v=0;v360&&(o=360);const n=e.center;let a=n?n[0]:0,l=n?n[1]:0;const h=n?n[2]:0,c=[],A=[],p=[],d=[];let f,E,y,g,I,v,T,_,R,P,D,N;for(_=0;_<=r;_++)for(T=0;T<=i;T++)f=T/i*o,E=.785398+_/r*Math.PI*2,a=t*Math.cos(f),l=t*Math.sin(f),y=(t+s*Math.cos(E))*Math.cos(f),g=(t+s*Math.cos(E))*Math.sin(f),I=s*Math.sin(E),c.push(y+a),c.push(g+l),c.push(I+h),p.push(1-T/i),p.push(_/r),v=u.normalizeVec3(u.subVec3([y,g,I],[a,l,h],[]),[]),A.push(v[0]),A.push(v[1]),A.push(v[2]);for(_=1;_<=r;_++)for(T=1;T<=i;T++)R=(i+1)*_+T-1,P=(i+1)*(_-1)+T-1,D=(i+1)*(_-1)+T,N=(i+1)*_+T,d.push(R),d.push(P),d.push(D),d.push(D),d.push(N),d.push(R);return m.apply(e,{positions:c,normals:A,uv:p,indices:d})}ai.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},ai.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(ai.parse._buffToStr(e));window.location.href=s},ai.clone=function(e){return JSON.parse(JSON.stringify(e))},ai.bin={},ai.bin.f=new Float32Array(1),ai.bin.fb=new Uint8Array(ai.bin.f.buffer),ai.bin.rf=function(e,t){for(var s=ai.bin.f,i=ai.bin.fb,r=0;r<4;r++)i[r]=e[t+r];return s[0]},ai.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},ai.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},ai.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},ai.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},ai.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},ai.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},ai.parse={},ai.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",i=0;ir&&(r=l),ho&&(o=h),cn&&(n=c)}return{min:{x:t,y:s,z:i},max:{x:r,y:o,z:n}}};class ci extends C{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=u.vec3(t.pos||[0,0,0]),this._up=u.vec3(t.up||[0,1,0]),this._normal=u.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=u.vec3(),this._rtcPos=u.vec3(),this._imageSize=u.vec2(),this._texture=new ii(this),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new Ys(this,{matrix:u.inverseMat4(u.lookAtMat4v(this._pos,u.subVec3(this._pos,this._normal,u.mat4()),this._up,u.mat4())),children:[this._bitmapMesh=new Bs(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new ht(this,li({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new dt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height*e,1,this._height]}}class Ai extends C{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],this._origin=u.vec3(t.origin||[0,0,0]),t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;ed.has(e.id)||E.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let i,r=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(i=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,i=Math.round(255*i).toString(16).padStart(2,"0"),r=i+r):d.has(s.id)&&(i=Math.round(255*s.opacity).toString(16).padStart(2,"0"),r=i+r),e[r]||(e[r]=[]);const o=s.id,n=s.originalSystemId,a={ifc_guid:n,originating_system:this.originatingSystem};return n!==o&&(a.authoring_tool_id=o),e[r].push(a),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));o.components.coloring=y;const g=t.objectIds,I=t.visibleObjects,v=t.visibleObjectIds,T=g.filter((e=>!I[e])),_=t.selectedObjectIds;return e.defaultInvisible||v.length0&&e.clipping_planes.forEach((function(e){let t=yi(e.location,ui),s=yi(e.direction,ui);h&&u.negateVec3(s),u.subVec3(t,l),r.yUp&&(t=Ii(t),s=Ii(s)),new Us(i,{pos:t,dir:s})})),i.clearLines(),e.lines&&e.lines.length>0){const t=[],s=[];let r=0;e.lines.forEach((e=>{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(r++),s.push(r++))})),new Ai(i,{positions:t,indices:s,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let o=yi(e.location,pi),n=yi(e.normal,di),a=yi(e.up,fi),l=e.height||1;t&&s&&o&&n&&a&&(r.yUp&&(o=Ii(o),n=Ii(n),a=Ii(a)),new ci(i,{src:s,type:t,pos:o,normal:n,up:a,clippable:!1,collidable:!0,height:l}))})),a&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const r=e.components.visibility.view_setup_hints;r&&(!1===r.spaces_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!1),!1===r.openings_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!1),r.space_boundaries_visible)}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,i=0,r=!1;8===s.length&&(i=parseInt(s.substring(0,2),16)/256,i<=1&&i>=.95&&(i=1),s=s.substring(2),r=!0);const o=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=o,r&&(e.opacity=i)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let a,h,c,A;if(e.perspective_camera?(a=yi(e.perspective_camera.camera_view_point,ui),h=yi(e.perspective_camera.camera_direction,ui),c=yi(e.perspective_camera.camera_up_vector,ui),r.perspective.fov=e.perspective_camera.field_of_view,A="perspective"):(a=yi(e.orthogonal_camera.camera_view_point,ui),h=yi(e.orthogonal_camera.camera_direction,ui),c=yi(e.orthogonal_camera.camera_up_vector,ui),r.ortho.scale=e.orthogonal_camera.view_to_world_scale,A="ortho"),u.subVec3(a,l),r.yUp&&(a=Ii(a),h=Ii(h),c=Ii(c)),o){const e=i.pick({pickSurface:!0,origin:a,direction:h});h=e?e.worldPos:u.addVec3(a,h,ui)}else h=u.addVec3(a,h,ui);n?(r.eye=a,r.look=h,r.up=c,r.projection=A):s.cameraFlight.flyTo({eye:a,look:h,up:c,duration:t.duration,projection:A})}}_withBCFComponent(e,t,s){const i=this.viewer,r=i.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const o=t.authoring_tool_id,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}}if(t.ifc_guid){const o=t.ifc_guid,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}Object.keys(r.models).forEach((t=>{const n=u.globalizeObjectId(t,o),a=r.objects[n];if(a)s(a);else if(e.updateCompositeObjects){i.metaScene.metaObjects[n]&&r.withObjects(i.metaScene.getObjectIDsInSubtree(n),s)}}))}}destroy(){super.destroy()}}function mi(e){return{x:e[0],y:e[1],z:e[2]}}function yi(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function gi(e){return new Float64Array([e[0],-e[2],e[1]])}function Ii(e){return new Float64Array([e[0],e[2],-e[1]])}u.vec3();class vi extends n{constructor(e,t={}){super("FastNav",e),this._hideColorTexture=!1!==t.hideColorTexture,this._hidePBR=!1!==t.hidePBR,this._hideSAO=!1!==t.hideSAO,this._hideEdges=!1!==t.hideEdges,this._hideTransparentObjects=!!t.hideTransparentObjects,this._scaleCanvasResolution=!!t.scaleCanvasResolution,this._scaleCanvasResolutionFactor=t.scaleCanvasResolutionFactor||.6,this._delayBeforeRestore=!1!==t.delayBeforeRestore,this._delayBeforeRestoreSeconds=t.delayBeforeRestoreSeconds||.5;let s=1e3*this._delayBeforeRestoreSeconds,i=!1;const r=()=>{s=1e3*this._delayBeforeRestoreSeconds,i||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,i=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",r),this._onCameraMatrix=e.scene.camera.on("matrix",r),this._onSceneTick=e.scene.on("tick",(t=>{i&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),i=!1))}));let o=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{o=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{o=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{o&&r()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}class Ti{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const i=_i(e,s);return i?t?Ri(i,t):i:null}translatePlurals(e,t,s){const i=this._messages[this._locale];if(!i)return null;let r=_i(e,i);return r=0===(t=parseInt(""+t,10))?r.zero:t>1?r.other:r.one,r?(r=Ri(r,[t]),s&&(r=Ri(r,s)),r):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];if(i)for(const e in i)if(i.hasOwnProperty(e)){i[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[t];i||(i={},this._eventSubs[t]=i);const r=this._eventSubIDMap.addItem();i[r]={callback:s},this._eventSubEvents[r]=t;const o=this._events[t];return void 0!==o&&s(o),r}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function _i(e,t){if(t[e])return t[e];const s=e.split(".");let i=t;for(let e=0,t=s.length;i&&e=1;e>1&&(e=1);const s=this.easing?bi._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(u.subVec3(i.eye,i.look,Oi),i.eye=u.lerpVec3(s,0,1,this._eye1,this._eye2,Ni),i.look=u.subVec3(Ni,Oi,Di)):this._flyingLook&&(i.look=u.lerpVec3(s,0,1,this._look1,this._look2,Di),i.up=u.lerpVec3(s,0,1,this._up1,this._up2,Ci)):this._flyingEyeLookUp&&(i.eye=u.lerpVec3(s,0,1,this._eye1,this._eye2,Ni),i.look=u.lerpVec3(s,0,1,this._look1,this._look2,Di),i.up=u.lerpVec3(s,0,1,this._up1,this._up2,Ci)),this._projection2){const t="ortho"===this._projection2?bi._easeOutExpo(e,0,1,1):bi._easeInCubic(e,0,1,1);i.customProjection.matrix=u.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();D.scheduleTask(this._update,this)}static _ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}static _easeInCubic(e,t,s,i){return s*(e/=i)*e*e+t}static _easeOutExpo(e,t,s,i){return s*(1-Math.pow(2,-10*e/i))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class Si extends C{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new bi(this),this._t=0,this.state=Si.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const i=performance.now(),r=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==r)switch(this.state){case Si.SCRUBBING:return;case Si.PLAYING:if(this._t+=this._playingRate*r,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=Si.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case Si.PLAYING_TO:s=this._t+this._playingRate*r*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=Si.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=Si.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=Si.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const i=s.frames[e];i?(this.state=Si.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=Si.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=Si.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=Si.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}Si.STOPPED=0,Si.SCRUBBING=1,Si.PLAYING=2,Si.PLAYING_TO=3,u.vec3(),u.vec3(),u.vec3(),u.vec3([0,-1,0]),u.vec4([0,0,0,1]);const wi=u.vec3(),xi=u.vec3(),Bi=u.mat4();class Fi{constructor(){this.normal=u.vec3(),this.offset=0,this.testVertex=u.vec3()}set(e,t,s,i){const r=1/Math.sqrt(e*e+t*t+s*s);this.normal[0]=e*r,this.normal[1]=t*r,this.normal[2]=s*r,this.offset=i*r,this.testVertex[0]=this.normal[0]>=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class Mi{constructor(){this.planes=[new Fi,new Fi,new Fi,new Fi,new Fi,new Fi]}}function Li(e,t){let s=Mi.INSIDE;const i=wi,r=xi;i[0]=t[0],i[1]=t[1],i[2]=t[2],r[0]=t[3],r[1]=t[4],r[2]=t[5];const o=[i,r];for(let t=0;t<6;++t){const i=e.planes[t];if(i.normal[0]*o[i.testVertex[0]][0]+i.normal[1]*o[i.testVertex[1]][1]+i.normal[2]*o[i.testVertex[2]][2]+i.offset<0)return Mi.OUTSIDE;i.normal[0]*o[1-i.testVertex[0]][0]+i.normal[1]*o[1-i.testVertex[1]][1]+i.normal[2]*o[1-i.testVertex[2]][2]+i.offset<0&&(s=Mi.INTERSECT)}return s}Mi.INSIDE=0,Mi.INTERSECT=1,Mi.OUTSIDE=2;const Ui=u.vec3();class Hi{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?m.apply(s,{}):null;const i=!s||s.visible,r=!s||s.edges,o=!s||s.xrayed,n=!s||s.highlighted,a=!s||s.selected,l=!s||s.clippable,h=!s||s.pickable,c=!s||s.colorize,A=!s||s.opacity,u=t.metaObjects,p=e.objects;for(let e=0,t=u.length;e0){const n=t._sectionPlanesState.sectionPlanes,a=r*o,l=i.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.sectionPlanes.length;t0&&d.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,d.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),d.lightMaps.length>0&&d.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,d.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),this._withSAO){const t=n.sao;if(t.possible){const s=a.drawingBufferWidth,i=a.drawingBufferHeight;zi[0]=s,zi[1]=i,zi[2]=t.blendCutoff,zi[3]=t.blendFactor,a.uniform4fv(this._uSAOParams,zi),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++}}if(i){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===ji[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=n.xrayMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===ji[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=n.highlightMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===ji[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=n.selectedMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else a.uniform4fv(this._uColor,this._edges?Wi:Qi)}this._draw({state:l,frameCtx:e,incrementDrawState:r}),a.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,p.memory.programs--}}class qi extends Zi{constructor(e,t,{instancing:s=!1,edges:i=!1}={}){super(e,t,{instancing:s,edges:i})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=i.pickElementsCount||s.indicesBuf.numItems,o=i.pickElementsOffset?i.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,o),r&&i.drawElements++}}}class Ji extends qi{constructor(e,t){super(e,t,{instancing:!1,edges:!0})}}class $i extends Zi{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++)}}class er extends $i{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class tr extends Zi{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),r&&i.drawArrays++}}class sr extends Zi{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArraysInstanced(t.POINTS,0,s.positionsBuf.numItems,s.numInstances),r&&i.drawArrays++}}class ir extends Zi{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),r&&i.drawElements++}}class rr extends Zi{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElementsInstanced(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++}}class or extends qi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r;const o=[];o.push("#version 300 es"),o.push("// Triangles batching draw vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class nr extends qi{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching flat-shading draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching silhouette fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = vColor;"),o.push("}"),o}}class lr extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class hr extends Ji{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class cr extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class Ar extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class ur extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(` outNormal = ivec4(vWorldNormal * float(${u.MAX_INT}), 1.0);`),i.push("}"),i}}class pr extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class dr extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching depth fragment shader"),i.push("precision highp float;"),i.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}}class fr extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Er extends qi{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class mr extends qi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Triangles batching quality draw vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),o.push("vFragDepth = 1.0 + clipPos.w;")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Triangles batching quality draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),n.push("uniform sampler2D uAOMap;"),n.push("in vec4 vViewPosition;"),n.push("in vec3 vViewNormal;"),n.push("in vec4 vColor;"),n.push("in vec2 vUV;"),n.push("in vec2 vMetallicRoughness;"),i.lightMaps.length>0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick flat normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${u.MAX_INT}), 1.0);`),i.push("}"),i}}class gr extends qi{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,i=e._sectionPlanesState,r=i.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching color texture fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),r){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=i.sectionPlanes.length;e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=i.sectionPlanes.length;e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const _r=u.mat4(),Rr=u.mat4();function Pr(e,t,s){const i=e.length,r=new Uint16Array(i),o=t[0],n=t[1],a=t[2],l=t[3]-o,h=t[4]-n,c=t[5]-a,A=65525,p=A/l,d=A/h,f=A/c,E=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1),i=e,r=t}return new Int8Array([Math[t](127.5*i+(i<0?-1:0)),Math[s](127.5*r+(r<0?-1:0))])}function Cr(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}const Or=u.vec3(),br=u.vec3(),Sr=u.vec3(),wr=u.vec3(),xr=u.mat4();class Br extends Zi{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=Or;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=br;if(l){const e=Sr;u.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=b(d,t,xr),m=wr,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.indicesBuf.bind(),n.drawElements(n.TRIANGLES,a.indicesBuf.numItems,a.indicesBuf.itemType,0),a.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Fr=u.vec3(),Mr=u.vec3(),Lr=u.vec3(),Ur=u.vec3(),Hr=u.mat4();class Gr extends Zi{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=Fr;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=Mr;if(l){const e=Lr;u.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=b(d,t,Hr),m=Ur,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(a.edgeIndicesBuf.bind(),n.drawElements(n.LINES,a.edgeIndicesBuf.numItems,a.edgeIndicesBuf.itemType,0),a.edgeIndicesBuf.unbind()):n.drawArrays(n.POINTS,0,a.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class kr{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}eagerCreateRenders(){this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Br(this._scene,!1)),this._snapDepthRenderer||(this._snapDepthRenderer=new Gr(this._scene))}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Br(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new Gr(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const Vr={};const jr=u.mat4(),Qr=u.mat4(),Wr=u.vec4([0,0,0,1]),zr=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();const Kr=u.vec3(),Yr=u.vec3(),Xr=u.vec3(),Zr=u.vec3(),qr=u.vec3(),Jr=u.vec3(),$r=u.vec3();class eo{constructor(e){console.info("Creating TrianglesBatchingLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=vr[t];return s||(s=new Ir(e),vr[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete vr[t],s._destroy()}))),s}(e.model.scene),this._snapBatchingRenderers=function(e){const t=e.id;let s=Vr[t];return s||(s=new kr(e),Vr[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Vr[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Tr(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({origin:u.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=u.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=u.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.aabb=u.collapseAABB3(),this.solid=!!e.solid}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)for(let e=0,t=r.length;e0){const e=jr;E?u.inverseMat4(u.transposeMat4(E,Qr),e):u.identityMat4(e,e),function(e,t,s,i,r){function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let n,a,l,h,c,A,p=new Float32Array([0,0,0,0]),d=new Float32Array([0,0,0,0]);for(A=0;Ac&&(l=n,c=h),n=Nr(d,"floor","ceil"),a=Cr(n),h=o(d,a),h>c&&(l=n,c=h),n=Nr(d,"ceil","ceil"),a=Cr(n),h=o(d,a),h>c&&(l=n,c=h),i[r+A+0]=l[0],i[r+A+1]=l[1],i[r+A+2]=0}(e,i,i.length,I.normals,I.normals.length)}if(a)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0)for(let e=0,t=n.length;e0){const i=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):Pr(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=u.mat4());if(e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const i=new Int8Array(s.normals);let r=!0;e.normalsBuf=new ae(t,t.ARRAY_BUFFER,i,s.normals.length,3,t.STATIC_DRAW,r)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.uv.length>0)if(e.uvDecodeMatrix){let i=!1;e.uvBuf=new ae(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,i)}else{const i=nt.getUVBounds(s.uv),r=nt.compressUVs(s.uv,i.min,i.max),o=r.quantized;let n=!1;e.uvDecodeMatrix=u.mat3(r.decodeMatrix),e.uvBuf=new ae(t,t.ARRAY_BUFFER,o,o.length,2,t.STATIC_DRAW,n)}if(s.metallicRoughness.length>0){const i=new Uint8Array(s.metallicRoughness);let r=!1;e.metallicRoughnessBuf=new ae(t,t.ARRAY_BUFFER,i,s.metallicRoughness.length,2,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i),o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const i=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,i=this._portions[s],r=4*i.vertsBaseIndex,o=4*i.numVerts,n=this._scratchMemory.getUInt8Array(o),a=t[0],l=t[1],h=t[2],c=t[3];for(let e=0;ey)&&(y=e,i.set(g),r&&u.triangleNormal(d,f,E,r),m=!0)}}return m&&r&&(u.transformVec3(this.model.worldNormalMatrix,r,r),u.normalizeVec3(r)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class to extends $i{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r,o,n;const a=[];for(a.push("#version 300 es"),a.push("// Instancing geometry drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec2 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;"),r=0,o=s.lights.length;r= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),a.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),r=0,o=s.lights.length;r0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class so extends $i{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let i,r;const o=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),o){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}for(n.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),n.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),n.push("float lambertian = 1.0;"),n.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),n.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),n.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=s.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing fill fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class ro extends er{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class oo extends er{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class no extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class ao extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class lo extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(` outNormal = ivec4(vWorldNormal * float(${u.MAX_INT}), 1.0);`),i.push("}"),i}}class ho extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class co extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry depth drawing fragment shader"),o.push("precision highp float;"),o.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),o.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),o.push("}"),o}}class Ao extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class uo extends $i{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}const po={3e3:"linearToLinear",3001:"sRGBToLinear"};class fo extends $i{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Instancing geometry quality drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push(" worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),o.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("vFragDepth = 1.0 + clipPos.w;"),o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Instancing geometry quality drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),n.push("#define PI 3.14159265359"),n.push("#define RECIPROCAL_PI 0.31830988618"),n.push("#define RECIPROCAL_PI2 0.15915494"),n.push("#define EPSILON 1e-6"),n.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),n.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),n.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),n.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),n.push(" return normalize(surf_norm );"),n.push(" }"),n.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),n.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),n.push(" vec2 st0 = dFdx( uv.st );"),n.push(" vec2 st1 = dFdy( uv.st );"),n.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),n.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),n.push(" vec3 N = normalize( surf_norm );"),n.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),n.push(" mat3 tsn = mat3( S, T, N );"),n.push(" return normalize( tsn * mapN );"),n.push("}"),n.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),n.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),n.push("}"),n.push("struct IncidentLight {"),n.push(" vec3 color;"),n.push(" vec3 direction;"),n.push("};"),n.push("struct ReflectedLight {"),n.push(" vec3 diffuse;"),n.push(" vec3 specular;"),n.push("};"),n.push("struct Geometry {"),n.push(" vec3 position;"),n.push(" vec3 viewNormal;"),n.push(" vec3 worldNormal;"),n.push(" vec3 viewEyeDir;"),n.push("};"),n.push("struct Material {"),n.push(" vec3 diffuseColor;"),n.push(" float specularRoughness;"),n.push(" vec3 specularColor;"),n.push(" float shine;"),n.push("};"),n.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),n.push(" float r = ggxRoughness + 0.0001;"),n.push(" return (2.0 / (r * r) - 2.0);"),n.push("}"),n.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),n.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),n.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),n.push("}"),i.reflectionMaps.length>0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = "+po[i.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = "+po[i.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${u.MAX_INT}), 1.0);`),i.push("}"),i}}class mo extends $i{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState;let r,o;const n=s.sectionPlanes.length>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),n){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),r=0,o=i.lights.length;r0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Do=u.vec3(),No=u.vec3(),Co=u.vec3(),Oo=u.vec3(),bo=u.mat4();class So extends Zi{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=Do;let E,m;if(f[0]=u.safeInv(p[3]-p[0])*u.MAX_INT,f[1]=u.safeInv(p[4]-p[1])*u.MAX_INT,f[2]=u.safeInv(p[5]-p[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(f[0]),e.snapPickCoordinateScale[1]=u.safeInv(f[1]),e.snapPickCoordinateScale[2]=u.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=No;if(l){const e=u.transformPoint3(c,l,Co);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=b(d,t,bo),m=Oo,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(a.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(a.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(a.modelMatrixCol2Buf),n.vertexAttribDivisor(this._aModelMatrixCol0.location,1),n.vertexAttribDivisor(this._aModelMatrixCol1.location,1),n.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(a.flagsBuf),n.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(a.edgeIndicesBuf.bind(),n.drawElementsInstanced(n.LINES,a.edgeIndicesBuf.numItems,a.edgeIndicesBuf.itemType,0,a.numInstances),a.edgeIndicesBuf.unbind()):n.drawArraysInstanced(n.POINTS,0,a.positionsBuf.numItems,a.numInstances),n.vertexAttribDivisor(this._aModelMatrixCol0.location,0),n.vertexAttribDivisor(this._aModelMatrixCol1.location,0),n.vertexAttribDivisor(this._aModelMatrixCol2.location,0),n.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&n.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class wo{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}eagerCreateRenders(){this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Po(this._scene,!1)),this._snapDepthRenderer||(this._snapDepthRenderer=new So(this._scene))}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Po(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new So(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const xo={};const Bo=new Uint8Array(4),Fo=new Float32Array(1),Mo=u.vec4([0,0,0,1]),Lo=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const Uo=new Float32Array(3),Ho=u.vec3(),Go=u.vec3(),ko=u.vec3(),Vo=u.vec3(),jo=u.vec3(),Qo=u.vec3(),Wo=u.vec3();class zo{constructor(e){console.info("Creating TrianglesInstancingLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._instancingRenderers=function(e){const t=e.id;let s=go[t];return s||(s=new yo(e),go[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete go[t],s._destroy()}))),s}(e.model.scene),this._snapInstancingRenderers=function(e){const t=e.id;let s=xo[t];return s||(s=new wo(e),xo[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete xo[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({numInstances:0,obb:u.OBB3(),origin:u.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.aabb=u.collapseAABB3(),this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}createPortion(e){const t=e.color,s=e.metallic,i=e.roughness,r=null!==e.opacity&&void 0!==e.opacity?e.opacity:255,o=e.meshMatrix,n=e.aabb,a=e.pickColor;if(this._finalized)throw"Already finalized";const l=t[0],h=t[1],c=t[2];if(this._colors.push(l),this._colors.push(h),this._colors.push(c),this._colors.push(r),this._metallicRoughness.push(null!=s?s:0),this._metallicRoughness.push(null!=i?i:255),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(o[0]),this._modelMatrixCol0.push(o[4]),this._modelMatrixCol0.push(o[8]),this._modelMatrixCol0.push(o[12]),this._modelMatrixCol1.push(o[1]),this._modelMatrixCol1.push(o[5]),this._modelMatrixCol1.push(o[9]),this._modelMatrixCol1.push(o[13]),this._modelMatrixCol2.push(o[2]),this._modelMatrixCol2.push(o[6]),this._modelMatrixCol2.push(o[10]),this._modelMatrixCol2.push(o[14]),this._state.geometry.normals){let e=u.transposeMat4(o,u.mat4()),t=u.inverseMat4(e);this._modelNormalMatrixCol0.push(t[0]),this._modelNormalMatrixCol0.push(t[4]),this._modelNormalMatrixCol0.push(t[8]),this._modelNormalMatrixCol0.push(t[12]),this._modelNormalMatrixCol1.push(t[1]),this._modelNormalMatrixCol1.push(t[5]),this._modelNormalMatrixCol1.push(t[9]),this._modelNormalMatrixCol1.push(t[13]),this._modelNormalMatrixCol2.push(t[2]),this._modelNormalMatrixCol2.push(t[6]),this._modelNormalMatrixCol2.push(t[10]),this._modelNormalMatrixCol2.push(t[14])}this._pickColors.push(a[0]),this._pickColors.push(a[1]),this._pickColors.push(a[2]),this._pickColors.push(a[3]);const A=this._state.geometry.positionsCompressed.length,p=this._state.geometry.positionsCompressed,d=this._state.geometry.positionsDecodeMatrix;for(let e=0;e0){let t=!1;e.colorsBuf=new ae(i,i.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,i.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new ae(i,i.ARRAY_BUFFER,t,this._metallicRoughness.length,2,i.STATIC_DRAW,s)}if(o>0){let t=!1;e.flagsBuf=new ae(i,i.ARRAY_BUFFER,new Float32Array(o),o,1,i.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,i.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new ae(i,i.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,i.STATIC_DRAW,s),e.positionsDecodeMatrix=u.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),r=!1;e.colorsBuf=new ae(i,i.ARRAY_BUFFER,s,s.length,4,i.STATIC_DRAW,r)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new ae(i,i.ARRAY_BUFFER,s,s.length,2,i.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,i.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new ae(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,i.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelMatrixCol1Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelMatrixCol2Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new ae(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new ae(i,i.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,i.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Bo[0]=t[0],Bo[1]=t[1],Bo[2]=t[2],Bo[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Bo,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ji.NOT_RENDERED:s?ji.COLOR_TRANSPARENT:ji.COLOR_OPAQUE,A=!i||h?ji.NOT_RENDERED:n?ji.SILHOUETTE_SELECTED:o?ji.SILHOUETTE_HIGHLIGHTED:r?ji.SILHOUETTE_XRAYED:ji.NOT_RENDERED;let u=0;u=!i||h?ji.NOT_RENDERED:n?ji.EDGES_SELECTED:o?ji.EDGES_HIGHLIGHTED:r?ji.EDGES_XRAYED:a?s?ji.EDGES_COLOR_TRANSPARENT:ji.EDGES_COLOR_OPAQUE:ji.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ji.PICK:ji.NOT_RENDERED)<<12,p|=(t&L?1:0)<<16,Fo[0]=p,this._state.flagsBuf&&this._state.flagsBuf.setData(Fo,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Uo[0]=t[0],Uo[1]=t[1],Uo[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(Uo,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,i=s.geometry,r=this._portions[e];if(!r)return void this.model.error("portion not found: "+e);const o=i.quantizedPositions,n=s.origin,a=r.offset,l=n[0]+a[0],h=n[1]+a[1],c=n[2]+a[2],A=Mo,p=r.matrix,d=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=o.length;eg)&&(g=e,i.set(I),r&&u.triangleNormal(f,E,m,r),y=!0)}}return y&&r&&(u.transformVec3(a.normalMatrix,r,r),u.transformVec3(this.model.worldNormalMatrix,r,r),u.normalizeVec3(r)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class Ko extends ir{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class Yo extends ir{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class Xo{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ko(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Yo(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const Zo={};class qo{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}const Jo=u.vec4([0,0,0,1]),$o=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();class en{constructor(e){this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=Zo[t];return s||(s=new Xo(e),Zo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Zo[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new qo(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:u.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=u.vec3(e.origin)),this.aabb=u.collapseAABB3()}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=Pr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.colors.length>0){const i=s.colors.length/4,r=new Float32Array(i);let o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new ae(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2],h=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Lines instancing color fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return this._withSAO?(o.push(" float viewportWidth = uSAOParams[0];"),o.push(" float viewportHeight = uSAOParams[1];"),o.push(" float blendCutoff = uSAOParams[2];"),o.push(" float blendFactor = uSAOParams[3];"),o.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),o.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),o.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):o.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class sn extends rr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class rn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new tn(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new sn(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const on={};const nn=new Uint8Array(4),an=new Float32Array(1),ln=u.vec4([0,0,0,1]),hn=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const cn=new Float32Array(3);class An{constructor(e){this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._linesInstancingRenderers=function(e){const t=e.id;let s=on[t];return s||(s=new rn(e),on[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete on[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({obb:u.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],e.origin&&(this._state.origin=u.vec3(e.origin)),this._finalized=!1,this.aabb=u.collapseAABB3()}createPortion(e){const t=e.color,s=e.opacity,i=e.meshMatrix,r=e.aabb;if(this._finalized)throw"Already finalized";const o=t[0],n=t[1],a=t[2];t[3],this._colors.push(o),this._colors.push(n),this._colors.push(a),this._colors.push(s),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(i[0]),this._modelMatrixCol0.push(i[4]),this._modelMatrixCol0.push(i[8]),this._modelMatrixCol0.push(i[12]),this._modelMatrixCol1.push(i[1]),this._modelMatrixCol1.push(i[5]),this._modelMatrixCol1.push(i[9]),this._modelMatrixCol1.push(i[13]),this._modelMatrixCol2.push(i[2]),this._modelMatrixCol2.push(i[6]),this._modelMatrixCol2.push(i[10]),this._modelMatrixCol2.push(i[14]),u.collapseAABB3(r);const l=this._state.obb,h=l.length;for(let e=0;e0){let t=!1;this._state.colorsBuf=new ae(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(s>0){let t=!1;this._state.flagsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(s),s,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";nn[0]=t[0],nn[1]=t[1],nn[2]=t[2],nn[3]=t[3],this._state.colorsBuf.setData(nn,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ji.NOT_RENDERED:s?ji.COLOR_TRANSPARENT:ji.COLOR_OPAQUE,A=!i||h?ji.NOT_RENDERED:n?ji.SILHOUETTE_SELECTED:o?ji.SILHOUETTE_HIGHLIGHTED:r?ji.SILHOUETTE_XRAYED:ji.NOT_RENDERED;let u=0;u=!i||h?ji.NOT_RENDERED:n?ji.EDGES_SELECTED:o?ji.EDGES_HIGHLIGHTED:r?ji.EDGES_XRAYED:a?s?ji.EDGES_COLOR_TRANSPARENT:ji.EDGES_COLOR_OPAQUE:ji.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ji.PICK:ji.NOT_RENDERED)<<12,p|=(t&L?255:0)<<16,an[0]=p,this._state.flagsBuf.setData(an,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(cn[0]=t[0],cn[1]=t[1],cn[2]=t[2],this._state.offsetsBuf.setData(cn,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class un extends tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial,i=[];return i.push("#version 300 es"),i.push("// Points batching color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class pn extends tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform vec4 color;"),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points batching silhouette vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = color;"),o.push("}"),o}}class dn extends tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class fn extends tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batched pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batched pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class En extends tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push(" gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),i.push("}"),i}}class mn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new un(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new pn(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new dn(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new fn(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new En(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const yn={};class gn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}const In=u.vec4(),vn=u.vec4(),Tn=u.vec4([0,0,0,1]),_n=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]),u.OBB3();class Rn{constructor(e){this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._pointsBatchingRenderers=function(e){const t=e.id;let s=yn[t];return s||(s=new mn(e),yn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete yn[t],s._destroy()}))),s}(e.model.scene),this._buffer=new gn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ne({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:u.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=u.collapseAABB3(),this._portions=[],this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=u.vec3(e.origin)),this.aabb=u.collapseAABB3()}canCreatePortion(e){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts}createPortion(e){if(this._finalized)throw"Already finalized";const t=e.positions,s=e.positionsCompressed,i=e.color,r=e.colorsCompressed,o=e.colors,n=e.meshMatrix,a=e.worldAABB,l=e.pickColor,h=this._buffer,c=h.positions.length/3;let A;if(this._preCompressedPositionsExpected){if(!s)throw"positionsCompressed expected";for(let e=0,t=s.length;e0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=Pr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new ae(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i);let o=!1;e.flagsBuf=new ae(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new ae(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new ae(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class Dn extends sr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 color;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),i.push("uniform vec4 silhouetteColor;"),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class Nn extends sr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),i.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick mesh fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class Cn extends sr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push(" vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),i.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class On extends sr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 color;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class bn extends sr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points instancing depth vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return o.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class Sn extends sr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }"),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class wn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Pn(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Dn(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new bn(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Nn(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Cn(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new On(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Sn(this._scene)),this._shadowRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy()}}const xn={};const Bn=new Uint8Array(4),Fn=new Float32Array(1),Mn=u.vec4([0,0,0,1]),Ln=u.vec4([0,0,0,1]);u.vec4([0,0,0,1]);const Un=new Float32Array(3);class Hn{constructor(e){this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._pointsInstancingRenderers=function(e){const t=e.id;let s=xn[t];return s||(s=new wn(e),xn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete xn[t],s._destroy()}))),s}(e.model.scene),this._aabb=u.collapseAABB3(),this._state=new Ne({obb:u.OBB3(),numInstances:0,origin:e.origin?u.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._finalized=!1,this.aabb=u.collapseAABB3()}createPortion(e){const t=e.meshMatrix,s=e.aabb,i=e.pickColor;if(this._finalized)throw"Already finalized";this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(t[0]),this._modelMatrixCol0.push(t[4]),this._modelMatrixCol0.push(t[8]),this._modelMatrixCol0.push(t[12]),this._modelMatrixCol1.push(t[1]),this._modelMatrixCol1.push(t[5]),this._modelMatrixCol1.push(t[9]),this._modelMatrixCol1.push(t[13]),this._modelMatrixCol2.push(t[2]),this._modelMatrixCol2.push(t[6]),this._modelMatrixCol2.push(t[10]),this._modelMatrixCol2.push(t[14]),this._pickColors.push(i[0]),this._pickColors.push(i[1]),this._pickColors.push(i[2]),this._pickColors.push(i[3]),u.collapseAABB3(s);const r=this._state.obb,o=r.length;for(let e=0;e0){let i=!1;s.flagsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(i.positionsCompressed&&i.positionsCompressed.length>0){const t=!1;s.positionsBuf=new ae(e,e.ARRAY_BUFFER,i.positionsCompressed,i.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=u.mat4(i.positionsDecodeMatrix)}if(i.colorsCompressed&&i.colorsCompressed.length>0){const t=new Uint8Array(i.colorsCompressed),r=!1;s.colorsBuf=new ae(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,r)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new ae(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new ae(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Bn[0]=t[0],Bn[1]=t[1],Bn[2]=t[2],this._state.colorsBuf.setData(Bn,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&B),r=!!(t&H),o=!!(t&G),n=!!(t&k),a=!!(t&V),l=!!(t&M),h=!!(t&F);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?ji.NOT_RENDERED:s?ji.COLOR_TRANSPARENT:ji.COLOR_OPAQUE,A=!i||h?ji.NOT_RENDERED:n?ji.SILHOUETTE_SELECTED:o?ji.SILHOUETTE_HIGHLIGHTED:r?ji.SILHOUETTE_XRAYED:ji.NOT_RENDERED;let u=0;u=!i||h?ji.NOT_RENDERED:n?ji.EDGES_SELECTED:o?ji.EDGES_HIGHLIGHTED:r?ji.EDGES_XRAYED:a?s?ji.EDGES_COLOR_TRANSPARENT:ji.EDGES_COLOR_OPAQUE:ji.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?ji.PICK:ji.NOT_RENDERED)<<12,p|=(t&L?255:0)<<16,Fn[0]=p,this._state.flagsBuf.setData(Fn,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Un[0]=t[0],Un[1]=t[1],Un[2]=t[2],this._state.offsetsBuf.setData(Un,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.occlusionRenderer&&this._pointsInstancingRenderers.occlusionRenderer.drawLayer(t,this,ji.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickMeshRenderer&&this._pointsInstancingRenderers.pickMeshRenderer.drawLayer(t,this,ji.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickDepthRenderer&&this._pointsInstancingRenderers.pickDepthRenderer.drawLayer(t,this,ji.PICK)}drawPickNormals(e,t){}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}class Gn{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class kn{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const Vn={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};const jn=new class{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==Qn[e])return void Qn[e].push({onLoad:t,onProgress:s,onError:i});Qn[e]=[],Qn[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),n=this.mimeType,a=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=Qn[e],i=t.body.getReader(),r=t.headers.get("Content-Length"),o=r?parseInt(r):0,n=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then((({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:n,loaded:a,total:o});for(let e=0,t=s.length;e{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,n)));case"json":return e.json();default:if(void 0===n)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(n),s=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(s);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{Vn.add(e,t);const s=Qn[e];delete Qn[e];for(let e=0,i=s.length;e{const s=Qn[e];if(void 0===s)throw this.manager.itemError(e),t;delete Qn[e];for(let e=0,i=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class zn{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Kn=0;class Yn{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new zn,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const i=e.capabilities;this._workerConfig={astcSupported:i.astcSupported,etc1Supported:i.etc1Supported,etc2Supported:i.etc2Supported,dxtSupported:i.dxtSupported,bptcSupported:i.bptcSupported,pvrtcSupported:i.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new Wn;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new Wn;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const i=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,i]).then((([e,t])=>{const s=Yn.BasisWorker.toString(),i=["/* constants */","let _EngineFormat = "+JSON.stringify(Yn.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Yn.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Yn.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([i])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),Kn>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Kn++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((i,r)=>{const o=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:o},e))).then((e=>{const s=e.data,{mipmaps:o,width:n,height:a,format:l,type:h,error:c,dfdTransferFn:A,dfdFlags:u}=s;if("error"===h)return r(c);t.setCompressedData({mipmaps:o,props:{format:l,minFilter:1===o.length?1006:1008,magFilter:1===o.length?1006:1008,encoding:2===A?3001:3e3,premultiplyAlpha:!!(1&u)}}),i()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Kn--}}Yn.BasisFormat={ETC1S:0,UASTC_4x4:1},Yn.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Yn.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Yn.BasisWorker=function(){let e,t,s;const i=_EngineFormat,r=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",(function(n){const c=n.data;switch(c.type){case"init":e=c.config,A=c.transcoderBinary,t=new Promise((e=>{s={wasmBinary:A,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:n,hasAlpha:A,mipmaps:u,format:p,dfdTransferFn:d,dfdFlags:f}=function(t){const n=new s.KTX2File(new Uint8Array(t));function c(){n.close(),n.delete()}if(!n.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const A=n.isUASTC()?o.UASTC_4x4:o.ETC1S,u=n.getWidth(),p=n.getHeight(),d=n.getLevels(),f=n.getHasAlpha(),E=n.getDFDTransferFunc(),m=n.getDFDFlags(),{transcoderFormat:y,engineFormat:g}=function(t,s,n,c){let A,u;const p=t===o.ETC1S?a:l;for(let i=0;i{for(let s=0,i=e.meshI * step, but is much more GC-friendly and actually faster than the classic O(N) * approach based in keeping a hash-based LUT to identify unique positionsCompressed. */ -let Jn=null;function $n(e,t){let s;for(let i=0;i<3;i++)if(0!=(s=Jn[3*e+i]-Jn[3*t+i]))return s;return 0}let ea=null;function ta(e){const t=e.positionsCompressed,s=e.indices,i=e.edgeIndices;!function(e){if(!(null!==ea&&ea.length>=e)){ea=new Uint32Array(e);for(let t=0;t=e)){Jn=new Uint32Array(e);for(let t=0;t>t;s.sort(ia);const i=new Int32Array(e.length);for(let t=0,r=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}ra=new Int32Array(e),t.sort(oa);const s=new Int32Array(e.length);for(let i=0,r=t.length;it){let s=e;e=t,t=s}function s(s,i){return s!==e?e-s:i!==t?t-i:0}let i=0,r=(o.length>>1)-1;for(;i<=r;){const e=r+i>>1,t=s(o[2*e],o[2*e+1]);if(t>0)i=e+1;else{if(!(t<0))return e;r=e-1}}return-i-1}const a=new Int32Array(o.length/2);a.fill(0);const l=i.length/3;if(l>8*(1<u.maxNumPositions&&(u=A()),u.bucketNumber>8)return[e];let d;-1===h[l]&&(h[l]=u.numPositions++,u.positionsCompressed.push(i[3*l]),u.positionsCompressed.push(i[3*l+1]),u.positionsCompressed.push(i[3*l+2])),-1===h[c]&&(h[c]=u.numPositions++,u.positionsCompressed.push(i[3*c]),u.positionsCompressed.push(i[3*c+1]),u.positionsCompressed.push(i[3*c+2])),-1===h[p]&&(h[p]=u.numPositions++,u.positionsCompressed.push(i[3*p]),u.positionsCompressed.push(i[3*p+1]),u.positionsCompressed.push(i[3*p+2])),u.indices.push(h[l]),u.indices.push(h[c]),u.indices.push(h[p]),(d=n(l,c))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(l,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(c,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]]))}const p=t/8*2,d=t/8,f=2*i.length+(r.length+o.length)*p;let E=0,m=-i.length/3;return c.forEach((e=>{E+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*d,m+=e.positionsCompressed.length/3})),E>f?[e]:(s&&function(e,t){const s={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,o=e.positionsCompressed;for(let e=0,i=t.length;e0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uRenderPass=i.getLocation("renderPass"),this._uLightAmbient=i.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const r=s.lights;let o;for(let e=0,t=r.length;e0;let r;const o=[];o.push("#version 300 es"),o.push("// TrianglesDataTextureColorRenderer vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("uniform mat4 sceneModelWorldMatrix;"),o.push("uniform mat4 viewMatrix;"),o.push("uniform mat4 projMatrix;"),o.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),o.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),o.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),o.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),o.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),o.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),o.push("uniform highp sampler2D uTextureModelMatrices;"),o.push("uniform vec3 uCameraEyeRtc;"),o.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("out float isPerspective;")),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),o.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),o.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),o.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),o.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),o.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),o.push("if (int(flags.x) != renderPass) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("} else {"),o.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),o.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),o.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),o.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),o.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),o.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),o.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),o.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),o.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),o.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),o.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),o.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),o.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),o.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),o.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),o.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),o.push("if (color.a == 0u) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("};"),o.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),o.push("vec3 position;"),o.push("position = positions[gl_VertexID % 3];"),o.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),o.push("if (solid != 1u) {"),o.push("if (isPerspectiveMatrix(projMatrix)) {"),o.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),o.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("} else {"),o.push("if (viewNormal.z < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("}"),o.push("}"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),o.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),o.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureColorRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const da=new Float32Array([1,1,1]),fa=u.vec3(),Ea=u.vec3(),ma=u.vec3(),ya=u.vec3(),ga=u.mat4();class Ia{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=o,d=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=fa;if(h){const t=Ea;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=O(d,e,ga),E=ma,E[0]=r.eye[0]-e[0],E[1]=r.eye[1]-e[1],E[2]=r.eye[2]-e[2]}else f=d,E=r.eye;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===ki.SILHOUETTE_XRAYED){const e=i.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ki.SILHOUETTE_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ki.SILHOUETTE_SELECTED){const e=i.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,da);if(i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = color;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const va=new Float32Array([0,0,0,1]),Ta=u.vec3(),_a=u.vec3();u.vec3();const Ra=u.vec3(),Pa=u.mat4();class Da{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Ta;if(E){const t=_a;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=O(d,e,Pa)}else f=d;if(n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s===ki.EDGES_XRAYED){const e=r.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ki.EDGES_HIGHLIGHTED){const e=r.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ki.EDGES_SELECTED){const e=r.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,va);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Na=u.vec3(),ba=u.vec3(),Ca=u.vec3(),Oa=u.mat4();class Sa{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Na;if(E){const t=ba;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=O(d,e,Oa)}else f=d;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureEdgesColorRenderer"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const xa=u.vec3(),wa=u.vec3(),Ba=u.vec3(),Fa=u.mat4();class Ma{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i;let d,f;l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=xa;if(E){const t=u.transformPoint3(A,h,wa);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=O(o.viewMatrix,e,Fa),f=Ba,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=o.viewMatrix,f=o.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outPickColor = vPickColor; "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const La=u.vec3(),Ua=u.vec3(),Ha=u.vec3(),Ga=u.vec3(),ka=u.mat4();class Va{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=e.pickViewMatrix||o.viewMatrix;let f,E;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const t=La;if(h){const e=Ua;u.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],f=O(d,t,ka),E=Ha,E[0]=o.eye[0]-t[0],E[1]=o.eye[1]-t[1],E[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=d,E=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform1f(this._uPickZNear,e.pickZNear),n.uniform1f(this._uPickZFar,e.pickZFar),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),r.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outPackedDepth = packDepth(zNormalizedDepth); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ja=u.vec3(),Qa=u.vec3(),Wa=u.vec3(),za=u.vec3(),Ka=u.vec3(),Ya=u.mat4();class Xa{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=ja;let m,y;E[0]=u.safeInv(d[3]-d[0])*u.MAX_INT,E[1]=u.safeInv(d[4]-d[1])*u.MAX_INT,E[2]=u.safeInv(d[5]-d[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(E[0]),e.snapPickCoordinateScale[1]=u.safeInv(E[1]),e.snapPickCoordinateScale[2]=u.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=Qa;if(g){const e=u.transformPoint3(A,h,Wa);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=O(f,t,Ya),y=za,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(T,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(T,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(T,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Za=u.vec3(),qa=u.vec3(),Ja=u.vec3(),$a=u.vec3(),el=u.vec3(),tl=u.mat4();class sl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=Za;let m,y;E[0]=u.safeInv(d[3]-d[0])*u.MAX_INT,E[1]=u.safeInv(d[4]-d[1])*u.MAX_INT,E[2]=u.safeInv(d[5]-d[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(E[0]),e.snapPickCoordinateScale[1]=u.safeInv(E[1]),e.snapPickCoordinateScale[2]=u.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=qa;if(g){const e=Ja;u.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=O(f,t,tl),y=$a,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this._uVectorA,e.snapVectorA),n.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const il=u.vec3();class rl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin;this._program||this._allocate(t),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureCameraMatrices,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);let c=o.eye;e.pickViewMatrix&&(l.bindPickCameraTexture(this._program,this._uTextureCameraMatrices),c=e.pickOrigin||c);const A=[c[0]-h[0],c[1]-h[1],c[2]-h[2]];if(n.uniform3fv(this._uCameraEyeRtc,A),n.uniform1i(this._uRenderPass,s),n.uniform3fv(this._uCameraEyeRtc,A),n.uniform1i(this._uPickInvisible,e.pickInvisible),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const u=r._sectionPlanesState.sectionPlanes.length;if(u>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*u,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick normals vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureCameraMatrices;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("mat4 viewMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 0), 0));"),s.push("mat4 projMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 2), 0));"),s.push("mat4 worldMatrix = mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("normal = -normal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("normal = -normal;"),s.push("}"),s.push("}"),s.push("}"),s.push("normal = -normal;"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldNormal = normal.xyz;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.w;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outNormal = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ol=u.vec3(),nl=u.vec3(),al=u.vec3(),ll=u.vec3(),hl=u.mat4();class cl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=e.pickViewMatrix||o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=ol;if(h){const t=nl;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=O(d,e,hl),E=al,E[0]=o.eye[0]-e[0],E[1]=o.eye[1]-e[1],E[2]=o.eye[2]-e[2]}else f=d,E=o.eye;n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Al=u.vec3(),ul=u.vec3(),pl=u.vec3(),dl=u.vec3(),fl=u.mat4();class El{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Al;if(E){const t=u.transformPoint3(A,h,ul);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=O(r.viewMatrix,e,fl),f=pl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// Triangles dataTexture draw vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out highp vec2 vHighPrecisionZW;"),s&&(i.push("out vec4 vWorldPosition;"),i.push("flat out uint vFlags2;")),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.x) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags2 = flags2.r;")),i.push("gl_Position = clipPos;"),i.push("vHighPrecisionZW = gl_Position.zw;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in highp vec2 vHighPrecisionZW;"),i.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ml=u.vec3(),yl=u.vec3(),gl=u.vec3(),Il=u.vec3(),vl=u.mat4();class Tl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const E=0!==l[0]||0!==l[1]||0!==l[2],m=0!==h[0]||0!==h[1]||0!==h[2];if(E||m){const e=ml;if(E){const t=yl;u.transformPoint3(c,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=h[0],e[1]+=h[1],e[2]+=h[2],d=O(p,e,vl),f=gl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=p,f=o.eye;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniformMatrix4fv(this._uViewNormalMatrix,!1,o.viewNormalMatrix),n.uniformMatrix4fv(this._uWorldNormalMatrix,!1,i.worldNormalMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&Y.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),Y.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(Y.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&Y.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&Y.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in vec4 vFlags2;");for(let e=0;e 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&Y.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const _l=u.vec3();class Rl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin;this._program||this._allocate(t),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),this._program.bindTexture(this._uTexturePerObjectIdPositionsDecodeMatrix,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerObjectIdPositionsDecodeMatrix),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},1),this._program.bindTexture(this._uTexturePerVertexIdCoordinates,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerVertexIdCoordinates),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},2),this._program.bindTexture(this._uTexturePerObjectIdColorsAndFlags,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerObjectIdColorsAndFlags),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},3),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uWorldMatrix,!1,i.worldMatrix);const h=e.pickViewMatrix||o.viewMatrix,c=l?O(h,l):h;if(n.uniformMatrix4fv(this._uViewMatrix,!1,c),n.uniformMatrix4fv(this._uProjMatrix,!1,e.pickProjMatrix),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const A=r._sectionPlanesState.sectionPlanes.length;if(A>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*A,o=i.renderFlags;for(let t=0;t0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds8Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices8Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds16Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices16Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds32Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices32Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick flat normals vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in uvec3 packedVertexId;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform isampler2D uTexturePerPolygonIdNormals;"),s.push("uniform usampler2D uTexturePerPolygonIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out int vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_normal_index = polygonIndex & 4095;"),s.push("int v_normal_index = polygonIndex >> 12;"),s.push("int h_packed_object_id_index = ((polygonIndex >> 3) / 2) & 4095;"),s.push("int v_packed_object_id_index = ((polygonIndex >> 3) / 2) >> 12;"),s.push("ivec3 packedObjectId = ivec3(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).rgb);"),s.push("int objectIndex;"),s.push("if (((polygonIndex >> 3) % 2) == 0) {"),s.push(" objectIndex = (packedObjectId.r << 4) + (packedObjectId.g >> 4);"),s.push("} else {"),s.push(" objectIndex = ((packedObjectId.g & 15) << 8) + packedObjectId.b;"),s.push("}"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("int h_index = polygonIndex & 4095;"),s.push("int v_index = polygonIndex >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position1 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("vec3 position2 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("vec3 position3 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(position3 - position1, position2 - position1));"),s.push("int vertexNumber = gl_VertexID % 3;"),s.push("vec3 position;"),s.push("if (vertexNumber == 0) position = position1;"),s.push("else if (vertexNumber == 1) position = position2;"),s.push("else position = position3;"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags2 = flags2.r;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick flat normals fragment shader"),i.push("#extension GL_OES_standard_derivatives : enable"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in int vFlags2;");for(var r=0;r 0;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outNormal = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Pl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._vertexDepthRenderer&&!this._vertexDepthRenderer.getValid()&&(this._vertexDepthRenderer.destroy(),this._vertexDepthRenderer=null),this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new pa(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new pa(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO||(this._colorQualityRendererWithSAO=new TrianglesDataTextureColorQualityRenderer(this._scene,!0)),this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ia(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new El(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Tl(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Da(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Sa(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ma(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new rl(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Rl(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Va(this._scene)),this._pickDepthRenderer}get vertexDepthRenderer(){return this._vertexDepthRenderer||(this._vertexDepthRenderer=new Xa(this._scene)),this._vertexDepthRenderer}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new sl(this._scene)),this._snapDepthBufInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new cl(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._vertexDepthRenderer&&this._vertexDepthRenderer.destroy(),this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const Dl={};class Nl{constructor(){this.positionsCompressed=[],this.metallicRoughness=[],this.indices8Bits=[],this.indices16Bits=[],this.indices32Bits=[],this.edgeIndices8Bits=[],this.edgeIndices16Bits=[],this.edgeIndices32Bits=[],this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class bl{constructor(){this.texturePerObjectIdColorsAndFlags=null,this.texturePerObjectIdOffsets=null,this.texturePerObjectIdPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,i,r,o){this.texturePerObjectIdPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectIdColorsAndFlags.bindTexture(e,i,3),this.textureModelMatrices.bindTexture(e,r,4),this.texturePerObjectIdOffsets.bindTexture(e,o,5)}bindPickCameraTexture(e,t){}bindTriangleIndicesTextures(e,t,s,i){this.indicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,6),this.indicesPerBitnessTextures[i].bindTexture(e,s,7)}bindEdgeIndicesTextures(e,t,s,i){this.edgeIndicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,6),this.edgeIndicesPerBitnessTextures[i].bindTexture(e,s,7)}}class Cl{constructor(e,t,s,i,r=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=i,this._textureData=r}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const Ol={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Ol,null,4));let e=0;Object.keys(Ol).forEach((t=>{t.startsWith("size")&&(e+=Ol[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Ol.totalPolygons).toFixed(2)}`);let t={};Object.keys(Ol).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Ol[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Sl{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateCameraDataTexture(e,t,s,i){const r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,3),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null);const o=new Cl(e,r,4,3);let n=!0;o.updateViewMatrix=(s,r)=>{e.bindTexture(e.TEXTURE_2D,o._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(i?O(s,i):s)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.viewNormalMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,2,4,1,e.RGBA,e.FLOAT,new Float32Array(r))};const a=()=>{n&&(n=!1,o.updateViewMatrix(t.viewMatrix,t.project.matrix))};return t.on("matrix",(()=>n=!0)),s.on("rendering",a),a(),o}generatePickCameraDataTexture(e,t,s){const i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,3),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null);const r=new Cl(e,i,4,3);return r.updateViewMatrix=(i,o)=>{e.bindTexture(e.TEXTURE_2D,r._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(s?O(i,s):i)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.viewNormalMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,2,4,1,e.RGBA,e.FLOAT,new Float32Array(o))},r}generateModelTexture(e,t){const s=e.createTexture();return e.bindTexture(e.TEXTURE_2D,s),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,2),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(t.worldMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.worldNormalMatrix)),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null),new Cl(e,s,4,2)}generateTextureForColorsAndFlags(e,t,s,i,r,o,n){const a=t.length;this.numPortions=a;const l=4096,h=Math.ceil(a/512);if(0===h)throw"texture height===0";const c=new Uint8Array(16384*h);Ol.sizeDataColorsAndFlags+=c.byteLength,Ol.numberOfTextures++;for(let e=0;e>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+16),c.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+20),c.set([o[e]>>24&255,o[e]>>16&255,o[e]>>8&255,255&o[e]],32*e+24),c.set([n[e]?1:0,0,0,0],32*e+28);const A=e.createTexture();return e.bindTexture(e.TEXTURE_2D,A),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,h),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,h,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Cl(e,A,l,h,c)}generateTextureForObjectOffsets(e,t){const s=512,i=Math.ceil(t/s);if(0===i)throw"texture height===0";const r=new Float32Array(1536*i).fill(0);Ol.sizeDataTextureOffsets+=r.byteLength,Ol.numberOfTextures++;const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,i),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,i,e.RGB,e.FLOAT,r,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Cl(e,o,s,i,r)}generateTextureForPositionsDecodeMatrices(e,t,s){const i=t.length;if(0===i)throw"num decode+entity matrices===0";const r=2048,o=Math.ceil(i/512),n=new Float32Array(8192*o);Ol.sizeDataPositionDecodeMatrices+=n.byteLength,Ol.numberOfTextures++;const a=u.mat4();for(let e=0;e{s._compile()})),e.on("destroyed",(()=>{delete Dl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new Nl,this._dataTextureState=new bl,this._dataTextureGenerator=new Sl,this._state=new Ne({origin:u.vec3(t.origin),metallicRoughnessBuf:null,positionsDecodeMatrix:u.mat4(),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this.aabb=u.collapseAABB3(),this._numUpdatesInFrame=0,this._finalized=!1}canCreatePortion(e){if(this._finalized)throw"Already finalized";const t=e.buckets.length;this._numPortions+t>65536&&Ol.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const i=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[i]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let i=0,r=0;e.buckets.forEach((e=>{i+=e.positionsCompressed.length/3,r+=e.indices.length/3})),(this._state.numVertices+i>16777216||t+r>16777216)&&Ol.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+i<=16777216&&t+r<=16777216}return s}createPortion(e){if(this._finalized)throw"Already finalized";const t=[],s=e.worldAABB;e.buckets.forEach(((i,r)=>{const o=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#${r}`:`${e.id}#${r}`;let n=this._bucketGeometries[o];n||(n=this._createBucketGeometry(e,i),this._bucketGeometries[o]=n);const a=u.collapseAABB3(Ml),l=this._createSubPortion(e,n,i,a);u.expandAABB3(s,a),t.push(l)}));const i=this._state.origin;0===i[0]&&0===i[1]&&0===i[2]||(s[0]+=i[0],s[1]+=i[1],s[2]+=i[2],s[3]+=i[0],s[4]+=i[1],s[5]+=i[2]),u.expandAABB3(this.aabb,s);const r=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(t),this.model.numPortions++,r}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;Ol.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;Ol.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,i=t.indices,r=t.edgeIndices,o=this._buffer,n=o.positionsCompressed.length/3,a=s.length/3;for(let e=0,t=s.length;e0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=h.perTriangleNumberPortionId8Bits,c.numIndices8Bits+=s,Ol.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=h.perTriangleNumberPortionId16Bits,c.numIndices16Bits+=s,Ol.totalPolygons16Bits+=t.numTriangles):(e=h.perTriangleNumberPortionId32Bits,c.numIndices32Bits+=s,Ol.totalPolygons32Bits+=t.numTriangles),Ol.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=h.perEdgeNumberPortionId8Bits,c.numEdgeIndices8Bits+=s,Ol.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=h.perEdgeNumberPortionId16Bits,c.numEdgeIndices16Bits+=s,Ol.totalEdges16Bits+=t.numEdges):(e=h.perEdgeNumberPortionId32Bits,c.numEdgeIndices32Bits+=s,Ol.totalEdges32Bits+=t.numEdges),Ol.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId32Bits)),i.indices8Bits.length>0&&(t.texturePerPolygonIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,i.indices8Bits)),i.indices16Bits.length>0&&(t.texturePerPolygonIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,i.indices16Bits)),i.indices32Bits.length>0&&(t.texturePerPolygonIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,i.indices32Bits)),i.edgeIndices8Bits.length>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(s,i.edgeIndices8Bits)),i.edgeIndices16Bits.length>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(s,i.edgeIndices16Bits)),i.edgeIndices32Bits.length>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(s,i.edgeIndices32Bits)),this.model._modelMatricesTexture||(this.model._modelMatricesTexture=this._dataTextureGenerator.generateModelTexture(s,this.model)),t.textureModelMatrices=this.model._modelMatricesTexture,t.cameraTexture=this._dataTextureGenerator.generateCameraDataTexture(this.model.scene.canvas.gl,this.model.scene.camera,this.model.scene,this._state.origin.slice()),t.textureCameraMatrices=t.cameraTexture,t.texturePickCameraMatrices=this._dataTextureGenerator.generatePickCameraDataTexture(this.model.scene.canvas.gl,this.model.scene.camera,this._state.origin.slice()),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(console.info("_uploadDeferredFlags"),this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdColorsAndFlags._textureWidth,t.texturePerObjectIdColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectIdColorsAndFlags._textureData),e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdOffsets._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdOffsets._textureWidth,t.texturePerObjectIdOffsets._textureHeight,e.RGB,e.FLOAT,t.texturePerObjectIdOffsets._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdColorsAndFlags._texture),i.texSubImage2D(i.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,i.RGBA_INTEGER,i.UNSIGNED_BYTE,Bl)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,i=!1){const r=this._portionToSubPortionsMap[e];for(let e=0,o=r.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetFlags set flags write through"),d.bindTexture(d.TEXTURE_2D,p.texturePerObjectIdColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,Bl)}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetFlags2 set flags write through"),o.bindTexture(o.TEXTURE_2D,r.texturePerObjectIdColorsAndFlags._texture),o.texSubImage2D(o.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,o.RGBA_INTEGER,o.UNSIGNED_BYTE,Bl))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdOffsets._texture),i.texSubImage2D(i.TEXTURE_2D,0,0,e,1,1,i.RGB,i.FLOAT,Fl))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._dataTextureRenderers.colorRendererWithSAO&&this._dataTextureRenderers.colorRendererWithSAO.drawLayer(t,this,ki.COLOR_OPAQUE):this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,ki.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.depthRenderer&&this._dataTextureRenderers.depthRenderer.drawLayer(t,this,ki.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.normalsRenderer&&this._dataTextureRenderers.normalsRenderer.drawLayer(t,this,ki.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ki.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,ki.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,ki.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ki.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ki.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ki.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.occlusionRenderer&&this._dataTextureRenderers.occlusionRenderer.drawLayer(t,this,ki.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.shadowRenderer&&this._dataTextureRenderers.shadowRenderer.drawLayer(t,this,ki.COLOR_OPAQUE))}setPickMatrices(e,t){0!==this._numVisibleLayerPortions&&this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(e,t)}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickMeshRenderer&&this._dataTextureRenderers.pickMeshRenderer.drawLayer(t,this,ki.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickDepthRenderer&&this._dataTextureRenderers.pickDepthRenderer.drawLayer(t,this,ki.PICK))}drawSnapInitDepthBuf(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.snapDepthBufInitRenderer&&this._dataTextureRenderers.snapDepthBufInitRenderer.drawLayer(t,this,ki.PICK))}drawSnapDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.vertexDepthRenderer&&this._dataTextureRenderers.vertexDepthRenderer.drawLayer(t,this,ki.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickNormalsRenderer&&this._dataTextureRenderers.pickNormalsRenderer.drawLayer(t,this,ki.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const Gl=u.vec3();u.mat4();const kl=u.vec3([1,1,1]),Vl=u.vec3([0,0,0]),jl=u.vec3([0,0,0]),Ql=u.identityQuaternion(),Wl=u.identityMat4(),zl=new Uint8Array([255,255,255]);class Kl extends b{constructor(e,t={}){super(e,t),this._dtxEnabled=this.scene.dtxEnabled&&!1!==t.dtxEnabled,this._enableVertexWelding=!1,this._enableIndexBucketing=!0,this._vboBatchingLayerScratchMemory=(Gi++,Hi),this._textureTranscoder=t.textureTranscoder||function(e){const t=e.scene.id;let s=qn[t];return s||(s=new Zn({viewer:e}),qn[t]=s,e.scene.on("destroyed",(()=>{delete qn[t],s.destroy()}))),s}(this.scene.viewer),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this._aabb=u.collapseAABB3(),this._aabbDirty=!0,this._quantizationRanges={},this._vboInstancingLayers={},this._vboBatchingLayers={},this._dtxLayers={},this._meshList=[],this.layerList=[],this._entityList=[],this._geometries={},this._dtxBuckets={},this._textures={},this._textureSets={},this._meshes={},this._entities={},this._scheduledMeshes={},this.renderFlags=new bs,this.numGeometries=0,this.numPortions=0,this.numVisibleLayerPortions=0,this.numTransparentLayerPortions=0,this.numXRayedLayerPortions=0,this.numHighlightedLayerPortions=0,this.numSelectedLayerPortions=0,this.numEdgesLayerPortions=0,this.numPickableLayerPortions=0,this.numClippableLayerPortions=0,this.numCulledLayerPortions=0,this.numEntities=0,this._numTriangles=0,this._numLines=0,this._numPoints=0,this._edgeThreshold=t.edgeThreshold||10,this._origin=u.vec3(t.origin||[0,0,0]),this._position=u.vec3(t.position||[0,0,0]),this._rotation=u.vec3(t.rotation||[0,0,0]),this._quaternion=u.vec4(t.quaternion||[0,0,0,1]),this._conjugateQuaternion=u.vec4(t.quaternion||[0,0,0,1]),t.rotation&&u.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._scale=u.vec3(t.scale||[1,1,1]),this._worldRotationMatrix=u.mat4(),this._worldRotationMatrixConjugate=u.mat4(),this._matrix=u.mat4(),this._matrixDirty=!0,this._rebuildMatrices(),this._worldNormalMatrix=u.mat4(),u.inverseMat4(this._matrix,this._worldNormalMatrix),u.transposeMat4(this._worldNormalMatrix),(t.matrix||t.position||t.rotation||t.scale||t.quaternion)&&(this._viewMatrix=u.mat4(),this._viewNormalMatrix=u.mat4(),this._viewMatrixDirty=!0,this._matrixNonIdentity=!0),this._opacity=1,this._colorize=[1,1,1],this._saoEnabled=!1!==t.saoEnabled,this._pbrEnabled=!1!==t.pbrEnabled,this._colorTextureEnabled=!1!==t.colorTextureEnabled,this._isModel=t.isModel,this._isModel&&this.scene._registerModel(this),this._onCameraViewMatrix=this.scene.camera.on("matrix",(()=>{this._viewMatrixDirty=!0})),this.scene.vfc.enabled&&(this._vfcManager=this.scene.vfc.getVFCManager(this)),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_createDefaultTextureSet(){const e=new jn({id:"defaultColorTexture",texture:new si({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new jn({id:"defaultMetalRoughTexture",texture:new si({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new jn({id:"defaultNormalsTexture",texture:new si({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),i=new jn({id:"defaultEmissiveTexture",texture:new si({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),r=new jn({id:"defaultOcclusionTexture",texture:new si({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=i,this._textures.defaultOcclusionTexture=r,this._textureSets.defaultTextureSet=new Vn({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:i,occlusionTexture:r})}get isPerformanceModel(){return!0}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),u.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),u.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||Wl),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),u.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),u.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),u.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),u.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0}_setLocalAABBDirty(){for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,i=t.length;e{l.setImage(h,{minFilter:s,magFilter:i,wrapS:r,wrapT:o,wrapR:n,flipY:e.flipY,encoding:a}),this.glRedraw()},h.src=e.src;break;default:this._textureTranscoder?m.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new jn({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,i,r,o,n;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(i=this._textures[e.metallicRoughnessTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(r=this._textures[e.normalsTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(o=this._textures[e.emissiveTextureId],!o)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else o=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(n=this._textures[e.occlusionTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultOcclusionTexture;const a=new Vn({id:t,model:this,colorTexture:s,metallicRoughnessTexture:i,normalsTexture:r,emissiveTexture:o,occlusionTexture:n});this._textureSets[t]=a}createMesh(e){if(void 0===e.id||null===e.id)return void this.error("[createMesh] SceneModel.createMesh() config missing: id");if(this._scheduledMeshes[e.id])return void this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`);if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return void this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),null;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),null;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),null;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),null;const t=!!this._dtxEnabled&&("triangles"===e.primitive||"solid"===e.primitive||"surface"===e.primitive);if(e.origin=e.origin?u.addVec3(this._origin,e.origin,u.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||kl,s=e.position||Vl,i=e.rotation||jl;u.eulerToQuaternion(i,"XYZ",Ql),e.meshMatrix=u.composeMat4(s,Ql,t,u.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Rr(e.positionsDecodeBoundary,u.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=u.vec3(),s=[];x(e.positions,s,t)&&(e.positions=s,e.origin=u.addVec3(e.origin,t,t))}if(e.positions){const t=u.collapseAABB3();e.positionsDecodeMatrix=u.mat4(),u.expandAABB3Points3(t,e.positions),e.positionsCompressed=_r(e.positions,t,e.positionsDecodeMatrix)}e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=$e(e.positions,e.indices,null,2):e.edgeIndices=$e(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.buckets||(e.buckets=Yl(e,this._enableVertexWelding&&this._enableIndexBucketing))}else{if(e.type=1,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):[255,255,255],e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.positions){const t=[];x(e.positions,t,Gl)&&(e.positions=t,e.origin=u.addVec3(e.origin,Gl,u.vec3()))}if(e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=$e(e.positions,e.indices,null,2):e.edgeIndices=$e(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId],!e.textureSet))return void this.error(`[createMesh] Texture set not found: ${e.textureSetId} - ensure that you create it first with createTextureSet()`)}}else{if(e.positions||e.positionsCompressed||e.indices||e.edgeIndices||e.normals||e.normalsCompressed||e.uv||e.uvCompressed||e.positionsDecodeMatrix)return void this.error("Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)");if(e.geometry=this._geometries[e.geometryId],!e.geometry)return void this.error(`[createMesh] Geometry not found: ${e.geometryId} - ensure that you create it first with createGeometry()`);if(e.origin=e.origin?u.addVec3(this._origin,e.origin,u.vec3()):this._origin,e.positionsDecodeMatrix=e.geometry.positionsDecodeMatrix,e.matrix)e.meshMatrix=e.matrix.slice();else{const t=e.scale||kl,s=e.position||Vl,i=e.rotation||jl;u.eulerToQuaternion(i,"XYZ",Ql),e.meshMatrix=u.composeMat4(s,Ql,t,u.mat4())}if(!!this._dtxEnabled&&("triangles"===e.geometry.primitive||"solid"===e.geometry.primitive||"surface"===e.geometry.primitive)){e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255;let t=this._dtxBuckets[e.geometryId];t||(t=Yl(e.geometry,this._enableVertexWelding,this._enableIndexBucketing),this._dtxBuckets[e.geometryId]=t),e.buckets=t}else e.type=0,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId]),function(e){if(e.obb=u.OBB3(),e.positionsCompressed&&e.positionsCompressed.length>0){const t=u.collapseAABB3();u.expandAABB3Points3(t,e.positionsCompressed),nt.decompressAABB(t,e.positionsDecodeMatrix),u.AABB3ToOBB3(t,e.obb)}else if(e.positions&&e.positions.length>0){const t=u.collapseAABB3();u.expandAABB3Points3(t,e.positions),u.AABB3ToOBB3(t,e.obb)}}(e.geometry)}e.numPrimitives=this._getNumPrimitives(e),this._vfcManager&&!this._vfcManager.finalized?this._vfcManager.addMesh(e):this._createMesh(e)}_createMesh(e){const t=new Ui(this,e.id,e.color,e.opacity);t.pickId=this.scene._renderer.getPickID(t);const s=t.pickId,i=s>>24&255,r=s>>16&255,o=s>>8&255,n=255&s;switch(e.pickColor=new Uint8Array([n,o,r,i]),e.worldAABB=u.collapseAABB3(),e.aabb=e.worldAABB,e.solid="solid"===e.primitive,t.origin=u.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e);break;case 1:t.layer=this._getVBOBatchingLayer(e);break;case 0:t.layer=this._getVBOInstancingLayer(e)}t.portionId=t.layer.createPortion(e),t.aabb=e.worldAABB,t.numPrimitives=e.numPrimitives,u.expandAABB3(this._aabb,t.aabb),this._meshes[e.id]=t,this._meshList.push(t)}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,i=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,i=e.textureSetId||"-",r=e.geometryId,o=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${i}.${r}`;let n=this._vboInstancingLayers[o];if(n)return n;let a=e.textureSet;const l=e.geometry;for(;!n;)switch(l.primitive){case"triangles":case"surface":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new Yo({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new Yo({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":console.info(`[SceneModel ${this.id}]: creating LinesInstancingLayer`),n=new pn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0});break;case"points":console.info(`[SceneModel ${this.id}]: creating PointsInstancingLayer`),n=new kn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[o]=n,this.layerList.push(n),n}createEntity(e){if(void 0===e.id?e.id=u.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=u.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;if(this._visible&&!1!==e.visible&&(t|=B),this._pickable&&!1!==e.pickable&&(t|=M),this._culled&&!1!==e.culled&&(t|=F),this._clippable&&!1!==e.clippable&&(t|=L),this._collidable&&!1!==e.collidable&&(t|=U),this._edges&&!1!==e.edges&&(t|=V),this._xrayed&&!1!==e.xrayed&&(t|=H),this._highlighted&&!1!==e.highlighted&&(t|=G),this._selected&&!1!==e.selected&&(t|=k),e.flags=t,this._vfcManager&&!this._vfcManager.finalized){for(let t=0,s=e.meshIds.length;t{}));for(let e=0,t=this.layerList.length;ee.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,i=t.visibleLayers.length;s65536?16:8)}else n=[{positionsCompressed:i,indices:r,edgeIndices:o}];return n}const Xl=u.vec4(),Zl=u.vec4(),ql=u.vec3(),Jl=u.vec3(),$l=u.vec3(),eh=u.vec4(),th=u.vec4(),sh=u.vec4();class ih{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let i=!1;const r=this._scene.camera;if(e){const t=u.subVec3(e,r.eye,ql);i=u.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=u.vec3();u.decomposeMat4(u.inverseMat4(this._scene.viewer.camera.viewMatrix,u.mat4()),t,u.vec4(),u.vec3());const s=u.distVec3(t,e);let i=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(i/=this._scene.camera.ortho.scale/2),S(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Ai(this._scene,Vs({radius:i})),this._pivotSphere=new Hs(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){u.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,u.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,i=s[2],r=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*i/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*r/2);let o=t._lastBoundingClientRect;if(!o||t._canvasSizeChanged){const e=t.canvas;o=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(o.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(o.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(S(this.getPivotPos(),this._rtcCenter,this._rtcPos),u.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new dt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=u.lookAtMat4v(e.eye,e.look,e.worldUp);u.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=u.distVec3(e.eye,s),t=u.inverseMat4(t);const i=u.transformVec3(t,this._cameraOffset),r=u.vec3();if(u.subVec3(e.eye,s,r),u.addVec3(r,i),e.zUp){const e=r[1];r[1]=r[2],r[2]=e}this._radius=u.lenVec3(r),this._polar=Math.acos(r[1]/this._radius),this._azimuth=Math.atan2(r[0],r[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=u.normalizeVec3(u.subVec3(e.look,e.eye,rh)),s=u.cross3Vec3(t,e.worldUp,oh);return u.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(u.distVec3(this._scene.center,t.eye)),i=t.project.transposedMatrix,r=i.subarray(8,12),o=i.subarray(12),n=[0,0,-1,1],a=u.dotVec4(n,r)/u.dotVec4(n,o),l=ah;t.project.unproject(e,a,lh,hh,l);const h=u.normalizeVec3(u.subVec3(l,t.eye,rh)),c=u.addVec3(t.eye,u.mulVec3Scalar(h,s,oh),nh);this.setPivotPos(c)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var i=-e;const r=-t;1===s.worldUp[2]&&(i=-i),this._azimuth+=.01*-i,this._polar+=.01*r,this._polar=u.clamp(this._polar,.001,Math.PI-.001);const o=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=o[1];o[1]=o[2],o[2]=e}const n=u.lenVec3(u.subVec3(s.look,s.eye,u.vec3())),a=this.getPivotPos();u.addVec3(o,a);let l=u.lookAtMat4v(o,a,s.worldUp);l=u.inverseMat4(l);const h=u.transformVec3(l,this._cameraOffset);l[12]-=h[0],l[13]-=h[1],l[14]-=h[2];const c=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],u.subVec3(s.eye,u.mulVec3Scalar(c,n),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Ah{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=u.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._needFireEvents=!1}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1,this._needFireEvents=!1;const e=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.snapPick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapMode:this._configs.snapMode});e&&e.snappedWorldPos?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents=!0):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const t=this.pickResult.canvasPos;if(t[0]===this.pickCursorPos[0]&&t[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents=e,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents=!0):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents=!0)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!0)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new $;e.worldPos=this.snapPickResult.snappedWorldPos,e.canvasPos=this.snapPickResult.snappedCanvasPos,"vertex"===this._configs.snapMode?e.snappedToVertex=!0:e.snappedToEdge=!0,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=!1}}destroy(){}}const uh=u.vec2();class ph{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController;let n,a,l,h=0,c=0,A=0,p=0,d=!1;const f=u.vec3();let E=!0;const m=this._scene.canvas.canvas,y=[];function g(e=!0){m.style.cursor="move",h=i.pointerCanvasPos[0],c=i.pointerCanvasPos[1],A=i.pointerCanvasPos[0],p=i.pointerCanvasPos[1],e&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(d=!0,f.set(o.pickResult.worldPos)):d=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(n=!0,g()):(n=!0,g(!1));break;case 2:a=!0,g();break;case 3:l=!0,s.panRightClick&&g()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!n&&!a&&!l)return;const t=e.canvas.boundary,o=t[2],A=t[3],p=i.pointerCanvasPos[0],E=i.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&a||s.panRightClick&&l){const t=p-h,s=E-c,i=e.camera;if("perspective"===i.projection){const o=Math.abs(d?u.lenVec3(u.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=1.5*t*o/A,r.panDeltaY+=1.5*s*o/A}else r.panDeltaX+=.5*i.ortho.scale*(t/A),r.panDeltaY+=.5*i.ortho.scale*(s/A)}else!n||a||l||s.planView||(s.firstPerson?(r.rotateDeltaY-=(p-h)/o*s.dragRotationRate/2,r.rotateDeltaX+=(E-c)/A*(s.dragRotationRate/4)):(r.rotateDeltaY-=(p-h)/o*(1.5*s.dragRotationRate),r.rotateDeltaX+=(E-c)/A*(1.5*s.dragRotationRate)));h=p,c=E}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&i.mouseover&&(E=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:n=!1,a=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,i=0,r=0,o=0,n=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,o+=s.scrollLeft,n+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+o-i,t[1]=e.pageY+n-r}else e=window.event,t[0]=e.x,t[1]=e.y}(e,uh);const s=uh[0],i=uh[1];Math.abs(s-A)<3&&Math.abs(i-p)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:uh,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const I=1/60;let v=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var o=null!==v?t-v:0;v=t,o>.05&&(o=.05),o{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const n=r._isKeyDownForAction(r.AXIS_VIEW_RIGHT),a=r._isKeyDownForAction(r.AXIS_VIEW_BACK),l=r._isKeyDownForAction(r.AXIS_VIEW_LEFT),h=r._isKeyDownForAction(r.AXIS_VIEW_FRONT),c=r._isKeyDownForAction(r.AXIS_VIEW_TOP),A=r._isKeyDownForAction(r.AXIS_VIEW_BOTTOM);if(!(n||a||l||h||c||A))return;const p=e.aabb,d=u.getAABB3Diag(p);u.getAABB3Center(p,dh);const f=Math.abs(d/Math.tan(t.cameraFlight.fitFOV*u.DEGTORAD)),E=1.1*d;gh.orthoScale=E,n?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldRight,f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):a?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldForward,f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):l?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldRight,-f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):h?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldForward,-f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):c?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldUp,f,fh),yh)),gh.look.set(dh),gh.up.set(u.normalizeVec3(u.mulVec3Scalar(o.worldForward,1,Eh),mh))):A&&(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldUp,-f,fh),yh)),gh.look.set(dh),gh.up.set(u.normalizeVec3(u.mulVec3Scalar(o.worldForward,-1,Eh)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(dh),t.cameraFlight.duration>0?t.cameraFlight.flyTo(gh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(gh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class vh{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,h=!1;const c=this._scene.canvas.canvas,A=s=>{let i;s&&s.worldPos&&(i=s.worldPos);const r=s&&s.entity?s.entity.aabb:e.aabb;if(i){const s=e.camera;u.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};c.addEventListener("mousemove",this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||h)return;const r=a.hasSubs("hover"),n=a.hasSubs("hoverOut"),c=a.hasSubs("hoverOff"),A=a.hasSubs("hoverSurface"),u=a.hasSubs("hoverSnapOrSurface");if(r||n||c||A||u)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=u,o.update(),o.pickResult){if(o.pickResult.entity){const t=o.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),a.fire("hoverEnter",o.pickResult,!0),this._lastPickedEntityId=t)}a.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&a.fire("hoverSurface",o.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),a.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}),c.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(h=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(i.mouseDownClientX=t.clientX,i.mouseDownClientY=t.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===t.which))){const t=o.pickResult;t&&t.worldPos?(n.setPivotPos(t.worldPos),n.startPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),n.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(h=!1),n.getPivoting()&&n.endPivot()}),c.addEventListener("mouseup",this._canvasMouseUpHandler=r=>{if(!s.active||!s.pointerEnabled)return;if(!(1===r.which))return;if(n.hidePivot(),Math.abs(r.clientX-i.mouseDownClientX)>3||Math.abs(r.clientY-i.mouseDownClientY)>3)return;const l=a.hasSubs("picked"),h=a.hasSubs("pickedNothing"),c=a.hasSubs("pickedSurface"),p=a.hasSubs("doublePicked"),d=a.hasSubs("doublePickedSurface"),f=a.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||p||d||f))return(l||h||c)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=c,o.update(),o.pickResult?(a.fire("picked",o.pickResult,!0),o.pickedSurface&&a.fire("pickedSurface",o.pickResult,!0)):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo,o.schedulePickSurface=c,o.update();const e=o.pickResult,r=o.pickedSurface;this._timeout=setTimeout((()=>{e?(a.fire("picked",e,!0),r&&(a.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo||p||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(a.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&a.fire("doublePickedSurface",o.pickResult,!0),s.doublePickFlyTo&&(A(o.pickResult),!s.firstPerson&&s.followPointer)){const e=o.pickResult.entity.aabb,s=u.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(a.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),s.doublePickFlyTo&&(A(),!s.firstPerson&&s.followPointer)){const s=e.aabb,i=u.getAABB3Center(s);t.pivotController.setPivotPos(i),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class Th{constructor(e,t,s,i,r){this._scene=e;const o=e.input,n=[],a=e.canvas.canvas;let l=!0;this._onSceneMouseMove=o.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=o.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&i.mouseover&&(n[t]=!0,t===o.KEY_SHIFT&&(a.style.cursor="move"))})),this._onSceneKeyUp=o.on("keyup",(i=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(n[i]=!1,i===o.KEY_SHIFT&&(a.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(a=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const h=t.cameraControl,c=a.deltaTime/1e3;if(!s.planView){const e=h._isKeyDownForAction(h.ROTATE_Y_POS,n),i=h._isKeyDownForAction(h.ROTATE_Y_NEG,n),o=h._isKeyDownForAction(h.ROTATE_X_POS,n),a=h._isKeyDownForAction(h.ROTATE_X_NEG,n),l=c*s.keyboardRotationRate;(e||i||o||a)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?r.rotateDeltaY+=l:i&&(r.rotateDeltaY-=l),o?r.rotateDeltaX+=l:a&&(r.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!n[o.KEY_CTRL]&&!n[o.KEY_ALT]){const e=h._isKeyDownForAction(h.DOLLY_BACKWARDS,n),o=h._isKeyDownForAction(h.DOLLY_FORWARDS,n);if(e||o){const n=c*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),o?r.dollyDelta-=n:e&&(r.dollyDelta+=n),l&&(i.followPointerDirty=!0,l=!1)}}const A=h._isKeyDownForAction(h.PAN_FORWARDS,n),u=h._isKeyDownForAction(h.PAN_BACKWARDS,n),p=h._isKeyDownForAction(h.PAN_LEFT,n),d=h._isKeyDownForAction(h.PAN_RIGHT,n),f=h._isKeyDownForAction(h.PAN_UP,n),E=h._isKeyDownForAction(h.PAN_DOWN,n),m=(n[o.KEY_ALT]?.3:1)*c*s.keyboardPanRate;(A||u||p||d||f||E)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),E?r.panDeltaY+=m:f&&(r.panDeltaY+=-m),d?r.panDeltaX+=-m:p&&(r.panDeltaX+=m),u?r.panDeltaZ+=m:A&&(r.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const _h=u.vec3();class Rh{constructor(e,t,s,i,r){this._scene=e;const o=e.camera,n=t.pickController,a=t.pivotController,l=t.panController;let h=1,c=1,A=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(r.dollyDelta)<.001&&(r.dollyDelta=0),Math.abs(r.rotateDeltaX)<.001&&(r.rotateDeltaX=0),Math.abs(r.rotateDeltaY)<.001&&(r.rotateDeltaY=0),0===r.rotateDeltaX&&0===r.rotateDeltaY||(r.dollyDelta=0),s.followPointer&&--h<=0&&(h=1,0!==r.dollyDelta)){if(0===r.rotateDeltaY&&0===r.rotateDeltaX&&s.followPointer&&i.followPointerDirty&&(n.pickCursorPos=i.pointerCanvasPos,n.schedulePickSurface=!0,n.update(),n.pickResult&&n.pickResult.worldPos?A=n.pickResult.worldPos:(c=1,A=null),i.followPointerDirty=!1),A){const t=Math.abs(u.lenVec3(u.subVec3(A,e.camera.eye,_h)));c=t/s.dollyProximityThreshold}c{i.mouseover=!0}),o.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{i.mouseover=!1,o.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{Dh(e,o,i.pointerCanvasPos)}),o.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(Dh(e,o,i.pointerCanvasPos),i.mouseover=!0)}),o.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function Dh(e,t,s){if(e){const{x:i,y:r}=t.getBoundingClientRect();s[0]=e.clientX-i,s[1]=e.clientY-r}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const Nh=function(e,t){if(e){let s=e.target,i=0,r=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class bh{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=u.vec2(),l=u.vec2(),h=u.vec2(),c=u.vec2(),A=[],p=this._scene.canvas.canvas;let d=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),p.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const r=t.touches,l=t.changedTouches;for(i.touchStartTime=Date.now(),1===r.length&&1===l.length&&(Nh(r[0],a),s.followPointer&&(o.pickCursorPos=a,o.schedulePickSurface=!0,o.update(),s.planView||(o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(n.setPivotPos(o.pickResult.worldPos),!s.firstPerson&&n.startPivot()&&n.showPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),!s.firstPerson&&n.startPivot()&&n.showPivot()))));A.length{n.getPivoting()&&n.endPivot()}),p.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const n=e.canvas.boundary,a=n[2],p=n[3],E=t.touches;if(t.touches.length===d){if(1===d){Nh(E[0],l),u.subVec2(l,A[0],c);const t=c[0],o=c[1];if(null!==i.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(o)>s.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),s.planView){const i=e.camera;if("perspective"===i.projection){const n=Math.abs(e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=t*n/p*s.touchPanRate,r.panDeltaY+=o*n/p*s.touchPanRate}else r.panDeltaX+=.5*i.ortho.scale*(t/p)*s.touchPanRate,r.panDeltaY+=.5*i.ortho.scale*(o/p)*s.touchPanRate}else r.rotateDeltaY-=t/a*(1*s.dragRotationRate),r.rotateDeltaX+=o/p*(1.5*s.dragRotationRate)}else if(2===d){const t=E[0],n=E[1];Nh(t,l),Nh(n,h);const a=u.geometricMeanVec2(A[0],A[1]),c=u.geometricMeanVec2(l,h),d=u.vec2();u.subVec2(a,c,d);const f=d[0],m=d[1],y=e.camera,g=u.distVec2([t.pageX,t.pageY],[n.pageX,n.pageY]),I=(u.distVec2(A[0],A[1])-g)*s.touchDollyRate;if(r.dollyDelta=I,Math.abs(I)<1)if("perspective"===y.projection){const t=o.pickResult?o.pickResult.worldPos:e.center,i=Math.abs(u.lenVec3(u.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);r.panDeltaX-=f*i/p*s.touchPanRate,r.panDeltaY-=m*i/p*s.touchPanRate}else r.panDeltaX-=.5*y.ortho.scale*(f/p)*s.touchPanRate,r.panDeltaY-=.5*y.ortho.scale*(m/p)*s.touchPanRate;i.pointerCanvasPos=c}for(let e=0;e{let i;s&&s.worldPos&&(i=s.worldPos);const r=s?s.entity.aabb:e.aabb;if(i){const s=e.camera;u.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};p.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null);const r=e.touches,o=e.changedTouches;if(a=Date.now(),1===r.length&&1===o.length){c=a,Ch(r[0],h);const o=h[0],n=h[1],l=r[0].pageX,A=r[0].pageY;i.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(A)],canvasPos:[Math.round(o),Math.round(n)],event:e},!0),i.longTouchTimeout=null}),s.longTapTimeout)}else c=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),r=e.touches,a=e.changedTouches,p=n.hasSubs("pickedSurface");null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),0===r.length&&1===a.length&&c>-1&&t-c<150&&(A>-1&&c-A<325?(Ch(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=p,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("doublePicked",o.pickResult),o.pickedSurface&&n.fire("doublePickedSurface",o.pickResult),s.doublePickFlyTo&&d(o.pickResult)):(n.fire("doublePickedNothing"),s.doublePickFlyTo&&d()),A=-1):u.distVec2(l[0],h)<4&&(Ch(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=p,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("picked",o.pickResult),o.pickedSurface&&n.fire("pickedSurface",o.pickResult)):n.fire("pickedNothing"),A=t),c=-1),l.length=r.length;for(let e=0,t=r.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapMode:"vertex",snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:u.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:u.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Ah(this,this._configs),pivotController:new ch(s,this._configs),panController:new ih(s),cameraFlight:new Bi(this,{duration:.5})},this._handlers=[new Ph(this.scene,this._controllers,this._configs,this._states,this._updates),new bh(this.scene,this._controllers,this._configs,this._states,this._updates),new ph(this.scene,this._controllers,this._configs,this._states,this._updates),new Ih(this.scene,this._controllers,this._configs,this._states,this._updates),new vh(this.scene,this._controllers,this._configs,this._states,this._updates),new Oh(this.scene,this._controllers,this._configs,this._states,this._updates),new Th(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new Rh(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",m.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,i=s.length;e0?Lh(t):null,n=s&&s.length>0?Lh(s):null,a=e=>{if(!e)return;var t=!0;(n&&n[e.type]||o&&!o[e.type])&&(t=!1),t&&i.push(e.id);const s=e.children;if(s)for(var r=0,l=s.length;r>t;s.sort(ta);const i=new Int32Array(e.length);for(let t=0,r=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}sa=new Int32Array(e),t.sort(ia);const s=new Int32Array(e.length);for(let i=0,r=t.length;it){let s=e;e=t,t=s}function s(s,i){return s!==e?e-s:i!==t?t-i:0}let i=0,r=(o.length>>1)-1;for(;i<=r;){const e=r+i>>1,t=s(o[2*e],o[2*e+1]);if(t>0)i=e+1;else{if(!(t<0))return e;r=e-1}}return-i-1}const a=new Int32Array(o.length/2);a.fill(0);const l=i.length/3;if(l>8*(1<u.maxNumPositions&&(u=A()),u.bucketNumber>8)return[e];let d;-1===h[l]&&(h[l]=u.numPositions++,u.positionsCompressed.push(i[3*l]),u.positionsCompressed.push(i[3*l+1]),u.positionsCompressed.push(i[3*l+2])),-1===h[c]&&(h[c]=u.numPositions++,u.positionsCompressed.push(i[3*c]),u.positionsCompressed.push(i[3*c+1]),u.positionsCompressed.push(i[3*c+2])),-1===h[p]&&(h[p]=u.numPositions++,u.positionsCompressed.push(i[3*p]),u.positionsCompressed.push(i[3*p+1]),u.positionsCompressed.push(i[3*p+2])),u.indices.push(h[l]),u.indices.push(h[c]),u.indices.push(h[p]),(d=n(l,c))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(l,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(c,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]]))}const p=t/8*2,d=t/8,f=2*i.length+(r.length+o.length)*p;let E=0,m=-i.length/3;return c.forEach((e=>{E+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*d,m+=e.positionsCompressed.length/3})),E>f?[e]:(s&&function(e,t){const s={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,o=e.positionsCompressed;for(let e=0,i=t.length;e0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uRenderPass=i.getLocation("renderPass"),this._uLightAmbient=i.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const r=s.lights;let o;for(let e=0,t=r.length;e0;let r;const o=[];o.push("#version 300 es"),o.push("// TrianglesDataTextureColorRenderer vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("uniform mat4 sceneModelWorldMatrix;"),o.push("uniform mat4 viewMatrix;"),o.push("uniform mat4 projMatrix;"),o.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),o.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),o.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),o.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),o.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),o.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),o.push("uniform highp sampler2D uTextureModelMatrices;"),o.push("uniform vec3 uCameraEyeRtc;"),o.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("out float isPerspective;")),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),o.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),o.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),o.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),o.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),o.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),o.push("if (int(flags.x) != renderPass) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("} else {"),o.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),o.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),o.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),o.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),o.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),o.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),o.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),o.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),o.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),o.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),o.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),o.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),o.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),o.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),o.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),o.push("if (color.a == 0u) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("};"),o.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),o.push("vec3 position;"),o.push("position = positions[gl_VertexID % 3];"),o.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),o.push("if (solid != 1u) {"),o.push("if (isPerspectiveMatrix(projMatrix)) {"),o.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),o.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("} else {"),o.push("if (viewNormal.z < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("}"),o.push("}"),o.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),o.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),o.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureColorRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ua=new Float32Array([1,1,1]),pa=u.vec3(),da=u.vec3(),fa=u.vec3(),Ea=u.vec3(),ma=u.mat4();class ya{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=o,d=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=pa;if(h){const t=da;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=b(d,e,ma),E=fa,E[0]=r.eye[0]-e[0],E[1]=r.eye[1]-e[1],E[2]=r.eye[2]-e[2]}else f=d,E=r.eye;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===ji.SILHOUETTE_XRAYED){const e=i.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ji.SILHOUETTE_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ji.SILHOUETTE_SELECTED){const e=i.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,ua);if(i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = color;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ga=new Float32Array([0,0,0,1]),Ia=u.vec3(),va=u.vec3();u.vec3();const Ta=u.vec3(),_a=u.mat4();class Ra{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Ia;if(E){const t=va;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=b(d,e,_a)}else f=d;if(n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s===ji.EDGES_XRAYED){const e=r.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ji.EDGES_HIGHLIGHTED){const e=r.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===ji.EDGES_SELECTED){const e=r.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,ga);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Pa=u.vec3(),Da=u.vec3(),Na=u.vec3(),Ca=u.mat4();class Oa{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Pa;if(E){const t=Da;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=b(d,e,Ca)}else f=d;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push(" vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureEdgesColorRenderer"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ba=u.vec3(),Sa=u.vec3(),wa=u.vec3(),xa=u.mat4();class Ba{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i;let d,f;l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=ba;if(E){const t=u.transformPoint3(A,h,Sa);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=b(o.viewMatrix,e,xa),f=wa,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=o.viewMatrix,f=o.eye;if(n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outPickColor = vPickColor; "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Fa=u.vec3(),Ma=u.vec3(),La=u.vec3(),Ua=u.vec3(),Ha=u.mat4();class Ga{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=e.pickViewMatrix||o.viewMatrix;let f,E;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const t=Fa;if(h){const e=Ma;u.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],f=b(d,t,Ha),E=La,E[0]=o.eye[0]-t[0],E[1]=o.eye[1]-t[1],E[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=d,E=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniform1f(this._uPickZNear,e.pickZNear),n.uniform1f(this._uPickZFar,e.pickZFar),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),r.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outPackedDepth = packDepth(zNormalizedDepth); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ka=u.vec3(),Va=u.vec3(),ja=u.vec3(),Qa=u.vec3(),Wa=u.vec3(),za=u.mat4();class Ka{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=ka;let m,y;E[0]=u.safeInv(d[3]-d[0])*u.MAX_INT,E[1]=u.safeInv(d[4]-d[1])*u.MAX_INT,E[2]=u.safeInv(d[5]-d[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(E[0]),e.snapPickCoordinateScale[1]=u.safeInv(E[1]),e.snapPickCoordinateScale[2]=u.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=Va;if(g){const e=u.transformPoint3(A,h,ja);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=b(f,t,za),y=Qa,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(T,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(T,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(T,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ya=u.vec3(),Xa=u.vec3(),Za=u.vec3(),qa=u.vec3(),Ja=u.vec3(),$a=u.mat4();class el{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=Ya;let m,y;E[0]=u.safeInv(d[3]-d[0])*u.MAX_INT,E[1]=u.safeInv(d[4]-d[1])*u.MAX_INT,E[2]=u.safeInv(d[5]-d[2])*u.MAX_INT,e.snapPickCoordinateScale[0]=u.safeInv(E[0]),e.snapPickCoordinateScale[1]=u.safeInv(E[1]),e.snapPickCoordinateScale[2]=u.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=Xa;if(g){const e=Za;u.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=b(f,t,$a),y=qa,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this._uVectorA,e.snapVectorA),n.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const tl=u.vec3(),sl=u.vec3(),il=u.vec3(),rl=u.vec3(),ol=u.mat4();class nl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=i,d=e.pickViewMatrix||o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=tl;if(h){const t=sl;u.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=b(d,e,ol),E=il,E[0]=o.eye[0]-e[0],E[1]=o.eye[1]-e[1],E[2]=o.eye[2]-e[2]}else f=d,E=o.eye;n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const al=u.vec3(),ll=u.vec3(),hl=u.vec3(),cl=u.vec3(),Al=u.mat4();class ul{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=al;if(E){const t=u.transformPoint3(A,h,ll);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=b(r.viewMatrix,e,Al),f=hl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// Triangles dataTexture draw vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out highp vec2 vHighPrecisionZW;"),s&&(i.push("out vec4 vWorldPosition;"),i.push("flat out uint vFlags2;")),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.x) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags2 = flags2.r;")),i.push("gl_Position = clipPos;"),i.push("vHighPrecisionZW = gl_Position.zw;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in highp vec2 vHighPrecisionZW;"),i.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const pl=u.vec3(),dl=u.vec3(),fl=u.vec3(),El=u.vec3(),ml=u.mat4();class yl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,p=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const E=0!==l[0]||0!==l[1]||0!==l[2],m=0!==h[0]||0!==h[1]||0!==h[2];if(E||m){const e=pl;if(E){const t=dl;u.transformPoint3(c,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=h[0],e[1]+=h[1],e[2]+=h[2],d=b(p,e,ml),f=fl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=p,f=o.eye;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniformMatrix4fv(this._uViewNormalMatrix,!1,o.viewNormalMatrix),n.uniformMatrix4fv(this._uWorldNormalMatrix,!1,i.worldNormalMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&q.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),q.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(q.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&q.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&q.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in vec4 vFlags2;");for(let e=0;e 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&q.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const gl=u.vec3(),Il=u.vec3(),vl=u.vec3(),Tl=u.vec3();u.vec4();const _l=u.mat4();class Rl{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:p}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=gl;if(E){const t=u.transformPoint3(A,h,Il);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=b(r.viewMatrix,e,_l),f=vl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,p),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ne(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// trianglesDatatextureNormalsRenderer vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("uniform vec2 pickClipPos;"),i.push("uniform vec2 drawingBufferSize;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out vec4 vWorldPosition;"),s&&i.push("flat out uint vFlags2;"),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.w) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i.push("vWorldPosition = worldPosition;"),s&&i.push("vFlags2 = flags2.r;"),i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${u.MAX_INT}), 1.0);`),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Pl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._vertexDepthRenderer&&!this._vertexDepthRenderer.getValid()&&(this._vertexDepthRenderer.destroy(),this._vertexDepthRenderer=null),this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new ya(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new Ba(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Ga(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new Rl(this._scene)),this._vertexDepthRenderer||(this._vertexDepthRenderer=new Ka(this._scene)),this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new el(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Aa(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Aa(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new ya(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ul(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new yl(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Ra(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Oa(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ba(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Rl(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Rl(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Ga(this._scene)),this._pickDepthRenderer}get vertexDepthRenderer(){return this._vertexDepthRenderer||(this._vertexDepthRenderer=new Ka(this._scene)),this._vertexDepthRenderer}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new el(this._scene)),this._snapDepthBufInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new nl(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._vertexDepthRenderer&&this._vertexDepthRenderer.destroy(),this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const Dl={};class Nl{constructor(){this.positionsCompressed=[],this.metallicRoughness=[],this.indices8Bits=[],this.indices16Bits=[],this.indices32Bits=[],this.edgeIndices8Bits=[],this.edgeIndices16Bits=[],this.edgeIndices32Bits=[],this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class Cl{constructor(){this.texturePerObjectIdColorsAndFlags=null,this.texturePerObjectIdOffsets=null,this.texturePerObjectIdPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,i,r,o){this.texturePerObjectIdPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectIdColorsAndFlags.bindTexture(e,i,3),this.texturePerObjectIdOffsets.bindTexture(e,o,4)}bindTriangleIndicesTextures(e,t,s,i){this.indicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,5),this.indicesPerBitnessTextures[i].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,i){this.edgeIndicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[i].bindTexture(e,s,6)}}class Ol{constructor(e,t,s,i,r=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=i,this._textureData=r}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const bl={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(bl,null,4));let e=0;Object.keys(bl).forEach((t=>{t.startsWith("size")&&(e+=bl[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/bl.totalPolygons).toFixed(2)}`);let t={};Object.keys(bl).forEach((s=>{s.startsWith("size")&&(t[s]=`${(bl[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Sl{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,i,r,o,n){const a=t.length;this.numPortions=a;const l=4096,h=Math.ceil(a/512);if(0===h)throw"texture height===0";const c=new Uint8Array(16384*h);bl.sizeDataColorsAndFlags+=c.byteLength,bl.numberOfTextures++;for(let e=0;e>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+16),c.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+20),c.set([o[e]>>24&255,o[e]>>16&255,o[e]>>8&255,255&o[e]],32*e+24),c.set([n[e]?1:0,0,0,0],32*e+28);const A=e.createTexture();return e.bindTexture(e.TEXTURE_2D,A),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,h),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,h,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Ol(e,A,l,h,c)}generateTextureForObjectOffsets(e,t){const s=512,i=Math.ceil(t/s);if(0===i)throw"texture height===0";const r=new Float32Array(1536*i).fill(0);bl.sizeDataTextureOffsets+=r.byteLength,bl.numberOfTextures++;const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,i),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,i,e.RGB,e.FLOAT,r,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Ol(e,o,s,i,r)}generateTextureForPositionsDecodeMatrices(e,t,s){const i=t.length;if(0===i)throw"num decode+entity matrices===0";const r=2048,o=Math.ceil(i/512),n=new Float32Array(8192*o);bl.sizeDataPositionDecodeMatrices+=n.byteLength,bl.numberOfTextures++;const a=u.mat4();for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Dl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new Nl,this._dataTextureState=new Cl,this._dataTextureGenerator=new Sl,this._state=new Ne({origin:u.vec3(t.origin),metallicRoughnessBuf:null,positionsDecodeMatrix:u.mat4(),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this.aabb=u.collapseAABB3(),this._numUpdatesInFrame=0,this._finalized=!1}canCreatePortion(e){if(this._finalized)throw"Already finalized";const t=e.buckets.length;this._numPortions+t>65536&&bl.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const i=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[i]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let i=0,r=0;e.buckets.forEach((e=>{i+=e.positionsCompressed.length/3,r+=e.indices.length/3})),(this._state.numVertices+i>16777216||t+r>16777216)&&bl.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+i<=16777216&&t+r<=16777216}return s}createPortion(e){if(this._finalized)throw"Already finalized";const t=[],s=e.worldAABB;e.buckets.forEach(((i,r)=>{const o=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#${r}`:`${e.id}#${r}`;let n=this._bucketGeometries[o];n||(n=this._createBucketGeometry(e,i),this._bucketGeometries[o]=n);const a=u.collapseAABB3(Ml),l=this._createSubPortion(e,n,i,a);u.expandAABB3(s,a),t.push(l)}));const i=this._state.origin;0===i[0]&&0===i[1]&&0===i[2]||(s[0]+=i[0],s[1]+=i[1],s[2]+=i[2],s[3]+=i[0],s[4]+=i[1],s[5]+=i[2]),u.expandAABB3(this.aabb,s);const r=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(t),this.model.numPortions++,r}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;bl.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;bl.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,i=t.indices,r=t.edgeIndices,o=this._buffer,n=o.positionsCompressed.length/3,a=s.length/3;for(let e=0,t=s.length;e0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=h.perTriangleNumberPortionId8Bits,c.numIndices8Bits+=s,bl.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=h.perTriangleNumberPortionId16Bits,c.numIndices16Bits+=s,bl.totalPolygons16Bits+=t.numTriangles):(e=h.perTriangleNumberPortionId32Bits,c.numIndices32Bits+=s,bl.totalPolygons32Bits+=t.numTriangles),bl.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=h.perEdgeNumberPortionId8Bits,c.numEdgeIndices8Bits+=s,bl.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=h.perEdgeNumberPortionId16Bits,c.numEdgeIndices16Bits+=s,bl.totalEdges16Bits+=t.numEdges):(e=h.perEdgeNumberPortionId32Bits,c.numEdgeIndices32Bits+=s,bl.totalEdges32Bits+=t.numEdges),bl.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId32Bits)),i.indices8Bits.length>0&&(t.texturePerPolygonIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,i.indices8Bits)),i.indices16Bits.length>0&&(t.texturePerPolygonIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,i.indices16Bits)),i.indices32Bits.length>0&&(t.texturePerPolygonIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,i.indices32Bits)),i.edgeIndices8Bits.length>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(s,i.edgeIndices8Bits)),i.edgeIndices16Bits.length>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(s,i.edgeIndices16Bits)),i.edgeIndices32Bits.length>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(s,i.edgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&B&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&G&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&H&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&k&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&L&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&V&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&M&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&F&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&B?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&H?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&L?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(console.info("_uploadDeferredFlags"),this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdColorsAndFlags._textureWidth,t.texturePerObjectIdColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectIdColorsAndFlags._textureData),e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdOffsets._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdOffsets._textureWidth,t.texturePerObjectIdOffsets._textureHeight,e.RGB,e.FLOAT,t.texturePerObjectIdOffsets._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdColorsAndFlags._texture),i.texSubImage2D(i.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,i.RGBA_INTEGER,i.UNSIGNED_BYTE,Bl)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,i=!1){const r=this._portionToSubPortionsMap[e];for(let e=0,o=r.length;e=10&&this._beginDeferredFlags(),d.bindTexture(d.TEXTURE_2D,p.texturePerObjectIdColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,Bl))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),o.bindTexture(o.TEXTURE_2D,r.texturePerObjectIdColorsAndFlags._texture),o.texSubImage2D(o.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,o.RGBA_INTEGER,o.UNSIGNED_BYTE,Bl))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdOffsets._texture),i.texSubImage2D(i.TEXTURE_2D,0,0,e,1,1,i.RGB,i.FLOAT,Fl))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._dataTextureRenderers.colorRendererWithSAO&&this._dataTextureRenderers.colorRendererWithSAO.drawLayer(t,this,ji.COLOR_OPAQUE):this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,ji.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.depthRenderer&&this._dataTextureRenderers.depthRenderer.drawLayer(t,this,ji.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.normalsRenderer&&this._dataTextureRenderers.normalsRenderer.drawLayer(t,this,ji.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,ji.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,ji.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,ji.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ji.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ji.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,ji.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.occlusionRenderer&&this._dataTextureRenderers.occlusionRenderer.drawLayer(t,this,ji.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.shadowRenderer&&this._dataTextureRenderers.shadowRenderer.drawLayer(t,this,ji.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickMeshRenderer&&this._dataTextureRenderers.pickMeshRenderer.drawLayer(t,this,ji.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickDepthRenderer&&this._dataTextureRenderers.pickDepthRenderer.drawLayer(t,this,ji.PICK))}drawSnapInitDepthBuf(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.snapDepthBufInitRenderer&&this._dataTextureRenderers.snapDepthBufInitRenderer.drawLayer(t,this,ji.PICK))}drawSnapDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.vertexDepthRenderer&&this._dataTextureRenderers.vertexDepthRenderer.drawLayer(t,this,ji.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickNormalsRenderer&&this._dataTextureRenderers.pickNormalsRenderer.drawLayer(t,this,ji.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const Gl=u.vec3();u.mat4();const kl=u.vec3([1,1,1]),Vl=u.vec3([0,0,0]),jl=u.vec3([0,0,0]),Ql=u.identityQuaternion(),Wl=u.identityMat4(),zl=new Uint8Array([255,255,255]);class Kl extends C{constructor(e,t={}){super(e,t),this._dtxEnabled=this.scene.dtxEnabled&&!1!==t.dtxEnabled,this._enableVertexWelding=!1,this._enableIndexBucketing=!0,this._vboBatchingLayerScratchMemory=(Vi++,ki),this._textureTranscoder=t.textureTranscoder||function(e){const t=e.scene.id;let s=Xn[t];return s||(s=new Yn({viewer:e}),Xn[t]=s,e.scene.on("destroyed",(()=>{delete Xn[t],s.destroy()}))),s}(this.scene.viewer),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this._aabb=u.collapseAABB3(),this._aabbDirty=!0,this._quantizationRanges={},this._vboInstancingLayers={},this._vboBatchingLayers={},this._dtxLayers={},this._meshList=[],this.layerList=[],this._entityList=[],this._geometries={},this._dtxBuckets={},this._textures={},this._textureSets={},this._meshes={},this._entities={},this._scheduledMeshes={},this.renderFlags=new _s,this.numGeometries=0,this.numPortions=0,this.numVisibleLayerPortions=0,this.numTransparentLayerPortions=0,this.numXRayedLayerPortions=0,this.numHighlightedLayerPortions=0,this.numSelectedLayerPortions=0,this.numEdgesLayerPortions=0,this.numPickableLayerPortions=0,this.numClippableLayerPortions=0,this.numCulledLayerPortions=0,this.numEntities=0,this._numTriangles=0,this._numLines=0,this._numPoints=0,this._edgeThreshold=t.edgeThreshold||10,this._origin=u.vec3(t.origin||[0,0,0]),this._position=u.vec3(t.position||[0,0,0]),this._rotation=u.vec3(t.rotation||[0,0,0]),this._quaternion=u.vec4(t.quaternion||[0,0,0,1]),this._conjugateQuaternion=u.vec4(t.quaternion||[0,0,0,1]),t.rotation&&u.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._scale=u.vec3(t.scale||[1,1,1]),this._worldRotationMatrix=u.mat4(),this._worldRotationMatrixConjugate=u.mat4(),this._matrix=u.mat4(),this._matrixDirty=!0,this._rebuildMatrices(),this._worldNormalMatrix=u.mat4(),u.inverseMat4(this._matrix,this._worldNormalMatrix),u.transposeMat4(this._worldNormalMatrix),(t.matrix||t.position||t.rotation||t.scale||t.quaternion)&&(this._viewMatrix=u.mat4(),this._viewNormalMatrix=u.mat4(),this._viewMatrixDirty=!0,this._matrixNonIdentity=!0),this._opacity=1,this._colorize=[1,1,1],this._saoEnabled=!1!==t.saoEnabled,this._pbrEnabled=!1!==t.pbrEnabled,this._colorTextureEnabled=!1!==t.colorTextureEnabled,this._isModel=t.isModel,this._isModel&&this.scene._registerModel(this),this._onCameraViewMatrix=this.scene.camera.on("matrix",(()=>{this._viewMatrixDirty=!0})),this.scene.vfc.enabled&&(this._vfcManager=this.scene.vfc.getVFCManager(this)),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_createDefaultTextureSet(){const e=new kn({id:"defaultColorTexture",texture:new qs({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new kn({id:"defaultMetalRoughTexture",texture:new qs({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new kn({id:"defaultNormalsTexture",texture:new qs({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),i=new kn({id:"defaultEmissiveTexture",texture:new qs({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),r=new kn({id:"defaultOcclusionTexture",texture:new qs({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=i,this._textures.defaultOcclusionTexture=r,this._textureSets.defaultTextureSet=new Gn({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:i,occlusionTexture:r})}get isPerformanceModel(){return!0}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),u.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),u.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||Wl),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),u.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),u.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),u.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),u.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),u.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0}_setLocalAABBDirty(){for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,i=t.length;e{l.setImage(h,{minFilter:s,magFilter:i,wrapS:r,wrapT:o,wrapR:n,flipY:e.flipY,encoding:a}),this.glRedraw()},h.src=e.src;break;default:this._textureTranscoder?m.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new kn({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,i,r,o,n;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(i=this._textures[e.metallicRoughnessTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(r=this._textures[e.normalsTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(o=this._textures[e.emissiveTextureId],!o)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else o=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(n=this._textures[e.occlusionTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultOcclusionTexture;const a=new Gn({id:t,model:this,colorTexture:s,metallicRoughnessTexture:i,normalsTexture:r,emissiveTexture:o,occlusionTexture:n});this._textureSets[t]=a}createMesh(e){if(void 0===e.id||null===e.id)return void this.error("[createMesh] SceneModel.createMesh() config missing: id");if(this._scheduledMeshes[e.id])return void this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`);if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return void this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),null;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),null;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),null;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),null;e.normals&&(e.normals=null);const t=!!this._dtxEnabled&&("triangles"===e.primitive||"solid"===e.primitive||"surface"===e.primitive);if(e.origin=e.origin?u.addVec3(this._origin,e.origin,u.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||kl,s=e.position||Vl,i=e.rotation||jl;u.eulerToQuaternion(i,"XYZ",Ql),e.meshMatrix=u.composeMat4(s,Ql,t,u.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Dr(e.positionsDecodeBoundary,u.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=u.vec3(),s=[];w(e.positions,s,t)&&(e.positions=s,e.origin=u.addVec3(e.origin,t,t))}if(e.positions){const t=u.collapseAABB3();e.positionsDecodeMatrix=u.mat4(),u.expandAABB3Points3(t,e.positions),e.positionsCompressed=Pr(e.positions,t,e.positionsDecodeMatrix)}e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=$e(e.positions,e.indices,null,2):e.edgeIndices=$e(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.buckets||(e.buckets=Yl(e,this._enableVertexWelding&&this._enableIndexBucketing))}else{if(e.type=1,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):[255,255,255],e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.positions){const t=[];w(e.positions,t,Gl)&&(e.positions=t,e.origin=u.addVec3(e.origin,Gl,u.vec3()))}if(e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=$e(e.positions,e.indices,null,2):e.edgeIndices=$e(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId],!e.textureSet))return void this.error(`[createMesh] Texture set not found: ${e.textureSetId} - ensure that you create it first with createTextureSet()`)}}else{if(e.positions||e.positionsCompressed||e.indices||e.edgeIndices||e.normals||e.normalsCompressed||e.uv||e.uvCompressed||e.positionsDecodeMatrix)return void this.error("Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)");if(e.geometry=this._geometries[e.geometryId],!e.geometry)return void this.error(`[createMesh] Geometry not found: ${e.geometryId} - ensure that you create it first with createGeometry()`);if(e.origin=e.origin?u.addVec3(this._origin,e.origin,u.vec3()):this._origin,e.positionsDecodeMatrix=e.geometry.positionsDecodeMatrix,e.matrix)e.meshMatrix=e.matrix.slice();else{const t=e.scale||kl,s=e.position||Vl,i=e.rotation||jl;u.eulerToQuaternion(i,"XYZ",Ql),e.meshMatrix=u.composeMat4(s,Ql,t,u.mat4())}if(!!this._dtxEnabled&&("triangles"===e.geometry.primitive||"solid"===e.geometry.primitive||"surface"===e.geometry.primitive)){e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255;let t=this._dtxBuckets[e.geometryId];t||(t=Yl(e.geometry,this._enableVertexWelding,this._enableIndexBucketing),this._dtxBuckets[e.geometryId]=t),e.buckets=t}else e.type=0,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):zl,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId]),function(e){if(e.obb=u.OBB3(),e.positionsCompressed&&e.positionsCompressed.length>0){const t=u.collapseAABB3();u.expandAABB3Points3(t,e.positionsCompressed),nt.decompressAABB(t,e.positionsDecodeMatrix),u.AABB3ToOBB3(t,e.obb)}else if(e.positions&&e.positions.length>0){const t=u.collapseAABB3();u.expandAABB3Points3(t,e.positions),u.AABB3ToOBB3(t,e.obb)}}(e.geometry)}e.numPrimitives=this._getNumPrimitives(e),this._vfcManager&&!this._vfcManager.finalized?this._vfcManager.addMesh(e):this._createMesh(e)}_createMesh(e){const t=new Gi(this,e.id,e.color,e.opacity);t.pickId=this.scene._renderer.getPickID(t);const s=t.pickId,i=s>>24&255,r=s>>16&255,o=s>>8&255,n=255&s;switch(e.pickColor=new Uint8Array([n,o,r,i]),e.worldAABB=u.collapseAABB3(),e.aabb=e.worldAABB,e.solid="solid"===e.primitive,t.origin=u.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e);break;case 1:t.layer=this._getVBOBatchingLayer(e);break;case 0:t.layer=this._getVBOInstancingLayer(e)}t.portionId=t.layer.createPortion(e),t.aabb=e.worldAABB,t.numPrimitives=e.numPrimitives,u.expandAABB3(this._aabb,t.aabb),this._meshes[e.id]=t,this._meshList.push(t)}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,i=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,i=e.textureSetId||"-",r=e.geometryId,o=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${i}.${r}`;let n=this._vboInstancingLayers[o];if(n)return n;let a=e.textureSet;const l=e.geometry;for(;!n;)switch(l.primitive){case"triangles":case"surface":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new zo({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new zo({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":console.info(`[SceneModel ${this.id}]: creating LinesInstancingLayer`),n=new An({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0});break;case"points":console.info(`[SceneModel ${this.id}]: creating PointsInstancingLayer`),n=new Hn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[o]=n,this.layerList.push(n),n}createEntity(e){if(void 0===e.id?e.id=u.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=u.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;if(this._visible&&!1!==e.visible&&(t|=B),this._pickable&&!1!==e.pickable&&(t|=M),this._culled&&!1!==e.culled&&(t|=F),this._clippable&&!1!==e.clippable&&(t|=L),this._collidable&&!1!==e.collidable&&(t|=U),this._edges&&!1!==e.edges&&(t|=V),this._xrayed&&!1!==e.xrayed&&(t|=H),this._highlighted&&!1!==e.highlighted&&(t|=G),this._selected&&!1!==e.selected&&(t|=k),e.flags=t,this._vfcManager&&!this._vfcManager.finalized){for(let t=0,s=e.meshIds.length;t{}));for(let e=0,t=this.layerList.length;ee.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,i=t.visibleLayers.length;s65536?16:8)}else n=[{positionsCompressed:i,indices:r,edgeIndices:o}];return n}const Xl=u.vec4(),Zl=u.vec4(),ql=u.vec3(),Jl=u.vec3(),$l=u.vec3(),eh=u.vec4(),th=u.vec4(),sh=u.vec4();class ih{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let i=!1;const r=this._scene.camera;if(e){const t=u.subVec3(e,r.eye,ql);i=u.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=u.vec3();u.decomposeMat4(u.inverseMat4(this._scene.viewer.camera.viewMatrix,u.mat4()),t,u.vec4(),u.vec3());const s=u.distVec3(t,e);let i=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(i/=this._scene.camera.ortho.scale/2),S(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new ni(this._scene,Ls({radius:i})),this._pivotSphere=new Bs(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){u.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,u.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,i=s[2],r=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*i/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*r/2);let o=t._lastBoundingClientRect;if(!o||t._canvasSizeChanged){const e=t.canvas;o=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(o.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(o.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(S(this.getPivotPos(),this._rtcCenter,this._rtcPos),u.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new dt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=u.lookAtMat4v(e.eye,e.look,e.worldUp);u.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=u.distVec3(e.eye,s),t=u.inverseMat4(t);const i=u.transformVec3(t,this._cameraOffset),r=u.vec3();if(u.subVec3(e.eye,s,r),u.addVec3(r,i),e.zUp){const e=r[1];r[1]=r[2],r[2]=e}this._radius=u.lenVec3(r),this._polar=Math.acos(r[1]/this._radius),this._azimuth=Math.atan2(r[0],r[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=u.normalizeVec3(u.subVec3(e.look,e.eye,rh)),s=u.cross3Vec3(t,e.worldUp,oh);return u.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(u.distVec3(this._scene.center,t.eye)),i=t.project.transposedMatrix,r=i.subarray(8,12),o=i.subarray(12),n=[0,0,-1,1],a=u.dotVec4(n,r)/u.dotVec4(n,o),l=ah;t.project.unproject(e,a,lh,hh,l);const h=u.normalizeVec3(u.subVec3(l,t.eye,rh)),c=u.addVec3(t.eye,u.mulVec3Scalar(h,s,oh),nh);this.setPivotPos(c)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var i=-e;const r=-t;1===s.worldUp[2]&&(i=-i),this._azimuth+=.01*-i,this._polar+=.01*r,this._polar=u.clamp(this._polar,.001,Math.PI-.001);const o=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=o[1];o[1]=o[2],o[2]=e}const n=u.lenVec3(u.subVec3(s.look,s.eye,u.vec3())),a=this.getPivotPos();u.addVec3(o,a);let l=u.lookAtMat4v(o,a,s.worldUp);l=u.inverseMat4(l);const h=u.transformVec3(l,this._cameraOffset);l[12]-=h[0],l[13]-=h[1],l[14]-=h[2];const c=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],u.subVec3(s.eye,u.mulVec3Scalar(c,n),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Ah{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=u.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._needFireEvents=!1}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1,this._needFireEvents=!1;const e=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.snapPick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&e.snappedWorldPos?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents=!0):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const t=this.pickResult.canvasPos;if(t[0]===this.pickCursorPos[0]&&t[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents=e,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents=!0):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents=!0)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!0)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,cursorPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new $;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.snappedWorldPos,e.cursorPos=this.pickCursorPos,e.canvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=!1}}destroy(){}}const uh=u.vec2();class ph{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController;let n,a,l,h=0,c=0,A=0,p=0,d=!1;const f=u.vec3();let E=!0;const m=this._scene.canvas.canvas,y=[];function g(e=!0){m.style.cursor="move",h=i.pointerCanvasPos[0],c=i.pointerCanvasPos[1],A=i.pointerCanvasPos[0],p=i.pointerCanvasPos[1],e&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(d=!0,f.set(o.pickResult.worldPos)):d=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(n=!0,g()):(n=!0,g(!1));break;case 2:a=!0,g();break;case 3:l=!0,s.panRightClick&&g()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!n&&!a&&!l)return;const t=e.canvas.boundary,o=t[2],A=t[3],p=i.pointerCanvasPos[0],E=i.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&a||s.panRightClick&&l){const t=p-h,s=E-c,i=e.camera;if("perspective"===i.projection){const o=Math.abs(d?u.lenVec3(u.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=1.5*t*o/A,r.panDeltaY+=1.5*s*o/A}else r.panDeltaX+=.5*i.ortho.scale*(t/A),r.panDeltaY+=.5*i.ortho.scale*(s/A)}else!n||a||l||s.planView||(s.firstPerson?(r.rotateDeltaY-=(p-h)/o*s.dragRotationRate/2,r.rotateDeltaX+=(E-c)/A*(s.dragRotationRate/4)):(r.rotateDeltaY-=(p-h)/o*(1.5*s.dragRotationRate),r.rotateDeltaX+=(E-c)/A*(1.5*s.dragRotationRate)));h=p,c=E}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&i.mouseover&&(E=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:n=!1,a=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,i=0,r=0,o=0,n=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,o+=s.scrollLeft,n+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+o-i,t[1]=e.pageY+n-r}else e=window.event,t[0]=e.x,t[1]=e.y}(e,uh);const s=uh[0],i=uh[1];Math.abs(s-A)<3&&Math.abs(i-p)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:uh,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const I=1/60;let v=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var o=null!==v?t-v:0;v=t,o>.05&&(o=.05),o{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const n=r._isKeyDownForAction(r.AXIS_VIEW_RIGHT),a=r._isKeyDownForAction(r.AXIS_VIEW_BACK),l=r._isKeyDownForAction(r.AXIS_VIEW_LEFT),h=r._isKeyDownForAction(r.AXIS_VIEW_FRONT),c=r._isKeyDownForAction(r.AXIS_VIEW_TOP),A=r._isKeyDownForAction(r.AXIS_VIEW_BOTTOM);if(!(n||a||l||h||c||A))return;const p=e.aabb,d=u.getAABB3Diag(p);u.getAABB3Center(p,dh);const f=Math.abs(d/Math.tan(t.cameraFlight.fitFOV*u.DEGTORAD)),E=1.1*d;gh.orthoScale=E,n?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldRight,f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):a?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldForward,f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):l?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldRight,-f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):h?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldForward,-f,fh),yh)),gh.look.set(dh),gh.up.set(o.worldUp)):c?(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldUp,f,fh),yh)),gh.look.set(dh),gh.up.set(u.normalizeVec3(u.mulVec3Scalar(o.worldForward,1,Eh),mh))):A&&(gh.eye.set(u.addVec3(dh,u.mulVec3Scalar(o.worldUp,-f,fh),yh)),gh.look.set(dh),gh.up.set(u.normalizeVec3(u.mulVec3Scalar(o.worldForward,-1,Eh)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(dh),t.cameraFlight.duration>0?t.cameraFlight.flyTo(gh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(gh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class vh{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,h=!1;const c=this._scene.canvas.canvas,A=s=>{let i;s&&s.worldPos&&(i=s.worldPos);const r=s&&s.entity?s.entity.aabb:e.aabb;if(i){const s=e.camera;u.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};c.addEventListener("mousemove",this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||h)return;const r=a.hasSubs("hover"),n=a.hasSubs("hoverOut"),c=a.hasSubs("hoverOff"),A=a.hasSubs("hoverSurface"),u=a.hasSubs("hoverSnapOrSurface");if(r||n||c||A||u)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=u,o.update(),o.pickResult){if(o.pickResult.entity){const t=o.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),a.fire("hoverEnter",o.pickResult,!0),this._lastPickedEntityId=t)}a.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&a.fire("hoverSurface",o.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),a.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}),c.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(h=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(i.mouseDownClientX=t.clientX,i.mouseDownClientY=t.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===t.which))){const t=o.pickResult;t&&t.worldPos?(n.setPivotPos(t.worldPos),n.startPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),n.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(h=!1),n.getPivoting()&&n.endPivot()}),c.addEventListener("mouseup",this._canvasMouseUpHandler=r=>{if(!s.active||!s.pointerEnabled)return;if(!(1===r.which))return;if(n.hidePivot(),Math.abs(r.clientX-i.mouseDownClientX)>3||Math.abs(r.clientY-i.mouseDownClientY)>3)return;const l=a.hasSubs("picked"),h=a.hasSubs("pickedNothing"),c=a.hasSubs("pickedSurface"),p=a.hasSubs("doublePicked"),d=a.hasSubs("doublePickedSurface"),f=a.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||p||d||f))return(l||h||c)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=c,o.update(),o.pickResult?(a.fire("picked",o.pickResult,!0),o.pickedSurface&&a.fire("pickedSurface",o.pickResult,!0)):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo,o.schedulePickSurface=c,o.update();const e=o.pickResult,r=o.pickedSurface;this._timeout=setTimeout((()=>{e?(a.fire("picked",e,!0),r&&(a.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo||p||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(a.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&a.fire("doublePickedSurface",o.pickResult,!0),s.doublePickFlyTo&&(A(o.pickResult),!s.firstPerson&&s.followPointer)){const e=o.pickResult.entity.aabb,s=u.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(a.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),s.doublePickFlyTo&&(A(),!s.firstPerson&&s.followPointer)){const s=e.aabb,i=u.getAABB3Center(s);t.pivotController.setPivotPos(i),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class Th{constructor(e,t,s,i,r){this._scene=e;const o=e.input,n=[],a=e.canvas.canvas;let l=!0;this._onSceneMouseMove=o.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=o.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&i.mouseover&&(n[t]=!0,t===o.KEY_SHIFT&&(a.style.cursor="move"))})),this._onSceneKeyUp=o.on("keyup",(i=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(n[i]=!1,i===o.KEY_SHIFT&&(a.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(a=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const h=t.cameraControl,c=a.deltaTime/1e3;if(!s.planView){const e=h._isKeyDownForAction(h.ROTATE_Y_POS,n),i=h._isKeyDownForAction(h.ROTATE_Y_NEG,n),o=h._isKeyDownForAction(h.ROTATE_X_POS,n),a=h._isKeyDownForAction(h.ROTATE_X_NEG,n),l=c*s.keyboardRotationRate;(e||i||o||a)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?r.rotateDeltaY+=l:i&&(r.rotateDeltaY-=l),o?r.rotateDeltaX+=l:a&&(r.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!n[o.KEY_CTRL]&&!n[o.KEY_ALT]){const e=h._isKeyDownForAction(h.DOLLY_BACKWARDS,n),o=h._isKeyDownForAction(h.DOLLY_FORWARDS,n);if(e||o){const n=c*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),o?r.dollyDelta-=n:e&&(r.dollyDelta+=n),l&&(i.followPointerDirty=!0,l=!1)}}const A=h._isKeyDownForAction(h.PAN_FORWARDS,n),u=h._isKeyDownForAction(h.PAN_BACKWARDS,n),p=h._isKeyDownForAction(h.PAN_LEFT,n),d=h._isKeyDownForAction(h.PAN_RIGHT,n),f=h._isKeyDownForAction(h.PAN_UP,n),E=h._isKeyDownForAction(h.PAN_DOWN,n),m=(n[o.KEY_ALT]?.3:1)*c*s.keyboardPanRate;(A||u||p||d||f||E)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),E?r.panDeltaY+=m:f&&(r.panDeltaY+=-m),d?r.panDeltaX+=-m:p&&(r.panDeltaX+=m),u?r.panDeltaZ+=m:A&&(r.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const _h=u.vec3();class Rh{constructor(e,t,s,i,r){this._scene=e;const o=e.camera,n=t.pickController,a=t.pivotController,l=t.panController;let h=1,c=1,A=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(r.dollyDelta)<.001&&(r.dollyDelta=0),Math.abs(r.rotateDeltaX)<.001&&(r.rotateDeltaX=0),Math.abs(r.rotateDeltaY)<.001&&(r.rotateDeltaY=0),0===r.rotateDeltaX&&0===r.rotateDeltaY||(r.dollyDelta=0),s.followPointer&&--h<=0&&(h=1,0!==r.dollyDelta)){if(0===r.rotateDeltaY&&0===r.rotateDeltaX&&s.followPointer&&i.followPointerDirty&&(n.pickCursorPos=i.pointerCanvasPos,n.schedulePickSurface=!0,n.update(),n.pickResult&&n.pickResult.worldPos?A=n.pickResult.worldPos:(c=1,A=null),i.followPointerDirty=!1),A){const t=Math.abs(u.lenVec3(u.subVec3(A,e.camera.eye,_h)));c=t/s.dollyProximityThreshold}c{i.mouseover=!0}),o.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{i.mouseover=!1,o.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{Dh(e,o,i.pointerCanvasPos)}),o.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(Dh(e,o,i.pointerCanvasPos),i.mouseover=!0)}),o.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function Dh(e,t,s){if(e){const{x:i,y:r}=t.getBoundingClientRect();s[0]=e.clientX-i,s[1]=e.clientY-r}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const Nh=function(e,t){if(e){let s=e.target,i=0,r=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class Ch{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=u.vec2(),l=u.vec2(),h=u.vec2(),c=u.vec2(),A=[],p=this._scene.canvas.canvas;let d=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),p.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const r=t.touches,l=t.changedTouches;for(i.touchStartTime=Date.now(),1===r.length&&1===l.length&&(Nh(r[0],a),s.followPointer&&(o.pickCursorPos=a,o.schedulePickSurface=!0,o.update(),s.planView||(o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(n.setPivotPos(o.pickResult.worldPos),!s.firstPerson&&n.startPivot()&&n.showPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),!s.firstPerson&&n.startPivot()&&n.showPivot()))));A.length{n.getPivoting()&&n.endPivot()}),p.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const n=e.canvas.boundary,a=n[2],p=n[3],E=t.touches;if(t.touches.length===d){if(1===d){Nh(E[0],l),u.subVec2(l,A[0],c);const t=c[0],o=c[1];if(null!==i.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(o)>s.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),s.planView){const i=e.camera;if("perspective"===i.projection){const n=Math.abs(e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=t*n/p*s.touchPanRate,r.panDeltaY+=o*n/p*s.touchPanRate}else r.panDeltaX+=.5*i.ortho.scale*(t/p)*s.touchPanRate,r.panDeltaY+=.5*i.ortho.scale*(o/p)*s.touchPanRate}else r.rotateDeltaY-=t/a*(1*s.dragRotationRate),r.rotateDeltaX+=o/p*(1.5*s.dragRotationRate)}else if(2===d){const t=E[0],n=E[1];Nh(t,l),Nh(n,h);const a=u.geometricMeanVec2(A[0],A[1]),c=u.geometricMeanVec2(l,h),d=u.vec2();u.subVec2(a,c,d);const f=d[0],m=d[1],y=e.camera,g=u.distVec2([t.pageX,t.pageY],[n.pageX,n.pageY]),I=(u.distVec2(A[0],A[1])-g)*s.touchDollyRate;if(r.dollyDelta=I,Math.abs(I)<1)if("perspective"===y.projection){const t=o.pickResult?o.pickResult.worldPos:e.center,i=Math.abs(u.lenVec3(u.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);r.panDeltaX-=f*i/p*s.touchPanRate,r.panDeltaY-=m*i/p*s.touchPanRate}else r.panDeltaX-=.5*y.ortho.scale*(f/p)*s.touchPanRate,r.panDeltaY-=.5*y.ortho.scale*(m/p)*s.touchPanRate;i.pointerCanvasPos=c}for(let e=0;e{let i;s&&s.worldPos&&(i=s.worldPos);const r=s?s.entity.aabb:e.aabb;if(i){const s=e.camera;u.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};p.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null);const r=e.touches,o=e.changedTouches;if(a=Date.now(),1===r.length&&1===o.length){c=a,Oh(r[0],h);const o=h[0],n=h[1],l=r[0].pageX,A=r[0].pageY;i.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(A)],canvasPos:[Math.round(o),Math.round(n)],event:e},!0),i.longTouchTimeout=null}),s.longTapTimeout)}else c=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),r=e.touches,a=e.changedTouches,p=n.hasSubs("pickedSurface");null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),0===r.length&&1===a.length&&c>-1&&t-c<150&&(A>-1&&c-A<325?(Oh(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=p,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("doublePicked",o.pickResult),o.pickedSurface&&n.fire("doublePickedSurface",o.pickResult),s.doublePickFlyTo&&d(o.pickResult)):(n.fire("doublePickedNothing"),s.doublePickFlyTo&&d()),A=-1):u.distVec2(l[0],h)<4&&(Oh(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=p,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("picked",o.pickResult),o.pickedSurface&&n.fire("pickedSurface",o.pickResult)):n.fire("pickedNothing"),A=t),c=-1),l.length=r.length;for(let e=0,t=r.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:u.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:u.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Ah(this,this._configs),pivotController:new ch(s,this._configs),panController:new ih(s),cameraFlight:new bi(this,{duration:.5})},this._handlers=[new Ph(this.scene,this._controllers,this._configs,this._states,this._updates),new Ch(this.scene,this._controllers,this._configs,this._states,this._updates),new ph(this.scene,this._controllers,this._configs,this._states,this._updates),new Ih(this.scene,this._controllers,this._configs,this._states,this._updates),new vh(this.scene,this._controllers,this._configs,this._states,this._updates),new bh(this.scene,this._controllers,this._configs,this._states,this._updates),new Th(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new Rh(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",m.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,i=s.length;e0?Lh(t):null,n=s&&s.length>0?Lh(s):null,a=e=>{if(!e)return;var t=!0;(n&&n[e.type]||o&&!o[e.type])&&(t=!1),t&&i.push(e.id);const s=e.children;if(s)for(var r=0,l=s.length;r * Copyright (c) 2022 Niklas von Hertzen @@ -43,5 +43,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Uh=function(e,t){return Uh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},Uh(e,t)};function Hh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}Uh(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var Gh=function(){return Gh=Object.assign||function(e){for(var t,s=1,i=arguments.length;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=55296&&r<=56319&&s>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zh=0;Zh=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ic="undefined"==typeof Uint8Array?[]:new Uint8Array(256),rc=0;rc>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i0;){var n=i[--o];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var a=s;a<=i.length;){var l;if((l=i[++a])===t)return!0;if(l!==oc)break}if(n!==oc)break}return!1},Hc=function(e,t){for(var s=e;s>=0;){var i=t[s];if(i!==oc)return i;s--}return 0},Gc=function(e,t,s,i,r){if(0===s[i])return"×";var o=i-1;if(Array.isArray(r)&&!0===r[o])return"×";var n=o-1,a=o+1,l=t[o],h=n>=0?t[n]:0,c=t[a];if(2===l&&3===c)return"×";if(-1!==xc.indexOf(l))return"!";if(-1!==xc.indexOf(c))return"×";if(-1!==wc.indexOf(c))return"×";if(8===Hc(o,t))return"÷";if(11===Oc.get(e[o]))return"×";if((l===Ic||l===vc)&&11===Oc.get(e[a]))return"×";if(7===l||7===c)return"×";if(9===l)return"×";if(-1===[oc,nc,ac].indexOf(l)&&9===c)return"×";if(-1!==[lc,hc,cc,dc,yc].indexOf(c))return"×";if(Hc(o,t)===pc)return"×";if(Uc(23,pc,o,t))return"×";if(Uc([lc,hc],uc,o,t))return"×";if(Uc(12,12,o,t))return"×";if(l===oc)return"÷";if(23===l||23===c)return"×";if(16===c||16===l)return"÷";if(-1!==[nc,ac,uc].indexOf(c)||14===l)return"×";if(36===h&&-1!==Lc.indexOf(l))return"×";if(l===yc&&36===c)return"×";if(c===Ac)return"×";if(-1!==Sc.indexOf(c)&&l===fc||-1!==Sc.indexOf(l)&&c===fc)return"×";if(l===mc&&-1!==[Rc,Ic,vc].indexOf(c)||-1!==[Rc,Ic,vc].indexOf(l)&&c===Ec)return"×";if(-1!==Sc.indexOf(l)&&-1!==Bc.indexOf(c)||-1!==Bc.indexOf(l)&&-1!==Sc.indexOf(c))return"×";if(-1!==[mc,Ec].indexOf(l)&&(c===fc||-1!==[pc,ac].indexOf(c)&&t[a+1]===fc)||-1!==[pc,ac].indexOf(l)&&c===fc||l===fc&&-1!==[fc,yc,dc].indexOf(c))return"×";if(-1!==[fc,yc,dc,lc,hc].indexOf(c))for(var A=o;A>=0;){if((u=t[A])===fc)return"×";if(-1===[yc,dc].indexOf(u))break;A--}if(-1!==[mc,Ec].indexOf(c))for(A=-1!==[lc,hc].indexOf(l)?n:o;A>=0;){var u;if((u=t[A])===fc)return"×";if(-1===[yc,dc].indexOf(u))break;A--}if(Pc===l&&-1!==[Pc,Dc,Tc,_c].indexOf(c)||-1!==[Dc,Tc].indexOf(l)&&-1!==[Dc,Nc].indexOf(c)||-1!==[Nc,_c].indexOf(l)&&c===Nc)return"×";if(-1!==Mc.indexOf(l)&&-1!==[Ac,Ec].indexOf(c)||-1!==Mc.indexOf(c)&&l===mc)return"×";if(-1!==Sc.indexOf(l)&&-1!==Sc.indexOf(c))return"×";if(l===dc&&-1!==Sc.indexOf(c))return"×";if(-1!==Sc.concat(fc).indexOf(l)&&c===pc&&-1===Cc.indexOf(e[a])||-1!==Sc.concat(fc).indexOf(c)&&l===hc)return"×";if(41===l&&41===c){for(var p=s[o],d=1;p>0&&41===t[--p];)d++;if(d%2!=0)return"×"}return l===Ic&&c===vc?"×":"÷"},kc=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var s=function(e,t){void 0===t&&(t="strict");var s=[],i=[],r=[];return e.forEach((function(e,o){var n=Oc.get(e);if(n>50?(r.push(!0),n-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(o),s.push(16);if(4===n||11===n){if(0===o)return i.push(o),s.push(gc);var a=s[o-1];return-1===Fc.indexOf(a)?(i.push(i[o-1]),s.push(a)):(i.push(o),s.push(gc))}return i.push(o),31===n?s.push("strict"===t?uc:Rc):n===bc||29===n?s.push(gc):43===n?e>=131072&&e<=196605||e>=196608&&e<=262141?s.push(Rc):s.push(gc):void s.push(n)})),[i,s,r]}(e,t.lineBreak),i=s[0],r=s[1],o=s[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map((function(e){return-1!==[fc,gc,bc].indexOf(e)?Rc:e})));var n="keep-all"===t.wordBreak?o.map((function(t,s){return t&&e[s]>=19968&&e[s]<=40959})):void 0;return[i,r,n]},Vc=function(){function e(e,t,s,i){this.codePoints=e,this.required="!"===t,this.start=s,this.end=i}return e.prototype.slice=function(){return Kh.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),jc=function(e){return e>=48&&e<=57},Qc=function(e){return jc(e)||e>=65&&e<=70||e>=97&&e<=102},Wc=function(e){return 10===e||9===e||32===e},zc=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},Kc=function(e){return zc(e)||jc(e)||45===e},Yc=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Xc=function(e,t){return 92===e&&10!==t},Zc=function(e,t,s){return 45===e?zc(t)||Xc(t,s):!!zc(e)||!(92!==e||!Xc(e,t))},qc=function(e,t,s){return 43===e||45===e?!!jc(t)||46===t&&jc(s):jc(46===e?t:e)},Jc=function(e){var t=0,s=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(s=-1),t++);for(var i=[];jc(e[t]);)i.push(e[t++]);var r=i.length?parseInt(Kh.apply(void 0,i),10):0;46===e[t]&&t++;for(var o=[];jc(e[t]);)o.push(e[t++]);var n=o.length,a=n?parseInt(Kh.apply(void 0,o),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(l=-1),t++);for(var h=[];jc(e[t]);)h.push(e[t++]);var c=h.length?parseInt(Kh.apply(void 0,h),10):0;return s*(r+a*Math.pow(10,-n))*Math.pow(10,l*c)},$c={type:2},eA={type:3},tA={type:4},sA={type:13},iA={type:8},rA={type:21},oA={type:9},nA={type:10},aA={type:11},lA={type:12},hA={type:14},cA={type:23},AA={type:1},uA={type:25},pA={type:24},dA={type:26},fA={type:27},EA={type:28},mA={type:29},yA={type:31},gA={type:32},IA=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(zh(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==gA;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),s=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Kc(t)||Xc(s,i)){var r=Zc(t,s,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),sA;break;case 39:return this.consumeStringToken(39);case 40:return $c;case 41:return eA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),hA;break;case 43:if(qc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return tA;case 45:var o=e,n=this.peekCodePoint(0),a=this.peekCodePoint(1);if(qc(o,n,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Zc(o,n,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===n&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),pA;break;case 46:if(qc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(-1===l)return this.consumeToken()}break;case 58:return dA;case 59:return fA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),uA;break;case 64:var h=this.peekCodePoint(0),c=this.peekCodePoint(1),A=this.peekCodePoint(2);if(Zc(h,c,A))return{type:7,value:this.consumeName()};break;case 91:return EA;case 92:if(Xc(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return mA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),iA;break;case 123:return aA;case 125:return lA;case 117:case 85:var u=this.peekCodePoint(0),p=this.peekCodePoint(1);return 43!==u||!Qc(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),oA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),rA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),nA;break;case-1:return gA}return Wc(e)?(this.consumeWhiteSpace(),yA):jc(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):zc(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Kh(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Qc(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var s=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),s=!0;if(s)return{type:30,start:parseInt(Kh.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(Kh.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var i=parseInt(Kh.apply(void 0,e),16);if(45===this.peekCodePoint(0)&&Qc(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var r=[];Qc(t)&&r.length<6;)r.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(Kh.apply(void 0,r),16)}}return{type:30,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var s=this.consumeStringToken(this.consumeCodePoint());return 0===s.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:s.value}):(this.consumeBadUrlRemnants(),cA)}for(;;){var i=this.consumeCodePoint();if(-1===i||41===i)return{type:22,value:Kh.apply(void 0,e)};if(Wc(i))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:Kh.apply(void 0,e)}):(this.consumeBadUrlRemnants(),cA);if(34===i||39===i||40===i||Yc(i))return this.consumeBadUrlRemnants(),cA;if(92===i){if(!Xc(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),cA;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;Wc(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||-1===e)return;Xc(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var s=Math.min(5e4,e);t+=Kh.apply(void 0,this._value.splice(0,s)),e-=s}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",s=0;;){var i=this._value[s];if(-1===i||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(s)};if(10===i)return this._value.splice(0,s),AA;if(92===i){var r=this._value[s+1];-1!==r&&void 0!==r&&(10===r?(t+=this.consumeStringSlice(s),s=-1,this._value.shift()):Xc(i,r)&&(t+=this.consumeStringSlice(s),t+=Kh(this.consumeEscapedCodePoint()),s=-1))}s++}},e.prototype.consumeNumber=function(){var e=[],t=4,s=this.peekCodePoint(0);for(43!==s&&45!==s||e.push(this.consumeCodePoint());jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(46===s&&jc(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0),i=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===s||101===s)&&((43===i||45===i)&&jc(r)||jc(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Jc(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],s=e[1],i=this.peekCodePoint(0),r=this.peekCodePoint(1),o=this.peekCodePoint(2);return Zc(i,r,o)?{type:15,number:t,flags:s,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:t,flags:s}):{type:17,number:t,flags:s}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Qc(e)){for(var t=Kh(e);Qc(this.peekCodePoint(0))&&t.length<6;)t+=Kh(this.consumeCodePoint());Wc(this.peekCodePoint(0))&&this.consumeCodePoint();var s=parseInt(t,16);return 0===s||function(e){return e>=55296&&e<=57343}(s)||s>1114111?65533:s}return-1===e?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Kc(t))e+=Kh(t);else{if(!Xc(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=Kh(this.consumeEscapedCodePoint())}}},e}(),vA=function(){function e(e){this._tokens=e}return e.create=function(t){var s=new IA;return s.write(t),new e(s.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},s=this.consumeToken();;){if(32===s.type||OA(s,e))return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue()),s=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var s=this.consumeToken();if(32===s.type||3===s.type)return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?gA:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),TA=function(e){return 15===e.type},_A=function(e){return 17===e.type},RA=function(e){return 20===e.type},PA=function(e){return 0===e.type},DA=function(e,t){return RA(e)&&e.value===t},NA=function(e){return 31!==e.type},bA=function(e){return 31!==e.type&&4!==e.type},CA=function(e){var t=[],s=[];return e.forEach((function(e){if(4===e.type){if(0===s.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(s),void(s=[])}31!==e.type&&s.push(e)})),s.length&&t.push(s),t},OA=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},SA=function(e){return 17===e.type||15===e.type},xA=function(e){return 16===e.type||SA(e)},wA=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},BA={type:17,number:0,flags:4},FA={type:16,number:50,flags:4},MA={type:16,number:100,flags:4},LA=function(e,t,s){var i=e[0],r=e[1];return[UA(i,t),UA(void 0!==r?r:i,s)]},UA=function(e,t){if(16===e.type)return e.number/100*t;if(TA(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},HA=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case"grad":return Math.PI/200*t.number;case"rad":return t.number;case"turn":return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},GA=function(e){return 15===e.type&&("deg"===e.unit||"grad"===e.unit||"rad"===e.unit||"turn"===e.unit)},kA=function(e){switch(e.filter(RA).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[BA,BA];case"to top":case"bottom":return VA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[BA,MA];case"to right":case"left":return VA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[MA,MA];case"to bottom":case"top":return VA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[MA,BA];case"to left":case"right":return VA(270)}return 0},VA=function(e){return Math.PI*e/180},jA=function(e,t){if(18===t.type){var s=qA[t.name];if(void 0===s)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return s(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);return zA(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),1)}if(4===t.value.length){i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);var n=t.value.substring(3,4);return zA(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),parseInt(n+n,16)/255)}if(6===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6);return zA(parseInt(i,16),parseInt(r,16),parseInt(o,16),1)}if(8===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6),n=t.value.substring(6,8);return zA(parseInt(i,16),parseInt(r,16),parseInt(o,16),parseInt(n,16)/255)}}if(20===t.type){var a=$A[t.value.toUpperCase()];if(void 0!==a)return a}return $A.TRANSPARENT},QA=function(e){return 0==(255&e)},WA=function(e){var t=255&e,s=255&e>>8,i=255&e>>16,r=255&e>>24;return t<255?"rgba("+r+","+i+","+s+","+t/255+")":"rgb("+r+","+i+","+s+")"},zA=function(e,t,s,i){return(e<<24|t<<16|s<<8|Math.round(255*i)<<0)>>>0},KA=function(e,t){if(17===e.type)return e.number;if(16===e.type){var s=3===t?1:255;return 3===t?e.number/100*s:Math.round(e.number/100*s)}return 0},YA=function(e,t){var s=t.filter(bA);if(3===s.length){var i=s.map(KA),r=i[0],o=i[1],n=i[2];return zA(r,o,n,1)}if(4===s.length){var a=s.map(KA),l=(r=a[0],o=a[1],n=a[2],a[3]);return zA(r,o,n,l)}return 0};function XA(e,t,s){return s<0&&(s+=1),s>=1&&(s-=1),s<1/6?(t-e)*s*6+e:s<.5?t:s<2/3?6*(t-e)*(2/3-s)+e:e}var ZA=function(e,t){var s=t.filter(bA),i=s[0],r=s[1],o=s[2],n=s[3],a=(17===i.type?VA(i.number):HA(e,i))/(2*Math.PI),l=xA(r)?r.number/100:0,h=xA(o)?o.number/100:0,c=void 0!==n&&xA(n)?UA(n,1):1;if(0===l)return zA(255*h,255*h,255*h,1);var A=h<=.5?h*(l+1):h+l-h*l,u=2*h-A,p=XA(u,A,a+1/3),d=XA(u,A,a),f=XA(u,A,a-1/3);return zA(255*p,255*d,255*f,c)},qA={hsl:ZA,hsla:ZA,rgb:YA,rgba:YA},JA=function(e,t){return jA(e,vA.create(t).parseComponentValue())},$A={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},eu={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(RA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},tu={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},su=function(e,t){var s=jA(e,t[0]),i=t[1];return i&&xA(i)?{color:s,stop:i}:{color:s,stop:null}},iu=function(e,t){var s=e[0],i=e[e.length-1];null===s.stop&&(s.stop=BA),null===i.stop&&(i.stop=MA);for(var r=[],o=0,n=0;no?r.push(l):r.push(o),o=l}else r.push(null)}var h=null;for(n=0;ne.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},au=function(e,t){var s=VA(180),i=[];return CA(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(s=kA(t));if(GA(o))return void(s=(HA(e,o)+VA(270))%VA(360))}var n=su(e,t);i.push(n)})),{angle:s,stops:i,type:1}},lu=function(e,t){var s=0,i=3,r=[],o=[];return CA(t).forEach((function(t,n){var a=!0;if(0===n?a=t.reduce((function(e,t){if(RA(t))switch(t.value){case"center":return o.push(FA),!1;case"top":case"left":return o.push(BA),!1;case"right":case"bottom":return o.push(MA),!1}else if(xA(t)||SA(t))return o.push(t),!1;return e}),a):1===n&&(a=t.reduce((function(e,t){if(RA(t))switch(t.value){case"circle":return s=0,!1;case"ellipse":return s=1,!1;case"contain":case"closest-side":return i=0,!1;case"farthest-side":return i=1,!1;case"closest-corner":return i=2,!1;case"cover":case"farthest-corner":return i=3,!1}else if(SA(t)||xA(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)),a){var l=su(e,t);r.push(l)}})),{size:i,shape:s,stops:r,position:o,type:2}},hu=function(e,t){if(22===t.type){var s={url:t.value,type:0};return e.cache.addImage(t.value),s}if(18===t.type){var i=Au[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)};var cu,Au={"linear-gradient":function(e,t){var s=VA(180),i=[];return CA(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&"to"===o.value)return void(s=kA(t));if(GA(o))return void(s=HA(e,o))}var n=su(e,t);i.push(n)})),{angle:s,stops:i,type:1}},"-moz-linear-gradient":au,"-ms-linear-gradient":au,"-o-linear-gradient":au,"-webkit-linear-gradient":au,"radial-gradient":function(e,t){var s=0,i=3,r=[],o=[];return CA(t).forEach((function(t,n){var a=!0;if(0===n){var l=!1;a=t.reduce((function(e,t){if(l)if(RA(t))switch(t.value){case"center":return o.push(FA),e;case"top":case"left":return o.push(BA),e;case"right":case"bottom":return o.push(MA),e}else(xA(t)||SA(t))&&o.push(t);else if(RA(t))switch(t.value){case"circle":return s=0,!1;case"ellipse":return s=1,!1;case"at":return l=!0,!1;case"closest-side":return i=0,!1;case"cover":case"farthest-side":return i=1,!1;case"contain":case"closest-corner":return i=2,!1;case"farthest-corner":return i=3,!1}else if(SA(t)||xA(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)}if(a){var h=su(e,t);r.push(h)}})),{size:i,shape:s,stops:r,position:o,type:2}},"-moz-radial-gradient":lu,"-ms-radial-gradient":lu,"-o-radial-gradient":lu,"-webkit-radial-gradient":lu,"-webkit-gradient":function(e,t){var s=VA(180),i=[],r=1;return CA(t).forEach((function(t,s){var o=t[0];if(0===s){if(RA(o)&&"linear"===o.value)return void(r=1);if(RA(o)&&"radial"===o.value)return void(r=2)}if(18===o.type)if("from"===o.name){var n=jA(e,o.values[0]);i.push({stop:BA,color:n})}else if("to"===o.name){n=jA(e,o.values[0]);i.push({stop:MA,color:n})}else if("color-stop"===o.name){var a=o.values.filter(bA);if(2===a.length){n=jA(e,a[1]);var l=a[0];_A(l)&&i.push({stop:{type:16,number:100*l.number,flags:l.flags},color:n})}}})),1===r?{angle:(s+VA(180))%VA(360),stops:i,type:r}:{size:3,shape:0,stops:i,position:[],type:r}}},uu={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var s=t[0];return 20===s.type&&"none"===s.value?[]:t.filter((function(e){return bA(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Au[e.name])}(e)})).map((function(t){return hu(e,t)}))}},pu={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(RA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},du={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return CA(t).map((function(e){return e.filter(xA)})).map(wA)}},fu={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return CA(t).map((function(e){return e.filter(RA).map((function(e){return e.value})).join(" ")})).map(Eu)}},Eu=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(cu||(cu={}));var mu,yu={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return CA(t).map((function(e){return e.filter(gu)}))}},gu=function(e){return RA(e)||xA(e)},Iu=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},vu=Iu("top"),Tu=Iu("right"),_u=Iu("bottom"),Ru=Iu("left"),Pu=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return wA(t.filter(xA))}}},Du=Pu("top-left"),Nu=Pu("top-right"),bu=Pu("bottom-right"),Cu=Pu("bottom-left"),Ou=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Su=Ou("top"),xu=Ou("right"),wu=Ou("bottom"),Bu=Ou("left"),Fu=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return TA(t)?t.number:0}}},Mu=Fu("top"),Lu=Fu("right"),Uu=Fu("bottom"),Hu=Fu("left"),Gu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ku={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Vu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(RA).reduce((function(e,t){return e|ju(t.value)}),0)}},ju=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Qu={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Wu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(mu||(mu={}));var zu,Ku={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?mu.STRICT:mu.NORMAL}},Yu={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xu=function(e,t){return RA(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:xA(e)?UA(e,t):t},Zu={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:hu(e,t)}},qu={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Ju={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},$u=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},ep=$u("top"),tp=$u("right"),sp=$u("bottom"),ip=$u("left"),rp={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(RA).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},op={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},np=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ap=np("top"),lp=np("right"),hp=np("bottom"),cp=np("left"),Ap={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},up={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},pp={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&DA(t[0],"none")?[]:CA(t).map((function(t){for(var s={color:$A.TRANSPARENT,offsetX:BA,offsetY:BA,blur:BA},i=0,r=0;r1?1:0],this.overflowWrap=zp(e,op,t.overflowWrap),this.paddingTop=zp(e,ap,t.paddingTop),this.paddingRight=zp(e,lp,t.paddingRight),this.paddingBottom=zp(e,hp,t.paddingBottom),this.paddingLeft=zp(e,cp,t.paddingLeft),this.paintOrder=zp(e,Gp,t.paintOrder),this.position=zp(e,up,t.position),this.textAlign=zp(e,Ap,t.textAlign),this.textDecorationColor=zp(e,Pp,null!==(s=t.textDecorationColor)&&void 0!==s?s:t.color),this.textDecorationLine=zp(e,Dp,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=zp(e,pp,t.textShadow),this.textTransform=zp(e,dp,t.textTransform),this.transform=zp(e,fp,t.transform),this.transformOrigin=zp(e,gp,t.transformOrigin),this.visibility=zp(e,Ip,t.visibility),this.webkitTextStrokeColor=zp(e,kp,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=zp(e,Vp,t.webkitTextStrokeWidth),this.wordBreak=zp(e,vp,t.wordBreak),this.zIndex=zp(e,Tp,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return QA(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return xp(this.display,4)||xp(this.display,33554432)||xp(this.display,268435456)||xp(this.display,536870912)||xp(this.display,67108864)||xp(this.display,134217728)},e}(),Qp=function(e,t){this.content=zp(e,wp,t.content),this.quotes=zp(e,Lp,t.quotes)},Wp=function(e,t){this.counterIncrement=zp(e,Bp,t.counterIncrement),this.counterReset=zp(e,Fp,t.counterReset)},zp=function(e,t,s){var i=new IA,r=null!=s?s.toString():t.initialValue;i.write(r);var o=new vA(i.read());switch(t.type){case 2:var n=o.parseComponentValue();return t.parse(e,RA(n)?n.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return HA(e,o.parseComponentValue());case"color":return jA(e,o.parseComponentValue());case"image":return hu(e,o.parseComponentValue());case"length":var a=o.parseComponentValue();return SA(a)?a:BA;case"length-percentage":var l=o.parseComponentValue();return xA(l)?l:BA;case"time":return _p(e,o.parseComponentValue())}}},Kp=function(e,t){var s=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===s||t===s},Yp=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Kp(t,3),this.styles=new jp(e,window.getComputedStyle(t,null)),Yd(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=Wh(this.context,t),Kp(t,4)&&(this.flags|=16)},Xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zp="undefined"==typeof Uint8Array?[]:new Uint8Array(256),qp=0;qp=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",td="undefined"==typeof Uint8Array?[]:new Uint8Array(256),sd=0;sd>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},hd=function(e,t){var s,i,r,o=function(e){var t,s,i,r,o,n=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),c=Array.isArray(h)?h:new Uint8Array(h);for(t=0;t>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i=55296&&r<=56319&&s=s)return{done:!0,value:null};for(var e="×";in.x||r.y>n.y;return n=r,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(Ed,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,s=e.createElement("canvas"),i=s.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,";try{i.drawImage(t,0,0),s.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(Ed,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),s=100;t.width=s,t.height=s;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,s,s);var r=new Image,o=t.toDataURL();r.src=o;var n=dd(s,s,0,0,r);return i.fillStyle="red",i.fillRect(0,0,s,s),fd(n).then((function(t){i.drawImage(t,0,0);var r=i.getImageData(0,0,s,s).data;i.fillStyle="red",i.fillRect(0,0,s,s);var n=e.createElement("div");return n.style.backgroundImage="url("+o+")",n.style.height="100px",pd(r)?fd(dd(s,s,0,0,n)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),pd(i.getImageData(0,0,s,s).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Ed,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Ed,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Ed,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ed,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Ed,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},md=function(e,t){this.text=e,this.bounds=t},yd=function(e,t){var s=t.ownerDocument;if(s){var i=s.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var r=t.parentNode;if(r){r.replaceChild(i,t);var o=Wh(e,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return Qh.EMPTY},gd=function(e,t,s){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(e,t),r.setEnd(e,t+s),r},Id=function(e){if(Ed.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,s=ud(e),i=[];!(t=s.next()).done;)t.value&&i.push(t.value.slice());return i}(e)},vd=function(e,t){return 0!==t.letterSpacing?Id(e):function(e,t){if(Ed.SUPPORT_NATIVE_TEXT_SEGMENTATION){var s=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(s.segment(e)).map((function(e){return e.segment}))}return _d(e,t)}(e,t)},Td=[32,160,4961,65792,65793,4153,4241],_d=function(e,t){for(var s,i=function(e,t){var s=zh(e),i=kc(s,t),r=i[0],o=i[1],n=i[2],a=s.length,l=0,h=0;return{next:function(){if(h>=a)return{done:!0,value:null};for(var e="×";h0)if(Ed.SUPPORT_RANGE_BOUNDS){var r=gd(i,n,t.length).getClientRects();if(r.length>1){var a=Id(t),l=0;a.forEach((function(t){o.push(new md(t,Qh.fromDOMRectList(e,gd(i,l+n,t.length).getClientRects()))),l+=t.length}))}else o.push(new md(t,Qh.fromDOMRectList(e,r)))}else{var h=i.splitText(t.length);o.push(new md(t,yd(e,i))),i=h}else Ed.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));n+=t.length})),o}(e,this.text,s,t)},Pd=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Dd,Nd);case 2:return e.toUpperCase();default:return e}},Dd=/(^|\s|:|-|\(|\))([a-z])/g,Nd=function(e,t,s){return e.length>0?t+s.toUpperCase():e},bd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.src=s.currentSrc||s.src,i.intrinsicWidth=s.naturalWidth,i.intrinsicHeight=s.naturalHeight,i.context.cache.addImage(i.src),i}return Hh(t,e),t}(Yp),Cd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.canvas=s,i.intrinsicWidth=s.width,i.intrinsicHeight=s.height,i}return Hh(t,e),t}(Yp),Od=function(e){function t(t,s){var i=e.call(this,t,s)||this,r=new XMLSerializer,o=Wh(t,s);return s.setAttribute("width",o.width+"px"),s.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(s)),i.intrinsicWidth=s.width.baseVal.value,i.intrinsicHeight=s.height.baseVal.value,i.context.cache.addImage(i.svg),i}return Hh(t,e),t}(Yp),Sd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.value=s.value,i}return Hh(t,e),t}(Yp),xd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.start=s.start,i.reversed="boolean"==typeof s.reversed&&!0===s.reversed,i}return Hh(t,e),t}(Yp),wd=[{type:15,flags:0,unit:"px",number:3}],Bd=[{type:16,flags:0,number:50}],Fd="password",Md=function(e){function t(t,s){var i,r,o,n=e.call(this,t,s)||this;switch(n.type=s.type.toLowerCase(),n.checked=s.checked,n.value=0===(r=(i=s).type===Fd?new Array(i.value.length+1).join("•"):i.value).length?i.placeholder||"":r,"checkbox"!==n.type&&"radio"!==n.type||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(o=n.bounds).width>o.height?new Qh(o.left+(o.width-o.height)/2,o.top,o.height,o.height):o.width0)s.textNodes.push(new Rd(e,r,s.styles));else if(Kd(r))if(hf(r)&&r.assignedNodes)r.assignedNodes().forEach((function(t){return kd(e,t,s,i)}));else{var n=Vd(e,r);n.styles.isVisible()&&(Qd(r,n,i)?n.flags|=4:Wd(n.styles)&&(n.flags|=2),-1!==Gd.indexOf(r.tagName)&&(n.flags|=8),s.elements.push(n),r.slot,r.shadowRoot?kd(e,r.shadowRoot,n,i):af(r)||$d(r)||lf(r)||kd(e,r,n,i))}},Vd=function(e,t){return rf(t)?new bd(e,t):tf(t)?new Cd(e,t):$d(t)?new Od(e,t):Zd(t)?new Sd(e,t):qd(t)?new xd(e,t):Jd(t)?new Md(e,t):lf(t)?new Ld(e,t):af(t)?new Ud(e,t):of(t)?new Hd(e,t):new Yp(e,t)},jd=function(e,t){var s=Vd(e,t);return s.flags|=4,kd(e,t,s,s),s},Qd=function(e,t,s){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||ef(e)&&s.styles.isTransparent()},Wd=function(e){return e.isPositioned()||e.isFloating()},zd=function(e){return e.nodeType===Node.TEXT_NODE},Kd=function(e){return e.nodeType===Node.ELEMENT_NODE},Yd=function(e){return Kd(e)&&void 0!==e.style&&!Xd(e)},Xd=function(e){return"object"==typeof e.className},Zd=function(e){return"LI"===e.tagName},qd=function(e){return"OL"===e.tagName},Jd=function(e){return"INPUT"===e.tagName},$d=function(e){return"svg"===e.tagName},ef=function(e){return"BODY"===e.tagName},tf=function(e){return"CANVAS"===e.tagName},sf=function(e){return"VIDEO"===e.tagName},rf=function(e){return"IMG"===e.tagName},of=function(e){return"IFRAME"===e.tagName},nf=function(e){return"STYLE"===e.tagName},af=function(e){return"TEXTAREA"===e.tagName},lf=function(e){return"SELECT"===e.tagName},hf=function(e){return"SLOT"===e.tagName},cf=function(e){return e.tagName.indexOf("-")>0},Af=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,s=e.counterIncrement,i=e.counterReset,r=!0;null!==s&&s.forEach((function(e){var s=t.counters[e.counter];s&&0!==e.increment&&(r=!1,s.length||s.push(1),s[Math.max(0,s.length-1)]+=e.increment)}));var o=[];return r&&i.forEach((function(e){var s=t.counters[e.counter];o.push(e.counter),s||(s=t.counters[e.counter]=[]),s.push(e.reset)})),o},e}(),uf={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},pf={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},df={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},ff={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ef=function(e,t,s,i,r,o){return es?vf(e,r,o.length>0):i.integers.reduce((function(t,s,r){for(;e>=s;)e-=s,t+=i.values[r];return t}),"")+o},mf=function(e,t,s,i){var r="";do{s||e--,r=i(e)+r,e/=t}while(e*t>=t);return r},yf=function(e,t,s,i,r){var o=s-t+1;return(e<0?"-":"")+(mf(Math.abs(e),o,i,(function(e){return Kh(Math.floor(e%o)+t)}))+r)},gf=function(e,t,s){void 0===s&&(s=". ");var i=t.length;return mf(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+s},If=function(e,t,s,i,r,o){if(e<-9999||e>9999)return vf(e,4,r.length>0);var n=Math.abs(e),a=r;if(0===n)return t[0]+a;for(var l=0;n>0&&l<=4;l++){var h=n%10;0===h&&xp(o,1)&&""!==a?a=t[h]+a:h>1||1===h&&0===l||1===h&&1===l&&xp(o,2)||1===h&&1===l&&xp(o,4)&&e>100||1===h&&l>1&&xp(o,8)?a=t[h]+(l>0?s[l-1]:"")+a:1===h&&l>0&&(a=s[l-1]+a),n=Math.floor(n/10)}return(e<0?i:"")+a},vf=function(e,t,s){var i=s?". ":"",r=s?"、":"",o=s?", ":"",n=s?" ":"";switch(t){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var a=yf(e,48,57,!0,i);return a.length<4?"0"+a:a;case 4:return gf(e,"〇一二三四五六七八九",r);case 6:return Ef(e,1,3999,uf,3,i).toLowerCase();case 7:return Ef(e,1,3999,uf,3,i);case 8:return yf(e,945,969,!1,i);case 9:return yf(e,97,122,!1,i);case 10:return yf(e,65,90,!1,i);case 11:return yf(e,1632,1641,!0,i);case 12:case 49:return Ef(e,1,9999,pf,3,i);case 35:return Ef(e,1,9999,pf,3,i).toLowerCase();case 13:return yf(e,2534,2543,!0,i);case 14:case 30:return yf(e,6112,6121,!0,i);case 15:return gf(e,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return gf(e,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return If(e,"零一二三四五六七八九","十百千萬","負",r,14);case 47:return If(e,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",r,15);case 42:return If(e,"零一二三四五六七八九","十百千萬","负",r,14);case 41:return If(e,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",r,15);case 26:return If(e,"〇一二三四五六七八九","十百千万","マイナス",r,0);case 25:return If(e,"零壱弐参四伍六七八九","拾百千万","マイナス",r,7);case 31:return If(e,"영일이삼사오육칠팔구","십백천만","마이너스",o,7);case 33:return If(e,"零一二三四五六七八九","十百千萬","마이너스",o,0);case 32:return If(e,"零壹貳參四五六七八九","拾百千","마이너스",o,7);case 18:return yf(e,2406,2415,!0,i);case 20:return Ef(e,1,19999,ff,3,i);case 21:return yf(e,2790,2799,!0,i);case 22:return yf(e,2662,2671,!0,i);case 22:return Ef(e,1,10999,df,3,i);case 23:return gf(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return gf(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return yf(e,3302,3311,!0,i);case 28:return gf(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return gf(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return yf(e,3792,3801,!0,i);case 37:return yf(e,6160,6169,!0,i);case 38:return yf(e,4160,4169,!0,i);case 39:return yf(e,2918,2927,!0,i);case 40:return yf(e,1776,1785,!0,i);case 43:return yf(e,3046,3055,!0,i);case 44:return yf(e,3174,3183,!0,i);case 45:return yf(e,3664,3673,!0,i);case 46:return yf(e,3872,3881,!0,i);default:return yf(e,48,57,!0,i)}},Tf=function(){function e(e,t,s){if(this.context=e,this.options=s,this.scrolledElements=[],this.referenceElement=t,this.counters=new Af,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var s=this,i=Rf(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,n=i.contentWindow,a=n.document,l=Nf(i).then((function(){return kh(s,void 0,void 0,(function(){var e,s;return Vh(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(xf),n&&(n.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===t.top&&n.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-t.left,n.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(s=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Df(a)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,s)})).then((function(){return i}))]:[2,i]}}))}))}));return a.open(),a.write(Of(document.doctype)+""),Sf(this.referenceElement.ownerDocument,r,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(Kp(e,2),tf(e))return this.createCanvasClone(e);if(sf(e))return this.createVideoClone(e);if(nf(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return rf(t)&&(rf(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),cf(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Cf(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var s=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=s,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var s=e.ownerDocument.createElement("img");try{return s.src=e.toDataURL(),s}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var r=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&r)o.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var n=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(n){var a=n.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var s=t.getContext("2d");try{return s&&(s.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||s.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},e.prototype.appendChildNode=function(e,t,s){Kd(t)&&("SCRIPT"===t.tagName||t.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Kd(t)&&nf(t)||e.appendChild(this.cloneNode(t,s))},e.prototype.cloneChildNodes=function(e,t,s){for(var i=this,r=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;r;r=r.nextSibling)if(Kd(r)&&hf(r)&&"function"==typeof r.assignedNodes){var o=r.assignedNodes();o.length&&o.forEach((function(e){return i.appendChildNode(t,e,s)}))}else this.appendChildNode(t,r,s)},e.prototype.cloneNode=function(e,t){if(zd(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var s=e.ownerDocument.defaultView;if(s&&Kd(e)&&(Yd(e)||Xd(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var r=s.getComputedStyle(e),o=s.getComputedStyle(e,":before"),n=s.getComputedStyle(e,":after");this.referenceElement===e&&Yd(i)&&(this.clonedReferenceElement=i),ef(i)&&Ff(i);var a=this.counters.parse(new Wp(this.context,r)),l=this.resolvePseudoContent(e,i,o,id.BEFORE);cf(e)&&(t=!0),sf(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(e,i,n,id.AFTER);return h&&i.appendChild(h),this.counters.pop(a),(r&&(this.options.copyStyles||Xd(e))&&!of(e)||t)&&Cf(r,i),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(af(e)||lf(e))&&(af(i)||lf(i))&&(i.value=e.value),i}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,s,i){var r=this;if(s){var o=s.content,n=t.ownerDocument;if(n&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==s.display){this.counters.parse(new Wp(this.context,s));var a=new Qp(this.context,s),l=n.createElement("html2canvaspseudoelement");Cf(s,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(n.createTextNode(t.value));else if(22===t.type){var s=n.createElement("img");s.src=t.value,s.style.opacity="1",l.appendChild(s)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(RA);i.length&&l.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(bA),h=o[0],c=o[1];if(h&&RA(h)){var A=r.counters.getCounterValue(h.value),u=c&&RA(c)?Ju.parse(r.context,c.value):3;l.appendChild(n.createTextNode(vf(A,u,!1)))}}else if("counters"===t.name){var p=t.values.filter(bA),d=(h=p[0],p[1]);c=p[2];if(h&&RA(h)){var f=r.counters.getCounterValues(h.value),E=c&&RA(c)?Ju.parse(r.context,c.value):3,m=d&&0===d.type?d.value:"",y=f.map((function(e){return vf(e,E,!1)})).join(m);l.appendChild(n.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(n.createTextNode(Up(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":l.appendChild(n.createTextNode(Up(a.quotes,--r.quoteDepth,!1)));break;default:l.appendChild(n.createTextNode(t.value))}})),l.className=wf+" "+Bf;var h=i===id.BEFORE?" "+wf:" "+Bf;return Xd(t)?t.className.baseValue+=h:t.className+=h,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(id||(id={}));var _f,Rf=function(e,t){var s=e.createElement("iframe");return s.className="html2canvas-container",s.style.visibility="hidden",s.style.position="fixed",s.style.left="-10000px",s.style.top="0px",s.style.border="0",s.width=t.width.toString(),s.height=t.height.toString(),s.scrolling="no",s.setAttribute("data-html2canvas-ignore","true"),e.body.appendChild(s),s},Pf=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Df=function(e){return Promise.all([].slice.call(e.images,0).map(Pf))},Nf=function(e){return new Promise((function(t,s){var i=e.contentWindow;if(!i)return s("No window assigned for iframe");var r=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var s=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(s),t(e))}),50)}}))},bf=["all","d","content"],Cf=function(e,t){for(var s=e.length-1;s>=0;s--){var i=e.item(s);-1===bf.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},Of=function(e){var t="";return e&&(t+=""),t},Sf=function(e,t,s){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||s!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,s)},xf=function(e){var t=e[0],s=e[1],i=e[2];t.scrollLeft=s,t.scrollTop=i},wf="___html2canvas___pseudoelement_before",Bf="___html2canvas___pseudoelement_after",Ff=function(e){Mf(e,"."+wf+':before{\n content: "" !important;\n display: none !important;\n}\n .'+Bf+':after{\n content: "" !important;\n display: none !important;\n}')},Mf=function(e,t){var s=e.ownerDocument;if(s){var i=s.createElement("style");i.textContent=t,e.appendChild(i)}},Lf=function(){function e(){}return e.getOrigin=function(t){var s=e._link;return s?(s.href=t,s.href=s.href,s.protocol+s.hostname+s.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Uf=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Wf(e)||Vf(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return kh(this,void 0,void 0,(function(){var t,s,i,r,o=this;return Vh(this,(function(n){switch(n.label){case 0:return t=Lf.isSameOrigin(e),s=!jf(e)&&!0===this._options.useCORS&&Ed.SUPPORT_CORS_IMAGES&&!t,i=!jf(e)&&!t&&!Wf(e)&&"string"==typeof this._options.proxy&&Ed.SUPPORT_CORS_XHR&&!s,t||!1!==this._options.allowTaint||jf(e)||Wf(e)||i||s?(r=e,i?[4,this.proxy(r)]:[3,2]):[2];case 1:r=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(Qf(r)||s)&&(i.crossOrigin="anonymous"),i.src=r,!0===i.complete&&setTimeout((function(){return e(i)}),500),o._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,s=this._options.proxy;if(!s)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(r,o){var n=Ed.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===n)r(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return r(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(a.response)}else o("Failed to proxy resource "+i+" with status code "+a.status)},a.onerror=o;var l=s.indexOf("?")>-1?"&":"?";if(a.open("GET",""+s+l+"url="+encodeURIComponent(e)+"&responseType="+n),"text"!==n&&a instanceof XMLHttpRequest&&(a.responseType=n),t._options.imageTimeout){var h=t._options.imageTimeout;a.timeout=h,a.ontimeout=function(){return o("Timed out ("+h+"ms) proxying "+i)}}a.send()}))},e}(),Hf=/^data:image\/svg\+xml/i,Gf=/^data:image\/.*;base64,/i,kf=/^data:image\/.*/i,Vf=function(e){return Ed.SUPPORT_SVG_DRAWING||!zf(e)},jf=function(e){return kf.test(e)},Qf=function(e){return Gf.test(e)},Wf=function(e){return"blob"===e.substr(0,4)},zf=function(e){return"svg"===e.substr(-3).toLowerCase()||Hf.test(e)},Kf=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,s){return new e(this.x+t,this.y+s)},e}(),Yf=function(e,t,s){return new Kf(e.x+(t.x-e.x)*s,e.y+(t.y-e.y)*s)},Xf=function(){function e(e,t,s,i){this.type=1,this.start=e,this.startControl=t,this.endControl=s,this.end=i}return e.prototype.subdivide=function(t,s){var i=Yf(this.start,this.startControl,t),r=Yf(this.startControl,this.endControl,t),o=Yf(this.endControl,this.end,t),n=Yf(i,r,t),a=Yf(r,o,t),l=Yf(n,a,t);return s?new e(this.start,i,n,l):new e(l,a,o,this.end)},e.prototype.add=function(t,s){return new e(this.start.add(t,s),this.startControl.add(t,s),this.endControl.add(t,s),this.end.add(t,s))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Zf=function(e){return 1===e.type},qf=function(e){var t=e.styles,s=e.bounds,i=LA(t.borderTopLeftRadius,s.width,s.height),r=i[0],o=i[1],n=LA(t.borderTopRightRadius,s.width,s.height),a=n[0],l=n[1],h=LA(t.borderBottomRightRadius,s.width,s.height),c=h[0],A=h[1],u=LA(t.borderBottomLeftRadius,s.width,s.height),p=u[0],d=u[1],f=[];f.push((r+a)/s.width),f.push((p+c)/s.width),f.push((o+d)/s.height),f.push((l+A)/s.height);var E=Math.max.apply(Math,f);E>1&&(r/=E,o/=E,a/=E,l/=E,c/=E,A/=E,p/=E,d/=E);var m=s.width-a,y=s.height-A,g=s.width-c,I=s.height-d,v=t.borderTopWidth,T=t.borderRightWidth,_=t.borderBottomWidth,R=t.borderLeftWidth,P=UA(t.paddingTop,e.bounds.width),D=UA(t.paddingRight,e.bounds.width),N=UA(t.paddingBottom,e.bounds.width),b=UA(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||o>0?Jf(s.left+R/3,s.top+v/3,r-R/3,o-v/3,_f.TOP_LEFT):new Kf(s.left+R/3,s.top+v/3),this.topRightBorderDoubleOuterBox=r>0||o>0?Jf(s.left+m,s.top+v/3,a-T/3,l-v/3,_f.TOP_RIGHT):new Kf(s.left+s.width-T/3,s.top+v/3),this.bottomRightBorderDoubleOuterBox=c>0||A>0?Jf(s.left+g,s.top+y,c-T/3,A-_/3,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T/3,s.top+s.height-_/3),this.bottomLeftBorderDoubleOuterBox=p>0||d>0?Jf(s.left+R/3,s.top+I,p-R/3,d-_/3,_f.BOTTOM_LEFT):new Kf(s.left+R/3,s.top+s.height-_/3),this.topLeftBorderDoubleInnerBox=r>0||o>0?Jf(s.left+2*R/3,s.top+2*v/3,r-2*R/3,o-2*v/3,_f.TOP_LEFT):new Kf(s.left+2*R/3,s.top+2*v/3),this.topRightBorderDoubleInnerBox=r>0||o>0?Jf(s.left+m,s.top+2*v/3,a-2*T/3,l-2*v/3,_f.TOP_RIGHT):new Kf(s.left+s.width-2*T/3,s.top+2*v/3),this.bottomRightBorderDoubleInnerBox=c>0||A>0?Jf(s.left+g,s.top+y,c-2*T/3,A-2*_/3,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-2*T/3,s.top+s.height-2*_/3),this.bottomLeftBorderDoubleInnerBox=p>0||d>0?Jf(s.left+2*R/3,s.top+I,p-2*R/3,d-2*_/3,_f.BOTTOM_LEFT):new Kf(s.left+2*R/3,s.top+s.height-2*_/3),this.topLeftBorderStroke=r>0||o>0?Jf(s.left+R/2,s.top+v/2,r-R/2,o-v/2,_f.TOP_LEFT):new Kf(s.left+R/2,s.top+v/2),this.topRightBorderStroke=r>0||o>0?Jf(s.left+m,s.top+v/2,a-T/2,l-v/2,_f.TOP_RIGHT):new Kf(s.left+s.width-T/2,s.top+v/2),this.bottomRightBorderStroke=c>0||A>0?Jf(s.left+g,s.top+y,c-T/2,A-_/2,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T/2,s.top+s.height-_/2),this.bottomLeftBorderStroke=p>0||d>0?Jf(s.left+R/2,s.top+I,p-R/2,d-_/2,_f.BOTTOM_LEFT):new Kf(s.left+R/2,s.top+s.height-_/2),this.topLeftBorderBox=r>0||o>0?Jf(s.left,s.top,r,o,_f.TOP_LEFT):new Kf(s.left,s.top),this.topRightBorderBox=a>0||l>0?Jf(s.left+m,s.top,a,l,_f.TOP_RIGHT):new Kf(s.left+s.width,s.top),this.bottomRightBorderBox=c>0||A>0?Jf(s.left+g,s.top+y,c,A,_f.BOTTOM_RIGHT):new Kf(s.left+s.width,s.top+s.height),this.bottomLeftBorderBox=p>0||d>0?Jf(s.left,s.top+I,p,d,_f.BOTTOM_LEFT):new Kf(s.left,s.top+s.height),this.topLeftPaddingBox=r>0||o>0?Jf(s.left+R,s.top+v,Math.max(0,r-R),Math.max(0,o-v),_f.TOP_LEFT):new Kf(s.left+R,s.top+v),this.topRightPaddingBox=a>0||l>0?Jf(s.left+Math.min(m,s.width-T),s.top+v,m>s.width+T?0:Math.max(0,a-T),Math.max(0,l-v),_f.TOP_RIGHT):new Kf(s.left+s.width-T,s.top+v),this.bottomRightPaddingBox=c>0||A>0?Jf(s.left+Math.min(g,s.width-R),s.top+Math.min(y,s.height-_),Math.max(0,c-T),Math.max(0,A-_),_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T,s.top+s.height-_),this.bottomLeftPaddingBox=p>0||d>0?Jf(s.left+R,s.top+Math.min(I,s.height-_),Math.max(0,p-R),Math.max(0,d-_),_f.BOTTOM_LEFT):new Kf(s.left+R,s.top+s.height-_),this.topLeftContentBox=r>0||o>0?Jf(s.left+R+b,s.top+v+P,Math.max(0,r-(R+b)),Math.max(0,o-(v+P)),_f.TOP_LEFT):new Kf(s.left+R+b,s.top+v+P),this.topRightContentBox=a>0||l>0?Jf(s.left+Math.min(m,s.width+R+b),s.top+v+P,m>s.width+R+b?0:a-R+b,l-(v+P),_f.TOP_RIGHT):new Kf(s.left+s.width-(T+D),s.top+v+P),this.bottomRightContentBox=c>0||A>0?Jf(s.left+Math.min(g,s.width-(R+b)),s.top+Math.min(y,s.height+v+P),Math.max(0,c-(T+D)),A-(_+N),_f.BOTTOM_RIGHT):new Kf(s.left+s.width-(T+D),s.top+s.height-(_+N)),this.bottomLeftContentBox=p>0||d>0?Jf(s.left+R+b,s.top+I,Math.max(0,p-(R+b)),d-(_+N),_f.BOTTOM_LEFT):new Kf(s.left+R+b,s.top+s.height-(_+N))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(_f||(_f={}));var Jf=function(e,t,s,i,r){var o=(Math.sqrt(2)-1)/3*4,n=s*o,a=i*o,l=e+s,h=t+i;switch(r){case _f.TOP_LEFT:return new Xf(new Kf(e,h),new Kf(e,h-a),new Kf(l-n,t),new Kf(l,t));case _f.TOP_RIGHT:return new Xf(new Kf(e,t),new Kf(e+n,t),new Kf(l,h-a),new Kf(l,h));case _f.BOTTOM_RIGHT:return new Xf(new Kf(l,t),new Kf(l,t+a),new Kf(e+n,h),new Kf(e,h));case _f.BOTTOM_LEFT:default:return new Xf(new Kf(l,h),new Kf(l-n,h),new Kf(e,t+a),new Kf(e,t))}},$f=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},eE=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},tE=function(e,t,s){this.offsetX=e,this.offsetY=t,this.matrix=s,this.type=0,this.target=6},sE=function(e,t){this.path=e,this.target=t,this.type=1},iE=function(e){this.opacity=e,this.type=2,this.target=6},rE=function(e){return 1===e.type},oE=function(e,t){return e.length===t.length&&e.some((function(e,s){return e===t[s]}))},nE=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},aE=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new qf(this.container),this.container.styles.opacity<1&&this.effects.push(new iE(this.container.styles.opacity)),null!==this.container.styles.transform){var s=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new tE(s,i,r))}if(0!==this.container.styles.overflowX){var o=$f(this.curves),n=eE(this.curves);oE(o,n)?this.effects.push(new sE(o,6)):(this.effects.push(new sE(o,2)),this.effects.push(new sE(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),s=this.parent,i=this.effects.slice(0);s;){var r=s.effects.filter((function(e){return!rE(e)}));if(t||0!==s.container.styles.position||!s.parent){if(i.unshift.apply(i,r),t=-1===[2,3].indexOf(s.container.styles.position),0!==s.container.styles.overflowX){var o=$f(s.curves),n=eE(s.curves);oE(o,n)||i.unshift(new sE(n,6))}}else i.unshift.apply(i,r);s=s.parent}return i.filter((function(t){return xp(t.target,e)}))},e}(),lE=function(e,t,s,i){e.container.elements.forEach((function(r){var o=xp(r.flags,4),n=xp(r.flags,2),a=new aE(r,e);xp(r.styles.display,2048)&&i.push(a);var l=xp(r.flags,8)?[]:i;if(o||n){var h=o||r.styles.isPositioned()?s:t,c=new nE(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var A=r.styles.zIndex.order;if(A<0){var u=0;h.negativeZIndex.some((function(e,t){return A>e.element.container.styles.zIndex.order?(u=t,!1):u>0})),h.negativeZIndex.splice(u,0,c)}else if(A>0){var p=0;h.positiveZIndex.some((function(e,t){return A>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0})),h.positiveZIndex.splice(p,0,c)}else h.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?h.nonPositionedFloats.push(c):h.nonPositionedInlineLevel.push(c);lE(a,c,o?c:s,l)}else r.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),lE(a,t,s,l);xp(r.flags,8)&&hE(r,l)}))},hE=function(e,t){for(var s=e instanceof xd?e.start:1,i=e instanceof xd&&e.reversed,r=0;r0&&e.intrinsicHeight>0){var i=dE(e),r=eE(t);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return kh(this,void 0,void 0,(function(){var s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g;return Vh(this,(function(I){switch(I.label){case 0:this.applyEffects(e.getEffects(4)),s=e.container,i=e.curves,r=s.styles,o=0,n=s.textNodes,I.label=1;case 1:return o0&&_>0&&(m=i.ctx.createPattern(d,"repeat"),i.renderRepeat(g,m,P,D))):function(e){return 2===e.type}(s)&&(y=fE(e,t,[null,null,null]),g=y[0],I=y[1],v=y[2],T=y[3],_=y[4],R=0===s.position.length?[FA]:s.position,P=UA(R[0],T),D=UA(R[R.length-1],_),N=function(e,t,s,i,r){var o=0,n=0;switch(e.size){case 0:0===e.shape?o=n=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-i)),n=Math.min(Math.abs(s),Math.abs(s-r)));break;case 2:if(0===e.shape)o=n=Math.min(ou(t,s),ou(t,s-r),ou(t-i,s),ou(t-i,s-r));else if(1===e.shape){var a=Math.min(Math.abs(s),Math.abs(s-r))/Math.min(Math.abs(t),Math.abs(t-i)),l=nu(i,r,t,s,!0),h=l[0],c=l[1];n=a*(o=ou(h-t,(c-s)/a))}break;case 1:0===e.shape?o=n=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-i)),n=Math.max(Math.abs(s),Math.abs(s-r)));break;case 3:if(0===e.shape)o=n=Math.max(ou(t,s),ou(t,s-r),ou(t-i,s),ou(t-i,s-r));else if(1===e.shape){a=Math.max(Math.abs(s),Math.abs(s-r))/Math.max(Math.abs(t),Math.abs(t-i));var A=nu(i,r,t,s,!1);h=A[0],c=A[1],n=a*(o=ou(h-t,(c-s)/a))}}return Array.isArray(e.size)&&(o=UA(e.size[0],i),n=2===e.size.length?UA(e.size[1],r):o),[o,n]}(s,P,D,T,_),b=N[0],C=N[1],b>0&&C>0&&(O=i.ctx.createRadialGradient(I+P,v+D,0,I+P,v+D,b),iu(s.stops,2*b).forEach((function(e){return O.addColorStop(e.stop,WA(e.color))})),i.path(g),i.ctx.fillStyle=O,b!==C?(S=e.bounds.left+.5*e.bounds.width,x=e.bounds.top+.5*e.bounds.height,B=1/(w=C/b),i.ctx.save(),i.ctx.translate(S,x),i.ctx.transform(1,0,0,w,0,0),i.ctx.translate(-S,-x),i.ctx.fillRect(I,B*(v-x)+x,T,_*B),i.ctx.restore()):i.ctx.fill())),F.label=6;case 6:return t--,[2]}}))},i=this,r=0,o=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return r0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return n++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,s,i,r){return kh(this,void 0,void 0,(function(){var o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I;return Vh(this,(function(v){return this.ctx.save(),o=function(e,t){switch(t){case 0:return AE(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return AE(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return AE(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return AE(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(i,s),n=cE(i,s),2===r&&(this.path(n),this.ctx.clip()),Zf(n[0])?(a=n[0].start.x,l=n[0].start.y):(a=n[0].x,l=n[0].y),Zf(n[1])?(h=n[1].end.x,c=n[1].end.y):(h=n[1].x,c=n[1].y),A=0===s||2===s?Math.abs(a-h):Math.abs(l-c),this.ctx.beginPath(),3===r?this.formatPath(o):this.formatPath(n.slice(0,2)),u=t<3?3*t:2*t,p=t<3?2*t:t,3===r&&(u=t,p=t),d=!0,A<=2*u?d=!1:A<=2*u+p?(u*=f=A/(2*u+p),p*=f):(E=Math.floor((A+p)/(u+p)),m=(A-E*u)/(E-1),p=(y=(A-(E+1)*u)/E)<=0||Math.abs(p-m){s=1e3*this._delayBeforeRestoreSeconds,i||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,i=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",r),this._onCameraMatrix=e.scene.camera.on("matrix",r),this._onSceneTick=e.scene.on("tick",(t=>{i&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),i=!1))}));let o=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{o=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{o=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{o&&r()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}Boolean("object"!=typeof process||"[object process]"!==String(process)||process.browser);const UE="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function HE(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}UE&&parseFloat(UE[1]);const GE="object"!=typeof process||"[object process]"!==String(process)||process.browser,kE="undefined"!=typeof window&&void 0!==window.orientation,VE="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function jE(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}VE&&parseFloat(VE[1]);class QE{constructor(e,t){jE(this,"name",void 0),jE(this,"workerThread",void 0),jE(this,"isRunning",!0),jE(this,"result",void 0),jE(this,"_resolve",(()=>{})),jE(this,"_reject",(()=>{})),this.name=e,this.workerThread=t,this.result=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){HE(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){HE(this.isRunning),this.isRunning=!1,this._reject(e)}}class WE{}const zE=new Map;function KE(e){HE(e.source&&!e.url||!e.source&&e.url);let t=zE.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return YE((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),zE.set(e.url,t)),e.source&&(t=YE(e.source),zE.set(e.source,t))),HE(t),t}function YE(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function XE(e,t=!0,s){const i=s||new Set;if(e){if(ZE(e))i.add(e);else if(ZE(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(const s in e)XE(e[s],t,i)}else;return void 0===s?Array.from(i):[]}function ZE(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const qE=()=>{};class JE{static isSupported(){return"undefined"!=typeof Worker&&GE||void 0!==typeof WE}constructor(e){jE(this,"name",void 0),jE(this,"source",void 0),jE(this,"url",void 0),jE(this,"terminated",!1),jE(this,"worker",void 0),jE(this,"onMessage",void 0),jE(this,"onError",void 0),jE(this,"_loadableURL","");const{name:t,source:s,url:i}=e;HE(s||i),this.name=t,this.source=s,this.url=i,this.onMessage=qE,this.onError=e=>console.log(e),this.worker=GE?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=qE,this.onError=qE,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||XE(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=KE({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new WE(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new WE(this.source,{eval:!0})}return e.on("message",(e=>{this.onMessage(e)})),e.on("error",(e=>{this.onError(e)})),e.on("exit",(e=>{})),e}}class $E{static isSupported(){return JE.isSupported()}constructor(e){jE(this,"name","unnamed"),jE(this,"source",void 0),jE(this,"url",void 0),jE(this,"maxConcurrency",1),jE(this,"maxMobileConcurrency",1),jE(this,"onDebug",(()=>{})),jE(this,"reuseWorkers",!0),jE(this,"props",{}),jE(this,"jobQueue",[]),jE(this,"idleQueue",[]),jE(this,"count",0),jE(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach((e=>e.destroy())),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,s)=>e.done(s)),s=((e,t)=>e.error(t))){const i=new Promise((i=>(this.jobQueue.push({name:e,onMessage:t,onError:s,onStart:i}),this)));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const s=new QE(t.name,e);e.onMessage=e=>t.onMessage(s,e.type,e.payload),e.onError=e=>t.onError(s,e),t.onStart(s);try{await s.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class tm{static isSupported(){return JE.isSupported()}static getWorkerFarm(e={}){return tm._workerFarm=tm._workerFarm||new tm({}),tm._workerFarm.setProps(e),tm._workerFarm}constructor(e){jE(this,"props",void 0),jE(this,"workerPools",new Map),this.props={...em},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:s,url:i}=e;let r=this.workerPools.get(t);return r||(r=new $E({name:t,source:s,url:i}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}jE(tm,"_workerFarm",void 0);const sm={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},im=sm.window||sm.self||sm.global,rm=sm.process||{},om="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",nm=!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}();class am{constructor(e,t,s="sessionStorage"){this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function lm(e,t,s,i=600){const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const hm={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function cm(e){return"string"==typeof e?hm[e.toUpperCase()]||hm.WHITE:e}function Am(e,t){if(!e)throw new Error(t||"Assertion failed")}function um(){let e;if(nm&&im.performance)e=im.performance.now();else if(rm.hrtime){const t=rm.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const pm={debug:nm&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},dm={enabled:!0,level:0};function fm(){}const Em={},mm={once:!0};function ym(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}class gm{constructor({id:e}={id:""}){this.id=e,this.VERSION=om,this._startTs=um(),this._deltaTs=um(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new am("__probe-".concat(this.id,"__"),dm),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((um()-this._startTs).toPrecision(10))}getDelta(){return Number((um()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){Am(e,t)}warn(e){return this._getLogFunction(0,e,pm.warn,arguments,mm)}error(e){return this._getLogFunction(0,e,pm.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,pm.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,pm.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,pm.debug||pm.info,arguments,mm)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||fm,s&&[s],{tag:ym(t)}):fm}image({logLevel:e,priority:t,image:s,message:i="",scale:r=1}){return this._shouldLog(e||t)?nm?function({image:e,message:t="",scale:s=1}){if("string"==typeof e){const i=new Image;return i.onload=()=>{const e=lm(i,t,s);console.log(...e)},i.src=e,fm}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...lm(e,t,s)),fm;if("canvas"===i.toLowerCase()){const i=new Image;return i.onload=()=>console.log(...lm(i,t,s)),i.src=e.toDataURL(),fm}return fm}({image:s,message:i,scale:r}):function({image:e,message:t="",scale:s=1}){let i=null;try{i=module.require("asciify-image")}catch(e){}if(i)return()=>i(e,{fit:"box",width:"".concat(Math.round(80*s),"%")}).then((e=>console.log(e)));return fm}({image:s,message:i,scale:r}):fm}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||fm)}group(e,t,s={collapsed:!1}){s=vm({logLevel:e,message:t,opts:s});const{collapsed:i}=s;return s.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(s)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||fm)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Im(e)}_getLogFunction(e,t,s,i=[],r){if(this._shouldLog(e)){r=vm({logLevel:e,message:t,args:i,opts:r}),Am(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=um();const o=r.tag||r.message;if(r.once){if(Em[o])return fm;Em[o]=um()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e,t=8){const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return nm||"string"!=typeof e||(t&&(t=cm(t),e="[".concat(t,"m").concat(e,"")),s&&(t=cm(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return fm}}function Im(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Am(Number.isFinite(t)&&t>=0),t}function vm(e){const{logLevel:t,message:s}=e;e.logLevel=Im(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(e.args=i,typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return Am("string"===r||"object"===r),Object.assign(e,e.opts)}gm.VERSION=om,new gm({id:"loaders.gl"});function Tm(){return!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}()}new class{constructor(){jE(this,"console",void 0),this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const _m={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},Rm=_m.window||_m.self||_m.global,Pm=_m.process||{},Dm="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";Tm();class Nm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";jE(this,"storage",void 0),jE(this,"id",void 0),jE(this,"config",{}),this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function bm(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}let Cm;function Om(e){return"string"==typeof e?Cm[e.toUpperCase()]||Cm.WHITE:e}function Sm(e,t){if(!e)throw new Error(t||"Assertion failed")}function xm(){let e;var t,s;if(Tm&&"performance"in Rm)e=null==Rm||null===(t=Rm.performance)||void 0===t||null===(s=t.now)||void 0===s?void 0:s.call(t);else if("hrtime"in Pm){var i;const t=null==Pm||null===(i=Pm.hrtime)||void 0===i?void 0:i.call(Pm);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(Cm||(Cm={}));const wm={debug:Tm&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Bm={enabled:!0,level:0};function Fm(){}const Mm={},Lm={once:!0};class Um{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};jE(this,"id",void 0),jE(this,"VERSION",Dm),jE(this,"_startTs",xm()),jE(this,"_deltaTs",xm()),jE(this,"_storage",void 0),jE(this,"userData",{}),jE(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new Nm("__probe-".concat(this.id,"__"),Bm),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((xm()-this._startTs).toPrecision(10))}getDelta(){return Number((xm()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){Sm(e,t)}warn(e){return this._getLogFunction(0,e,wm.warn,arguments,Lm)}error(e){return this._getLogFunction(0,e,wm.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,wm.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,wm.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),r=2;r{const t=bm(e,s,i);console.log(...t)},e.src=t,Fm}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...bm(t,s,i)),Fm;if("canvas"===r.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...bm(e,s,i)),e.src=t.toDataURL(),Fm}return Fm}({image:i,message:r,scale:o}):function(e){let{image:t,message:s="",scale:i=1}=e,r=null;try{r=module.require("asciify-image")}catch(e){}if(r)return()=>r(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return Fm}({image:i,message:r,scale:o}):Fm}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Fm)}group(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const i=Gm({logLevel:e,message:t,opts:s}),{collapsed:r}=s;return i.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Fm)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Hm(e)}_getLogFunction(e,t,s,i,r){if(this._shouldLog(e)){r=Gm({logLevel:e,message:t,args:i,opts:r}),Sm(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=xm();const o=r.tag||r.message;if(r.once){if(Mm[o])return Fm;Mm[o]=xm()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return Tm||"string"!=typeof e||(t&&(t=Om(t),e="[".concat(t,"m").concat(e,"")),s&&(t=Om(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return Fm}}function Hm(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Sm(Number.isFinite(t)&&t>=0),t}function Gm(e){const{logLevel:t,message:s}=e;e.logLevel=Hm(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return Sm("string"===r||"object"===r),Object.assign(e,{args:i},e.opts)}function km(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}var Vm,jm,Qm,Wm,zm,Km,Ym,Xm,Zm;let qm;jE(Um,"VERSION",Dm),new Um({id:"loaders.gl"}),(Zm=Vm||(Vm={}))[Zm.NONE=0]="NONE",Zm[Zm.BASISLZ=1]="BASISLZ",Zm[Zm.ZSTD=2]="ZSTD",Zm[Zm.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(jm||(jm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(Qm||(Qm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Wm||(Wm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(zm||(zm={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Km||(Km={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(Ym||(Ym={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Xm||(Xm={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(qm||(qm={}));const Jm={DEFAULT:{}};function $m(e,t,s={}){const i="lightgrey",r=s.hoverColor||"rgba(0,0,0,0.4)",o=500,n=o+o/3,a=n/24,l=[{boundary:[6,6,6,6],color:s.frontColor||s.color||"#55FF55"},{boundary:[18,6,6,6],color:s.backColor||s.color||"#55FF55"},{boundary:[12,6,6,6],color:s.leftColor||s.color||"#FF5555"},{boundary:[0,6,6,6],color:s.rightColor||s.color||"#FF5555"},{boundary:[6,0,6,6],color:s.topColor||s.color||"#7777FF"},{boundary:[6,12,6,6],color:s.bottomColor||s.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];s.frontColor||s.color,s.backColor||s.color,s.leftColor||s.color,s.rightColor||s.color,s.topColor||s.color,s.bottomColor||s.color;const c=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let e=0,t=h.length;e=r[0]*a&&t<=(r[0]+r[2])*a&&s>=r[1]*a&&s<=(r[1]+r[3])*a)return i}}return-1},this.setAreaHighlighted=function(e,t){var s=A[e];if(!s)throw"Area not found: "+e;s.highlighted=!!t,f()},this.getAreaDir=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const ey=u.vec3(),ty=u.vec3();u.mat4();class sy extends n{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new Yt(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(e){return void this.error(e)}const s=this._navCubeScene;s.clearLights(),new Ze(s,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ze(s,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ze(s,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=s.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,s.edgeMaterial.edgeColor=[.2,.2,.2],s.edgeMaterial.edgeAlpha=.6,this._zUp=Boolean(e.camera.zUp);var i=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=function(){const e=u.mat4();return function(t,s,r){return u.identityMat4(e),u.rotationMat4v(t*i._projectNorthOffsetAngle*u.DEGTORAD,[0,1,0],e),u.transformVec3(e,s,r)}}();this._synchCamera=function(){var t=u.rotationMat4c(-90*u.DEGTORAD,1,0,0),s=u.vec3(),o=u.vec3(),n=u.vec3();return function(){var a=e.camera.eye,l=e.camera.look,h=e.camera.up;s=u.mulVec3Scalar(u.normalizeVec3(u.subVec3(a,l,s)),5),i._isProjectNorth&&i._projectNorthOffsetAngle&&(s=r(-1,s,ey),h=r(-1,h,ty)),i._zUp?(u.transformVec3(t,s,o),u.transformVec3(t,h,n),i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=u.transformVec3(t,s,o),i._navCubeCamera.up=u.transformPoint3(t,h,n)):(i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=s,i._navCubeCamera.up=h)}}(),this._cubeTextureCanvas=new $m(e,s,t),this._cubeSampler=new li(s,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:1001,wrapT:1001}),this._cubeMesh=new Hs(s,{geometry:new ht(s,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new dt(s,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=!1===t.shadowVisible?null:new Hs(s,{geometry:new ht(s,ks({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new dt(s,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",(()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())})),this._onCameraFOV=e.camera.perspective.on("fov",(e=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=e)})),this._onCameraProjection=e.camera.on("projection",(e=>{this._synchProjection&&(this._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var o=-1;function n(e){var t=[0,0];if(e){for(var s=e.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var a,l,h=null,c=null,A=!1,p=!1,d=.5;i._navCubeCanvas.addEventListener("mouseenter",i._onMouseEnter=function(e){p=!0}),i._navCubeCanvas.addEventListener("mouseleave",i._onMouseLeave=function(e){p=!1}),i._navCubeCanvas.addEventListener("mousedown",i._onMouseDown=function(e){if(1===e.which){h=e.x,c=e.y,a=e.clientX,l=e.clientY;var t=n(e),i=s.pick({canvasPos:t});A=!!i}}),document.addEventListener("mouseup",i._onMouseUp=function(e){if(1===e.which&&(A=!1,null!==h)){var t=n(e),a=s.pick({canvasPos:t,pickSurface:!0});if(a&&a.uv){var l=i._cubeTextureCanvas.getArea(a.uv);if(l>=0&&(document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0)){if(i._cubeTextureCanvas.setAreaHighlighted(l,!0),o=l,i._repaint(),e.xh+3||e.yc+3)return;var u=i._cubeTextureCanvas.getAreaDir(l);if(u){var p=i._cubeTextureCanvas.getAreaUp(l);i._isProjectNorth&&i._projectNorthOffsetAngle&&(u=r(1,u,ey),p=r(1,p,ty)),f(u,p,(function(){o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0&&(i._cubeTextureCanvas.setAreaHighlighted(l,!1),o=-1,i._repaint())}))}}}}}),document.addEventListener("mousemove",i._onMouseMove=function(t){if(o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),1!==t.buttons||A){if(A){var r=t.clientX,h=t.clientY;return document.body.style.cursor="move",void function(t,s){var i=(t-a)*-d,r=(s-l)*-d;e.camera.orbitYaw(i),e.camera.orbitPitch(-r),a=t,l=s}(r,h)}if(p){var c=n(t),u=s.pick({canvasPos:c,pickSurface:!0});if(u){if(u.uv){document.body.style.cursor="pointer";var f=i._cubeTextureCanvas.getArea(u.uv);if(f===o)return;o>=0&&i._cubeTextureCanvas.setAreaHighlighted(o,!1),f>=0&&(i._cubeTextureCanvas.setAreaHighlighted(f,!0),i._repaint(),o=f)}}else document.body.style.cursor="default",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1)}}});var f=function(){var t=u.vec3();return function(s,r,o){var n=i._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,a=u.getAABB3Diag(n);u.getAABB3Center(n,t);var l=Math.abs(a/Math.tan(i._cameraFitFOV*u.DEGTORAD));e.cameraControl.pivotPos=t,i._cameraFly?e.cameraFlight.flyTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV,duration:i._cameraFlyDuration},o):e.cameraFlight.jumpTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV},o)}}();this._onUpdated=e.localeService.on("updated",(()=>{this._cubeTextureCanvas.clear(),this._repaint()})),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return!!this._navCubeCanvas&&this._cubeMesh.visible}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}u.vec3();const iy=new Float64Array([0,0,1]),ry=new Float64Array(4);class oy{constructor(e){this.id=null,this._viewer=e.viewer,this._visible=!1,this._pos=u.vec3(),this._origin=u.vec3(),this._rtcPos=u.vec3(),this._baseDir=u.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}_setSectionPlane(e){this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(()=>{this._setPos(this._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(()=>{this._ignoreNextSectionPlaneDirUpdate?this._ignoreNextSectionPlaneDirUpdate=!1:this._setDir(this._sectionPlane.dir)})))}get sectionPlane(){return this._sectionPlane}_setPos(e){this._pos.set(e),S(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}_setDir(e){this._baseDir.set(e),this._rootNode.quaternion=u.vec3PairToQuaternion(iy,e,ry)}_setSectionPlaneDir(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}setVisible(e=!0){if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}getVisible(){return this._visible}setCulled(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}_createNodes(){const e=!1,t=this._viewer.scene,s=.01;this._rootNode=new $s(t,{position:[0,0,0],scale:[5,5,5]});const i=this._rootNode,r={arrowHead:new ht(i,ks({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new ht(i,ks({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new ht(i,ks({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new ht(i,di({radius:.8,tube:s,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new ht(i,di({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new ht(i,di({radius:.8,tube:s,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new ht(i,ks({radiusTop:s,radiusBottom:s,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new ht(i,ks({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},o={pickable:new dt(i,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new dt(i,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new Et(i,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new dt(i,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new Et(i,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new dt(i,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new Et(i,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new dt(i,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Et(i,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Et(i,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:i.addChild(new Hs(i,{geometry:new ht(i,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new dt(i,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Et(i,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1]}),e),planeFrame:i.addChild(new Hs(i,{geometry:new ht(i,di({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new dt(i,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Et(i,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45]}),e),xCurve:i.addChild(new Hs(i,{geometry:r.curve,material:o.red,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveHandle:i.addChild(new Hs(i,{geometry:r.curveHandle,material:o.pickable,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveArrow1:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,-.07,-.8,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(0*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xCurveArrow2:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,-.8,-.07,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurve:i.addChild(new Hs(i,{geometry:r.curve,material:o.green,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveHandle:i.addChild(new Hs(i,{geometry:r.curveHandle,material:o.pickable,rotation:[-90,0,0],pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveArrow1:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(.07,0,-.8,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurveArrow2:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(.8,0,-.07,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurve:i.addChild(new Hs(i,{geometry:r.curve,material:o.blue,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zCurveHandle:i.addChild(new Hs(i,{geometry:r.curveHandle,material:o.pickable,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveCurveArrow1:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(.8,-.07,0,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4());return u.mulMat4(e,t,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveArrow2:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(.05,-.8,0,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),center:i.addChild(new Hs(i,{geometry:new ht(i,Vs({radius:.05})),material:o.center,pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrowHandle:i.addChild(new Hs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xAxis:i.addChild(new Hs(i,{geometry:r.axis,material:o.red,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisHandle:i.addChild(new Hs(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrowHandle:i.addChild(new Hs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1,opacity:.2}),e),yShaft:i.addChild(new Hs(i,{geometry:r.axis,material:o.green,position:[0,-.5,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yShaftHandle:i.addChild(new Hs(i,{geometry:r.axisHandle,material:o.pickable,position:[0,-.5,0],pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrowHandle:i.addChild(new Hs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zShaft:i.addChild(new Hs(i,{geometry:r.axis,material:o.blue,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),clippable:!1,pickable:!1,collidable:!0,visible:!1}),e),zAxisHandle:i.addChild(new Hs(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),clippable:!1,pickable:!0,collidable:!0,visible:!1}),e)},this._affordanceMeshes={planeFrame:i.addChild(new Hs(i,{geometry:new ht(i,di({center:[0,0,0],radius:2,tube:s,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new dt(i,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new Et(i,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45]}),e),xHoop:i.addChild(new Hs(i,{geometry:r.hoop,material:o.red,highlighted:!0,highlightMaterial:o.highlightRed,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yHoop:i.addChild(new Hs(i,{geometry:r.hoop,material:o.green,highlighted:!0,highlightMaterial:o.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zHoop:i.addChild(new Hs(i,{geometry:r.hoop,material:o.blue,highlighted:!0,highlightMaterial:o.highlightBlue,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHeadBig,material:o.red,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHeadBig,material:o.green,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Hs(i,{geometry:r.arrowHeadBig,material:o.blue,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e)}}_bindEvents(){const e=this;var t=!1;const s=-1,i=0,r=1,o=2,n=3,a=4,l=5,h=this._rootNode;var c=null,A=null;const p=u.vec2(),d=u.vec3([1,0,0]),f=u.vec3([0,1,0]),E=u.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,y=this._viewer.camera,g=this._viewer.scene;{const e=u.vec3([0,0,0]);let t=-1;this._onCameraViewMatrix=g.camera.on("viewMatrix",(()=>{})),this._onCameraProjMatrix=g.camera.on("projMatrix",(()=>{})),this._onSceneTick=g.on("tick",(()=>{const s=Math.abs(u.lenVec3(u.subVec3(g.camera.eye,this._pos,e)));if(s!==t&&"perspective"===y.projection){const e=.07*(Math.tan(y.perspective.fov*u.DEGTORAD)*s);h.scale=[e,e,e],t=s}if("ortho"===y.projection){const e=y.ortho.scale/10;h.scale=[e,e,e],t=s}}))}const I=function(){const e=new Float64Array(2);return function(t){if(t){for(var s=t.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;e[0]=t.pageX-i,e[1]=t.pageY-r}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),v=function(){const t=u.mat4();return function(s,i){return u.quaternionToMat4(e._rootNode.quaternion,t),u.transformVec3(t,s,i),u.normalizeVec3(i),i}}();var T=function(){const e=u.vec3();return function(t){const s=Math.abs(t[0]);return s>Math.abs(t[1])&&s>Math.abs(t[2])?u.cross3Vec3(t,[0,1,0],e):u.cross3Vec3(t,[1,0,0],e),u.cross3Vec3(e,t,e),u.normalizeVec3(e),e}}();const _=function(){const t=u.vec3(),s=u.vec3(),i=u.vec4();return function(r,o,n){v(r,i);const a=T(i,o,n);P(o,a,t),P(n,a,s),u.subVec3(s,t);const l=u.dotVec3(s,i);e._pos[0]+=i[0]*l,e._pos[1]+=i[1]*l,e._pos[2]+=i[2]*l,e._rootNode.position=e._pos,e._sectionPlane&&(e._sectionPlane.pos=e._pos)}}();var R=function(){const t=u.vec4(),s=u.vec4(),i=u.vec4(),r=u.vec4();return function(o,n,a){v(o,r);if(!(P(n,r,t)&&P(a,r,s))){const e=T(r,n,a);P(n,e,t,1),P(a,e,s,1);var l=u.dotVec3(t,r);t[0]-=l*r[0],t[1]-=l*r[1],t[2]-=l*r[2],l=u.dotVec3(s,r),s[0]-=l*r[0],s[1]-=l*r[1],s[2]-=l*r[2]}u.normalizeVec3(t),u.normalizeVec3(s),l=u.dotVec3(t,s),l=u.clamp(l,-1,1);var h=Math.acos(l)*u.RADTODEG;u.cross3Vec3(t,s,i),u.dotVec3(i,r)<0&&(h=-h),e._rootNode.rotate(o,h),D()}}(),P=function(){const t=u.vec4([0,0,0,1]),s=u.mat4();return function(i,r,o,n){n=n||0,t[0]=i[0]/m.width*2-1,t[1]=-(i[1]/m.height*2-1),t[2]=0,t[3]=1,u.mulMat4(y.projMatrix,y.viewMatrix,s),u.inverseMat4(s),u.transformVec4(s,t,t),u.mulVec4Scalar(t,1/t[3]);var a=y.eye;u.subVec4(t,a,t);const l=e._sectionPlane.pos;var h=-u.dotVec3(l,r)-n,c=u.dotVec3(r,t);if(Math.abs(c)>.005){var A=-(u.dotVec3(r,a)+h)/c;return u.mulVec3Scalar(t,A,o),u.addVec3(o,a),u.subVec3(o,l,o),!0}return!1}}();const D=function(){const t=u.vec3(),s=u.mat4();return function(){e.sectionPlane&&(u.quaternionToMat4(h.quaternion,s),u.transformVec3(s,[0,0,1],t),e._setSectionPlaneDir(t))}}();var N,b=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(e=>{if(!this._visible)return;if(b)return;var h;t=!1,N&&(N.visible=!1);switch(e.entity.id){case this._displayMeshes.xAxisArrowHandle.id:case this._displayMeshes.xAxisHandle.id:h=this._affordanceMeshes.xAxisArrow,c=i;break;case this._displayMeshes.yAxisArrowHandle.id:case this._displayMeshes.yShaftHandle.id:h=this._affordanceMeshes.yAxisArrow,c=r;break;case this._displayMeshes.zAxisArrowHandle.id:case this._displayMeshes.zAxisHandle.id:h=this._affordanceMeshes.zAxisArrow,c=o;break;case this._displayMeshes.xCurveHandle.id:h=this._affordanceMeshes.xHoop,c=n;break;case this._displayMeshes.yCurveHandle.id:h=this._affordanceMeshes.yHoop,c=a;break;case this._displayMeshes.zCurveHandle.id:h=this._affordanceMeshes.zHoop,c=l;break;default:return void(c=s)}h&&(h.visible=!0),N=h,t=!0})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOutEntity",(e=>{this._visible&&(N&&(N.visible=!1),N=null,c=s)})),m.addEventListener("mousedown",this._canvasMouseDownListener=e=>{if(e.preventDefault(),this._visible&&t&&(this._viewer.cameraControl.pointerEnabled=!1,1===e.which)){b=!0;var s=I(e);A=c,p[0]=s[0],p[1]=s[1]}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=e=>{if(!this._visible)return;if(!b)return;var t=I(e);const s=t[0],h=t[1];switch(A){case i:_(d,p,t);break;case r:_(f,p,t);break;case o:_(E,p,t);break;case n:R(d,p,t);break;case a:R(f,p,t);break;case l:R(E,p,t)}p[0]=s,p[1]=h}),m.addEventListener("mouseup",this._canvasMouseUpListener=e=>{this._visible&&(this._viewer.cameraControl.pointerEnabled=!0,b&&(e.which,b=!1,t=!1))}),m.addEventListener("wheel",this._canvasWheelListener=e=>{if(this._visible)Math.max(-1,Math.min(1,40*-e.deltaY))})}_destroy(){this._unbindEvents(),this._destroyNodes()}_unbindEvents(){const e=this._viewer,t=e.scene,s=t.canvas.canvas,i=e.camera,r=e.cameraControl;t.off(this._onSceneTick),s.removeEventListener("mousedown",this._canvasMouseDownListener),s.removeEventListener("mousemove",this._canvasMouseMoveListener),s.removeEventListener("mouseup",this._canvasMouseUpListener),s.removeEventListener("wheel",this._canvasWheelListener),i.off(this._onCameraViewMatrix),i.off(this._onCameraProjMatrix),r.off(this._onCameraControlHover),r.off(this._onCameraControlHoverLeave)}_destroyNodes(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}class ny{constructor(e,t,s){this.id=s.id,this._sectionPlane=s,this._mesh=new Hs(t,{id:s.id,geometry:new ht(t,ct({xSize:.5,ySize:.5,zSize:.001})),material:new dt(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new yt(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Et(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Et(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const e=u.vec3([0,0,0]),t=u.vec3(),s=u.vec3([0,0,1]),i=u.vec4(4),r=u.vec3(),o=()=>{const o=this._sectionPlane.scene.center,n=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];u.subVec3(o,this._sectionPlane.pos,e);const a=-u.dotVec3(n,e);u.normalizeVec3(n),u.mulVec3Scalar(n,a,t);const l=u.vec3PairToQuaternion(s,this._sectionPlane.dir,i);r[0]=.1*t[0],r[1]=.1*t[1],r[2]=.1*t[2],this._mesh.quaternion=l,this._mesh.position=r};this._onSectionPlanePos=this._sectionPlane.on("pos",o),this._onSectionPlaneDir=this._sectionPlane.on("dir",o)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}class ay{constructor(e,t){if(!(t.onHoverEnterPlane&&t.onHoverLeavePlane&&t.onClickedNothing&&t.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new Yt(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Ze(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ze(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ze(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const e=this._scene.camera,t=u.rotationMat4c(-90*u.DEGTORAD,1,0,0),s=u.vec3(),i=u.vec3(),r=u.vec3();this._synchCamera=()=>{const o=this._viewer.camera.eye,n=this._viewer.camera.look,a=this._viewer.camera.up;u.mulVec3Scalar(u.normalizeVec3(u.subVec3(o,n,s)),7),this._zUp?(u.transformVec3(t,s,i),u.transformVec3(t,a,r),e.look=[0,0,0],e.eye=u.transformVec3(t,s,i),e.up=u.transformPoint3(t,a,r)):(e.look=[0,0,0],e.eye=s,e.up=a)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(e=>{this._scene.camera.perspective.fov=e}));var s=null;this._onInputMouseMove=this._scene.input.on("mousemove",(e=>{const t=this._scene.pick({canvasPos:e});if(t){if(!s||t.entity.id!==s.id){if(s){this._planes[s.id]&&this._onHoverLeavePlane(s.id)}s=t.entity;this._planes[s.id]&&this._onHoverEnterPlane(s.id)}}else s&&(this._onHoverLeavePlane(s.id),s=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{if(s){this._planes[s.id]&&this._onClickedPlane(s.id)}else this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{s&&(this._onHoverLeavePlane(s.id),s=null)}),this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new ny(this,this._scene,e)}setPlaneHighlighted(e,t){const s=this._planes[e];s&&s.setHighlighted(t)}setPlaneSelected(e,t){const s=this._planes[e];s&&s.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const ly=u.AABB3(),hy=u.vec3();class cy extends n{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,null!==t.overviewCanvasId&&void 0!==t.overviewCanvasId){const e=document.getElementById(t.overviewCanvasId);e?this._overview=new ay(this,{overviewCanvas:e,visible:t.overviewVisible,onHoverEnterPlane:e=>{this._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:e=>{this._overview.setPlaneHighlighted(e,!1)},onClickedPlane:e=>{if(this.getShownControl()===e)return void this.hideControl();this.showControl(e);const t=this.sectionPlanes[e].pos;ly.set(this.viewer.scene.aabb),u.getAABB3Center(ly,hy),ly[0]+=t[0]-hy[0],ly[1]+=t[1]-hy[1],ly[2]+=t[2]-hy[2],ly[3]+=t[0]-hy[0],ly[4]+=t[1]-hy[1],ly[5]+=t[2]-hy[2],this.viewer.cameraFlight.flyTo({aabb:ly,fitFOV:65})},onClickedNothing:()=>{this.hideControl()}}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",(e=>{this._sectionPlaneCreated(e)}))}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id);return new js(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():new oy(this);t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(()=>{this._sectionPlaneDestroyed(e)}))}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].flipDir()}}showControl(e){const t=this._controls[e];t?(this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e):this.error("Control not found: "+e)}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)):this.error("SectionPlane not found: "+e)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,s=e.length;t{e.preventDefault()},this._onObjectVisibility=this._viewer.scene.on("objectVisibility",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;const i=e.visible;if(!(i!==s.checked))return;this._muteTreeEvents=!0,s.checked=i,i?s.numVisibleEntities++:s.numVisibleEntities--;const r=document.getElementById(`checkbox-${s.nodeId}`);r&&(r.checked=i);let o=s.parent;for(;o;){o.checked=i,i?o.numVisibleEntities++:o.numVisibleEntities--;const e=document.getElementById(`checkbox-${o.nodeId}`);if(e){const t=o.numVisibleEntities>0;t!==e.checked&&(e.checked=t)}o=o.parent}this._muteTreeEvents=!1})),this._onObjectXrayed=this._viewer.scene.on("objectXRayed",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;this._muteTreeEvents=!0;const i=e.xrayed;if(!(i!==s.xrayed))return;s.xrayed=i;const r=s.nodeId,o=document.getElementById(r);null!==o&&(i?o.classList.add("xrayed-node"):o.classList.remove("xrayed-node")),this._muteTreeEvents=!1})),this._switchExpandHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._expandSwitchElement(t)},this._switchCollapseHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._collapseSwitchElement(t)},this._checkboxChangeHandler=e=>{if(this._muteTreeEvents)return;this._muteSceneEvents=!0;const t=e.target,s=t.checked,i=t.id.replace("checkbox-",""),r=this._nodeNodes[i],o=this._viewer.scene.objects;let n=0;this._withNodeTree(r,(e=>{const t=e.objectId,i=`checkbox-${e.nodeId}`,r=o[t],a=0===e.children.length;e.numVisibleEntities=s?e.numEntities:0,a&&s!==e.checked&&n++,e.checked=s;const l=document.getElementById(i);l&&(l.checked=s),r&&(r.visible=s)}));let a=r.parent;for(;a;){a.checked=s;const e=document.getElementById(`checkbox-${a.nodeId}`);s?a.numVisibleEntities+=n:a.numVisibleEntities-=n;const t=a.numVisibleEntities>0;t!==e.checked&&(e.checked=t),a=a.parent}this._muteSceneEvents=!1},this._hierarchy=t.hierarchy||"containment",this._autoExpandDepth=t.autoExpandDepth||0,this._autoAddModels){const e=Object.keys(this.viewer.metaScene.metaModels);for(let t=0,s=e.length;t{this.viewer.metaScene.metaModels[e]&&this.addModel(e)}))}this.hierarchy=t.hierarchy}else this.error("Config expected: containerElement")}set hierarchy(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}get hierarchy(){return this._hierarchy}addModel(e,t={}){if(!this._containerElement)return;const s=this.viewer.scene.models[e];if(!s)throw"Model not found: "+e;const i=this.viewer.metaScene.metaModels[e];i?this._metaModels[e]?this.warn("Model already added: "+e):(this._metaModels[e]=i,s.on("destroyed",(()=>{this.removeModel(s.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}removeModel(e){if(!this._containerElement)return;this._metaModels[e]&&(delete this._metaModels[e],this._createNodes())}showNode(e){this._showListItemElementId&&this.unShowNode();const t=this._objectNodes[e];if(!t)return;const s=t.nodeId,i="switch-"+s,r=document.getElementById(i);if(r)return this._expandSwitchElement(r),void r.scrollIntoView();const o=[];o.unshift(t);let n=t.parent;for(;n;)o.unshift(n),n=n.parent;for(let e=0,t=o.length;e{if(i===e)return;const r="switch-"+s.nodeId,o=document.getElementById(r);if(o){this._expandSwitchElement(o);const e=s.children;for(var n=0,a=e.length;n0;return this.valid}_validateMetaModelForStoreysHierarchy(e=0,t,s){return!0}_createEnabledNodes(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this._createTrees(),this.expandToDepth(this._autoExpandDepth)}_createDisabledNodes(){const e=document.createElement("ul");this._rootElement=e,this._containerElement.appendChild(e);const t=this._viewer.metaScene.rootMetaObjects;for(let s in t){const i=t[s],r=i.type,o=i.name,n=o&&""!==o&&"Undefined"!==o&&"Default"!==o?o:r,a=document.createElement("li");e.appendChild(a);const l=document.createElement("a");l.href="#",l.textContent="!",l.classList.add("warn"),l.classList.add("warning"),a.appendChild(l);const h=document.createElement("span");h.textContent=n,a.appendChild(h)}}_findEmptyNodes(){const e=this._viewer.metaScene.rootMetaObjects;for(let t in e)this._findEmptyNodes2(e[t])}_findEmptyNodes2(e,t=0){const s=this.viewer.scene,i=e.children,r=e.id,o=s.objects[r];if(e._countEntities=0,o&&e._countEntities++,i)for(let t=0,s=i.length;t{e.aabb&&r.aabb||(e.aabb||(e.aabb=t.getAABB(i.getObjectIDsInSubtree(e.objectId))),r.aabb||(r.aabb=t.getAABB(i.getObjectIDsInSubtree(r.objectId))));let o=0;return o=s.xUp?0:s.yUp?1:2,e.aabb[o]>r.aabb[o]?-1:e.aabb[o]i?1:0}_synchNodesToEntities(){const e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,s=this._viewer.scene.objects;for(let i=0,r=e.length;ithis._createNodeElement(e))),t=document.createElement("ul");e.forEach((e=>{t.appendChild(e)})),this._containerElement.appendChild(t),this._rootElement=t}_createNodeElement(e){const t=document.createElement("li"),s=e.nodeId;if(e.xrayed&&t.classList.add("xrayed-node"),t.id=s,e.children.length>0){const e="switch-"+s,i=document.createElement("a");i.href="#",i.id=e,i.textContent="+",i.classList.add("plus"),i.addEventListener("click",this._switchExpandHandler),t.appendChild(i)}const i=document.createElement("input");i.id=`checkbox-${s}`,i.type="checkbox",i.checked=e.checked,i.style["pointer-events"]="all",i.addEventListener("change",this._checkboxChangeHandler),t.appendChild(i);const r=document.createElement("span");return r.textContent=e.title,t.appendChild(r),r.oncontextmenu=t=>{this.fire("contextmenu",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},r.onclick=t=>{this.fire("nodeTitleClicked",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},t}_expandSwitchElement(e){const t=e.parentElement;if(t.getElementsByTagName("li")[0])return;const s=t.id,i=this._nodeNodes[s].children.map((e=>this._createNodeElement(e))),r=document.createElement("ul");i.forEach((e=>{r.appendChild(e)})),t.appendChild(r),e.classList.remove("plus"),e.classList.add("minus"),e.textContent="-",e.removeEventListener("click",this._switchExpandHandler),e.addEventListener("click",this._switchCollapseHandler)}_collapseNode(e){const t="switch-"+e,s=document.getElementById(t);this._collapseSwitchElement(s)}_collapseSwitchElement(e){if(!e)return;const t=e.parentElement;if(!t)return;const s=t.querySelector("ul");s&&(t.removeChild(s),e.classList.remove("minus"),e.classList.add("plus"),e.textContent="+",e.removeEventListener("click",this._switchCollapseHandler),e.addEventListener("click",this._switchExpandHandler))}}class py{constructor(){}getManifest(e,t,s){m.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getMetaModel(e,t,s){m.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getXKT(e,t,s){var i=()=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=0;)e[t]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);t(n);const a=new Array(60);t(a);const l=new Array(512);t(l);const h=new Array(256);t(h);const c=new Array(29);t(c);const A=new Array(30);function u(e,t,s,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}let p,d,f;function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(A);const m=e=>e<256?l[e]:l[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},g=(e,t,s)=>{e.bi_valid>16-s?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=s-16):(e.bi_buf|=t<{g(e,s[2*t],s[2*t+1])},v=(e,t)=>{let s=0;do{s|=1&e,e>>>=1,s<<=1}while(--t>0);return s>>>1},T=(e,t,s)=>{const i=new Array(16);let r,o,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=v(i[t]++,t))}},_=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},R=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},P=(e,t,s,i)=>{const r=2*t,o=2*s;return e[r]{const i=e.heap[s];let r=s<<1;for(;r<=e.heap_len&&(r{let o,n,a,l,u=0;if(0!==e.sym_next)do{o=255&e.pending_buf[e.sym_buf+u++],o+=(255&e.pending_buf[e.sym_buf+u++])<<8,n=e.pending_buf[e.sym_buf+u++],0===o?I(e,n,t):(a=h[n],I(e,a+256+1,t),l=s[a],0!==l&&(n-=c[a],g(e,n,l)),o--,a=m(o),I(e,a,r),l=i[a],0!==l&&(o-=A[a],g(e,o,l)))}while(u{const s=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems;let n,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,n=0;n>1;n>=1;n--)D(e,s,n);l=o;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,s,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,s[2*l]=s[2*n]+s[2*a],e.depth[l]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,s[2*n+1]=s[2*a+1]=l,e.heap[1]=l++,D(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const s=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,n=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,A,u,p,d,f=0;for(u=0;u<=15;u++)e.bl_count[u]=0;for(s[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],u=s[2*s[2*c+1]+1]+1,u>l&&(u=l,f++),s[2*c+1]=u,c>i||(e.bl_count[u]++,p=0,c>=a&&(p=n[c-a]),d=s[2*c],e.opt_len+=d*(u+p),o&&(e.static_len+=d*(r[2*c+1]+p)));if(0!==f){do{for(u=l-1;0===e.bl_count[u];)u--;e.bl_count[u]--,e.bl_count[u+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(u=l;0!==u;u--)for(c=e.bl_count[u];0!==c;)A=e.heap[--h],A>i||(s[2*A+1]!==u&&(e.opt_len+=(u-s[2*A+1])*s[2*A],s[2*A+1]=u),c--)}})(e,t),T(s,h,e.bl_count)},C=(e,t,s)=>{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),t[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=t[2*(i+1)+1],++a{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),i=0;i<=s;i++)if(r=n,n=t[2*(i+1)+1],!(++a{g(e,0+(i?1:0),3),R(e),y(e,s),y(e,~s),s&&e.pending_buf.set(e.window.subarray(t,t+s),e.pending),e.pending+=s};var w={_tr_init:e=>{S||((()=>{let e,t,o,E,m;const y=new Array(16);for(o=0,E=0;E<28;E++)for(c[E]=o,e=0;e<1<>=7;E<30;E++)for(A[E]=m<<7,e=0;e<1<{let r,l,h=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,s=4093624447;for(t=0;t<=31;t++,s>>>=1)if(1&s&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),b(e,e.l_desc),b(e,e.d_desc),h=(e=>{let t;for(C(e,e.dyn_ltree,e.l_desc.max_code),C(e,e.dyn_dtree,e.d_desc.max_code),b(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*o[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,l=e.static_len+3+7>>>3,l<=r&&(r=l)):r=l=s+5,s+4<=r&&-1!==t?x(e,t,s,i):4===e.strategy||l===r?(g(e,2+(i?1:0),3),N(e,n,a)):(g(e,4+(i?1:0),3),((e,t,s,i)=>{let r;for(g(e,t-257,5),g(e,s-1,5),g(e,i-4,4),r=0;r(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=s,0===t?e.dyn_ltree[2*s]++:(e.matches++,t--,e.dyn_ltree[2*(h[s]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{g(e,2,3),I(e,256,n),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},B=(e,t,s,i)=>{let r=65535&e|0,o=e>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+t[i++]|0,o=o+r|0}while(--n);r%=65521,o%=65521}return r|o<<16|0};const F=new Uint32Array((()=>{let e,t=[];for(var s=0;s<256;s++){e=s;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[s]=e}return t})());var M=(e,t,s,i)=>{const r=F,o=i+s;e^=-1;for(let s=i;s>>8^r[255&(e^t[s])];return-1^e},L={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},U={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:G,_tr_flush_block:k,_tr_tally:V,_tr_align:j}=w,{Z_NO_FLUSH:Q,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:z,Z_FINISH:K,Z_BLOCK:Y,Z_OK:X,Z_STREAM_END:Z,Z_STREAM_ERROR:q,Z_DATA_ERROR:J,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:te,Z_HUFFMAN_ONLY:se,Z_RLE:ie,Z_FIXED:re,Z_DEFAULT_STRATEGY:oe,Z_UNKNOWN:ne,Z_DEFLATED:ae}=U,le=258,he=262,ce=42,Ae=113,ue=666,pe=(e,t)=>(e.msg=L[t],t),de=e=>2*e-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ee=e=>{let t,s,i,r=e.w_size;t=e.hash_size,i=t;do{s=e.head[--i],e.head[i]=s>=r?s-r:0}while(--t);t=r,i=t;do{s=e.prev[--i],e.prev[i]=s>=r?s-r:0}while(--t)};let me=(e,t,s)=>(t<{const t=e.state;let s=t.pending;s>e.avail_out&&(s=e.avail_out),0!==s&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+s),e.next_out),e.next_out+=s,t.pending_out+=s,e.total_out+=s,e.avail_out-=s,t.pending-=s,0===t.pending&&(t.pending_out=0))},ge=(e,t)=>{k(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ye(e.strm)},Ie=(e,t)=>{e.pending_buf[e.pending++]=t},ve=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Te=(e,t,s,i)=>{let r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),s),1===e.state.wrap?e.adler=B(e.adler,t,r,s):2===e.state.wrap&&(e.adler=M(e.adler,t,r,s)),e.next_in+=r,e.total_in+=r,r)},_e=(e,t)=>{let s,i,r=e.max_chain_length,o=e.strstart,n=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-he?e.strstart-(e.w_size-he):0,h=e.window,c=e.w_mask,A=e.prev,u=e.strstart+le;let p=h[o+n-1],d=h[o+n];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(s=t,h[s+n]===d&&h[s+n-1]===p&&h[s]===h[o]&&h[++s]===h[o+1]){o+=2,s++;do{}while(h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&on){if(e.match_start=t,n=i,i>=a)break;p=h[o+n-1],d=h[o+n]}}}while((t=A[t&c])>l&&0!=--r);return n<=e.lookahead?n:e.lookahead},Re=e=>{const t=e.w_size;let s,i,r;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-he)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ee(e),i+=t),0===e.strm.avail_in)break;if(s=Te(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=s,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=me(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=me(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let s,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n=0,a=e.strm.avail_in;do{if(s=65535,r=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(s=i+e.strm.avail_in),s>r&&(s=r),s>8,e.pending_buf[e.pending-2]=~s,e.pending_buf[e.pending-1]=~s>>8,ye(e.strm),i&&(i>s&&(i=s),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,s-=i),s&&(Te(e.strm,e.strm.output,e.strm.next_out,s),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s)}while(0===n);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waterr&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(Te(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,o=r>e.w_size?e.w_size:r,i=e.strstart-e.block_start,(i>=o||(i||t===K)&&t!==Q&&0===e.strm.avail_in&&i<=r)&&(s=i>r?r:i,n=t===K&&0===e.strm.avail_in&&s===i?1:0,G(e,e.block_start,s,n),e.block_start+=s,ye(e.strm)),n?3:1)},De=(e,t)=>{let s,i;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==s&&e.strstart-s<=e.w_size-he&&(e.match_length=_e(e,s)),e.match_length>=3)if(i=V(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=me(e,e.ins_h,e.window[e.strstart+1]);else i=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2},Ne=(e,t)=>{let s,i,r;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==s&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=V(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(ge(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=V(e,0,e.window[e.strstart-1]),i&&ge(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=V(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2};function be(e,t,s,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=s,this.max_chain=i,this.func=r}const Ce=[new be(0,0,0,0,Pe),new be(4,4,8,4,De),new be(4,5,16,8,De),new be(4,6,32,32,De),new be(4,4,16,16,Ne),new be(8,16,32,32,Ne),new be(8,16,128,128,Ne),new be(8,32,128,256,Ne),new be(32,128,258,1024,Ne),new be(32,258,258,4096,Ne)];function Oe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ae,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Se=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ce&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ae&&t.status!==ue?1:0},xe=e=>{if(Se(e))return pe(e,q);e.total_in=e.total_out=0,e.data_type=ne;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ce:Ae,e.adler=2===t.wrap?0:1,t.last_flush=-2,H(t),X},we=e=>{const t=xe(e);var s;return t===X&&((s=e.state).window_size=2*s.w_size,fe(s.head),s.max_lazy_match=Ce[s.level].max_lazy,s.good_match=Ce[s.level].good_length,s.nice_match=Ce[s.level].nice_length,s.max_chain_length=Ce[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),t},Be=(e,t,s,i,r,o)=>{if(!e)return q;let n=1;if(t===ee&&(t=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==ae||i<8||i>15||t<0||t>9||o<0||o>re||8===i&&1!==n)return pe(e,q);8===i&&(i=9);const a=new Oe;return e.state=a,a.strm=e,a.status=ce,a.wrap=n,a.gzhead=null,a.w_bits=i,a.w_size=1<Se(e)||2!==e.state.wrap?q:(e.state.gzhead=t,X),Le=(e,t)=>{if(Se(e)||t>Y||t<0)return e?pe(e,q):q;const s=e.state;if(!e.output||0!==e.avail_in&&!e.input||s.status===ue&&t!==K)return pe(e,0===e.avail_out?$:q);const i=s.last_flush;if(s.last_flush=t,0!==s.pending){if(ye(e),0===e.avail_out)return s.last_flush=-1,X}else if(0===e.avail_in&&de(t)<=de(i)&&t!==K)return pe(e,$);if(s.status===ue&&0!==e.avail_in)return pe(e,$);if(s.status===ce&&0===s.wrap&&(s.status=Ae),s.status===ce){let t=ae+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=se||s.level<2?0:s.level<6?1:6===s.level?2:3,t|=i<<6,0!==s.strstart&&(t|=32),t+=31-t%31,ve(s,t),0!==s.strstart&&(ve(s,e.adler>>>16),ve(s,65535&e.adler)),e.adler=1,s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(57===s.status)if(e.adler=0,Ie(s,31),Ie(s,139),Ie(s,8),s.gzhead)Ie(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),Ie(s,255&s.gzhead.time),Ie(s,s.gzhead.time>>8&255),Ie(s,s.gzhead.time>>16&255),Ie(s,s.gzhead.time>>24&255),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(Ie(s,255&s.gzhead.extra.length),Ie(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=M(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,3),s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X;if(69===s.status){if(s.gzhead.extra){let t=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex+=r,ye(e),0!==s.pending)return s.last_flush=-1,X;t=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(ye(e),0!==s.pending))return s.last_flush=-1,X;Ie(s,255&e.adler),Ie(s,e.adler>>8&255),e.adler=0}if(s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(0!==e.avail_in||0!==s.lookahead||t!==Q&&s.status!==ue){let i=0===s.level?Pe(s,t):s.strategy===se?((e,t)=>{let s;for(;;){if(0===e.lookahead&&(Re(e),0===e.lookahead)){if(t===Q)return 1;break}if(e.match_length=0,s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):s.strategy===ie?((e,t)=>{let s,i,r,o;const n=e.window;for(;;){if(e.lookahead<=le){if(Re(e),e.lookahead<=le&&t===Q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,i=n[r],i===n[++r]&&i===n[++r]&&i===n[++r])){o=e.strstart+le;do{}while(i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(s=V(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):Ce[s.level].func(s,t);if(3!==i&&4!==i||(s.status=ue),1===i||3===i)return 0===e.avail_out&&(s.last_flush=-1),X;if(2===i&&(t===W?j(s):t!==Y&&(G(s,0,0,!1),t===z&&(fe(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),ye(e),0===e.avail_out))return s.last_flush=-1,X}return t!==K?X:s.wrap<=0?Z:(2===s.wrap?(Ie(s,255&e.adler),Ie(s,e.adler>>8&255),Ie(s,e.adler>>16&255),Ie(s,e.adler>>24&255),Ie(s,255&e.total_in),Ie(s,e.total_in>>8&255),Ie(s,e.total_in>>16&255),Ie(s,e.total_in>>24&255)):(ve(s,e.adler>>>16),ve(s,65535&e.adler)),ye(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?X:Z)},Ue=e=>{if(Se(e))return q;const t=e.state.status;return e.state=null,t===Ae?pe(e,J):X},He=(e,t)=>{let s=t.length;if(Se(e))return q;const i=e.state,r=i.wrap;if(2===r||1===r&&i.status!==ce||i.lookahead)return q;if(1===r&&(e.adler=B(e.adler,t,s,0)),i.wrap=0,s>=i.w_size){0===r&&(fe(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(s-i.w_size,s),0),t=e,s=i.w_size}const o=e.avail_in,n=e.next_in,a=e.input;for(e.avail_in=s,e.next_in=0,e.input=t,Re(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=me(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Re(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=n,e.input=a,e.avail_in=o,i.wrap=r,X};const Ge=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ke=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const s=t.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(const t in s)Ge(s,t)&&(e[t]=s[t])}}return e},Ve=e=>{let t=0;for(let s=0,i=e.length;s=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qe[254]=Qe[254]=1;var We=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,s,i,r,o,n=e.length,a=0;for(r=0;r>>6,t[o++]=128|63&s):s<65536?(t[o++]=224|s>>>12,t[o++]=128|s>>>6&63,t[o++]=128|63&s):(t[o++]=240|s>>>18,t[o++]=128|s>>>12&63,t[o++]=128|s>>>6&63,t[o++]=128|63&s);return t},ze=(e,t)=>{const s=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,r;const o=new Array(2*s);for(r=0,i=0;i4)o[r++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&je)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let s="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let s=t-1;for(;s>=0&&128==(192&e[s]);)s--;return s<0||0===s?t:s+Qe[e[s]]>t?s:t},Ye=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Xe=Object.prototype.toString,{Z_NO_FLUSH:Ze,Z_SYNC_FLUSH:qe,Z_FULL_FLUSH:Je,Z_FINISH:$e,Z_OK:et,Z_STREAM_END:tt,Z_DEFAULT_COMPRESSION:st,Z_DEFAULT_STRATEGY:it,Z_DEFLATED:rt}=U;function ot(e){this.options=ke({level:st,method:rt,chunkSize:16384,windowBits:15,memLevel:8,strategy:it},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Fe(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(s!==et)throw new Error(L[s]);if(t.header&&Me(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?We(t.dictionary):"[object ArrayBuffer]"===Xe.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,s=He(this.strm,e),s!==et)throw new Error(L[s]);this._dict_set=!0}}function nt(e,t){const s=new ot(t);if(s.push(e,!0),s.err)throw s.msg||L[s.err];return s.result}ot.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize;let r,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?$e:Ze,"string"==typeof e?s.input=We(e):"[object ArrayBuffer]"===Xe.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),(o===qe||o===Je)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(r=Le(s,o),r===tt)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),r=Ue(this.strm),this.onEnd(r),this.ended=!0,r===et;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},ot.prototype.onData=function(e){this.chunks.push(e)},ot.prototype.onEnd=function(e){e===et&&(this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var at={Deflate:ot,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:U};const lt=16209;var ht=function(e,t){let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P;const D=e.state;s=e.next_in,R=e.input,i=s+(e.avail_in-5),r=e.next_out,P=e.output,o=r-(t-e.avail_out),n=r+(e.avail_out-257),a=D.dmax,l=D.wsize,h=D.whave,c=D.wnext,A=D.window,u=D.hold,p=D.bits,d=D.lencode,f=D.distcode,E=(1<>>24,u>>>=g,p-=g,g=y>>>16&255,0===g)P[r++]=65535&y;else{if(!(16&g)){if(0==(64&g)){y=d[(65535&y)+(u&(1<>>=g,p-=g),p<15&&(u+=R[s++]<>>24,u>>>=g,p-=g,g=y>>>16&255,!(16&g)){if(0==(64&g)){y=f[(65535&y)+(u&(1<a){e.msg="invalid distance too far back",D.mode=lt;break e}if(u>>>=g,p-=g,g=r-o,v>g){if(g=v-g,g>h&&D.sane){e.msg="invalid distance too far back",D.mode=lt;break e}if(T=0,_=A,0===c){if(T+=l-g,g2;)P[r++]=_[T++],P[r++]=_[T++],P[r++]=_[T++],I-=3;I&&(P[r++]=_[T++],I>1&&(P[r++]=_[T++]))}else{T=r-v;do{P[r++]=P[T++],P[r++]=P[T++],P[r++]=P[T++],I-=3}while(I>2);I&&(P[r++]=P[T++],I>1&&(P[r++]=P[T++]))}break}}break}}while(s>3,s-=I,p-=I<<3,u&=(1<{const l=a.bits;let h,c,A,u,p,d,f=0,E=0,m=0,y=0,g=0,I=0,v=0,T=0,_=0,R=0,P=null;const D=new Uint16Array(16),N=new Uint16Array(16);let b,C,O,S=null;for(f=0;f<=15;f++)D[f]=0;for(E=0;E=1&&0===D[y];y--);if(g>y&&(g=y),0===y)return r[o++]=20971520,r[o++]=20971520,a.bits=1,0;for(m=1;m0&&(0===e||1!==y))return-1;for(N[1]=0,f=1;f<15;f++)N[f+1]=N[f]+D[f];for(E=0;E852||2===e&&_>592)return 1;for(;;){b=f-v,n[E]+1=d?(C=S[n[E]-d],O=P[n[E]-d]):(C=96,O=0),h=1<>v)+c]=b<<24|C<<16|O|0}while(0!==c);for(h=1<>=1;if(0!==h?(R&=h-1,R+=h):R=0,E++,0==--D[f]){if(f===y)break;f=t[s+n[E]]}if(f>g&&(R&u)!==A){for(0===v&&(v=g),p+=m,I=f-v,T=1<852||2===e&&_>592)return 1;A=R&u,r[A]=g<<24|I<<16|p-o|0}}return 0!==R&&(r[p+R]=f-v<<24|64<<16|0),a.bits=g,0};const{Z_FINISH:ft,Z_BLOCK:Et,Z_TREES:mt,Z_OK:yt,Z_STREAM_END:gt,Z_NEED_DICT:It,Z_STREAM_ERROR:vt,Z_DATA_ERROR:Tt,Z_MEM_ERROR:_t,Z_BUF_ERROR:Rt,Z_DEFLATED:Pt}=U,Dt=16180,Nt=16190,bt=16191,Ct=16192,Ot=16194,St=16199,xt=16200,wt=16206,Bt=16209,Ft=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Mt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Lt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Ut=e=>{if(Lt(e))return vt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,yt},Ht=e=>{if(Lt(e))return vt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Ut(e)},Gt=(e,t)=>{let s;if(Lt(e))return vt;const i=e.state;return t<0?(s=0,t=-t):(s=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?vt:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=s,i.wbits=t,Ht(e))},kt=(e,t)=>{if(!e)return vt;const s=new Mt;e.state=s,s.strm=e,s.window=null,s.mode=Dt;const i=Gt(e,t);return i!==yt&&(e.state=null),i};let Vt,jt,Qt=!0;const Wt=e=>{if(Qt){Vt=new Int32Array(512),jt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dt(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dt(2,e.lens,0,32,jt,0,e.work,{bits:5}),Qt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=jt,e.distbits=5},zt=(e,t,s,i)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(s-o.wsize,s),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),o.window.set(t.subarray(s-i,s-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(s-i,s),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave{let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R=0;const P=new Uint8Array(4);let D,N;const b=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Lt(e)||!e.output||!e.input&&0!==e.avail_in)return vt;s=e.state,s.mode===bt&&(s.mode=Ct),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,A=a,u=l,_=yt;e:for(;;)switch(s.mode){case Dt:if(0===s.wrap){s.mode=Ct;break}for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0),h=0,c=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",s.mode=Bt;break}if((15&h)!==Pt){e.msg="unknown compression method",s.mode=Bt;break}if(h>>>=4,c-=4,T=8+(15&h),0===s.wbits&&(s.wbits=T),T>15||T>s.wbits){e.msg="invalid window size",s.mode=Bt;break}s.dmax=1<>8&1),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>8&255,P[2]=h>>>16&255,P[3]=h>>>24&255,s.check=M(s.check,P,4,0)),h=0,c=0,s.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>8),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16184;case 16184:if(1024&s.flags){for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(p=s.length,p>a&&(p=a),p&&(s.head&&(T=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(i.subarray(o,o+p),T)),512&s.flags&&4&s.wrap&&(s.check=M(s.check,i,p,o)),a-=p,o+=p,s.length-=p),s.length))break e;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===a)break e;p=0;do{T=i[o+p++],s.head&&T&&s.length<65536&&(s.head.name+=String.fromCharCode(T))}while(T&&p>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=bt;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>=7&c,c-=7&c,s.mode=wt;break}for(;c<3;){if(0===a)break e;a--,h+=i[o++]<>>=1,c-=1,3&h){case 0:s.mode=16193;break;case 1:if(Wt(s),s.mode=St,t===mt){h>>>=2,c-=2;break e}break;case 2:s.mode=16196;break;case 3:e.msg="invalid block type",s.mode=Bt}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",s.mode=Bt;break}if(s.length=65535&h,h=0,c=0,s.mode=Ot,t===mt)break e;case Ot:s.mode=16195;case 16195:if(p=s.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;r.set(i.subarray(o,o+p),n),a-=p,o+=p,l-=p,n+=p,s.length-=p;break}s.mode=bt;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=i[o++]<>>=5,c-=5,s.ndist=1+(31&h),h>>>=5,c-=5,s.ncode=4+(15&h),h>>>=4,c-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=Bt;break}s.have=0,s.mode=16197;case 16197:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[b[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,D={bits:s.lenbits},_=dt(0,s.lens,0,19,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid code lengths set",s.mode=Bt;break}s.have=0,s.mode=16198;case 16198:for(;s.have>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=E,c-=E,s.lens[s.have++]=y;else{if(16===y){for(N=E+2;c>>=E,c-=E,0===s.have){e.msg="invalid bit length repeat",s.mode=Bt;break}T=s.lens[s.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===y){for(N=E+3;c>>=E,c-=E,T=0,p=3+(7&h),h>>>=3,c-=3}else{for(N=E+7;c>>=E,c-=E,T=0,p=11+(127&h),h>>>=7,c-=7}if(s.have+p>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=Bt;break}for(;p--;)s.lens[s.have++]=T}}if(s.mode===Bt)break;if(0===s.lens[256]){e.msg="invalid code -- missing end-of-block",s.mode=Bt;break}if(s.lenbits=9,D={bits:s.lenbits},_=dt(1,s.lens,0,s.nlen,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid literal/lengths set",s.mode=Bt;break}if(s.distbits=6,s.distcode=s.distdyn,D={bits:s.distbits},_=dt(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,D),s.distbits=D.bits,_){e.msg="invalid distances set",s.mode=Bt;break}if(s.mode=St,t===mt)break e;case St:s.mode=xt;case xt:if(a>=6&&l>=258){e.next_out=n,e.avail_out=l,e.next_in=o,e.avail_in=a,s.hold=h,s.bits=c,ht(e,u),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,s.mode===bt&&(s.back=-1);break}for(s.back=0;R=s.lencode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,s.length=y,0===m){s.mode=16205;break}if(32&m){s.back=-1,s.mode=bt;break}if(64&m){e.msg="invalid literal/length code",s.mode=Bt;break}s.extra=15&m,s.mode=16201;case 16201:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;R=s.distcode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,64&m){e.msg="invalid distance code",s.mode=Bt;break}s.offset=y,s.extra=15&m,s.mode=16203;case 16203:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=Bt;break}s.mode=16204;case 16204:if(0===l)break e;if(p=u-l,s.offset>p){if(p=s.offset-p,p>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=Bt;break}p>s.wnext?(p-=s.wnext,d=s.wsize-p):d=s.wnext-p,p>s.length&&(p=s.length),f=s.window}else f=r,d=n-s.offset,p=s.length;p>l&&(p=l),l-=p,s.length-=p;do{r[n++]=f[d++]}while(--p);0===s.length&&(s.mode=xt);break;case 16205:if(0===l)break e;r[n++]=s.length,l--,s.mode=xt;break;case wt:if(s.wrap){for(;c<32;){if(0===a)break e;a--,h|=i[o++]<{if(Lt(e))return vt;let t=e.state;return t.window&&(t.window=null),e.state=null,yt},qt=(e,t)=>{if(Lt(e))return vt;const s=e.state;return 0==(2&s.wrap)?vt:(s.head=t,t.done=!1,yt)},Jt=(e,t)=>{const s=t.length;let i,r,o;return Lt(e)?vt:(i=e.state,0!==i.wrap&&i.mode!==Nt?vt:i.mode===Nt&&(r=1,r=B(r,t,s,0),r!==i.check)?Tt:(o=zt(e,t,s,s),o?(i.mode=16210,_t):(i.havedict=1,yt)))},$t=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const es=Object.prototype.toString,{Z_NO_FLUSH:ts,Z_FINISH:ss,Z_OK:is,Z_STREAM_END:rs,Z_NEED_DICT:os,Z_STREAM_ERROR:ns,Z_DATA_ERROR:as,Z_MEM_ERROR:ls}=U;function hs(e){this.options=ke({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Yt(this.strm,t.windowBits);if(s!==is)throw new Error(L[s]);if(this.header=new $t,qt(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=We(t.dictionary):"[object ArrayBuffer]"===es.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(s=Jt(this.strm,t.dictionary),s!==is)))throw new Error(L[s])}function cs(e,t){const s=new hs(t);if(s.push(e),s.err)throw s.msg||L[s.err];return s.result}hs.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let o,n,a;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:ts,"[object ArrayBuffer]"===es.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),o=Xt(s,n),o===os&&r&&(o=Jt(s,r),o===is?o=Xt(s,n):o===as&&(o=os));s.avail_in>0&&o===rs&&s.state.wrap>0&&0!==e[s.next_in];)Kt(s),o=Xt(s,n);switch(o){case ns:case as:case os:case ls:return this.onEnd(o),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||o===rs))if("string"===this.options.to){let e=Ke(s.output,s.next_out),t=s.next_out-e,r=ze(s.output,e);s.next_out=t,s.avail_out=i-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==is||0!==a){if(o===rs)return o=Zt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},hs.prototype.onData=function(e){this.chunks.push(e)},hs.prototype.onEnd=function(e){e===is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:hs,inflate:cs,inflateRaw:function(e,t){return(t=t||{}).raw=!0,cs(e,t)},ungzip:cs,constants:U};const{Deflate:us,deflate:ps,deflateRaw:ds,gzip:fs}=at,{Inflate:Es,inflate:ms,inflateRaw:ys,ungzip:gs}=As;var Is=us,vs=ps,Ts=ds,_s=fs,Rs=Es,Ps=ms,Ds=ys,Ns=gs,bs=U,Cs={Deflate:Is,deflate:vs,deflateRaw:Ts,gzip:_s,Inflate:Rs,inflate:Ps,inflateRaw:Ds,ungzip:Ns,constants:bs};e.Deflate=Is,e.Inflate=Rs,e.constants=bs,e.default=Cs,e.deflate=vs,e.deflateRaw=Ts,e.gzip=_s,e.inflate=Ps,e.inflateRaw=Ds,e.ungzip=Ns,Object.defineProperty(e,"__esModule",{value:!0})}));var dy=Object.freeze({__proto__:null});let fy=window.pako||dy;fy.inflate||(fy=fy.default);const Ey=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const my={version:1,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],meshPositions:e[4],meshIndices:e[5],meshEdgesIndices:e[6],meshColors:e[7],entityIDs:e[8],entityMeshes:e[9],entityIsObjects:e[10],positionsDecodeMatrix:e[11]}}(s),a=function(e){return{positions:new Uint16Array(fy.inflate(e.positions).buffer),normals:new Int8Array(fy.inflate(e.normals).buffer),indices:new Uint32Array(fy.inflate(e.indices).buffer),edgeIndices:new Uint32Array(fy.inflate(e.edgeIndices).buffer),meshPositions:new Uint32Array(fy.inflate(e.meshPositions).buffer),meshIndices:new Uint32Array(fy.inflate(e.meshIndices).buffer),meshEdgesIndices:new Uint32Array(fy.inflate(e.meshEdgesIndices).buffer),meshColors:new Uint8Array(fy.inflate(e.meshColors).buffer),entityIDs:fy.inflate(e.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(fy.inflate(e.entityMeshes).buffer),entityIsObjects:new Uint8Array(fy.inflate(e.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(fy.inflate(e.positionsDecodeMatrix).buffer)}}(n);!function(e,t,s,i,r,o){o.getNextId(),i.positionsCompression="precompressed",i.normalsCompression="precompressed";const n=s.positions,a=s.normals,l=s.indices,h=s.edgeIndices,c=s.meshPositions,A=s.meshIndices,p=s.meshEdgesIndices,d=s.meshColors,f=JSON.parse(s.entityIDs),E=s.entityMeshes,y=s.entityIsObjects,g=c.length,I=E.length;for(let r=0;rE[e]E[t]?1:0));for(let e=0;e1||(b[s]=e)}}for(let e=0;e<_;e++){const t=D[e],s=t===_-1,r=P[t]>1,o=Py(y.subarray(4*t,4*t+3)),u=y[4*t+3]/255,g=a.subarray(p[t],s?a.length:p[t+1]),v=l.subarray(p[t],s?l.length:p[t+1]),T=h.subarray(d[t],s?h.length:d[t+1]),R=c.subarray(f[t],s?c.length:f[t+1]),N=A.subarray(E[t],E[t]+16);if(r){const e=`${n}-geometry.${t}`;i.createGeometry({id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N})}else{const e=`${n}-${t}`;I[b[t]];const s={};i.createMesh(m.apply(s,{id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N,color:o,opacity:u}))}}let C=0;for(let e=0;e1){const t={},r=`${n}-instance.${C++}`,o=`${n}-geometry.${s}`,a=16*T[e],h=u.subarray(a,a+16);i.createMesh(m.apply(t,{id:r,geometryId:o,matrix:h})),l.push(r)}else l.push(s)}if(l.length>0){const e={};i.createEntity(m.apply(e,{id:r,isObject:!0,meshIds:l}))}}}(0,0,a,i,0,o)}};let Ny=window.pako||dy;Ny.inflate||(Ny=Ny.default);const by=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Cy={version:5,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],eachPrimitivePositionsAndNormalsPortion:e[5],eachPrimitiveIndicesPortion:e[6],eachPrimitiveEdgeIndicesPortion:e[7],eachPrimitiveColor:e[8],primitiveInstances:e[9],eachEntityId:e[10],eachEntityPrimitiveInstancesPortion:e[11],eachEntityMatricesPortion:e[12]}}(s),a=function(e){return{positions:new Float32Array(Ny.inflate(e.positions).buffer),normals:new Int8Array(Ny.inflate(e.normals).buffer),indices:new Uint32Array(Ny.inflate(e.indices).buffer),edgeIndices:new Uint32Array(Ny.inflate(e.edgeIndices).buffer),matrices:new Float32Array(Ny.inflate(e.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Ny.inflate(e.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Ny.inflate(e.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Ny.inflate(e.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Ny.inflate(e.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Ny.inflate(e.primitiveInstances).buffer),eachEntityId:Ny.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Ny.inflate(e.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Ny.inflate(e.eachEntityMatricesPortion).buffer)}}(n);!function(e,t,s,i,r,o){const n=o.getNextId();i.positionsCompression="disabled",i.normalsCompression="precompressed";const a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.eachPrimitivePositionsAndNormalsPortion,p=s.eachPrimitiveIndicesPortion,d=s.eachPrimitiveEdgeIndicesPortion,f=s.eachPrimitiveColor,E=s.primitiveInstances,y=JSON.parse(s.eachEntityId),g=s.eachEntityPrimitiveInstancesPortion,I=s.eachEntityMatricesPortion,v=u.length,T=E.length,_=new Uint8Array(v),R=y.length;for(let e=0;e1||(P[s]=e)}}for(let e=0;e1,r=by(f.subarray(4*e,4*e+3)),o=f[4*e+3]/255,A=a.subarray(u[e],t?a.length:u[e+1]),E=l.subarray(u[e],t?l.length:u[e+1]),g=h.subarray(p[e],t?h.length:p[e+1]),I=c.subarray(d[e],t?c.length:d[e+1]);if(s){const t=`${n}-geometry.${e}`;i.createGeometry({id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I})}else{const t=e;y[P[e]];const s={};i.createMesh(m.apply(s,{id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I,color:r,opacity:o}))}}let D=0;for(let e=0;e1){const t={},r="instance."+D++,o="geometry"+s,n=16*I[e],l=A.subarray(n,n+16);i.createMesh(m.apply(t,{id:r,geometryId:o,matrix:l})),a.push(r)}else a.push(s)}if(a.length>0){const e={};i.createEntity(m.apply(e,{id:r,isObject:!0,meshIds:a}))}}}(0,0,a,i,0,o)}};let Oy=window.pako||dy;Oy.inflate||(Oy=Oy.default);const Sy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const xy={version:6,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],reusedPrimitivesDecodeMatrix:e[5],eachPrimitivePositionsAndNormalsPortion:e[6],eachPrimitiveIndicesPortion:e[7],eachPrimitiveEdgeIndicesPortion:e[8],eachPrimitiveColorAndOpacity:e[9],primitiveInstances:e[10],eachEntityId:e[11],eachEntityPrimitiveInstancesPortion:e[12],eachEntityMatricesPortion:e[13],eachTileAABB:e[14],eachTileEntitiesPortion:e[15]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Oy.inflate(e,t).buffer}return{positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(t(e.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(t(e.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(t(e.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(t(e.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(t(e.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(t(e.primitiveInstances)),eachEntityId:Oy.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(t(e.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(t(e.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,p=s.reusedPrimitivesDecodeMatrix,d=s.eachPrimitivePositionsAndNormalsPortion,f=s.eachPrimitiveIndicesPortion,E=s.eachPrimitiveEdgeIndicesPortion,y=s.eachPrimitiveColorAndOpacity,g=s.primitiveInstances,I=JSON.parse(s.eachEntityId),v=s.eachEntityPrimitiveInstancesPortion,T=s.eachEntityMatricesPortion,_=s.eachTileAABB,R=s.eachTileEntitiesPortion,P=d.length,D=g.length,N=I.length,b=R.length,C=new Uint32Array(P);for(let e=0;e1,A=t===P-1,u=a.subarray(d[t],A?a.length:d[t+1]),I=l.subarray(d[t],A?l.length:d[t+1]),v=h.subarray(f[t],A?h.length:f[t+1]),T=c.subarray(E[t],A?c.length:E[t+1]),_=Sy(y.subarray(4*t,4*t+3)),R=y[4*t+3]/255,D=o.getNextId();if(r){const e=`${n}-geometry.${s}.${t}`;M[e]||(i.createGeometry({id:e,primitive:"triangles",positionsCompressed:u,indices:v,edgeIndices:T,positionsDecodeMatrix:p}),M[e]=!0),i.createMesh(m.apply(H,{id:D,geometryId:e,origin:O,matrix:b,color:_,opacity:R})),B.push(D)}else i.createMesh(m.apply(H,{id:D,origin:O,primitive:"triangles",positionsCompressed:u,normalsCompressed:I,indices:v,edgeIndices:T,positionsDecodeMatrix:F,color:_,opacity:R})),B.push(D)}B.length>0&&i.createEntity(m.apply(U,{id:R,isObject:!0,meshIds:B}))}}}(e,t,a,i,0,o)}};let wy=window.pako||dy;wy.inflate||(wy=wy.default);const By=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Fy(e){const t=[];for(let s=0,i=e.length;s1,u=t===C-1,P=By(R.subarray(6*e,6*e+3)),D=R[6*e+3]/255,N=R[6*e+4]/255,b=R[6*e+5]/255,O=o.getNextId();if(r){const r=_[e],o=p.slice(r,r+16),T=`${n}-geometry.${s}.${t}`;if(!G[T]){let e,s,r,o,n,p;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],u?a.length:E[t+1]),o=Fy(h.subarray(g[t],u?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],u?a.length:E[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]);break;default:continue}i.createGeometry({id:T,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:p,positionsDecodeMatrix:d}),G[T]=!0}i.createMesh(m.apply(k,{id:O,geometryId:T,origin:B,matrix:o,color:P,metallic:N,roughness:b,opacity:D})),M.push(O)}else{let e,s,r,o,n,p;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],u?a.length:E[t+1]),o=Fy(h.subarray(g[t],u?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],u?a.length:E[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]);break;default:continue}i.createMesh(m.apply(k,{id:O,origin:B,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:p,positionsDecodeMatrix:H,color:P,metallic:N,roughness:b,opacity:D})),M.push(O)}}M.length>0&&i.createEntity(m.apply(U,{id:b,isObject:!0,meshIds:M}))}}}(e,t,a,i,0,o)}};let Ly=window.pako||dy;Ly.inflate||(Ly=Ly.default);const Uy=u.vec4(),Hy=u.vec4();const Gy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function ky(e){const t=[];for(let s=0,i=e.length;s1,l=r===F-1,h=Gy(C.subarray(6*e,6*e+3)),c=C[6*e+3]/255,A=C[6*e+4]/255,O=C[6*e+5]/255,S=o.getNextId();if(a){const o=b[e],a=g.slice(o,o+16),N=`${n}-geometry.${s}.${r}`;let C=V[N];if(!C){C={batchThisMesh:!t.reuseGeometries};let e=!1;switch(v[r]){case 0:C.primitiveName="solid",C.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),C.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),C.geometryEdgeIndices=y.subarray(D[r],l?y.length:D[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 1:C.primitiveName="surface",C.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),C.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),C.geometryEdgeIndices=y.subarray(D[r],l?y.length:D[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 2:C.primitiveName="points",C.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),C.geometryColors=ky(f.subarray(R[r],l?f.length:R[r+1])),e=C.geometryPositions.length>0;break;case 3:C.primitiveName="lines",C.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;default:continue}if(e||(C=null),C&&(C.geometryPositions.length,C.batchThisMesh)){C.decompressedPositions=new Float32Array(C.geometryPositions.length);const e=C.geometryPositions,t=C.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=p.subarray(T[r],l?p.length:T[r+1]),s=d.subarray(_[r],l?d.length:_[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),a=y.subarray(D[r],l?y.length:D[r+1]),u=t.length>0&&n.length>0;break;case 2:e="points",t=p.subarray(T[r],l?p.length:T[r+1]),o=ky(f.subarray(R[r],l?f.length:R[r+1])),u=t.length>0;break;case 3:e="lines",t=p.subarray(T[r],l?p.length:T[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),u=t.length>0&&n.length>0;break;default:continue}u&&(i.createMesh(m.apply(Q,{id:S,origin:G,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:B,color:h,metallic:A,roughness:O,opacity:c})),w.push(S))}}w.length>0&&i.createEntity(m.apply(j,{id:h,isObject:!0,meshIds:w}))}}}(e,t,a,i,r,o)}};let jy=window.pako||dy;jy.inflate||(jy=jy.default);const Qy=u.vec4(),Wy=u.vec4();const zy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Ky={version:9,parse:function(e,t,s,i,r,o){const n=function(e){return{metadata:e[0],positions:e[1],normals:e[2],colors:e[3],indices:e[4],edgeIndices:e[5],matrices:e[6],reusedGeometriesDecodeMatrix:e[7],eachGeometryPrimitiveType:e[8],eachGeometryPositionsPortion:e[9],eachGeometryNormalsPortion:e[10],eachGeometryColorsPortion:e[11],eachGeometryIndicesPortion:e[12],eachGeometryEdgeIndicesPortion:e[13],eachMeshGeometriesPortion:e[14],eachMeshMatricesPortion:e[15],eachMeshMaterial:e[16],eachEntityId:e[17],eachEntityMeshesPortion:e[18],eachTileAABB:e[19],eachTileEntitiesPortion:e[20]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:jy.inflate(e,t).buffer}return{metadata:JSON.parse(jy.inflate(e.metadata,{to:"string"})),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(t(e.eachMeshMaterial)),eachEntityId:JSON.parse(jy.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.metadata,l=s.positions,h=s.normals,c=s.colors,A=s.indices,p=s.edgeIndices,d=s.matrices,f=s.reusedGeometriesDecodeMatrix,E=s.eachGeometryPrimitiveType,y=s.eachGeometryPositionsPortion,g=s.eachGeometryNormalsPortion,I=s.eachGeometryColorsPortion,v=s.eachGeometryIndicesPortion,T=s.eachGeometryEdgeIndicesPortion,_=s.eachMeshGeometriesPortion,R=s.eachMeshMatricesPortion,P=s.eachMeshMaterial,D=s.eachEntityId,N=s.eachEntityMeshesPortion,b=s.eachTileAABB,C=s.eachTileEntitiesPortion,O=y.length,S=_.length,x=N.length,w=C.length;r&&r.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});const B=new Uint32Array(O);for(let e=0;e1,D=r===O-1,N=zy(P.subarray(6*e,6*e+3)),b=P[6*e+3]/255,C=P[6*e+4]/255,S=P[6*e+5]/255,x=o.getNextId();if(a){const o=R[e],a=d.slice(o,o+16),_=`${n}-geometry.${s}.${r}`;let P=L[_];if(!P){P={batchThisMesh:!t.reuseGeometries};let e=!1;switch(E[r]){case 0:P.primitiveName="solid",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=p.subarray(T[r],D?p.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 1:P.primitiveName="surface",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=p.subarray(T[r],D?p.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 2:P.primitiveName="points",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryColors=c.subarray(I[r],D?c.length:I[r+1]),e=P.geometryPositions.length>0;break;case 3:P.primitiveName="lines",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;default:continue}if(e||(P=null),P&&(P.geometryPositions.length,P.batchThisMesh)){P.decompressedPositions=new Float32Array(P.geometryPositions.length),P.transformedAndRecompressedPositions=new Uint16Array(P.geometryPositions.length);const e=P.geometryPositions,t=P.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=l.subarray(y[r],D?l.length:y[r+1]),s=h.subarray(g[r],D?h.length:g[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),a=p.subarray(T[r],D?p.length:T[r+1]),u=t.length>0&&n.length>0;break;case 2:e="points",t=l.subarray(y[r],D?l.length:y[r+1]),o=c.subarray(I[r],D?c.length:I[r+1]),u=t.length>0;break;case 3:e="lines",t=l.subarray(y[r],D?l.length:y[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),u=t.length>0&&n.length>0;break;default:continue}u&&(i.createMesh(m.apply(j,{id:x,origin:F,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:G,color:N,metallic:C,roughness:S,opacity:b})),U.push(x))}}U.length>0&&i.createEntity(m.apply(V,{id:b,isObject:!0,meshIds:U}))}}}(e,t,a,i,r,o)}};let Yy=window.pako||dy;Yy.inflate||(Yy=Yy.default);const Xy=u.vec4(),Zy=u.vec4();const qy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Jy(e,t){const s=[];if(t.length>1)for(let e=0,i=t.length-1;e1)for(let t=0,i=e.length/3-1;t0,a=9*e,A=1===c[a+0],u=c[a+1];c[a+2],c[a+3];const p=c[a+4],d=c[a+5],f=c[a+6],E=c[a+7],m=c[a+8];if(o){const t=new Uint8Array(l.subarray(s,r)).buffer,o=`${n}-texture-${e}`;if(A)i.createTexture({id:o,buffers:[t],minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m});else{const e=new Blob([t],{type:10001===u?"image/jpeg":10002===u?"image/png":"image/gif"}),s=(window.URL||window.webkitURL).createObjectURL(e),r=document.createElement("img");r.src=s,i.createTexture({id:o,image:r,minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m})}}}for(let e=0;e=0?`${n}-texture-${r}`:null,normalsTextureId:a>=0?`${n}-texture-${a}`:null,metallicRoughnessTextureId:o>=0?`${n}-texture-${o}`:null,emissiveTextureId:l>=0?`${n}-texture-${l}`:null,occlusionTextureId:h>=0?`${n}-texture-${h}`:null})}const j=new Uint32Array(H);for(let e=0;e1,l=r===H-1,h=S[e],c=h>=0?`${n}-textureSet-${h}`:null,w=qy(x.subarray(6*e,6*e+3)),B=x[6*e+3]/255,F=x[6*e+4]/255,U=x[6*e+5]/255,G=o.getNextId();if(a){const o=O[e],a=I.slice(o,o+16),h=`${n}-geometry.${s}.${r}`;let C=z[h];if(!C){C={batchThisMesh:!t.reuseGeometries};let e=!1;switch(T[r]){case 0:C.primitiveName="solid",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryNormals=p.subarray(R[r],l?p.length:R[r+1]),C.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),C.geometryEdgeIndices=y.subarray(b[r],l?y.length:b[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 1:C.primitiveName="surface",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryNormals=p.subarray(R[r],l?p.length:R[r+1]),C.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),C.geometryEdgeIndices=y.subarray(b[r],l?y.length:b[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 2:C.primitiveName="points",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryColors=d.subarray(P[r],l?d.length:P[r+1]),e=C.geometryPositions.length>0;break;case 3:C.primitiveName="lines",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 4:C.primitiveName="lines",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryIndices=Jy(C.geometryPositions,E.subarray(N[r],l?E.length:N[r+1])),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;default:continue}if(e||(C=null),C&&(C.geometryPositions.length,C.batchThisMesh)){C.decompressedPositions=new Float32Array(C.geometryPositions.length),C.transformedAndRecompressedPositions=new Uint16Array(C.geometryPositions.length);const e=C.geometryPositions,t=C.decompressedPositions;for(let s=0,i=e.length;s0&&a.length>0;break;case 1:e="surface",t=A.subarray(_[r],l?A.length:_[r+1]),s=p.subarray(R[r],l?p.length:R[r+1]),o=f.subarray(D[r],l?f.length:D[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),h=y.subarray(b[r],l?y.length:b[r+1]),u=t.length>0&&a.length>0;break;case 2:e="points",t=A.subarray(_[r],l?A.length:_[r+1]),n=d.subarray(P[r],l?d.length:P[r+1]),u=t.length>0;break;case 3:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),u=t.length>0&&a.length>0;break;case 4:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=Jy(t,E.subarray(N[r],l?E.length:N[r+1])),u=t.length>0&&a.length>0;break;default:continue}u&&(i.createMesh(m.apply(V,{id:G,textureSetId:c,origin:Q,primitive:e,positionsCompressed:t,normalsCompressed:s,uv:o&&o.length>0?o:null,colorsCompressed:n,indices:a,edgeIndices:h,positionsDecodeMatrix:g,color:w,metallic:F,roughness:U,opacity:B})),M.push(G))}}M.length>0&&i.createEntity(m.apply(G,{id:l,isObject:!0,meshIds:M}))}}}(e,t,a,i,r,o)}},eg={};eg[my.version]=my,eg[Iy.version]=Iy,eg[_y.version]=_y,eg[Dy.version]=Dy,eg[Cy.version]=Cy,eg[xy.version]=xy,eg[My.version]=My,eg[Vy.version]=Vy,eg[Ky.version]=Ky,eg[$y.version]=$y;class tg extends n{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(eg)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new py}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||Jm}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=!1!==e}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc)return this.error("load() param expected: src, xkt or manifestSrc"),o;const t={},s=e.includeTypes||this._includeTypes,i=e.excludeTypes||this._excludeTypes,r=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=null!==e.reuseGeometries&&void 0!==e.reuseGeometries?e.reuseGeometries:!1!==this._reuseGeometries,s){t.includeTypesMap={};for(let e=0,i=s.length;e{o.finalize(),a.finalize(),this.viewer.scene.canvas.spinner.processes--,o.once("destroyed",(()=>{this.viewer.metaScene.destroyMetaModel(a.id)})),o.scene.once("tick",(()=>{o.destroyed||(o.scene.fire("modelLoaded",o.id),o.fire("loaded",!0,!1))}))},h=e=>{this.viewer.scene.canvas.spinner.processes--,this.error(e),o.fire("error",e)};let c=0;const A={getNextId:()=>`${n}.${c++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const r=e.metaModelSrc;this._dataSource.getMetaModel(r,(r=>{o.destroyed||(a.loadData(r,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()))}),(e=>{h(`load(): Failed to load model metadata for model '${n} from '${r}' - ${e}`)}))}else e.metaModelData&&(a.loadData(e.metaModelData,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()));else if(e.src)this._loadModel(e.src,e,t,o,a,A,l,h);else if(e.xkt)this._parseModel(e.xkt,e,t,o,a,A),l();else if(e.manifestSrc){const r=function(e){const t=e.split("/");return t.pop(),t.join("/")+"/"}(e.manifestSrc),n=(e,o,n)=>{let l=0;const h=()=>{l>=e.length?o():this._dataSource.getMetaModel(`${r}${e[l]}`,(e=>{a.loadData(e,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),l++,h()}),n)};h()},c=(s,i,n)=>{let l=0;const h=()=>{l>=s.length?i():this._dataSource.getXKT(`${r}${s[l]}`,(s=>{this._parseModel(s,e,t,o,a,A),l++,h()}),n)};h()};this._dataSource.getManifest(e.manifestSrc,(e=>{if(o.destroyed)return;const t=e.xktFiles;if(!t||0===t.length)return void h("load(): Failed to load model manifest - manifest not valid");const s=e.metaModelFiles;s?n(s,(()=>{c(t,l,h)}),h):c(t,l,h)}),h)}return o}_loadModel(e,t,s,i,r,o,n,a){this._dataSource.getXKT(t.src,(e=>{this._parseModel(e,t,s,i,r,o),n()}),a)}_parseModel(e,t,s,i,r,o){if(i.destroyed)return;const n=new DataView(e),a=new Uint8Array(e),l=n.getUint32(0,!0),h=eg[l];if(!h)return void this.error("Unsupported .XKT file version: "+l+" - this XKTLoaderPlugin supports versions "+Object.keys(eg));this.log("Loading .xkt V"+l);const c=n.getUint32(4,!0),A=[];let u=4*(c+2);for(let e=0;ee.size)throw new RangeError("offset:"+t+", length:"+s+", size:"+e.size);return e.slice?e.slice(t,t+s):e.webkitSlice?e.webkitSlice(t,t+s):e.mozSlice?e.mozSlice(t,t+s):e.msSlice?e.msSlice(t,t+s):void 0}(e,t,s))}catch(e){r(e)}}}function d(){}function f(e){var s,i=this;i.init=function(e){s=new Blob([],{type:n}),e()},i.writeUint8Array=function(e,i){s=new Blob([s,t?e:e.buffer],{type:n}),i()},i.getData=function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=i,r.readAsText(s,e)}}function E(t){var s=this,i="",r="";s.init=function(e){i+="data:"+(t||"")+";base64,",e()},s.writeUint8Array=function(t,s){var o,n=r.length,a=r;for(r="",o=0;o<3*Math.floor((n+t.length)/3)-n;o++)a+=String.fromCharCode(t[o]);for(;o2?i+=e.btoa(a):r=a,s()},s.getData=function(t){t(i+e.btoa(r))}}function m(e){var s,i=this;i.init=function(t){s=new Blob([],{type:e}),t()},i.writeUint8Array=function(i,r){s=new Blob([s,t?i:i.buffer],{type:e}),r()},i.getData=function(e){e(s)}}function y(e,t,s,i,r,n,a,l,h,c){var A,u,p,d=0,f=t.sn;function E(){e.removeEventListener("message",m,!1),l(u,p)}function m(t){var s=t.data,r=s.data,o=s.error;if(o)return o.toString=function(){return"Error: "+this.message},void h(o);if(s.sn===f)switch("number"==typeof s.codecTime&&(e.codecTime+=s.codecTime),"number"==typeof s.crcTime&&(e.crcTime+=s.crcTime),s.type){case"append":r?(u+=r.length,i.writeUint8Array(r,(function(){y()}),c)):y();break;case"flush":p=s.crc,r?(u+=r.length,i.writeUint8Array(r,(function(){E()}),c)):E();break;case"progress":a&&a(A+s.loaded,n);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",s)}}function y(){(A=d*o)<=n?s.readUint8Array(r+A,Math.min(o,n-A),(function(s){a&&a(A,n);var i=0===A?t:{sn:f};i.type="append",i.data=s;try{e.postMessage(i,[s.buffer])}catch(t){e.postMessage(i)}d++}),h):e.postMessage({sn:f,type:"flush"})}u=0,e.addEventListener("message",m,!1),y()}function g(e,t,s,i,r,n,l,h,c,A){var u,p=0,d=0,f="input"===n,E="output"===n,m=new a;!function n(){var a;if((u=p*o)127?r[s-128]:String.fromCharCode(s);return i}function T(e){return decodeURIComponent(escape(e))}function _(e){var t,s="";for(t=0;t>16,s=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&s)>>11,(2016&s)>>5,2*(31&s),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((i||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(s+10,!0),e.compressedSize=t.view.getUint32(s+14,!0),e.uncompressedSize=t.view.getUint32(s+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(s+22,!0),e.extraFieldLength=t.view.getUint16(s+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function P(t,o,n){var a=0;function l(){}l.prototype.getData=function(i,o,l,c){var A=this;function u(e,t){c&&!function(e){var t=h(4);return t.view.setUint32(0,e),A.crc32==t.view.getUint32(0)}(t)?n("CRC failed."):i.getData((function(e){o(e)}))}function p(e){n(e||r)}function d(e){n(e||"Error while writing file data.")}t.readUint8Array(A.offset,30,(function(r){var o,f=h(r.length,r);1347093252==f.view.getUint32(0)?(R(A,f,4,!1,n),o=A.offset+30+A.filenameLength+A.extraFieldLength,i.init((function(){0===A.compressionMethod?I(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d):function(t,s,i,r,o,n,a,l,h,c,A){var u=a?"output":"none";e.zip.useWebWorkers?y(t,{sn:s,codecClass:"Inflater",crcType:u},i,r,o,n,h,l,c,A):g(new e.zip.Inflater,i,r,o,n,u,h,l,c,A)}(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d)}),d)):n(s)}),p)};var c={getEntries:function(e){var r=this._worker;!function(e){t.size<22?n(s):r(22,(function(){r(Math.min(65558,t.size),(function(){n(s)}))}));function r(s,r){t.readUint8Array(t.size-s,s,(function(t){for(var s=t.length-22;s>=0;s--)if(80===t[s]&&75===t[s+1]&&5===t[s+2]&&6===t[s+3])return void e(new DataView(t.buffer,s,22));r()}),(function(){n(i)}))}}((function(o){var a,c;a=o.getUint32(16,!0),c=o.getUint16(8,!0),a<0||a>=t.size?n(s):t.readUint8Array(a,t.size-a,(function(t){var i,o,a,A,u=0,p=[],d=h(t.length,t);for(i=0;i>>8^s[255&(t^e[i])];this.crc=t},a.prototype.get=function(){return~this.crc},a.prototype.table=function(){var e,t,s,i=[];for(e=0;e<256;e++){for(s=e,t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;i[e]=s}return i}(),l.prototype.append=function(e,t){return e},l.prototype.flush=function(){},A.prototype=new c,A.prototype.constructor=A,u.prototype=new c,u.prototype.constructor=u,p.prototype=new c,p.prototype.constructor=p,d.prototype.getData=function(e){e(this.data)},f.prototype=new d,f.prototype.constructor=f,E.prototype=new d,E.prototype.constructor=E,m.prototype=new d,m.prototype.constructor=m;var C={deflater:["z-worker.js","deflate.js"],inflater:["z-worker.js","inflate.js"]};function O(t,s,i){if(null===e.zip.workerScripts||null===e.zip.workerScriptsPath){var r;if(e.zip.workerScripts){if(r=e.zip.workerScripts[t],!Array.isArray(r))return void i(new Error("zip.workerScripts."+t+" is not an array!"));r=function(e){var t=document.createElement("a");return e.map((function(e){return t.href=e,t.href}))}(r)}else(r=C[t].slice(0))[0]=(e.zip.workerScriptsPath||"")+r[0];var o=new Worker(r[0]);o.codecTime=o.crcTime=0,o.postMessage({type:"importScripts",scripts:r.slice(1)}),o.addEventListener("message",(function e(t){var r=t.data;if(r.error)return o.terminate(),void i(r.error);"importScripts"===r.type&&(o.removeEventListener("message",e),o.removeEventListener("error",n),s(o))})),o.addEventListener("error",n)}else i(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));function n(e){o.terminate(),i(e)}}function S(e){console.error(e)}e.zip={Reader:c,Writer:d,BlobReader:p,Data64URIReader:u,TextReader:A,BlobWriter:m,Data64URIWriter:E,TextWriter:f,createReader:function(e,t,s){s=s||S,e.init((function(){P(e,t,s)}),s)},createWriter:function(e,t,s,i){s=s||S,i=!!i,e.init((function(){b(e,t,s,i)}),s)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null}}(sg);!function(e){var t,s,i=e.Reader,r=e.Writer;try{s=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(e){}function o(e){var t=this;function s(s,i){var r;t.data?s():((r=new XMLHttpRequest).addEventListener("load",(function(){t.size||(t.size=Number(r.getResponseHeader("Content-Length"))||Number(r.response.byteLength)),t.data=new Uint8Array(r.response),s()}),!1),r.addEventListener("error",i,!1),r.open("GET",e),r.responseType="arraybuffer",r.send())}t.size=0,t.init=function(i,r){if(function(e){var t=document.createElement("a");return t.href=e,"http:"===t.protocol||"https:"===t.protocol}(e)){var o=new XMLHttpRequest;o.addEventListener("load",(function(){t.size=Number(o.getResponseHeader("Content-Length")),t.size?i():s(i,r)}),!1),o.addEventListener("error",r,!1),o.open("HEAD",e),o.send()}else s(i,r)},t.readUint8Array=function(e,i,r,o){s((function(){r(new Uint8Array(t.data.subarray(e,e+i)))}),o)}}function n(e){var t=this;t.size=0,t.init=function(s,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(){t.size=Number(r.getResponseHeader("Content-Length")),"bytes"==r.getResponseHeader("Accept-Ranges")?s():i("HTTP Range not supported.")}),!1),r.addEventListener("error",i,!1),r.open("HEAD",e),r.send()},t.readUint8Array=function(t,s,i,r){!function(t,s,i,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="arraybuffer",o.setRequestHeader("Range","bytes="+t+"-"+(t+s-1)),o.addEventListener("load",(function(){i(o.response)}),!1),o.addEventListener("error",r,!1),o.send()}(t,s,(function(e){i(new Uint8Array(e))}),r)}}function a(e){var t=this;t.size=0,t.init=function(s,i){t.size=e.byteLength,s()},t.readUint8Array=function(t,s,i,r){i(new Uint8Array(e.slice(t,t+s)))}}function l(){var e,t=this;t.init=function(t,s){e=new Uint8Array,t()},t.writeUint8Array=function(t,s,i){var r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length),e=r,s()},t.getData=function(t){t(e.buffer)}}function h(e,t){var i,r=this;r.init=function(t,s){e.createWriter((function(e){i=e,t()}),s)},r.writeUint8Array=function(e,r,o){var n=new Blob([s?e:e.buffer],{type:t});i.onwrite=function(){i.onwrite=null,r()},i.onerror=o,i.write(n)},r.getData=function(t){e.file(t)}}o.prototype=new i,o.prototype.constructor=o,n.prototype=new i,n.prototype.constructor=n,a.prototype=new i,a.prototype.constructor=a,l.prototype=new r,l.prototype.constructor=l,h.prototype=new r,h.prototype.constructor=h,e.FileWriter=h,e.HttpReader=o,e.HttpRangeReader=n,e.ArrayBufferReader=a,e.ArrayBufferWriter=l,e.fs&&((t=e.fs.ZipDirectoryEntry).prototype.addHttpContent=function(s,i,r){return function(s,i,r,o){if(s.directory)return o?new t(s.fs,i,r,s):new e.fs.ZipFileEntry(s.fs,i,r,s);throw"Parent entry is not a directory."}(this,s,{data:i,Reader:r?n:o})},t.prototype.importHttpContent=function(e,t,s,i){this.importZip(t?new n(e):new o(e),s,i)},e.fs.FS.prototype.importHttpContent=function(e,s,i,r){this.entries=[],this.root=new t(this),this.root.importHttpContent(e,s,i,r)})}(sg.zip);var ig,rg,og,ng,ag,lg,hg,cg=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},Ag=cg({"dist/web-ifc-mt.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return N.buffer!=w.buffer&&z(),w}function i(){return N.buffer!=w.buffer&&z(),B}function r(){return N.buffer!=w.buffer&&z(),F}function o(){return N.buffer!=w.buffer&&z(),M}function n(){return N.buffer!=w.buffer&&z(),L}function a(){return N.buffer!=w.buffer&&z(),U}function l(){return N.buffer!=w.buffer&&z(),G}var h,c,A=void 0!==e?e:{};A.ready=new Promise((function(e,t){h=e,c=t}));var u,p,d,f=Object.assign({},A),E="./this.program",m=(e,t)=>{throw t},y="object"==typeof window,g="function"==typeof importScripts,I="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=A.ENVIRONMENT_IS_PTHREAD||!1,T="";function _(e){return A.locateFile?A.locateFile(e,T):T+e}(y||g)&&(g?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),s&&(T=s),T=0!==T.indexOf("blob:")?T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g&&(d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)});var R,P=A.print||console.log.bind(console),D=A.printErr||console.warn.bind(console);Object.assign(A,f),f=null,A.arguments,A.thisProgram&&(E=A.thisProgram),A.quit&&(m=A.quit),A.wasmBinary&&(R=A.wasmBinary);var N,b,C=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&ae("no native wasm support detected");var O,S=!1;function x(e,t){e||ae(t)}var w,B,F,M,L,U,H,G,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function V(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&k)return k.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,r):e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function j(e,t){return(e>>>=0)?V(i(),e,t):""}function Q(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function W(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function z(){var e=N.buffer;A.HEAP8=w=new Int8Array(e),A.HEAP16=F=new Int16Array(e),A.HEAP32=L=new Int32Array(e),A.HEAPU8=B=new Uint8Array(e),A.HEAPU16=M=new Uint16Array(e),A.HEAPU32=U=new Uint32Array(e),A.HEAPF32=H=new Float32Array(e),A.HEAPF64=G=new Float64Array(e)}var K,Y=A.INITIAL_MEMORY||16777216;if(x(Y>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Y+"! (STACK_SIZE=5242880)"),v)N=A.wasmMemory;else if(A.wasmMemory)N=A.wasmMemory;else if(!((N=new WebAssembly.Memory({initial:Y/65536,maximum:65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw D("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),I&&D("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");z(),Y=N.buffer.byteLength;var X=[],Z=[],q=[];function J(){return C}function $(){v||(A.noFSInit||ye.init.initialized||ye.init(),ye.ignorePermissions=!1,_e(Z))}var ee,te,se,ie=0,re=null;function oe(e){ie++,A.monitorRunDependencies&&A.monitorRunDependencies(ie)}function ne(e){if(ie--,A.monitorRunDependencies&&A.monitorRunDependencies(ie),0==ie&&re){var t=re;re=null,t()}}function ae(e){A.onAbort&&A.onAbort(e),D(e="Aborted("+e+")"),S=!0,O=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw c(t),t}function le(e){return e.startsWith("data:application/octet-stream;base64,")}function he(e){try{if(e==ee&&R)return new Uint8Array(R);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){ae(e)}}function ce(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ae(e){var t=Te.pthreads[e];x(t),Te.returnWorkerToPool(t)}le(ee="web-ifc-mt.wasm")||(ee=_(ee));var ue={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=ue.isAbs(e),s="/"===e.substr(-1);return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ue.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ue.normalize(e.join("/"))},join2:(e,t)=>ue.normalize(e+"/"+t)},pe={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:ye.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=ue.isAbs(i)}return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=pe.resolve(e).substr(1),t=pe.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:W(e)+1,r=new Array(i),o=Q(e,r,0,r.length);return t&&(r.length=o),r}var fe={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){fe.ttys[e]={input:[],output:[],ops:t},ye.registerDevice(e,fe.stream_ops)},stream_ops:{open:function(e){var t=fe.ttys[e.node.rdev];if(!t)throw new ye.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new ye.ErrnoError(60);for(var o=0,n=0;n0&&(P(V(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(D(V(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(D(V(e.output,0)),e.output=[])}}};function Ee(e){ae()}var me={ops_table:null,mount:function(e){return me.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(ye.isBlkdev(s)||ye.isFIFO(s))throw new ye.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:ye.chrdev_stream_ops}});var r=ye.createNode(e,t,s,i);return ye.isDir(r.mode)?(r.node_ops=me.ops_table.dir.node,r.stream_ops=me.ops_table.dir.stream,r.contents={}):ye.isFile(r.mode)?(r.node_ops=me.ops_table.file.node,r.stream_ops=me.ops_table.file.stream,r.usedBytes=0,r.contents=null):ye.isLink(r.mode)?(r.node_ops=me.ops_table.link.node,r.stream_ops=me.ops_table.link.stream):ye.isChrdev(r.mode)&&(r.node_ops=me.ops_table.chrdev.node,r.stream_ops=me.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=ye.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,ye.isDir(e.mode)?t.size=4096:ye.isFile(e.mode)?t.size=e.usedBytes:ye.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup:function(e,t){throw ye.genericErrors[44]},mknod:function(e,t,s,i){return me.createNode(e,t,s,i)},rename:function(e,t,s){if(ye.isDir(e.mode)){var i;try{i=ye.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new ye.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=ye.lookupNode(e,t);for(var i in s.contents)throw new ye.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=me.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!ye.isLink(e.mode))throw new ye.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||i+s>>=0,t().set(l,n>>>0)}else a=!1,n=l.byteOffset;return{ptr:n,allocated:a}},msync:function(e,t,s,i,r){return me.stream_ops.write(e,t,0,i,s,!1),0}}},ye={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=pe.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new ye.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=ye.root,r="/",o=0;o40)throw new ye.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(ye.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%ye.nameTable.length},hashAddNode:e=>{var t=ye.hashName(e.parent.id,e.name);e.name_next=ye.nameTable[t],ye.nameTable[t]=e},hashRemoveNode:e=>{var t=ye.hashName(e.parent.id,e.name);if(ye.nameTable[t]===e)ye.nameTable[t]=e.name_next;else for(var s=ye.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=ye.mayLookup(e);if(s)throw new ye.ErrnoError(s,e);for(var i=ye.hashName(e.id,t),r=ye.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return ye.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new ye.FSNode(e,t,s,i);return ye.hashAddNode(r),r},destroyNode:e=>{ye.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=ye.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>ye.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=ye.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return ye.lookupNode(e,t),20}catch(e){}return ye.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=ye.lookupNode(e,t)}catch(e){return e.errno}var r=ye.nodePermissions(e,"wx");if(r)return r;if(s){if(!ye.isDir(i.mode))return 54;if(ye.isRoot(i)||ye.getPath(i)===ye.cwd())return 10}else if(ye.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?ye.isLink(e.mode)?32:ye.isDir(e.mode)&&("r"!==ye.flagsToPermissionString(t)||512&t)?31:ye.nodePermissions(e,ye.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=ye.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!ye.streams[s])return s;throw new ye.ErrnoError(33)},getStream:e=>ye.streams[e],createStream:(e,t,s)=>{ye.FSStream||(ye.FSStream=function(){this.shared={}},ye.FSStream.prototype={},Object.defineProperties(ye.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new ye.FSStream,e);var i=ye.nextfd(t,s);return e.fd=i,ye.streams[i]=e,e},closeStream:e=>{ye.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=ye.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new ye.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{ye.devices[e]={stream_ops:t}},getDevice:e=>ye.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),ye.syncFSRequests++,ye.syncFSRequests>1&&D("warning: "+ye.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=ye.getMounts(ye.root.mount),i=0;function r(e){return ye.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&ye.root)throw new ye.ErrnoError(10);if(!r&&!o){var n=ye.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,ye.isMountpoint(i))throw new ye.ErrnoError(10);if(!ye.isDir(i.mode))throw new ye.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?ye.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=ye.lookupPath(e,{follow_mount:!1});if(!ye.isMountpoint(t.node))throw new ye.ErrnoError(28);var s=t.node,i=s.mounted,r=ye.getMounts(i);Object.keys(ye.nameTable).forEach((e=>{for(var t=ye.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&ye.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=ye.lookupPath(e,{parent:!0}).node,r=ue.basename(e);if(!r||"."===r||".."===r)throw new ye.ErrnoError(28);var o=ye.mayCreate(i,r);if(o)throw new ye.ErrnoError(o);if(!i.node_ops.mknod)throw new ye.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,ye.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,ye.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,ye.mknod(e,t,s)),symlink:(e,t)=>{if(!pe.resolve(e))throw new ye.ErrnoError(44);var s=ye.lookupPath(t,{parent:!0}).node;if(!s)throw new ye.ErrnoError(44);var i=ue.basename(t),r=ye.mayCreate(s,i);if(r)throw new ye.ErrnoError(r);if(!s.node_ops.symlink)throw new ye.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=ue.dirname(e),o=ue.dirname(t),n=ue.basename(e),a=ue.basename(t);if(s=ye.lookupPath(e,{parent:!0}).node,i=ye.lookupPath(t,{parent:!0}).node,!s||!i)throw new ye.ErrnoError(44);if(s.mount!==i.mount)throw new ye.ErrnoError(75);var l,h=ye.lookupNode(s,n),c=pe.relative(e,o);if("."!==c.charAt(0))throw new ye.ErrnoError(28);if("."!==(c=pe.relative(t,r)).charAt(0))throw new ye.ErrnoError(55);try{l=ye.lookupNode(i,a)}catch(e){}if(h!==l){var A=ye.isDir(h.mode),u=ye.mayDelete(s,n,A);if(u)throw new ye.ErrnoError(u);if(u=l?ye.mayDelete(i,a,A):ye.mayCreate(i,a))throw new ye.ErrnoError(u);if(!s.node_ops.rename)throw new ye.ErrnoError(63);if(ye.isMountpoint(h)||l&&ye.isMountpoint(l))throw new ye.ErrnoError(10);if(i!==s&&(u=ye.nodePermissions(s,"w")))throw new ye.ErrnoError(u);ye.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{ye.hashAddNode(h)}}},rmdir:e=>{var t=ye.lookupPath(e,{parent:!0}).node,s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!0);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.rmdir)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.rmdir(t,s),ye.destroyNode(i)},readdir:e=>{var t=ye.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new ye.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=ye.lookupPath(e,{parent:!0}).node;if(!t)throw new ye.ErrnoError(44);var s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!1);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.unlink)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.unlink(t,s),ye.destroyNode(i)},readlink:e=>{var t=ye.lookupPath(e).node;if(!t)throw new ye.ErrnoError(44);if(!t.node_ops.readlink)throw new ye.ErrnoError(28);return pe.resolve(ye.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=ye.lookupPath(e,{follow:!t}).node;if(!s)throw new ye.ErrnoError(44);if(!s.node_ops.getattr)throw new ye.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>ye.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?ye.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{ye.chmod(e,t,!0)},fchmod:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);ye.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?ye.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{ye.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=ye.getStream(e);if(!i)throw new ye.ErrnoError(8);ye.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new ye.ErrnoError(28);var s;if(!(s="string"==typeof e?ye.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);if(ye.isDir(s.mode))throw new ye.ErrnoError(31);if(!ye.isFile(s.mode))throw new ye.ErrnoError(28);var i=ye.nodePermissions(s,"w");if(i)throw new ye.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);if(0==(2097155&s.flags))throw new ye.ErrnoError(28);ye.truncate(s.node,t)},utime:(e,t,s)=>{var i=ye.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new ye.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?ye.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=ue.normalize(e);try{i=ye.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var r=!1;if(64&t)if(i){if(128&t)throw new ye.ErrnoError(20)}else i=ye.mknod(e,s,0),r=!0;if(!i)throw new ye.ErrnoError(44);if(ye.isChrdev(i.mode)&&(t&=-513),65536&t&&!ye.isDir(i.mode))throw new ye.ErrnoError(54);if(!r){var o=ye.mayOpen(i,t);if(o)throw new ye.ErrnoError(o)}512&t&&!r&&ye.truncate(i,0),t&=-131713;var n=ye.createStream({node:i,path:ye.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return n.stream_ops.open&&n.stream_ops.open(n),!A.logReadFiles||1&t||(ye.readFiles||(ye.readFiles={}),e in ye.readFiles||(ye.readFiles[e]=1)),n},close:e=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ye.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ye.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new ye.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(1==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.read)throw new ye.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.write)throw new ye.ErrnoError(28);e.seekable&&1024&e.flags&&ye.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(t<0||s<=0)throw new ye.ErrnoError(28);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(!ye.isFile(e.node.mode)&&!ye.isDir(e.node.mode))throw new ye.ErrnoError(43);if(!e.stream_ops.allocate)throw new ye.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new ye.ErrnoError(2);if(1==(2097155&e.flags))throw new ye.ErrnoError(2);if(!e.stream_ops.mmap)throw new ye.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new ye.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=ye.open(e,t.flags),r=ye.stat(e).size,o=new Uint8Array(r);return ye.read(i,o,0,r,0),"utf8"===t.encoding?s=V(o,0):"binary"===t.encoding&&(s=o),ye.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=ye.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(W(t)+1),o=Q(t,r,0,r.length);ye.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");ye.write(i,t,0,t.byteLength,void 0,s.canOwn)}ye.close(i)},cwd:()=>ye.currentPath,chdir:e=>{var t=ye.lookupPath(e,{follow:!0});if(null===t.node)throw new ye.ErrnoError(44);if(!ye.isDir(t.node.mode))throw new ye.ErrnoError(54);var s=ye.nodePermissions(t.node,"x");if(s)throw new ye.ErrnoError(s);ye.currentPath=t.path},createDefaultDirectories:()=>{ye.mkdir("/tmp"),ye.mkdir("/home"),ye.mkdir("/home/web_user")},createDefaultDevices:()=>{ye.mkdir("/dev"),ye.registerDevice(ye.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),ye.mkdev("/dev/null",ye.makedev(1,3)),fe.register(ye.makedev(5,0),fe.default_tty_ops),fe.register(ye.makedev(6,0),fe.default_tty1_ops),ye.mkdev("/dev/tty",ye.makedev(5,0)),ye.mkdev("/dev/tty1",ye.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>ae("randomDevice")}();ye.createDevice("/dev","random",e),ye.createDevice("/dev","urandom",e),ye.mkdir("/dev/shm"),ye.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ye.mkdir("/proc");var e=ye.mkdir("/proc/self");ye.mkdir("/proc/self/fd"),ye.mount({mount:()=>{var t=ye.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=ye.getStream(s);if(!i)throw new ye.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{A.stdin?ye.createDevice("/dev","stdin",A.stdin):ye.symlink("/dev/tty","/dev/stdin"),A.stdout?ye.createDevice("/dev","stdout",null,A.stdout):ye.symlink("/dev/tty","/dev/stdout"),A.stderr?ye.createDevice("/dev","stderr",null,A.stderr):ye.symlink("/dev/tty1","/dev/stderr"),ye.open("/dev/stdin",0),ye.open("/dev/stdout",1),ye.open("/dev/stderr",1)},ensureErrnoError:()=>{ye.ErrnoError||(ye.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ye.ErrnoError.prototype=new Error,ye.ErrnoError.prototype.constructor=ye.ErrnoError,[44].forEach((e=>{ye.genericErrors[e]=new ye.ErrnoError(e),ye.genericErrors[e].stack=""})))},staticInit:()=>{ye.ensureErrnoError(),ye.nameTable=new Array(4096),ye.mount(me,{},"/"),ye.createDefaultDirectories(),ye.createDefaultDevices(),ye.createSpecialDirectories(),ye.filesystems={MEMFS:me}},init:(e,t,s)=>{ye.init.initialized=!0,ye.ensureErrnoError(),A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=s||A.stderr,ye.createStandardStreams()},quit:()=>{ye.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=ye.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=ye.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=ye.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=ue.basename(e),i=ye.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:ye.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=ue.join2(e,o);try{ye.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=ue.join2("string"==typeof e?e:ye.getPath(e),t),n=ye.getMode(i,r);return ye.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:ye.getPath(e),n=t?ue.join2(e,t):e);var a=ye.getMode(i,r),l=ye.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=ue.join2("string"==typeof e?e:ye.getPath(e),t),o=ye.getMode(!!s,!!i);ye.createDevice.major||(ye.createDevice.major=64);var n=ye.makedev(ye.createDevice.major++,0);return ye.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=de(u(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ye.ErrnoError(29)}},createLazyFile:(e,s,i,r,o)=>{function n(){this.lengthKnown=!1,this.chunks=[]}if(n.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,s=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=s);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,s-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>s-1)throw new Error("only "+s+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),s!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):de(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&s||(n=s=1,s=this.getter(0).length,n=s,P("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=s,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!g)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:a}}else l={isDevice:!1,url:i};var h=ye.createFile(e,s,l,r,o);l.contents?h.contents=l.contents:l.url&&(h.contents=null,h.url=l.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var c={};function A(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=h.stream_ops[e];c[e]=function(){return ye.forceLoadFile(h),t.apply(null,arguments)}})),c.read=(e,t,s,i,r)=>(ye.forceLoadFile(h),A(e,t,s,i,r)),c.mmap=(e,s,i,r,o)=>{ye.forceLoadFile(h);var n=Ee();if(!n)throw new ye.ErrnoError(48);return A(e,t(),n,s,i),{ptr:n,allocated:!0}},h.stream_ops=c,h},createPreloadedFile:(e,t,s,i,r,o,n,a,l,h)=>{var c=t?pe.resolve(ue.join2(e,t)):e;function A(s){function A(s){h&&h(),a||ye.createDataFile(e,t,s,i,r,l),o&&o(),ne()}Browser.handledByPreloadPlugin(s,c,A,(()=>{n&&n(),ne()}))||A(s)}oe(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;p(e,(s=>{x(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&ne()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&oe()}(s,(e=>A(e)),n):A(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{P("creating db"),r.result.createObjectStore(ye.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([ye.DB_STORE_NAME],"readwrite"),o=i.objectStore(ye.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(ye.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([ye.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(ye.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{ye.analyzePath(e).exists&&ye.unlink(e),ye.createDataFile(ue.dirname(e),ue.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},ge={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(ue.isAbs(t))return t;var i;if(i=-100===e?ye.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!s)throw new ye.ErrnoError(44);return i}return ue.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&ue.normalize(t)!==ue.normalize(ye.getPath(e.node)))return-54;throw e}n()[s>>>2]=i.dev,n()[s+8>>>2]=i.ino,n()[s+12>>>2]=i.mode,a()[s+16>>>2]=i.nlink,n()[s+20>>>2]=i.uid,n()[s+24>>>2]=i.gid,n()[s+28>>>2]=i.rdev,se=[i.size>>>0,(te=i.size,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+40>>>2]=se[0],n()[s+44>>>2]=se[1],n()[s+48>>>2]=4096,n()[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),l=i.ctime.getTime();return se=[Math.floor(r/1e3)>>>0,(te=Math.floor(r/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+56>>>2]=se[0],n()[s+60>>>2]=se[1],a()[s+64>>>2]=r%1e3*1e3,se=[Math.floor(o/1e3)>>>0,(te=Math.floor(o/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+72>>>2]=se[0],n()[s+76>>>2]=se[1],a()[s+80>>>2]=o%1e3*1e3,se=[Math.floor(l/1e3)>>>0,(te=Math.floor(l/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+88>>>2]=se[0],n()[s+92>>>2]=se[1],a()[s+96>>>2]=l%1e3*1e3,se=[i.ino>>>0,(te=i.ino,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+104>>>2]=se[0],n()[s+108>>>2]=se[1],0},doMsync:function(e,t,s,r,o){if(!ye.isFile(t.node.mode))throw new ye.ErrnoError(43);if(2&r)return 0;e>>>=0;var n=i().slice(e,e+s);ye.msync(t,n,o,s,r)},varargs:void 0,get:function(){return ge.varargs+=4,n()[ge.varargs-4>>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=ye.getStream(e);if(!t)throw new ye.ErrnoError(8);return t}};function Ie(e){if(v)return ls(1,1,e);O=e,J()||(Te.terminateAllThreads(),A.onExit&&A.onExit(e),S=!0),m(e,new ce(e))}var ve=function(e,t){if(O=e,!t&&v)throw Re(e),"unwind";Ie(e)},Te={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){v?Te.initWorker():Te.initMainThread()},initMainThread:function(){for(var e=navigator.hardwareConcurrency;e--;)Te.allocateUnusedWorker()},initWorker:function(){C=!1},setExitStatus:function(e){O=e},terminateAllThreads:function(){for(var e of Object.values(Te.pthreads))Te.returnWorkerToPool(e);for(var e of Te.unusedWorkers)e.terminate();Te.unusedWorkers=[]},returnWorkerToPool:function(e){var t=e.pthread_ptr;delete Te.pthreads[t],Te.unusedWorkers.push(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Fs(t)},receiveObjectTransfer:function(e){},threadInitTLS:function(){Te.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=s=>{var i,r=s.data,o=r.cmd;if(e.pthread_ptr&&(Te.currentProxiedOperationCallerThread=e.pthread_ptr),r.targetThread&&r.targetThread!=Cs()){var n=Te.pthreads[r.targetThread];return n?n.postMessage(r,r.transferList):D('Internal error! Worker sent a message "'+o+'" to target pthread '+r.targetThread+", but that thread no longer exists!"),void(Te.currentProxiedOperationCallerThread=void 0)}"processProxyingQueue"===o?ts(r.queue):"spawnThread"===o?function(e){var t=Te.getNewWorker();if(!t)return 6;Te.runningWorkers.push(t),Te.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var s={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};t.postMessage(s,e.transferList)}(r):"cleanupThread"===o?Ae(r.thread):"killThread"===o?function(e){var t=Te.pthreads[e];delete Te.pthreads[e],t.terminate(),Fs(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(t),1),t.pthread_ptr=0}(r.thread):"cancelThread"===o?(i=r.thread,Te.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"print"===o?P("Thread "+r.threadId+": "+r.text):"printErr"===o?D("Thread "+r.threadId+": "+r.text):"alert"===o?alert("Thread "+r.threadId+": "+r.text):"setimmediate"===r.target?e.postMessage(r):"callHandler"===o?A[r.handler](...r.args):o&&D("worker sent an unknown command "+o),Te.currentProxiedOperationCallerThread=void 0},e.onerror=e=>{throw D("worker sent an error! "+e.filename+":"+e.lineno+": "+e.message),e};var i=[];for(var r of["onExit","onAbort","print","printErr"])A.hasOwnProperty(r)&&i.push(r);e.postMessage({cmd:"load",handlers:i,urlOrBlob:A.mainScriptUrlOrBlob||s,wasmMemory:N,wasmModule:b})})),loadWasmModuleToAllWorkers:function(e){if(v)return e();Promise.all(Te.unusedWorkers.map(Te.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker:function(){var e,t=_("web-ifc-mt.worker.js");e=new Worker(t),Te.unusedWorkers.push(e)},getNewWorker:function(){return 0==Te.unusedWorkers.length&&(Te.allocateUnusedWorker(),Te.loadWasmModuleToWorker(Te.unusedWorkers[0])),Te.unusedWorkers.pop()}};function _e(e){for(;e.length>0;)e.shift()(A)}function Re(e){if(v)return ls(2,0,e);try{ve(e)}catch(e){!function(e){if(e instanceof ce||"unwind"==e)return O;m(1,e)}(e)}}A.PThread=Te,A.establishStackSpace=function(){var e=Cs(),t=n()[e+52>>>2],s=n()[e+56>>>2];Us(t,t-s),Gs(t)};var Pe=[];function De(e){var t=Pe[e];return t||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=t=K.get(e)),t}function Ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){a()[this.ptr+4>>>2]=e},this.get_type=function(){return a()[this.ptr+4>>>2]},this.set_destructor=function(e){a()[this.ptr+8>>>2]=e},this.get_destructor=function(){return a()[this.ptr+8>>>2]},this.set_refcount=function(e){n()[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){Atomics.add(n(),this.ptr+0>>2,1)},this.release_ref=function(){return 1===Atomics.sub(n(),this.ptr+0>>2,1)},this.set_adjusted_ptr=function(e){a()[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return a()[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Vs(this.get_type()))return a()[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}A.invokeEntryPoint=function(e,t){var s=De(e)(t);J()?Te.setExitStatus(s):Ms(s)};var be="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",Ce={};function Oe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Se(e){return this.fromWireType(n()[e>>>2])}var xe={},we={},Be={};function Fe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function Me(e,t){return e=Fe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Le(e,t){var s=Me(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var Ue=void 0;function He(e){throw new Ue(e)}function Ge(e,t,s){function i(t){var i=s(t);i.length!==e.length&&He("Mismatched type converter count");for(var r=0;r{we.hasOwnProperty(e)?r[t]=we[e]:(o.push(e),xe.hasOwnProperty(e)||(xe[e]=[]),xe[e].push((()=>{r[t]=we[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var ke={};function Ve(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var je=void 0;function Qe(e){for(var t="",s=e;i()[s>>>0];)t+=je[i()[s++>>>0]];return t}var We=void 0;function ze(e){throw new We(e)}function Ke(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ze('type "'+i+'" must have a positive integer typeid pointer'),we.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ze("Cannot register type '"+i+"' twice")}if(we[e]=t,delete Be[e],xe.hasOwnProperty(e)){var r=xe[e];delete xe[e],r.forEach((e=>e()))}}function Ye(e){if(!(this instanceof mt))return!1;if(!(e instanceof mt))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function Xe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ze(e){ze(e.$$.ptrType.registeredClass.name+" instance already deleted")}var qe=!1;function Je(e){}function $e(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function et(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=et(e,t,s.baseClass);return null===i?null:s.downcast(i)}var tt={};function st(){return Object.keys(lt).length}function it(){var e=[];for(var t in lt)lt.hasOwnProperty(t)&&e.push(lt[t]);return e}var rt=[];function ot(){for(;rt.length;){var e=rt.pop();e.$$.deleteScheduled=!1,e.delete()}}var nt=void 0;function at(e){nt=e,rt.length&&nt&&nt(ot)}var lt={};function ht(e,t){return t=function(e,t){for(void 0===t&&ze("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),lt[t]}function ct(e,t){return t.ptrType&&t.ptr||He("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&He("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ut(Object.create(e,{$$:{value:t}}))}function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=ht(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?ct(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ct(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=tt[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=et(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function ut(e){return"undefined"==typeof FinalizationRegistry?(ut=e=>e,e):(qe=new FinalizationRegistry((e=>{$e(e.$$)})),Je=e=>qe.unregister(e),(ut=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};qe.register(e,s,e)}return e})(e))}function pt(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ut(Object.create(Object.getPrototypeOf(this),{$$:{value:Xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function dt(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),Je(this),$e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ft(){return!this.$$.ptr}function Et(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),rt.push(this),1===rt.length&&nt&&nt(ot),this.$$.deleteScheduled=!0,this}function mt(){}function yt(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ze("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function gt(e,t,s){A.hasOwnProperty(e)?((void 0===s||void 0!==A[e].overloadTable&&void 0!==A[e].overloadTable[s])&&ze("Cannot register public name '"+e+"' twice"),yt(A,e,e),A.hasOwnProperty(s)&&ze("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),A[e].overloadTable[s]=t):(A[e]=t,void 0!==s&&(A[e].numArguments=s))}function It(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function vt(e,t,s){for(;t!==s;)t.upcast||ze("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Tt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function _t(e,t){var s;if(null===t)return this.isReference&&ze("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=vt(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ze("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,Vt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ze("Unsupporting sharing policy")}return s}function Rt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function Pt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Dt(e){this.rawDestructor&&this.rawDestructor(e)}function Nt(e){null!==e&&e.delete()}function bt(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=_t:i?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=Rt,this.destructorFunction=null)}function Ct(e,t,s){A.hasOwnProperty(e)||He("Replacing nonexistant public symbol"),void 0!==A[e].overloadTable&&void 0!==s?A[e].overloadTable[s]=t:(A[e]=t,A[e].argCount=s)}function Ot(e,t,s){return e.includes("j")?function(e,t,s){var i=A["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):De(t).apply(null,s)}function St(e,t){var s,i,r,o=(e=Qe(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ot(s,i,r)}):De(t);return"function"!=typeof o&&ze("unknown function pointer with signature "+e+": "+t),o}var xt=void 0;function wt(e){var t=Os(e),s=Qe(t);return Ls(t),s}function Bt(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||we[t]||(Be[t]?Be[t].forEach(e):(s.push(t),i[t]=!0))})),new xt(e+": "+s.map(wt).join([", "]))}function Ft(e,t){for(var s=[],i=0;i>>2]);return s}function Mt(e,t,s,i,r){var o=t.length;o<2&&ze("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--Ut[e].refcount&&(Ut[e]=void 0,Lt.push(e))}function Gt(){for(var e=0,t=5;t(e||ze("Cannot use deleted val. handle = "+e),Ut[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Lt.length?Lt.pop():Ut.length;return Ut[t]={refcount:1,value:e},t}}};function jt(e,s,l){switch(s){case 0:return function(e){var s=l?t():i();return this.fromWireType(s[e>>>0])};case 1:return function(e){var t=l?r():o();return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=l?n():a();return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Qt(e,t){var s=we[e];return void 0===s&&ze(t+" has unknown type "+wt(e)),s}function Wt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function zt(e,t){switch(t){case 2:return function(e){return this.fromWireType((N.buffer!=w.buffer&&z(),H)[e>>>2])};case 3:return function(e){return this.fromWireType(l()[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Kt(e,s,l){switch(s){case 0:return l?function(e){return t()[e>>>0]}:function(e){return i()[e>>>0]};case 1:return l?function(e){return r()[e>>>1]}:function(e){return o()[e>>>1]};case 2:return l?function(e){return n()[e>>>2]}:function(e){return a()[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Yt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Xt(e,t){for(var s=e,n=s>>1,a=n+t/2;!(n>=a)&&o()[n>>>0];)++n;if((s=n<<1)-e>32&&Yt)return Yt.decode(i().slice(e,s));for(var l="",h=0;!(h>=t/2);++h){var c=r()[e+2*h>>>1];if(0==c)break;l+=String.fromCharCode(c)}return l}function Zt(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,o=(s-=2)<2*e.length?s/2:e.length,n=0;n>>1]=a,t+=2}return r()[t>>>1]=0,t-i}function qt(e){return 2*e.length}function Jt(e,t){for(var s=0,i="";!(s>=t/4);){var r=n()[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function $t(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),n()[t>>>2]=a,(t+=4)+4>r)break}return n()[t>>>2]=0,t-i}function es(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}function ts(e){Atomics.store(n(),e>>2,1),Cs()&&Bs(e),Atomics.compareExchange(n(),e>>2,1,0)}A.executeNotifiedProxyingQueue=ts;var ss,is={};function rs(e){var t=is[e];return void 0===t?Qe(e):t}function os(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ns(e){ns.shown||(ns.shown={}),ns.shown[e]||(ns.shown[e]=1,D(e))}function as(e){var t=Hs(),s=e();return Gs(t),s}function ls(e,t){var s=arguments.length-2,i=arguments;return as((()=>{for(var r=s,o=ks(8*r),n=o>>3,a=0;a>>0]=h}return ws(e,r,o,t)}))}ss=()=>performance.timeOrigin+performance.now();var hs=[];function cs(e){var t=N.buffer;try{return N.grow(e-t.byteLength+65535>>>16),z(),1}catch(e){}}var As={};function us(){if(!us.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:E||"./this.program"};for(var t in As)void 0===As[t]?delete e[t]:e[t]=As[t];var s=[];for(var t in e)s.push(t+"="+e[t]);us.strings=s}return us.strings}function ps(e,s){if(v)return ls(3,1,e,s);var i=0;return us().forEach((function(r,o){var n=s+i;a()[e+4*o>>>2]=n,function(e,s,i){for(var r=0;r>>0]=e.charCodeAt(r);i||(t()[s>>>0]=0)}(r,n),i+=r.length+1})),0}function ds(e,t){if(v)return ls(4,1,e,t);var s=us();a()[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),a()[t>>>2]=i,0}function fs(e){if(v)return ls(5,1,e);try{var t=ge.getStreamFromFD(e);return ye.close(t),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function Es(e,s,i,r){if(v)return ls(6,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.read(e,t(),l,h,r);if(c<0)return-1;if(o+=c,c>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function ms(e,t,s,i,r){if(v)return ls(7,1,e,t,s,i,r);try{var o=(h=s)+2097152>>>0<4194305-!!(l=t)?(l>>>0)+4294967296*h:NaN;if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return ye.llseek(a,o,i),se=[a.position>>>0,(te=a.position,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[r>>>2]=se[0],n()[r+4>>>2]=se[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}var l,h}function ys(e,s,i,r){if(v)return ls(8,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.write(e,t(),l,h,r);if(c<0)return-1;o+=c,void 0!==r&&(r+=c)}return o}(ge.getStreamFromFD(e),s,i);return a()[r>>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function gs(e){return e%4==0&&(e%100!=0||e%400==0)}var Is=[31,29,31,30,31,30,31,31,30,31,30,31],vs=[31,28,31,30,31,30,31,31,30,31,30,31];function Ts(e,s,i,r){var o=n()[r+40>>>2],a={tm_sec:n()[r>>>2],tm_min:n()[r+4>>>2],tm_hour:n()[r+8>>>2],tm_mday:n()[r+12>>>2],tm_mon:n()[r+16>>>2],tm_year:n()[r+20>>>2],tm_wday:n()[r+24>>>2],tm_yday:n()[r+28>>>2],tm_isdst:n()[r+32>>>2],tm_gmtoff:n()[r+36>>>2],tm_zone:o?j(o):""},l=j(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in h)l=l.replace(new RegExp(c,"g"),h[c]);var A=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function E(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=gs(s.getFullYear()),r=s.getMonth(),o=(i?Is:vs)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=E(s),o=E(i);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(e){return A[e.tm_wday].substring(0,3)},"%A":function(e){return A[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return p(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(gs(e.tm_year+1900)?Is:vs,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&gs(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&gs(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in l=l.replace(/%%/g,"\0\0"),y)l.includes(c)&&(l=l.replace(new RegExp(c,"g"),y[c](a)));var g,I,v=de(l=l.replace(/\0\0/g,"%"),!1);return v.length>s?0:(g=v,I=e,t().set(g,I>>>0),v.length-1)}Te.init();var _s=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ye.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Rs=365,Ps=146;Object.defineProperties(_s.prototype,{read:{get:function(){return(this.mode&Rs)===Rs},set:function(e){e?this.mode|=Rs:this.mode&=-366}},write:{get:function(){return(this.mode&Ps)===Ps},set:function(e){e?this.mode|=Ps:this.mode&=-147}},isFolder:{get:function(){return ye.isDir(this.mode)}},isDevice:{get:function(){return ye.isChrdev(this.mode)}}}),ye.FSNode=_s,ye.staticInit(),Ue=A.InternalError=Le(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);je=e}(),We=A.BindingError=Le(Error,"BindingError"),mt.prototype.isAliasOf=Ye,mt.prototype.clone=pt,mt.prototype.delete=dt,mt.prototype.isDeleted=ft,mt.prototype.deleteLater=Et,A.getInheritedInstanceCount=st,A.getLiveInheritedInstances=it,A.flushPendingDeletes=ot,A.setDelayFunction=at,bt.prototype.getPointee=Pt,bt.prototype.destructor=Dt,bt.prototype.argPackAdvance=8,bt.prototype.readValueFromPointer=Se,bt.prototype.deleteObject=Nt,bt.prototype.fromWireType=At,xt=A.UnboundTypeError=Le(Error,"UnboundTypeError"),A.count_emval_handles=Gt,A.get_first_emval=kt;var Ds=[null,Ie,Re,ps,ds,fs,Es,ms,ys],Ns={g:function(e,t,s){throw new Ne(e).init(t,s),e},T:function(e){Ss(e,!g,1,!y),Te.threadInitTLS()},J:function(e){v?postMessage({cmd:"cleanupThread",thread:e}):Ae(e)},X:function(e){},_:function(e){ae(be)},Z:function(e,t){ae(be)},da:function(e){var t=Ce[e];delete Ce[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;Ge([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Oe(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>l])},destructorFunction:null})},p:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=Qe(c),o=St(r,o),a&&(a=St(n,a)),h&&(h=St(l,h)),u=St(A,u);var p=Fe(c);gt(p,(function(){Bt("Cannot construct "+c+" due to unbound types",[i])})),Ge([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:mt.prototype;var n=Me(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new We("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new We(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new It(c,n,l,u,s,o,a,h),d=new bt(c,A,!0,!1,!1),f=new bt(c+"*",A,!1,!1,!1),E=new bt(c+" const*",A,!1,!0,!1);return tt[e]={pointerType:f,constPointerType:E},Ct(p,n),[d,f,E]}))},o:function(e,t,s,i,r,o){x(t>0);var n=Ft(t,s);r=St(i,r),Ge([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Bt("Cannot construct "+e.name+" due to unbound types",n)},Ge([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Mt(s,i,null,r,o),[]})),[]}))},c:function(e,t,s,i,r,o,n,a){var l=Ft(s,i);t=Qe(t),o=St(r,o),Ge([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){Bt("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(yt(h,t,i),h[t].overloadTable[s-2]=r),Ge([],l,(function(r){var a=Mt(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},aa:function(e,t){Ke(e,{name:t=Qe(t),fromWireType:function(e){var t=Vt.toValue(e);return Ht(e),t},toWireType:function(e,t){return Vt.toHandle(t)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},D:function(e,t,s,i){var r=Ve(s);function o(){}t=Qe(t),o.values={},Ke(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:jt(t,r,i),destructorFunction:null}),gt(t,o)},t:function(e,t,s){var i=Qt(e,"enum");t=Qe(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:Me(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},B:function(e,t,s){var i=Ve(s);Ke(e,{name:t=Qe(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,i),destructorFunction:null})},d:function(e,t,s,i,r,o){var n=Ft(t,s);e=Qe(e),r=St(i,r),gt(e,(function(){Bt("Cannot call "+e+" due to unbound types",n)}),t-1),Ge([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ct(e,Mt(e,i,null,r,o),t-1),[]}))},s:function(e,t,s,i,r){t=Qe(t);var o=Ve(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ke(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Kt(t,o,0!==i),destructorFunction:null})},i:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){e>>=2;var t=a(),s=t[e>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ke(e,{name:s=Qe(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},C:function(e,t){var s="std::string"===(t=Qe(t));Ke(e,{name:t,fromWireType:function(e){var t,r=a()[e>>>2],o=e+4;if(s)for(var n=o,l=0;l<=r;++l){var h=o+l;if(l==r||0==i()[h>>>0]){var c=j(n,h-n);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),n=h+1}}else{var A=new Array(r);for(l=0;l>>0]);t=A.join("")}return Ls(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ze("Cannot pass non-string to std::string"),r=s&&o?W(t):t.length;var n,l,h=bs(4+r+1),c=h+4;if(c>>>=0,a()[h>>>2]=r,s&&o)n=c,l=r+1,Q(t,i(),n,l);else if(o)for(var A=0;A255&&(Ls(c),ze("String has UTF-16 code units that do not fit in 8 bits")),i()[c+A>>>0]=u}else for(A=0;A>>0]=t[A];return null!==e&&e.push(Ls,h),h},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},x:function(e,t,s){var i,r,n,l,h;s=Qe(s),2===t?(i=Xt,r=Zt,l=qt,n=()=>o(),h=1):4===t&&(i=Jt,r=$t,l=es,n=()=>a(),h=2),Ke(e,{name:s,fromWireType:function(e){for(var s,r=a()[e>>>2],o=n(),l=e+4,c=0;c<=r;++c){var A=e+4+c*t;if(c==r||0==o[A>>>h]){var u=i(l,A-l);void 0===s?s=u:(s+=String.fromCharCode(0),s+=u),l=A+t}}return Ls(e),s},toWireType:function(e,i){"string"!=typeof i&&ze("Cannot pass non-string to C++ string type "+s);var o=l(i),n=bs(4+o+t);return n>>>=0,a()[n>>>2]=o>>h,r(i,n+4,o+t),null!==e&&e.push(Ls,n),n},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},ea:function(e,t,s,i,r,o){Ce[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),elements:[]}},j:function(e,t,s,i,r,o,n,a,l){Ce[e].elements.push({getterReturnType:t,getter:St(s,i),getterContext:r,setterArgumentType:o,setter:St(n,a),setterContext:l})},r:function(e,t,s,i,r,o){ke[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),fields:[]}},f:function(e,t,s,i,r,o,n,a,l,h){ke[e].fields.push({fieldName:Qe(t),getterReturnType:s,getter:St(i,r),getterContext:o,setterArgumentType:n,setter:St(a,l),setterContext:h})},ca:function(e,t){Ke(e,{isVoid:!0,name:t=Qe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},Y:function(e){D(j(e))},V:function(e,t,s,i){if(e==t)setTimeout((()=>ts(i)));else if(v)postMessage({targetThread:e,cmd:"processProxyingQueue",queue:i});else{var r=Te.pthreads[e];if(!r)return;r.postMessage({cmd:"processProxyingQueue",queue:i})}return 1},S:function(e,t,s){return-1},n:function(e,t,s){e=Vt.toValue(e),t=Qt(t,"emval::as");var i=[],r=Vt.toHandle(i);return a()[s>>>2]=r,t.toWireType(i,e)},z:function(e,t,s,i){e=Vt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(Ut[e].refcount+=1)},ga:function(e,t){return(e=Vt.toValue(e))instanceof(t=Vt.toValue(t))},y:function(e){return"number"==typeof(e=Vt.toValue(e))},E:function(e){return"string"==typeof(e=Vt.toValue(e))},fa:function(){return Vt.toHandle([])},h:function(e){return Vt.toHandle(rs(e))},w:function(){return Vt.toHandle({})},m:function(e){Oe(Vt.toValue(e)),Ht(e)},k:function(e,t,s){e=Vt.toValue(e),t=Vt.toValue(t),s=Vt.toValue(s),e[t]=s},e:function(e,t){var s=(e=Qt(e,"_emval_take_value")).readValueFromPointer(t);return Vt.toHandle(s)},A:function(){ae("")},U:function(){g||ns("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},v:ss,W:function(e,t,s){i().copyWithin(e>>>0,t>>>0,t+s>>>0)},R:function(e,t,s){hs.length=t;for(var i=s>>3,r=0;r>>0];return Ds[e].apply(null,hs)},P:function(e){var t=i().length;if((e>>>=0)<=t)return!1;var s,r,o=4294901760;if(e>o)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);if(a=Math.min(a,e+100663296),cs(Math.min(o,(s=Math.max(e,a))+((r=65536)-s%r)%r)))return!0}return!1},$:function(){throw"unwind"},L:ps,M:ds,I:ve,N:fs,O:Es,G:ms,Q:ys,a:N||A.wasmMemory,K:function(e,t,s,i,r){return Ts(e,t,s,i)}};!function(){var e={a:Ns};function t(e,t){var s,i,r=e.exports;A.asm=r,s=A.asm.ka,Te.tlsInitFunctions.push(s),K=A.asm.ia,i=A.asm.ha,Z.unshift(i),b=t,Te.loadWasmModuleToAllWorkers((()=>ne()))}function s(e){t(e.instance,e.module)}function i(t){return(R||!y&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return he(ee)})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return he(ee)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){D("failed to asynchronously prepare wasm: "+e),ae(e)}))}if(oe(),A.instantiateWasm)try{return A.instantiateWasm(e,t)}catch(e){D("Module.instantiateWasm callback failed with error: "+e),c(e)}(R||"function"!=typeof WebAssembly.instantiateStreaming||le(ee)||"function"!=typeof fetch?i(s):fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return D("wasm streaming compile failed: "+e),D("falling back to ArrayBuffer instantiation"),i(s)}))}))).catch(c)}();var bs=function(){return(bs=A.asm.ja).apply(null,arguments)};A.__emscripten_tls_init=function(){return(A.__emscripten_tls_init=A.asm.ka).apply(null,arguments)};var Cs=A._pthread_self=function(){return(Cs=A._pthread_self=A.asm.la).apply(null,arguments)},Os=A.___getTypeName=function(){return(Os=A.___getTypeName=A.asm.ma).apply(null,arguments)};A.__embind_initialize_bindings=function(){return(A.__embind_initialize_bindings=A.asm.na).apply(null,arguments)};var Ss=A.__emscripten_thread_init=function(){return(Ss=A.__emscripten_thread_init=A.asm.oa).apply(null,arguments)};A.__emscripten_thread_crashed=function(){return(A.__emscripten_thread_crashed=A.asm.pa).apply(null,arguments)};var xs,ws=function(){return(ws=A.asm.qa).apply(null,arguments)},Bs=A.__emscripten_proxy_execute_task_queue=function(){return(Bs=A.__emscripten_proxy_execute_task_queue=A.asm.ra).apply(null,arguments)},Fs=function(){return(Fs=A.asm.sa).apply(null,arguments)},Ms=A.__emscripten_thread_exit=function(){return(Ms=A.__emscripten_thread_exit=A.asm.ta).apply(null,arguments)},Ls=function(){return(Ls=A.asm.ua).apply(null,arguments)},Us=function(){return(Us=A.asm.va).apply(null,arguments)},Hs=function(){return(Hs=A.asm.wa).apply(null,arguments)},Gs=function(){return(Gs=A.asm.xa).apply(null,arguments)},ks=function(){return(ks=A.asm.ya).apply(null,arguments)},Vs=function(){return(Vs=A.asm.za).apply(null,arguments)};function js(){if(!(ie>0)){if(v)return h(A),$(),void startWorker(A);!function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)e=A.preRun.shift(),X.unshift(e);var e;_e(X)}(),ie>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e())}function e(){xs||(xs=!0,A.calledRun=!0,S||($(),h(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(!v){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)e=A.postRun.shift(),q.unshift(e);var e;_e(q)}}()))}}if(A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.Aa).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.Ba).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.Ca).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.Da).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.Ea).apply(null,arguments)},A.keepRuntimeAlive=J,A.wasmMemory=N,A.ExitStatus=ce,A.PThread=Te,re=function e(){xs||js(),xs||(re=e)},A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return js(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),ug=cg({"dist/web-ifc.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,i,r=void 0!==e?e:{};r.ready=new Promise((function(e,s){t=e,i=s}));var o,n,a=Object.assign({},r),l="./this.program",h="";"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),s&&(h=s),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},n=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)};var c,A,u=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments,r.thisProgram&&(l=r.thisProgram),r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var d=!1;function f(e,t){e||V(t)}var E,m,y,g,I,v,T,_,R,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&P)return P.decode(e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function N(e,t){return(e>>>=0)?D(m,e,t):""}function b(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function C(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function O(){var e=A.buffer;r.HEAP8=E=new Int8Array(e),r.HEAP16=y=new Int16Array(e),r.HEAP32=I=new Int32Array(e),r.HEAPU8=m=new Uint8Array(e),r.HEAPU16=g=new Uint16Array(e),r.HEAPU32=v=new Uint32Array(e),r.HEAPF32=T=new Float32Array(e),r.HEAPF64=_=new Float64Array(e)}var S,x,w,B,F=[],M=[],L=[],U=0,H=null;function G(e){U++,r.monitorRunDependencies&&r.monitorRunDependencies(U)}function k(e){if(U--,r.monitorRunDependencies&&r.monitorRunDependencies(U),0==U&&H){var t=H;H=null,t()}}function V(e){r.onAbort&&r.onAbort(e),p(e="Aborted("+e+")"),d=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}function j(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){try{if(e==S&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function W(e){for(;e.length>0;)e.shift()(r)}function z(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){v[this.ptr+4>>>2]=e},this.get_type=function(){return v[this.ptr+4>>>2]},this.set_destructor=function(e){v[this.ptr+8>>>2]=e},this.get_destructor=function(){return v[this.ptr+8>>>2]},this.set_refcount=function(e){I[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=I[this.ptr>>>2];I[this.ptr>>>2]=e+1},this.release_ref=function(){var e=I[this.ptr>>>2];return I[this.ptr>>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){v[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return v[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Kt(this.get_type()))return v[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}j(S="web-ifc.wasm")||(x=S,S=r.locateFile?r.locateFile(x,h):h+x);var K={};function Y(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function X(e){return this.fromWireType(I[e>>>2])}var Z={},q={},J={};function $(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function ee(e,t){return e=$(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function te(e,t){var s=ee(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var se=void 0;function ie(e){throw new se(e)}function re(e,t,s){function i(t){var i=s(t);i.length!==e.length&&ie("Mismatched type converter count");for(var r=0;r{q.hasOwnProperty(e)?r[t]=q[e]:(o.push(e),Z.hasOwnProperty(e)||(Z[e]=[]),Z[e].push((()=>{r[t]=q[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var oe={};function ne(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ae=void 0;function le(e){for(var t="",s=e;m[s>>>0];)t+=ae[m[s++>>>0]];return t}var he=void 0;function ce(e){throw new he(e)}function Ae(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ce('type "'+i+'" must have a positive integer typeid pointer'),q.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ce("Cannot register type '"+i+"' twice")}if(q[e]=t,delete J[e],Z.hasOwnProperty(e)){var r=Z[e];delete Z[e],r.forEach((e=>e()))}}function ue(e){if(!(this instanceof Fe))return!1;if(!(e instanceof Fe))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function pe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function de(e){ce(e.$$.ptrType.registeredClass.name+" instance already deleted")}var fe=!1;function Ee(e){}function me(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function ye(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=ye(e,t,s.baseClass);return null===i?null:s.downcast(i)}var ge={};function Ie(){return Object.keys(De).length}function ve(){var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e}var Te=[];function _e(){for(;Te.length;){var e=Te.pop();e.$$.deleteScheduled=!1,e.delete()}}var Re=void 0;function Pe(e){Re=e,Te.length&&Re&&Re(_e)}var De={};function Ne(e,t){return t=function(e,t){for(void 0===t&&ce("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),De[t]}function be(e,t){return t.ptrType&&t.ptr||ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Oe(Object.create(e,{$$:{value:t}}))}function Ce(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=Ne(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?be(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):be(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=ge[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=ye(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function Oe(e){return"undefined"==typeof FinalizationRegistry?(Oe=e=>e,e):(fe=new FinalizationRegistry((e=>{me(e.$$)})),Ee=e=>fe.unregister(e),(Oe=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};fe.register(e,s,e)}return e})(e))}function Se(){if(this.$$.ptr||de(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Oe(Object.create(Object.getPrototypeOf(this),{$$:{value:pe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function xe(){this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Ee(this),me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function we(){return!this.$$.ptr}function Be(){return this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Te.push(this),1===Te.length&&Re&&Re(_e),this.$$.deleteScheduled=!0,this}function Fe(){}function Me(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ce("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function Le(e,t,s){r.hasOwnProperty(e)?((void 0===s||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[s])&&ce("Cannot register public name '"+e+"' twice"),Me(r,e,e),r.hasOwnProperty(s)&&ce("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),r[e].overloadTable[s]=t):(r[e]=t,void 0!==s&&(r[e].numArguments=s))}function Ue(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function He(e,t,s){for(;t!==s;)t.upcast||ce("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Ge(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function ke(e,t){var s;if(null===t)return this.isReference&&ce("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=He(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,lt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ce("Unsupporting sharing policy")}return s}function Ve(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function je(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Qe(e){this.rawDestructor&&this.rawDestructor(e)}function We(e){null!==e&&e.delete()}function ze(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=ke:i?(this.toWireType=Ge,this.destructorFunction=null):(this.toWireType=Ve,this.destructorFunction=null)}function Ke(e,t,s){r.hasOwnProperty(e)||ie("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==s?r[e].overloadTable[s]=t:(r[e]=t,r[e].argCount=s)}var Ye=[];function Xe(e){var t=Ye[e];return t||(e>=Ye.length&&(Ye.length=e+1),Ye[e]=t=R.get(e)),t}function Ze(e,t,s){return e.includes("j")?function(e,t,s){var i=r["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):Xe(t).apply(null,s)}function qe(e,t){var s,i,r,o=(e=le(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ze(s,i,r)}):Xe(t);return"function"!=typeof o&&ce("unknown function pointer with signature "+e+": "+t),o}var Je=void 0;function $e(e){var t=Qt(e),s=le(t);return zt(t),s}function et(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||q[t]||(J[t]?J[t].forEach(e):(s.push(t),i[t]=!0))})),new Je(e+": "+s.map($e).join([", "]))}function tt(e,t){for(var s=[],i=0;i>>2]);return s}function st(e,t,s,i,r){var o=t.length;o<2&&ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--rt[e].refcount&&(rt[e]=void 0,it.push(e))}function nt(){for(var e=0,t=5;t(e||ce("Cannot use deleted val. handle = "+e),rt[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=it.length?it.pop():rt.length;return rt[t]={refcount:1,value:e},t}}};function ht(e,t,s){switch(t){case 0:return function(e){var t=s?E:m;return this.fromWireType(t[e>>>0])};case 1:return function(e){var t=s?y:g;return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=s?I:v;return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e,t){var s=q[e];return void 0===s&&ce(t+" has unknown type "+$e(e)),s}function At(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function ut(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>>2])};case 3:return function(e){return this.fromWireType(_[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function pt(e,t,s){switch(t){case 0:return s?function(e){return E[e>>>0]}:function(e){return m[e>>>0]};case 1:return s?function(e){return y[e>>>1]}:function(e){return g[e>>>1]};case 2:return s?function(e){return I[e>>>2]}:function(e){return v[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var dt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ft(e,t){for(var s=e,i=s>>1,r=i+t/2;!(i>=r)&&g[i>>>0];)++i;if((s=i<<1)-e>32&&dt)return dt.decode(m.subarray(e>>>0,s>>>0));for(var o="",n=0;!(n>=t/2);++n){var a=y[e+2*n>>>1];if(0==a)break;o+=String.fromCharCode(a)}return o}function Et(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,r=(s-=2)<2*e.length?s/2:e.length,o=0;o>>1]=n,t+=2}return y[t>>>1]=0,t-i}function mt(e){return 2*e.length}function yt(e,t){for(var s=0,i="";!(s>=t/4);){var r=I[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function gt(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++o)),I[t>>>2]=n,(t+=4)+4>r)break}return I[t>>>2]=0,t-i}function It(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}var vt={};function Tt(e){var t=vt[e];return void 0===t?le(e):t}function _t(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Rt(e){var t=A.buffer;try{return A.grow(e-t.byteLength+65535>>>16),O(),1}catch(e){}}var Pt={};function Dt(){if(!Dt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in Pt)void 0===Pt[t]?delete e[t]:e[t]=Pt[t];var s=[];for(var t in e)s.push(t+"="+e[t]);Dt.strings=s}return Dt.strings}var Nt={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=Nt.isAbs(e),s="/"===e.substr(-1);return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Nt.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Nt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Nt.normalize(e.join("/"))},join2:(e,t)=>Nt.normalize(e+"/"+t)},bt={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:wt.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=Nt.isAbs(i)}return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=bt.resolve(e).substr(1),t=bt.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:C(e)+1,r=new Array(i),o=b(e,r,0,r.length);return t&&(r.length=o),r}var Ot={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){Ot.ttys[e]={input:[],output:[],ops:t},wt.registerDevice(e,Ot.stream_ops)},stream_ops:{open:function(e){var t=Ot.ttys[e.node.rdev];if(!t)throw new wt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new wt.ErrnoError(60);for(var o=0,n=0;n0&&(u(D(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(D(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(p(D(e.output,0)),e.output=[])}}};function St(e){V()}var xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(wt.isBlkdev(s)||wt.isFIFO(s))throw new wt.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:wt.chrdev_stream_ops}});var r=wt.createNode(e,t,s,i);return wt.isDir(r.mode)?(r.node_ops=xt.ops_table.dir.node,r.stream_ops=xt.ops_table.dir.stream,r.contents={}):wt.isFile(r.mode)?(r.node_ops=xt.ops_table.file.node,r.stream_ops=xt.ops_table.file.stream,r.usedBytes=0,r.contents=null):wt.isLink(r.mode)?(r.node_ops=xt.ops_table.link.node,r.stream_ops=xt.ops_table.link.stream):wt.isChrdev(r.mode)&&(r.node_ops=xt.ops_table.chrdev.node,r.stream_ops=xt.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=wt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,wt.isDir(e.mode)?t.size=4096:wt.isFile(e.mode)?t.size=e.usedBytes:wt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&xt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw wt.genericErrors[44]},mknod:function(e,t,s,i){return xt.createNode(e,t,s,i)},rename:function(e,t,s){if(wt.isDir(e.mode)){var i;try{i=wt.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new wt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=wt.lookupNode(e,t);for(var i in s.contents)throw new wt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=xt.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!wt.isLink(e.mode))throw new wt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||s+t>>=0,E.set(a,o>>>0)}else n=!1,o=a.byteOffset;return{ptr:o,allocated:n}},msync:function(e,t,s,i,r){return xt.stream_ops.write(e,t,0,i,s,!1),0}}},wt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=bt.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new wt.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=wt.root,r="/",o=0;o40)throw new wt.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(wt.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%wt.nameTable.length},hashAddNode:e=>{var t=wt.hashName(e.parent.id,e.name);e.name_next=wt.nameTable[t],wt.nameTable[t]=e},hashRemoveNode:e=>{var t=wt.hashName(e.parent.id,e.name);if(wt.nameTable[t]===e)wt.nameTable[t]=e.name_next;else for(var s=wt.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=wt.mayLookup(e);if(s)throw new wt.ErrnoError(s,e);for(var i=wt.hashName(e.id,t),r=wt.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return wt.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new wt.FSNode(e,t,s,i);return wt.hashAddNode(r),r},destroyNode:e=>{wt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=wt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>wt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=wt.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return wt.lookupNode(e,t),20}catch(e){}return wt.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=wt.lookupNode(e,t)}catch(e){return e.errno}var r=wt.nodePermissions(e,"wx");if(r)return r;if(s){if(!wt.isDir(i.mode))return 54;if(wt.isRoot(i)||wt.getPath(i)===wt.cwd())return 10}else if(wt.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?wt.isLink(e.mode)?32:wt.isDir(e.mode)&&("r"!==wt.flagsToPermissionString(t)||512&t)?31:wt.nodePermissions(e,wt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=wt.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!wt.streams[s])return s;throw new wt.ErrnoError(33)},getStream:e=>wt.streams[e],createStream:(e,t,s)=>{wt.FSStream||(wt.FSStream=function(){this.shared={}},wt.FSStream.prototype={},Object.defineProperties(wt.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new wt.FSStream,e);var i=wt.nextfd(t,s);return e.fd=i,wt.streams[i]=e,e},closeStream:e=>{wt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=wt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new wt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{wt.devices[e]={stream_ops:t}},getDevice:e=>wt.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),wt.syncFSRequests++,wt.syncFSRequests>1&&p("warning: "+wt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=wt.getMounts(wt.root.mount),i=0;function r(e){return wt.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&wt.root)throw new wt.ErrnoError(10);if(!r&&!o){var n=wt.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,wt.isMountpoint(i))throw new wt.ErrnoError(10);if(!wt.isDir(i.mode))throw new wt.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?wt.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=wt.lookupPath(e,{follow_mount:!1});if(!wt.isMountpoint(t.node))throw new wt.ErrnoError(28);var s=t.node,i=s.mounted,r=wt.getMounts(i);Object.keys(wt.nameTable).forEach((e=>{for(var t=wt.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&wt.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=wt.lookupPath(e,{parent:!0}).node,r=Nt.basename(e);if(!r||"."===r||".."===r)throw new wt.ErrnoError(28);var o=wt.mayCreate(i,r);if(o)throw new wt.ErrnoError(o);if(!i.node_ops.mknod)throw new wt.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,wt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,wt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,wt.mknod(e,t,s)),symlink:(e,t)=>{if(!bt.resolve(e))throw new wt.ErrnoError(44);var s=wt.lookupPath(t,{parent:!0}).node;if(!s)throw new wt.ErrnoError(44);var i=Nt.basename(t),r=wt.mayCreate(s,i);if(r)throw new wt.ErrnoError(r);if(!s.node_ops.symlink)throw new wt.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=Nt.dirname(e),o=Nt.dirname(t),n=Nt.basename(e),a=Nt.basename(t);if(s=wt.lookupPath(e,{parent:!0}).node,i=wt.lookupPath(t,{parent:!0}).node,!s||!i)throw new wt.ErrnoError(44);if(s.mount!==i.mount)throw new wt.ErrnoError(75);var l,h=wt.lookupNode(s,n),c=bt.relative(e,o);if("."!==c.charAt(0))throw new wt.ErrnoError(28);if("."!==(c=bt.relative(t,r)).charAt(0))throw new wt.ErrnoError(55);try{l=wt.lookupNode(i,a)}catch(e){}if(h!==l){var A=wt.isDir(h.mode),u=wt.mayDelete(s,n,A);if(u)throw new wt.ErrnoError(u);if(u=l?wt.mayDelete(i,a,A):wt.mayCreate(i,a))throw new wt.ErrnoError(u);if(!s.node_ops.rename)throw new wt.ErrnoError(63);if(wt.isMountpoint(h)||l&&wt.isMountpoint(l))throw new wt.ErrnoError(10);if(i!==s&&(u=wt.nodePermissions(s,"w")))throw new wt.ErrnoError(u);wt.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{wt.hashAddNode(h)}}},rmdir:e=>{var t=wt.lookupPath(e,{parent:!0}).node,s=Nt.basename(e),i=wt.lookupNode(t,s),r=wt.mayDelete(t,s,!0);if(r)throw new wt.ErrnoError(r);if(!t.node_ops.rmdir)throw new wt.ErrnoError(63);if(wt.isMountpoint(i))throw new wt.ErrnoError(10);t.node_ops.rmdir(t,s),wt.destroyNode(i)},readdir:e=>{var t=wt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new wt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=wt.lookupPath(e,{parent:!0}).node;if(!t)throw new wt.ErrnoError(44);var s=Nt.basename(e),i=wt.lookupNode(t,s),r=wt.mayDelete(t,s,!1);if(r)throw new wt.ErrnoError(r);if(!t.node_ops.unlink)throw new wt.ErrnoError(63);if(wt.isMountpoint(i))throw new wt.ErrnoError(10);t.node_ops.unlink(t,s),wt.destroyNode(i)},readlink:e=>{var t=wt.lookupPath(e).node;if(!t)throw new wt.ErrnoError(44);if(!t.node_ops.readlink)throw new wt.ErrnoError(28);return bt.resolve(wt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=wt.lookupPath(e,{follow:!t}).node;if(!s)throw new wt.ErrnoError(44);if(!s.node_ops.getattr)throw new wt.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>wt.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?wt.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{wt.chmod(e,t,!0)},fchmod:(e,t)=>{var s=wt.getStream(e);if(!s)throw new wt.ErrnoError(8);wt.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?wt.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{wt.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=wt.getStream(e);if(!i)throw new wt.ErrnoError(8);wt.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new wt.ErrnoError(28);var s;if(!(s="string"==typeof e?wt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);if(wt.isDir(s.mode))throw new wt.ErrnoError(31);if(!wt.isFile(s.mode))throw new wt.ErrnoError(28);var i=wt.nodePermissions(s,"w");if(i)throw new wt.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=wt.getStream(e);if(!s)throw new wt.ErrnoError(8);if(0==(2097155&s.flags))throw new wt.ErrnoError(28);wt.truncate(s.node,t)},utime:(e,t,s)=>{var i=wt.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new wt.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?wt.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=Nt.normalize(e);try{i=wt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new wt.ErrnoError(20)}else i=wt.mknod(e,s,0),o=!0;if(!i)throw new wt.ErrnoError(44);if(wt.isChrdev(i.mode)&&(t&=-513),65536&t&&!wt.isDir(i.mode))throw new wt.ErrnoError(54);if(!o){var n=wt.mayOpen(i,t);if(n)throw new wt.ErrnoError(n)}512&t&&!o&&wt.truncate(i,0),t&=-131713;var a=wt.createStream({node:i,path:wt.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!r.logReadFiles||1&t||(wt.readFiles||(wt.readFiles={}),e in wt.readFiles||(wt.readFiles[e]=1)),a},close:e=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{wt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new wt.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new wt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new wt.ErrnoError(28);if(wt.isClosed(e))throw new wt.ErrnoError(8);if(1==(2097155&e.flags))throw new wt.ErrnoError(8);if(wt.isDir(e.node.mode))throw new wt.ErrnoError(31);if(!e.stream_ops.read)throw new wt.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new wt.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new wt.ErrnoError(28);if(wt.isClosed(e))throw new wt.ErrnoError(8);if(0==(2097155&e.flags))throw new wt.ErrnoError(8);if(wt.isDir(e.node.mode))throw new wt.ErrnoError(31);if(!e.stream_ops.write)throw new wt.ErrnoError(28);e.seekable&&1024&e.flags&&wt.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new wt.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);if(t<0||s<=0)throw new wt.ErrnoError(28);if(0==(2097155&e.flags))throw new wt.ErrnoError(8);if(!wt.isFile(e.node.mode)&&!wt.isDir(e.node.mode))throw new wt.ErrnoError(43);if(!e.stream_ops.allocate)throw new wt.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new wt.ErrnoError(2);if(1==(2097155&e.flags))throw new wt.ErrnoError(2);if(!e.stream_ops.mmap)throw new wt.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new wt.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=wt.open(e,t.flags),r=wt.stat(e).size,o=new Uint8Array(r);return wt.read(i,o,0,r,0),"utf8"===t.encoding?s=D(o,0):"binary"===t.encoding&&(s=o),wt.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=wt.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(C(t)+1),o=b(t,r,0,r.length);wt.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");wt.write(i,t,0,t.byteLength,void 0,s.canOwn)}wt.close(i)},cwd:()=>wt.currentPath,chdir:e=>{var t=wt.lookupPath(e,{follow:!0});if(null===t.node)throw new wt.ErrnoError(44);if(!wt.isDir(t.node.mode))throw new wt.ErrnoError(54);var s=wt.nodePermissions(t.node,"x");if(s)throw new wt.ErrnoError(s);wt.currentPath=t.path},createDefaultDirectories:()=>{wt.mkdir("/tmp"),wt.mkdir("/home"),wt.mkdir("/home/web_user")},createDefaultDevices:()=>{wt.mkdir("/dev"),wt.registerDevice(wt.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),wt.mkdev("/dev/null",wt.makedev(1,3)),Ot.register(wt.makedev(5,0),Ot.default_tty_ops),Ot.register(wt.makedev(6,0),Ot.default_tty1_ops),wt.mkdev("/dev/tty",wt.makedev(5,0)),wt.mkdev("/dev/tty1",wt.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>V("randomDevice")}();wt.createDevice("/dev","random",e),wt.createDevice("/dev","urandom",e),wt.mkdir("/dev/shm"),wt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{wt.mkdir("/proc");var e=wt.mkdir("/proc/self");wt.mkdir("/proc/self/fd"),wt.mount({mount:()=>{var t=wt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=wt.getStream(s);if(!i)throw new wt.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?wt.createDevice("/dev","stdin",r.stdin):wt.symlink("/dev/tty","/dev/stdin"),r.stdout?wt.createDevice("/dev","stdout",null,r.stdout):wt.symlink("/dev/tty","/dev/stdout"),r.stderr?wt.createDevice("/dev","stderr",null,r.stderr):wt.symlink("/dev/tty1","/dev/stderr"),wt.open("/dev/stdin",0),wt.open("/dev/stdout",1),wt.open("/dev/stderr",1)},ensureErrnoError:()=>{wt.ErrnoError||(wt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},wt.ErrnoError.prototype=new Error,wt.ErrnoError.prototype.constructor=wt.ErrnoError,[44].forEach((e=>{wt.genericErrors[e]=new wt.ErrnoError(e),wt.genericErrors[e].stack=""})))},staticInit:()=>{wt.ensureErrnoError(),wt.nameTable=new Array(4096),wt.mount(xt,{},"/"),wt.createDefaultDirectories(),wt.createDefaultDevices(),wt.createSpecialDirectories(),wt.filesystems={MEMFS:xt}},init:(e,t,s)=>{wt.init.initialized=!0,wt.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=s||r.stderr,wt.createStandardStreams()},quit:()=>{wt.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=wt.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=wt.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=wt.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=Nt.basename(e),i=wt.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:wt.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=Nt.join2(e,o);try{wt.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=Nt.join2("string"==typeof e?e:wt.getPath(e),t),n=wt.getMode(i,r);return wt.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:wt.getPath(e),n=t?Nt.join2(e,t):e);var a=wt.getMode(i,r),l=wt.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=Nt.join2("string"==typeof e?e:wt.getPath(e),t),o=wt.getMode(!!s,!!i);wt.createDevice.major||(wt.createDevice.major=64);var n=wt.makedev(wt.createDevice.major++,0);return wt.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ct(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new wt.ErrnoError(29)}},createLazyFile:(e,t,s,i,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",s,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+s+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=i);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",s,!1),i!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+s+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Ct(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&i||(n=i=1,i=this.getter(0).length,n=i,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n={isDevice:!1,url:s},a=wt.createFile(e,t,n,i,r);n.contents?a.contents=n.contents:n.url&&(a.contents=null,a.url=n.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function h(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=a.stream_ops[e];l[e]=function(){return wt.forceLoadFile(a),t.apply(null,arguments)}})),l.read=(e,t,s,i,r)=>(wt.forceLoadFile(a),h(e,t,s,i,r)),l.mmap=(e,t,s,i,r)=>{wt.forceLoadFile(a);var o=St();if(!o)throw new wt.ErrnoError(48);return h(e,E,o,t,s),{ptr:o,allocated:!0}},a.stream_ops=l,a},createPreloadedFile:(e,t,s,i,r,o,a,l,h,c)=>{var A=t?bt.resolve(Nt.join2(e,t)):e;function u(s){function n(s){c&&c(),l||wt.createDataFile(e,t,s,i,r,h),o&&o(),k()}Browser.handledByPreloadPlugin(s,A,n,(()=>{a&&a(),k()}))||n(s)}G(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;n(e,(s=>{f(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&k()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&G()}(s,(e=>u(e)),a):u(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=wt.indexedDB();try{var r=i.open(wt.DB_NAME(),wt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{u("creating db"),r.result.createObjectStore(wt.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([wt.DB_STORE_NAME],"readwrite"),o=i.objectStore(wt.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(wt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=wt.indexedDB();try{var r=i.open(wt.DB_NAME(),wt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([wt.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(wt.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{wt.analyzePath(e).exists&&wt.unlink(e),wt.createDataFile(Nt.dirname(e),Nt.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},Bt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(Nt.isAbs(t))return t;var i;if(i=-100===e?wt.cwd():Bt.getStreamFromFD(e).path,0==t.length){if(!s)throw new wt.ErrnoError(44);return i}return Nt.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&Nt.normalize(t)!==Nt.normalize(wt.getPath(e.node)))return-54;throw e}I[s>>>2]=i.dev,I[s+8>>>2]=i.ino,I[s+12>>>2]=i.mode,v[s+16>>>2]=i.nlink,I[s+20>>>2]=i.uid,I[s+24>>>2]=i.gid,I[s+28>>>2]=i.rdev,B=[i.size>>>0,(w=i.size,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+40>>>2]=B[0],I[s+44>>>2]=B[1],I[s+48>>>2]=4096,I[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),n=i.ctime.getTime();return B=[Math.floor(r/1e3)>>>0,(w=Math.floor(r/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+56>>>2]=B[0],I[s+60>>>2]=B[1],v[s+64>>>2]=r%1e3*1e3,B=[Math.floor(o/1e3)>>>0,(w=Math.floor(o/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+72>>>2]=B[0],I[s+76>>>2]=B[1],v[s+80>>>2]=o%1e3*1e3,B=[Math.floor(n/1e3)>>>0,(w=Math.floor(n/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+88>>>2]=B[0],I[s+92>>>2]=B[1],v[s+96>>>2]=n%1e3*1e3,B=[i.ino>>>0,(w=i.ino,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+104>>>2]=B[0],I[s+108>>>2]=B[1],0},doMsync:function(e,t,s,i,r){if(!wt.isFile(t.node.mode))throw new wt.ErrnoError(43);if(2&i)return 0;e>>>=0;var o=m.slice(e,e+s);wt.msync(t,o,r,s,i)},varargs:void 0,get:function(){return Bt.varargs+=4,I[Bt.varargs-4>>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=wt.getStream(e);if(!t)throw new wt.ErrnoError(8);return t}};function Ft(e){return e%4==0&&(e%100!=0||e%400==0)}var Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Lt=[31,28,31,30,31,30,31,31,30,31,30,31];function Ut(e,t,s,i){var r=I[i+40>>>2],o={tm_sec:I[i>>>2],tm_min:I[i+4>>>2],tm_hour:I[i+8>>>2],tm_mday:I[i+12>>>2],tm_mon:I[i+16>>>2],tm_year:I[i+20>>>2],tm_wday:I[i+24>>>2],tm_yday:I[i+28>>>2],tm_isdst:I[i+32>>>2],tm_gmtoff:I[i+36>>>2],tm_zone:r?N(r):""},n=N(s),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in a)n=n.replace(new RegExp(l,"g"),a[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function A(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function f(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=Ft(s.getFullYear()),r=s.getMonth(),o=(i?Mt:Lt)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=d(s),o=d(i);return p(r,t)<=0?p(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return h[e.tm_wday].substring(0,3)},"%A":function(e){return h[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return u((e.tm_year+1900)/100|0,2)},"%d":function(e){return u(e.tm_mday,2)},"%e":function(e){return A(e.tm_mday,2," ")},"%g":function(e){return f(e).toString().substring(2)},"%G":function(e){return f(e)},"%H":function(e){return u(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),u(t,2)},"%j":function(e){return u(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(Ft(e.tm_year+1900)?Mt:Lt,e.tm_mon-1),3)},"%m":function(e){return u(e.tm_mon+1,2)},"%M":function(e){return u(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return u(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return u(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&Ft(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Ft(e.tm_year%400-1))&&t++}return u(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return u(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in n=n.replace(/%%/g,"\0\0"),m)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),m[l](o)));var y,g,v=Ct(n=n.replace(/\0\0/g,"%"),!1);return v.length>t?0:(y=v,g=e,E.set(y,g>>>0),v.length-1)}se=r.InternalError=te(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ae=e}(),he=r.BindingError=te(Error,"BindingError"),Fe.prototype.isAliasOf=ue,Fe.prototype.clone=Se,Fe.prototype.delete=xe,Fe.prototype.isDeleted=we,Fe.prototype.deleteLater=Be,r.getInheritedInstanceCount=Ie,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=_e,r.setDelayFunction=Pe,ze.prototype.getPointee=je,ze.prototype.destructor=Qe,ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=X,ze.prototype.deleteObject=We,ze.prototype.fromWireType=Ce,Je=r.UnboundTypeError=te(Error,"UnboundTypeError"),r.count_emval_handles=nt,r.get_first_emval=at;var Ht=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=wt.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Gt=365,kt=146;Object.defineProperties(Ht.prototype,{read:{get:function(){return(this.mode&Gt)===Gt},set:function(e){e?this.mode|=Gt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(e){e?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return wt.isDir(this.mode)}},isDevice:{get:function(){return wt.isChrdev(this.mode)}}}),wt.FSNode=Ht,wt.staticInit();var Vt={f:function(e,t,s){throw new z(e).init(t,s),e},R:function(e){var t=K[e];delete K[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;re([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Y(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>o])},destructorFunction:null})},o:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=le(c),o=qe(r,o),a&&(a=qe(n,a)),h&&(h=qe(l,h)),u=qe(A,u);var p=$(c);Le(p,(function(){et("Cannot construct "+c+" due to unbound types",[i])})),re([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:Fe.prototype;var n=ee(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new he("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new he(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new he("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new Ue(c,n,l,u,s,o,a,h),d=new ze(c,A,!0,!1,!1),f=new ze(c+"*",A,!1,!1,!1),E=new ze(c+" const*",A,!1,!0,!1);return ge[e]={pointerType:f,constPointerType:E},Ke(p,n),[d,f,E]}))},n:function(e,t,s,i,r,o){f(t>0);var n=tt(t,s);r=qe(i,r),re([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new he("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{et("Cannot construct "+e.name+" due to unbound types",n)},re([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=st(s,i,null,r,o),[]})),[]}))},b:function(e,t,s,i,r,o,n,a){var l=tt(s,i);t=le(t),o=qe(r,o),re([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){et("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(Me(h,t,i),h[t].overloadTable[s-2]=r),re([],l,(function(r){var a=st(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},O:function(e,t){Ae(e,{name:t=le(t),fromWireType:function(e){var t=lt.toValue(e);return ot(e),t},toWireType:function(e,t){return lt.toHandle(t)},argPackAdvance:8,readValueFromPointer:X,destructorFunction:null})},B:function(e,t,s,i){var r=ne(s);function o(){}t=le(t),o.values={},Ae(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ht(t,r,i),destructorFunction:null}),Le(t,o)},s:function(e,t,s){var i=ct(e,"enum");t=le(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:ee(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},z:function(e,t,s){var i=ne(s);Ae(e,{name:t=le(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:ut(t,i),destructorFunction:null})},c:function(e,t,s,i,r,o){var n=tt(t,s);e=le(e),r=qe(i,r),Le(e,(function(){et("Cannot call "+e+" due to unbound types",n)}),t-1),re([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ke(e,st(e,i,null,r,o),t-1),[]}))},r:function(e,t,s,i,r){t=le(t);var o=ne(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ae(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:pt(t,o,0!==i),destructorFunction:null})},h:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=v,s=t[(e>>=2)>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ae(e,{name:s=le(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},A:function(e,t){var s="std::string"===(t=le(t));Ae(e,{name:t,fromWireType:function(e){var t,i=v[e>>>2],r=e+4;if(s)for(var o=r,n=0;n<=i;++n){var a=r+n;if(n==i||0==m[a>>>0]){var l=N(o,a-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=a+1}}else{var h=new Array(i);for(n=0;n>>0]);t=h.join("")}return zt(e),t},toWireType:function(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ce("Cannot pass non-string to std::string"),i=s&&r?C(t):t.length;var o=jt(4+i+1),n=o+4;if(n>>>=0,v[o>>>2]=i,s&&r)b(t,m,n,i+1);else if(r)for(var a=0;a255&&(zt(n),ce("String has UTF-16 code units that do not fit in 8 bits")),m[n+a>>>0]=l}else for(a=0;a>>0]=t[a];return null!==e&&e.push(zt,o),o},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},v:function(e,t,s){var i,r,o,n,a;s=le(s),2===t?(i=ft,r=Et,n=mt,o=()=>g,a=1):4===t&&(i=yt,r=gt,n=It,o=()=>v,a=2),Ae(e,{name:s,fromWireType:function(e){for(var s,r=v[e>>>2],n=o(),l=e+4,h=0;h<=r;++h){var c=e+4+h*t;if(h==r||0==n[c>>>a]){var A=i(l,c-l);void 0===s?s=A:(s+=String.fromCharCode(0),s+=A),l=c+t}}return zt(e),s},toWireType:function(e,i){"string"!=typeof i&&ce("Cannot pass non-string to C++ string type "+s);var o=n(i),l=jt(4+o+t);return v[(l>>>=0)>>>2]=o>>a,r(i,l+4,o+t),null!==e&&e.push(zt,l),l},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},S:function(e,t,s,i,r,o){K[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),elements:[]}},i:function(e,t,s,i,r,o,n,a,l){K[e].elements.push({getterReturnType:t,getter:qe(s,i),getterContext:r,setterArgumentType:o,setter:qe(n,a),setterContext:l})},q:function(e,t,s,i,r,o){oe[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),fields:[]}},e:function(e,t,s,i,r,o,n,a,l,h){oe[e].fields.push({fieldName:le(t),getterReturnType:s,getter:qe(i,r),getterContext:o,setterArgumentType:n,setter:qe(a,l),setterContext:h})},Q:function(e,t){Ae(e,{isVoid:!0,name:t=le(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,s){e=lt.toValue(e),t=ct(t,"emval::as");var i=[],r=lt.toHandle(i);return v[s>>>2]=r,t.toWireType(i,e)},x:function(e,t,s,i){e=lt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(rt[e].refcount+=1)},U:function(e,t){return(e=lt.toValue(e))instanceof(t=lt.toValue(t))},w:function(e){return"number"==typeof(e=lt.toValue(e))},C:function(e){return"string"==typeof(e=lt.toValue(e))},T:function(){return lt.toHandle([])},g:function(e){return lt.toHandle(Tt(e))},u:function(){return lt.toHandle({})},l:function(e){Y(lt.toValue(e)),ot(e)},j:function(e,t,s){e=lt.toValue(e),t=lt.toValue(t),s=lt.toValue(s),e[t]=s},d:function(e,t){var s=(e=ct(e,"_emval_take_value")).readValueFromPointer(t);return lt.toHandle(s)},y:function(){V("")},N:function(e,t,s){m.copyWithin(e>>>0,t>>>0,t+s>>>0)},L:function(e){var t,s,i=m.length,r=4294901760;if((e>>>=0)>r)return!1;for(var o=1;o<=4;o*=2){var n=i*(1+.2/o);if(n=Math.min(n,e+100663296),Rt(Math.min(r,(t=Math.max(e,n))+((s=65536)-t%s)%s)))return!0}return!1},H:function(e,t){var s=0;return Dt().forEach((function(i,r){var o=t+s;v[e+4*r>>>2]=o,function(e,t,s){for(var i=0;i>>0]=e.charCodeAt(i);s||(E[t>>>0]=0)}(i,o),s+=i.length+1})),0},I:function(e,t){var s=Dt();v[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),v[t>>>2]=i,0},J:function(e){try{var t=Bt.getStreamFromFD(e);return wt.close(t),0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},K:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=wt.read(e,E,n,a,i);if(l<0)return-1;if(r+=l,l>>2]=r,0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},E:function(e,t,s,i,r){try{var o=(l=s)+2097152>>>0<4194305-!!(a=t)?(a>>>0)+4294967296*l:NaN;if(isNaN(o))return 61;var n=Bt.getStreamFromFD(e);return wt.llseek(n,o,i),B=[n.position>>>0,(w=n.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[r>>>2]=B[0],I[r+4>>>2]=B[1],n.getdents&&0===o&&0===i&&(n.getdents=null),0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}var a,l},M:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=wt.write(e,E,n,a,i);if(l<0)return-1;r+=l,void 0!==i&&(i+=l)}return r}(Bt.getStreamFromFD(e),t,s);return v[i>>>2]=r,0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},G:function(e,t,s,i,r){return Ut(e,t,s,i)}};!function(){var e={a:Vt};function t(e,t){var s,i=e.exports;r.asm=i,A=r.asm.V,O(),R=r.asm.X,s=r.asm.W,M.unshift(s),k()}function s(e){t(e.instance)}function o(t){return(c||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(S)})):fetch(S,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()})).catch((function(){return Q(S)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),V(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){p("Module.instantiateWasm callback failed with error: "+e),i(e)}(c||"function"!=typeof WebAssembly.instantiateStreaming||j(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(i)}();var jt=function(){return(jt=r.asm.Y).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.Z).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm._).apply(null,arguments)};var Wt,zt=function(){return(zt=r.asm.$).apply(null,arguments)},Kt=function(){return(Kt=r.asm.aa).apply(null,arguments)};function Yt(){function e(){Wt||(Wt=!0,r.calledRun=!0,d||(r.noFSInit||wt.init.initialized||wt.init(),wt.ignorePermissions=!1,W(M),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),L.unshift(e);var e;W(L)}()))}U>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),F.unshift(e);var e;W(F)}(),U>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}if(r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.ba).apply(null,arguments)},r.dynCall_viijii=function(){return(r.dynCall_viijii=r.asm.ca).apply(null,arguments)},r.dynCall_iiiiij=function(){return(r.dynCall_iiiiij=r.asm.da).apply(null,arguments)},r.dynCall_iiiiijj=function(){return(r.dynCall_iiiiijj=r.asm.ea).apply(null,arguments)},r.dynCall_iiiiiijj=function(){return(r.dynCall_iiiiiijj=r.asm.fa).apply(null,arguments)},H=function e(){Wt||Yt(),Wt||(H=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Yt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),pg=class{constructor(e){this.value=e,this.type=5}},dg=class{constructor(e){this.expressID=e,this.type=0}};if((rg=ig||(ig={})).IFC2X3="IFC2X3",rg.IFC4="IFC4",rg.IFC4X3="IFC4X3",function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDaylightSavingHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHourInDay=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMinuteInHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSecondInMinute=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},s.COMPLETION_G1={type:3,value:"COMPLETION_G1"},s.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},s.SNOW_S={type:3,value:"SNOW_S"},s.WIND_W={type:3,value:"WIND_W"},s.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},s.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},s.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},s.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},s.FIRE={type:3,value:"FIRE"},s.IMPULSE={type:3,value:"IMPULSE"},s.IMPACT={type:3,value:"IMPACT"},s.TRANSPORT={type:3,value:"TRANSPORT"},s.ERECTION={type:3,value:"ERECTION"},s.PROPPING={type:3,value:"PROPPING"},s.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},s.SHRINKAGE={type:3,value:"SHRINKAGE"},s.CREEP={type:3,value:"CREEP"},s.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},s.BUOYANCY={type:3,value:"BUOYANCY"},s.ICE={type:3,value:"ICE"},s.CURRENT={type:3,value:"CURRENT"},s.WAVE={type:3,value:"WAVE"},s.RAIN={type:3,value:"RAIN"},s.BRAKES={type:3,value:"BRAKES"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=s;class i{}i.PERMANENT_G={type:3,value:"PERMANENT_G"},i.VARIABLE_Q={type:3,value:"VARIABLE_Q"},i.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=i;class r{}r.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},r.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},r.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},r.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},r.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=r;class o{}o.OFFICE={type:3,value:"OFFICE"},o.SITE={type:3,value:"SITE"},o.HOME={type:3,value:"HOME"},o.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},o.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=o;class n{}n.AHEAD={type:3,value:"AHEAD"},n.BEHIND={type:3,value:"BEHIND"},e.IfcAheadOrBehind=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.GRILLE={type:3,value:"GRILLE"},l.REGISTER={type:3,value:"REGISTER"},l.DIFFUSER={type:3,value:"DIFFUSER"},l.EYEBALL={type:3,value:"EYEBALL"},l.IRIS={type:3,value:"IRIS"},l.LINEARGRILLE={type:3,value:"LINEARGRILLE"},l.LINEARDIFFUSER={type:3,value:"LINEARDIFFUSER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},f.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},f.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},f.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},f.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},f.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=f;class E{}E.BEAM={type:3,value:"BEAM"},E.JOIST={type:3,value:"JOIST"},E.LINTEL={type:3,value:"LINTEL"},E.T_BEAM={type:3,value:"T_BEAM"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=E;class m{}m.GREATERTHAN={type:3,value:"GREATERTHAN"},m.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},m.LESSTHAN={type:3,value:"LESSTHAN"},m.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},m.EQUALTO={type:3,value:"EQUALTO"},m.NOTEQUALTO={type:3,value:"NOTEQUALTO"},e.IfcBenchmarkEnum=m;class y{}y.WATER={type:3,value:"WATER"},y.STEAM={type:3,value:"STEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=y;class g{}g.UNION={type:3,value:"UNION"},g.INTERSECTION={type:3,value:"INTERSECTION"},g.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=g;class I{}I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=I;class v{}v.BEND={type:3,value:"BEND"},v.CROSS={type:3,value:"CROSS"},v.REDUCER={type:3,value:"REDUCER"},v.TEE={type:3,value:"TEE"},v.USERDEFINED={type:3,value:"USERDEFINED"},v.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=v;class T{}T.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},T.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},T.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},T.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=T;class _{}_.CABLESEGMENT={type:3,value:"CABLESEGMENT"},_.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=_;class R{}R.NOCHANGE={type:3,value:"NOCHANGE"},R.MODIFIED={type:3,value:"MODIFIED"},R.ADDED={type:3,value:"ADDED"},R.DELETED={type:3,value:"DELETED"},R.MODIFIEDADDED={type:3,value:"MODIFIEDADDED"},R.MODIFIEDDELETED={type:3,value:"MODIFIEDDELETED"},e.IfcChangeActionEnum=R;class P{}P.AIRCOOLED={type:3,value:"AIRCOOLED"},P.WATERCOOLED={type:3,value:"WATERCOOLED"},P.HEATRECOVERY={type:3,value:"HEATRECOVERY"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=P;class D{}D.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},D.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},D.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},D.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},D.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},D.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=D;class N{}N.COLUMN={type:3,value:"COLUMN"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=N;class b{}b.DYNAMIC={type:3,value:"DYNAMIC"},b.RECIPROCATING={type:3,value:"RECIPROCATING"},b.ROTARY={type:3,value:"ROTARY"},b.SCROLL={type:3,value:"SCROLL"},b.TROCHOIDAL={type:3,value:"TROCHOIDAL"},b.SINGLESTAGE={type:3,value:"SINGLESTAGE"},b.BOOSTER={type:3,value:"BOOSTER"},b.OPENTYPE={type:3,value:"OPENTYPE"},b.HERMETIC={type:3,value:"HERMETIC"},b.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},b.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},b.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},b.ROTARYVANE={type:3,value:"ROTARYVANE"},b.SINGLESCREW={type:3,value:"SINGLESCREW"},b.TWINSCREW={type:3,value:"TWINSCREW"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=b;class C{}C.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},C.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},C.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},C.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},C.AIRCOOLED={type:3,value:"AIRCOOLED"},C.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=C;class O{}O.ATPATH={type:3,value:"ATPATH"},O.ATSTART={type:3,value:"ATSTART"},O.ATEND={type:3,value:"ATEND"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=O;class S{}S.HARD={type:3,value:"HARD"},S.SOFT={type:3,value:"SOFT"},S.ADVISORY={type:3,value:"ADVISORY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=S;class x{}x.FLOATING={type:3,value:"FLOATING"},x.PROPORTIONAL={type:3,value:"PROPORTIONAL"},x.PROPORTIONALINTEGRAL={type:3,value:"PROPORTIONALINTEGRAL"},x.PROPORTIONALINTEGRALDERIVATIVE={type:3,value:"PROPORTIONALINTEGRALDERIVATIVE"},x.TIMEDTWOPOSITION={type:3,value:"TIMEDTWOPOSITION"},x.TWOPOSITION={type:3,value:"TWOPOSITION"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=x;class w{}w.ACTIVE={type:3,value:"ACTIVE"},w.PASSIVE={type:3,value:"PASSIVE"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=w;class B{}B.NATURALDRAFT={type:3,value:"NATURALDRAFT"},B.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},B.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=B;class F{}F.BUDGET={type:3,value:"BUDGET"},F.COSTPLAN={type:3,value:"COSTPLAN"},F.ESTIMATE={type:3,value:"ESTIMATE"},F.TENDER={type:3,value:"TENDER"},F.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},F.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},F.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=F;class M{}M.CEILING={type:3,value:"CEILING"},M.FLOORING={type:3,value:"FLOORING"},M.CLADDING={type:3,value:"CLADDING"},M.ROOFING={type:3,value:"ROOFING"},M.INSULATION={type:3,value:"INSULATION"},M.MEMBRANE={type:3,value:"MEMBRANE"},M.SLEEVING={type:3,value:"SLEEVING"},M.WRAPPING={type:3,value:"WRAPPING"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=M;class L{}L.AED={type:3,value:"AED"},L.AES={type:3,value:"AES"},L.ATS={type:3,value:"ATS"},L.AUD={type:3,value:"AUD"},L.BBD={type:3,value:"BBD"},L.BEG={type:3,value:"BEG"},L.BGL={type:3,value:"BGL"},L.BHD={type:3,value:"BHD"},L.BMD={type:3,value:"BMD"},L.BND={type:3,value:"BND"},L.BRL={type:3,value:"BRL"},L.BSD={type:3,value:"BSD"},L.BWP={type:3,value:"BWP"},L.BZD={type:3,value:"BZD"},L.CAD={type:3,value:"CAD"},L.CBD={type:3,value:"CBD"},L.CHF={type:3,value:"CHF"},L.CLP={type:3,value:"CLP"},L.CNY={type:3,value:"CNY"},L.CYS={type:3,value:"CYS"},L.CZK={type:3,value:"CZK"},L.DDP={type:3,value:"DDP"},L.DEM={type:3,value:"DEM"},L.DKK={type:3,value:"DKK"},L.EGL={type:3,value:"EGL"},L.EST={type:3,value:"EST"},L.EUR={type:3,value:"EUR"},L.FAK={type:3,value:"FAK"},L.FIM={type:3,value:"FIM"},L.FJD={type:3,value:"FJD"},L.FKP={type:3,value:"FKP"},L.FRF={type:3,value:"FRF"},L.GBP={type:3,value:"GBP"},L.GIP={type:3,value:"GIP"},L.GMD={type:3,value:"GMD"},L.GRX={type:3,value:"GRX"},L.HKD={type:3,value:"HKD"},L.HUF={type:3,value:"HUF"},L.ICK={type:3,value:"ICK"},L.IDR={type:3,value:"IDR"},L.ILS={type:3,value:"ILS"},L.INR={type:3,value:"INR"},L.IRP={type:3,value:"IRP"},L.ITL={type:3,value:"ITL"},L.JMD={type:3,value:"JMD"},L.JOD={type:3,value:"JOD"},L.JPY={type:3,value:"JPY"},L.KES={type:3,value:"KES"},L.KRW={type:3,value:"KRW"},L.KWD={type:3,value:"KWD"},L.KYD={type:3,value:"KYD"},L.LKR={type:3,value:"LKR"},L.LUF={type:3,value:"LUF"},L.MTL={type:3,value:"MTL"},L.MUR={type:3,value:"MUR"},L.MXN={type:3,value:"MXN"},L.MYR={type:3,value:"MYR"},L.NLG={type:3,value:"NLG"},L.NZD={type:3,value:"NZD"},L.OMR={type:3,value:"OMR"},L.PGK={type:3,value:"PGK"},L.PHP={type:3,value:"PHP"},L.PKR={type:3,value:"PKR"},L.PLN={type:3,value:"PLN"},L.PTN={type:3,value:"PTN"},L.QAR={type:3,value:"QAR"},L.RUR={type:3,value:"RUR"},L.SAR={type:3,value:"SAR"},L.SCR={type:3,value:"SCR"},L.SEK={type:3,value:"SEK"},L.SGD={type:3,value:"SGD"},L.SKP={type:3,value:"SKP"},L.THB={type:3,value:"THB"},L.TRL={type:3,value:"TRL"},L.TTD={type:3,value:"TTD"},L.TWD={type:3,value:"TWD"},L.USD={type:3,value:"USD"},L.VEB={type:3,value:"VEB"},L.VND={type:3,value:"VND"},L.XEU={type:3,value:"XEU"},L.ZAR={type:3,value:"ZAR"},L.ZWD={type:3,value:"ZWD"},L.NOK={type:3,value:"NOK"},e.IfcCurrencyEnum=L;class U{}U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=U;class H{}H.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},H.FIREDAMPER={type:3,value:"FIREDAMPER"},H.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},H.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},H.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},H.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},H.BLASTDAMPER={type:3,value:"BLASTDAMPER"},H.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},H.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},H.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},H.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=H;class G{}G.MEASURED={type:3,value:"MEASURED"},G.PREDICTED={type:3,value:"PREDICTED"},G.SIMULATED={type:3,value:"SIMULATED"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=G;class k{}k.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},k.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},k.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},k.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},k.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},k.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},k.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},k.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},k.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},k.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},k.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},k.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},k.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},k.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},k.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},k.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},k.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},k.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},k.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},k.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},k.TORQUEUNIT={type:3,value:"TORQUEUNIT"},k.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},k.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},k.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},k.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},k.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},k.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},k.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},k.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},k.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},k.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},k.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},k.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},k.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},k.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},k.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},k.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},k.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},k.PHUNIT={type:3,value:"PHUNIT"},k.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},k.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},k.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},k.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},k.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},k.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},k.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},k.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},k.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},k.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=k;class V{}V.ORIGIN={type:3,value:"ORIGIN"},V.TARGET={type:3,value:"TARGET"},e.IfcDimensionExtentUsage=V;class j{}j.POSITIVE={type:3,value:"POSITIVE"},j.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=j;class Q{}Q.FORMEDDUCT={type:3,value:"FORMEDDUCT"},Q.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},Q.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},Q.MANHOLE={type:3,value:"MANHOLE"},Q.METERCHAMBER={type:3,value:"METERCHAMBER"},Q.SUMP={type:3,value:"SUMP"},Q.TRENCH={type:3,value:"TRENCH"},Q.VALVECHAMBER={type:3,value:"VALVECHAMBER"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=Q;class W{}W.PUBLIC={type:3,value:"PUBLIC"},W.RESTRICTED={type:3,value:"RESTRICTED"},W.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},W.PERSONAL={type:3,value:"PERSONAL"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=W;class z{}z.DRAFT={type:3,value:"DRAFT"},z.FINALDRAFT={type:3,value:"FINALDRAFT"},z.FINAL={type:3,value:"FINAL"},z.REVISION={type:3,value:"REVISION"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=z;class K{}K.SWINGING={type:3,value:"SWINGING"},K.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},K.SLIDING={type:3,value:"SLIDING"},K.FOLDING={type:3,value:"FOLDING"},K.REVOLVING={type:3,value:"REVOLVING"},K.ROLLINGUP={type:3,value:"ROLLINGUP"},K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=K;class Y{}Y.LEFT={type:3,value:"LEFT"},Y.MIDDLE={type:3,value:"MIDDLE"},Y.RIGHT={type:3,value:"RIGHT"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Y;class X{}X.ALUMINIUM={type:3,value:"ALUMINIUM"},X.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},X.STEEL={type:3,value:"STEEL"},X.WOOD={type:3,value:"WOOD"},X.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},X.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},X.PLASTIC={type:3,value:"PLASTIC"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=X;class Z{}Z.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Z.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Z.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},Z.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Z.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Z.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},Z.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Z.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Z.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},Z.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Z.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Z.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},Z.REVOLVING={type:3,value:"REVOLVING"},Z.ROLLINGUP={type:3,value:"ROLLINGUP"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=Z;class q{}q.BEND={type:3,value:"BEND"},q.CONNECTOR={type:3,value:"CONNECTOR"},q.ENTRY={type:3,value:"ENTRY"},q.EXIT={type:3,value:"EXIT"},q.JUNCTION={type:3,value:"JUNCTION"},q.OBSTRUCTION={type:3,value:"OBSTRUCTION"},q.TRANSITION={type:3,value:"TRANSITION"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=q;class J{}J.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},J.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=J;class ${}$.FLATOVAL={type:3,value:"FLATOVAL"},$.RECTANGULAR={type:3,value:"RECTANGULAR"},$.ROUND={type:3,value:"ROUND"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=$;class ee{}ee.COMPUTER={type:3,value:"COMPUTER"},ee.DIRECTWATERHEATER={type:3,value:"DIRECTWATERHEATER"},ee.DISHWASHER={type:3,value:"DISHWASHER"},ee.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ee.ELECTRICHEATER={type:3,value:"ELECTRICHEATER"},ee.FACSIMILE={type:3,value:"FACSIMILE"},ee.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ee.FREEZER={type:3,value:"FREEZER"},ee.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ee.HANDDRYER={type:3,value:"HANDDRYER"},ee.INDIRECTWATERHEATER={type:3,value:"INDIRECTWATERHEATER"},ee.MICROWAVE={type:3,value:"MICROWAVE"},ee.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ee.PRINTER={type:3,value:"PRINTER"},ee.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ee.RADIANTHEATER={type:3,value:"RADIANTHEATER"},ee.SCANNER={type:3,value:"SCANNER"},ee.TELEPHONE={type:3,value:"TELEPHONE"},ee.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ee.TV={type:3,value:"TV"},ee.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ee.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ee.WATERHEATER={type:3,value:"WATERHEATER"},ee.WATERCOOLER={type:3,value:"WATERCOOLER"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ee;class te{}te.ALTERNATING={type:3,value:"ALTERNATING"},te.DIRECT={type:3,value:"DIRECT"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricCurrentEnum=te;class se{}se.ALARMPANEL={type:3,value:"ALARMPANEL"},se.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},se.CONTROLPANEL={type:3,value:"CONTROLPANEL"},se.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},se.GASDETECTORPANEL={type:3,value:"GASDETECTORPANEL"},se.INDICATORPANEL={type:3,value:"INDICATORPANEL"},se.MIMICPANEL={type:3,value:"MIMICPANEL"},se.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},se.SWITCHBOARD={type:3,value:"SWITCHBOARD"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionPointFunctionEnum=se;class ie{}ie.BATTERY={type:3,value:"BATTERY"},ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},ie.UPS={type:3,value:"UPS"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=ie;class re{}re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=re;class oe{}oe.ELECTRICPOINTHEATER={type:3,value:"ELECTRICPOINTHEATER"},oe.ELECTRICCABLEHEATER={type:3,value:"ELECTRICCABLEHEATER"},oe.ELECTRICMATHEATER={type:3,value:"ELECTRICMATHEATER"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricHeaterTypeEnum=oe;class ne{}ne.DC={type:3,value:"DC"},ne.INDUCTION={type:3,value:"INDUCTION"},ne.POLYPHASE={type:3,value:"POLYPHASE"},ne.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},ne.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=ne;class ae{}ae.TIMECLOCK={type:3,value:"TIMECLOCK"},ae.TIMEDELAY={type:3,value:"TIMEDELAY"},ae.RELAY={type:3,value:"RELAY"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=ae;class le{}le.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},le.ARCH={type:3,value:"ARCH"},le.BEAM_GRID={type:3,value:"BEAM_GRID"},le.BRACED_FRAME={type:3,value:"BRACED_FRAME"},le.GIRDER={type:3,value:"GIRDER"},le.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},le.RIGID_FRAME={type:3,value:"RIGID_FRAME"},le.SLAB_FIELD={type:3,value:"SLAB_FIELD"},le.TRUSS={type:3,value:"TRUSS"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=le;class he{}he.COMPLEX={type:3,value:"COMPLEX"},he.ELEMENT={type:3,value:"ELEMENT"},he.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=he;class ce{}ce.PRIMARY={type:3,value:"PRIMARY"},ce.SECONDARY={type:3,value:"SECONDARY"},ce.TERTIARY={type:3,value:"TERTIARY"},ce.AUXILIARY={type:3,value:"AUXILIARY"},ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnergySequenceEnum=ce;class Ae{}Ae.COMBINEDVALUE={type:3,value:"COMBINEDVALUE"},Ae.DISPOSAL={type:3,value:"DISPOSAL"},Ae.EXTRACTION={type:3,value:"EXTRACTION"},Ae.INSTALLATION={type:3,value:"INSTALLATION"},Ae.MANUFACTURE={type:3,value:"MANUFACTURE"},Ae.TRANSPORTATION={type:3,value:"TRANSPORTATION"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnvironmentalImpactCategoryEnum=Ae;class ue{}ue.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},ue.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},ue.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},ue.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},ue.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},ue.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},ue.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=ue;class pe{}pe.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},pe.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},pe.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},pe.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},pe.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=pe;class de{}de.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},de.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},de.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},de.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},de.TUBEAXIAL={type:3,value:"TUBEAXIAL"},de.VANEAXIAL={type:3,value:"VANEAXIAL"},de.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=de;class fe{}fe.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},fe.ODORFILTER={type:3,value:"ODORFILTER"},fe.OILFILTER={type:3,value:"OILFILTER"},fe.STRAINER={type:3,value:"STRAINER"},fe.WATERFILTER={type:3,value:"WATERFILTER"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=fe;class Ee{}Ee.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Ee.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Ee.HOSEREEL={type:3,value:"HOSEREEL"},Ee.SPRINKLER={type:3,value:"SPRINKLER"},Ee.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Ee;class me{}me.SOURCE={type:3,value:"SOURCE"},me.SINK={type:3,value:"SINK"},me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=me;class ye{}ye.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},ye.THERMOMETER={type:3,value:"THERMOMETER"},ye.AMMETER={type:3,value:"AMMETER"},ye.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},ye.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},ye.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},ye.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},ye.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=ye;class ge{}ge.ELECTRICMETER={type:3,value:"ELECTRICMETER"},ge.ENERGYMETER={type:3,value:"ENERGYMETER"},ge.FLOWMETER={type:3,value:"FLOWMETER"},ge.GASMETER={type:3,value:"GASMETER"},ge.OILMETER={type:3,value:"OILMETER"},ge.WATERMETER={type:3,value:"WATERMETER"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=ge;class Ie{}Ie.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},Ie.PAD_FOOTING={type:3,value:"PAD_FOOTING"},Ie.PILE_CAP={type:3,value:"PILE_CAP"},Ie.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=Ie;class ve{}ve.GASAPPLIANCE={type:3,value:"GASAPPLIANCE"},ve.GASBOOSTER={type:3,value:"GASBOOSTER"},ve.GASBURNER={type:3,value:"GASBURNER"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGasTerminalTypeEnum=ve;class Te{}Te.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Te.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Te.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Te.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Te.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Te.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Te.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Te;class _e{}_e.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},_e.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=_e;class Re{}Re.PLATE={type:3,value:"PLATE"},Re.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=Re;class Pe{}Pe.STEAMINJECTION={type:3,value:"STEAMINJECTION"},Pe.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},Pe.ADIABATICPAN={type:3,value:"ADIABATICPAN"},Pe.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},Pe.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},Pe.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},Pe.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},Pe.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},Pe.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},Pe.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},Pe.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},Pe.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},Pe.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=Pe;class De{}De.INTERNAL={type:3,value:"INTERNAL"},De.EXTERNAL={type:3,value:"EXTERNAL"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=De;class Ne{}Ne.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Ne.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Ne.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Ne;class be{}be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=be;class Ce{}Ce.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},Ce.FLUORESCENT={type:3,value:"FLUORESCENT"},Ce.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},Ce.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},Ce.METALHALIDE={type:3,value:"METALHALIDE"},Ce.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=Ce;class Oe{}Oe.AXIS1={type:3,value:"AXIS1"},Oe.AXIS2={type:3,value:"AXIS2"},Oe.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=Oe;class Se{}Se.TYPE_A={type:3,value:"TYPE_A"},Se.TYPE_B={type:3,value:"TYPE_B"},Se.TYPE_C={type:3,value:"TYPE_C"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Se;class xe{}xe.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},xe.FLUORESCENT={type:3,value:"FLUORESCENT"},xe.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},xe.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},xe.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},xe.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},xe.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},xe.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},xe.METALHALIDE={type:3,value:"METALHALIDE"},xe.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=xe;class we{}we.POINTSOURCE={type:3,value:"POINTSOURCE"},we.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=we;class Be{}Be.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Be.LOAD_CASE={type:3,value:"LOAD_CASE"},Be.LOAD_COMBINATION_GROUP={type:3,value:"LOAD_COMBINATION_GROUP"},Be.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Be;class Fe{}Fe.LOGICALAND={type:3,value:"LOGICALAND"},Fe.LOGICALOR={type:3,value:"LOGICALOR"},e.IfcLogicalOperatorEnum=Fe;class Me{}Me.BRACE={type:3,value:"BRACE"},Me.CHORD={type:3,value:"CHORD"},Me.COLLAR={type:3,value:"COLLAR"},Me.MEMBER={type:3,value:"MEMBER"},Me.MULLION={type:3,value:"MULLION"},Me.PLATE={type:3,value:"PLATE"},Me.POST={type:3,value:"POST"},Me.PURLIN={type:3,value:"PURLIN"},Me.RAFTER={type:3,value:"RAFTER"},Me.STRINGER={type:3,value:"STRINGER"},Me.STRUT={type:3,value:"STRUT"},Me.STUD={type:3,value:"STUD"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=Me;class Le{}Le.BELTDRIVE={type:3,value:"BELTDRIVE"},Le.COUPLING={type:3,value:"COUPLING"},Le.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Le;class Ue{}Ue.NULL={type:3,value:"NULL"},e.IfcNullStyle=Ue;class He{}He.PRODUCT={type:3,value:"PRODUCT"},He.PROCESS={type:3,value:"PROCESS"},He.CONTROL={type:3,value:"CONTROL"},He.RESOURCE={type:3,value:"RESOURCE"},He.ACTOR={type:3,value:"ACTOR"},He.GROUP={type:3,value:"GROUP"},He.PROJECT={type:3,value:"PROJECT"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=He;class Ge{}Ge.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ge.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ge.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ge.REQUIREMENT={type:3,value:"REQUIREMENT"},Ge.SPECIFICATION={type:3,value:"SPECIFICATION"},Ge.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ge;class ke{}ke.ASSIGNEE={type:3,value:"ASSIGNEE"},ke.ASSIGNOR={type:3,value:"ASSIGNOR"},ke.LESSEE={type:3,value:"LESSEE"},ke.LESSOR={type:3,value:"LESSOR"},ke.LETTINGAGENT={type:3,value:"LETTINGAGENT"},ke.OWNER={type:3,value:"OWNER"},ke.TENANT={type:3,value:"TENANT"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=ke;class Ve{}Ve.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},Ve.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},Ve.POWEROUTLET={type:3,value:"POWEROUTLET"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=Ve;class je{}je.GRILL={type:3,value:"GRILL"},je.LOUVER={type:3,value:"LOUVER"},je.SCREEN={type:3,value:"SCREEN"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=je;class Qe{}Qe.PHYSICAL={type:3,value:"PHYSICAL"},Qe.VIRTUAL={type:3,value:"VIRTUAL"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=Qe;class We{}We.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},We.COMPOSITE={type:3,value:"COMPOSITE"},We.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},We.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=We;class ze{}ze.COHESION={type:3,value:"COHESION"},ze.FRICTION={type:3,value:"FRICTION"},ze.SUPPORT={type:3,value:"SUPPORT"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=ze;class Ke{}Ke.BEND={type:3,value:"BEND"},Ke.CONNECTOR={type:3,value:"CONNECTOR"},Ke.ENTRY={type:3,value:"ENTRY"},Ke.EXIT={type:3,value:"EXIT"},Ke.JUNCTION={type:3,value:"JUNCTION"},Ke.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ke.TRANSITION={type:3,value:"TRANSITION"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Ke;class Ye{}Ye.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ye.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ye.GUTTER={type:3,value:"GUTTER"},Ye.SPOOL={type:3,value:"SPOOL"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Ye;class Xe{}Xe.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Xe.SHEET={type:3,value:"SHEET"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Xe;class Ze{}Ze.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Ze.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Ze.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Ze.CALIBRATION={type:3,value:"CALIBRATION"},Ze.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Ze.SHUTDOWN={type:3,value:"SHUTDOWN"},Ze.STARTUP={type:3,value:"STARTUP"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Ze;class qe{}qe.CURVE={type:3,value:"CURVE"},qe.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=qe;class Je{}Je.CHANGE={type:3,value:"CHANGE"},Je.MAINTENANCE={type:3,value:"MAINTENANCE"},Je.MOVE={type:3,value:"MOVE"},Je.PURCHASE={type:3,value:"PURCHASE"},Je.WORK={type:3,value:"WORK"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderRecordTypeEnum=Je;class $e{}$e.CHANGEORDER={type:3,value:"CHANGEORDER"},$e.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},$e.MOVEORDER={type:3,value:"MOVEORDER"},$e.PURCHASEORDER={type:3,value:"PURCHASEORDER"},$e.WORKORDER={type:3,value:"WORKORDER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=$e;class et{}et.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},et.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=et;class tt{}tt.DESIGN={type:3,value:"DESIGN"},tt.DESIGNMAXIMUM={type:3,value:"DESIGNMAXIMUM"},tt.DESIGNMINIMUM={type:3,value:"DESIGNMINIMUM"},tt.SIMULATED={type:3,value:"SIMULATED"},tt.ASBUILT={type:3,value:"ASBUILT"},tt.COMMISSIONING={type:3,value:"COMMISSIONING"},tt.MEASURED={type:3,value:"MEASURED"},tt.USERDEFINED={type:3,value:"USERDEFINED"},tt.NOTKNOWN={type:3,value:"NOTKNOWN"},e.IfcPropertySourceEnum=tt;class st{}st.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},st.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},st.EARTHFAILUREDEVICE={type:3,value:"EARTHFAILUREDEVICE"},st.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},st.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},st.VARISTOR={type:3,value:"VARISTOR"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=st;class it{}it.CIRCULATOR={type:3,value:"CIRCULATOR"},it.ENDSUCTION={type:3,value:"ENDSUCTION"},it.SPLITCASE={type:3,value:"SPLITCASE"},it.VERTICALINLINE={type:3,value:"VERTICALINLINE"},it.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=it;class rt{}rt.HANDRAIL={type:3,value:"HANDRAIL"},rt.GUARDRAIL={type:3,value:"GUARDRAIL"},rt.BALUSTRADE={type:3,value:"BALUSTRADE"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=rt;class ot{}ot.STRAIGHT={type:3,value:"STRAIGHT"},ot.SPIRAL={type:3,value:"SPIRAL"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=ot;class nt{}nt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},nt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},nt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},nt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},nt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},nt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=nt;class at{}at.BLINN={type:3,value:"BLINN"},at.FLAT={type:3,value:"FLAT"},at.GLASS={type:3,value:"GLASS"},at.MATT={type:3,value:"MATT"},at.METAL={type:3,value:"METAL"},at.MIRROR={type:3,value:"MIRROR"},at.PHONG={type:3,value:"PHONG"},at.PLASTIC={type:3,value:"PLASTIC"},at.STRAUSS={type:3,value:"STRAUSS"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=at;class lt{}lt.MAIN={type:3,value:"MAIN"},lt.SHEAR={type:3,value:"SHEAR"},lt.LIGATURE={type:3,value:"LIGATURE"},lt.STUD={type:3,value:"STUD"},lt.PUNCHING={type:3,value:"PUNCHING"},lt.EDGE={type:3,value:"EDGE"},lt.RING={type:3,value:"RING"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=lt;class ht{}ht.PLAIN={type:3,value:"PLAIN"},ht.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=ht;class ct{}ct.CONSUMED={type:3,value:"CONSUMED"},ct.PARTIALLYCONSUMED={type:3,value:"PARTIALLYCONSUMED"},ct.NOTCONSUMED={type:3,value:"NOTCONSUMED"},ct.OCCUPIED={type:3,value:"OCCUPIED"},ct.PARTIALLYOCCUPIED={type:3,value:"PARTIALLYOCCUPIED"},ct.NOTOCCUPIED={type:3,value:"NOTOCCUPIED"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcResourceConsumptionEnum=ct;class At{}At.DIRECTION_X={type:3,value:"DIRECTION_X"},At.DIRECTION_Y={type:3,value:"DIRECTION_Y"},e.IfcRibPlateDirectionEnum=At;class ut{}ut.SUPPLIER={type:3,value:"SUPPLIER"},ut.MANUFACTURER={type:3,value:"MANUFACTURER"},ut.CONTRACTOR={type:3,value:"CONTRACTOR"},ut.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},ut.ARCHITECT={type:3,value:"ARCHITECT"},ut.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},ut.COSTENGINEER={type:3,value:"COSTENGINEER"},ut.CLIENT={type:3,value:"CLIENT"},ut.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},ut.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},ut.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},ut.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},ut.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},ut.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},ut.CIVILENGINEER={type:3,value:"CIVILENGINEER"},ut.COMISSIONINGENGINEER={type:3,value:"COMISSIONINGENGINEER"},ut.ENGINEER={type:3,value:"ENGINEER"},ut.OWNER={type:3,value:"OWNER"},ut.CONSULTANT={type:3,value:"CONSULTANT"},ut.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},ut.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},ut.RESELLER={type:3,value:"RESELLER"},ut.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=ut;class pt{}pt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},pt.SHED_ROOF={type:3,value:"SHED_ROOF"},pt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},pt.HIP_ROOF={type:3,value:"HIP_ROOF"},pt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},pt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},pt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},pt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},pt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},pt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},pt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},pt.DOME_ROOF={type:3,value:"DOME_ROOF"},pt.FREEFORM={type:3,value:"FREEFORM"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=pt;class dt{}dt.EXA={type:3,value:"EXA"},dt.PETA={type:3,value:"PETA"},dt.TERA={type:3,value:"TERA"},dt.GIGA={type:3,value:"GIGA"},dt.MEGA={type:3,value:"MEGA"},dt.KILO={type:3,value:"KILO"},dt.HECTO={type:3,value:"HECTO"},dt.DECA={type:3,value:"DECA"},dt.DECI={type:3,value:"DECI"},dt.CENTI={type:3,value:"CENTI"},dt.MILLI={type:3,value:"MILLI"},dt.MICRO={type:3,value:"MICRO"},dt.NANO={type:3,value:"NANO"},dt.PICO={type:3,value:"PICO"},dt.FEMTO={type:3,value:"FEMTO"},dt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=dt;class ft{}ft.AMPERE={type:3,value:"AMPERE"},ft.BECQUEREL={type:3,value:"BECQUEREL"},ft.CANDELA={type:3,value:"CANDELA"},ft.COULOMB={type:3,value:"COULOMB"},ft.CUBIC_METRE={type:3,value:"CUBIC_METRE"},ft.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},ft.FARAD={type:3,value:"FARAD"},ft.GRAM={type:3,value:"GRAM"},ft.GRAY={type:3,value:"GRAY"},ft.HENRY={type:3,value:"HENRY"},ft.HERTZ={type:3,value:"HERTZ"},ft.JOULE={type:3,value:"JOULE"},ft.KELVIN={type:3,value:"KELVIN"},ft.LUMEN={type:3,value:"LUMEN"},ft.LUX={type:3,value:"LUX"},ft.METRE={type:3,value:"METRE"},ft.MOLE={type:3,value:"MOLE"},ft.NEWTON={type:3,value:"NEWTON"},ft.OHM={type:3,value:"OHM"},ft.PASCAL={type:3,value:"PASCAL"},ft.RADIAN={type:3,value:"RADIAN"},ft.SECOND={type:3,value:"SECOND"},ft.SIEMENS={type:3,value:"SIEMENS"},ft.SIEVERT={type:3,value:"SIEVERT"},ft.SQUARE_METRE={type:3,value:"SQUARE_METRE"},ft.STERADIAN={type:3,value:"STERADIAN"},ft.TESLA={type:3,value:"TESLA"},ft.VOLT={type:3,value:"VOLT"},ft.WATT={type:3,value:"WATT"},ft.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=ft;class Et{}Et.BATH={type:3,value:"BATH"},Et.BIDET={type:3,value:"BIDET"},Et.CISTERN={type:3,value:"CISTERN"},Et.SHOWER={type:3,value:"SHOWER"},Et.SINK={type:3,value:"SINK"},Et.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Et.TOILETPAN={type:3,value:"TOILETPAN"},Et.URINAL={type:3,value:"URINAL"},Et.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Et.WCSEAT={type:3,value:"WCSEAT"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Et;class mt{}mt.UNIFORM={type:3,value:"UNIFORM"},mt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=mt;class yt{}yt.CO2SENSOR={type:3,value:"CO2SENSOR"},yt.FIRESENSOR={type:3,value:"FIRESENSOR"},yt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},yt.GASSENSOR={type:3,value:"GASSENSOR"},yt.HEATSENSOR={type:3,value:"HEATSENSOR"},yt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},yt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},yt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},yt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},yt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},yt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},yt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},yt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=yt;class gt{}gt.START_START={type:3,value:"START_START"},gt.START_FINISH={type:3,value:"START_FINISH"},gt.FINISH_START={type:3,value:"FINISH_START"},gt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=gt;class It{}It.A_QUALITYOFCOMPONENTS={type:3,value:"A_QUALITYOFCOMPONENTS"},It.B_DESIGNLEVEL={type:3,value:"B_DESIGNLEVEL"},It.C_WORKEXECUTIONLEVEL={type:3,value:"C_WORKEXECUTIONLEVEL"},It.D_INDOORENVIRONMENT={type:3,value:"D_INDOORENVIRONMENT"},It.E_OUTDOORENVIRONMENT={type:3,value:"E_OUTDOORENVIRONMENT"},It.F_INUSECONDITIONS={type:3,value:"F_INUSECONDITIONS"},It.G_MAINTENANCELEVEL={type:3,value:"G_MAINTENANCELEVEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcServiceLifeFactorTypeEnum=It;class vt{}vt.ACTUALSERVICELIFE={type:3,value:"ACTUALSERVICELIFE"},vt.EXPECTEDSERVICELIFE={type:3,value:"EXPECTEDSERVICELIFE"},vt.OPTIMISTICREFERENCESERVICELIFE={type:3,value:"OPTIMISTICREFERENCESERVICELIFE"},vt.PESSIMISTICREFERENCESERVICELIFE={type:3,value:"PESSIMISTICREFERENCESERVICELIFE"},vt.REFERENCESERVICELIFE={type:3,value:"REFERENCESERVICELIFE"},e.IfcServiceLifeTypeEnum=vt;class Tt{}Tt.FLOOR={type:3,value:"FLOOR"},Tt.ROOF={type:3,value:"ROOF"},Tt.LANDING={type:3,value:"LANDING"},Tt.BASESLAB={type:3,value:"BASESLAB"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Tt;class _t{}_t.DBA={type:3,value:"DBA"},_t.DBB={type:3,value:"DBB"},_t.DBC={type:3,value:"DBC"},_t.NC={type:3,value:"NC"},_t.NR={type:3,value:"NR"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSoundScaleEnum=_t;class Rt{}Rt.SECTIONALRADIATOR={type:3,value:"SECTIONALRADIATOR"},Rt.PANELRADIATOR={type:3,value:"PANELRADIATOR"},Rt.TUBULARRADIATOR={type:3,value:"TUBULARRADIATOR"},Rt.CONVECTOR={type:3,value:"CONVECTOR"},Rt.BASEBOARDHEATER={type:3,value:"BASEBOARDHEATER"},Rt.FINNEDTUBEUNIT={type:3,value:"FINNEDTUBEUNIT"},Rt.UNITHEATER={type:3,value:"UNITHEATER"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Rt;class Pt{}Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Pt;class Dt{}Dt.BIRDCAGE={type:3,value:"BIRDCAGE"},Dt.COWL={type:3,value:"COWL"},Dt.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=Dt;class Nt{}Nt.STRAIGHT={type:3,value:"STRAIGHT"},Nt.WINDER={type:3,value:"WINDER"},Nt.SPIRAL={type:3,value:"SPIRAL"},Nt.CURVED={type:3,value:"CURVED"},Nt.FREEFORM={type:3,value:"FREEFORM"},Nt.USERDEFINED={type:3,value:"USERDEFINED"},Nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Nt;class bt{}bt.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},bt.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},bt.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},bt.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},bt.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},bt.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},bt.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},bt.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},bt.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},bt.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},bt.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},bt.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},bt.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},bt.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=bt;class Ct{}Ct.READWRITE={type:3,value:"READWRITE"},Ct.READONLY={type:3,value:"READONLY"},Ct.LOCKED={type:3,value:"LOCKED"},Ct.READWRITELOCKED={type:3,value:"READWRITELOCKED"},Ct.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=Ct;class Ot{}Ot.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},Ot.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},Ot.CABLE={type:3,value:"CABLE"},Ot.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},Ot.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveTypeEnum=Ot;class St{}St.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},St.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},St.SHELL={type:3,value:"SHELL"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceTypeEnum=St;class xt{}xt.POSITIVE={type:3,value:"POSITIVE"},xt.NEGATIVE={type:3,value:"NEGATIVE"},xt.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=xt;class wt{}wt.BUMP={type:3,value:"BUMP"},wt.OPACITY={type:3,value:"OPACITY"},wt.REFLECTION={type:3,value:"REFLECTION"},wt.SELFILLUMINATION={type:3,value:"SELFILLUMINATION"},wt.SHININESS={type:3,value:"SHININESS"},wt.SPECULAR={type:3,value:"SPECULAR"},wt.TEXTURE={type:3,value:"TEXTURE"},wt.TRANSPARENCYMAP={type:3,value:"TRANSPARENCYMAP"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceTextureEnum=wt;class Bt{}Bt.CONTACTOR={type:3,value:"CONTACTOR"},Bt.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Bt.STARTER={type:3,value:"STARTER"},Bt.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Bt.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Bt;class Ft{}Ft.PREFORMED={type:3,value:"PREFORMED"},Ft.SECTIONAL={type:3,value:"SECTIONAL"},Ft.EXPANSION={type:3,value:"EXPANSION"},Ft.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=Ft;class Mt{}Mt.STRAND={type:3,value:"STRAND"},Mt.WIRE={type:3,value:"WIRE"},Mt.BAR={type:3,value:"BAR"},Mt.COATED={type:3,value:"COATED"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Mt;class Lt{}Lt.LEFT={type:3,value:"LEFT"},Lt.RIGHT={type:3,value:"RIGHT"},Lt.UP={type:3,value:"UP"},Lt.DOWN={type:3,value:"DOWN"},e.IfcTextPath=Lt;class Ut{}Ut.PEOPLE={type:3,value:"PEOPLE"},Ut.LIGHTING={type:3,value:"LIGHTING"},Ut.EQUIPMENT={type:3,value:"EQUIPMENT"},Ut.VENTILATIONINDOORAIR={type:3,value:"VENTILATIONINDOORAIR"},Ut.VENTILATIONOUTSIDEAIR={type:3,value:"VENTILATIONOUTSIDEAIR"},Ut.RECIRCULATEDAIR={type:3,value:"RECIRCULATEDAIR"},Ut.EXHAUSTAIR={type:3,value:"EXHAUSTAIR"},Ut.AIREXCHANGERATE={type:3,value:"AIREXCHANGERATE"},Ut.DRYBULBTEMPERATURE={type:3,value:"DRYBULBTEMPERATURE"},Ut.RELATIVEHUMIDITY={type:3,value:"RELATIVEHUMIDITY"},Ut.INFILTRATION={type:3,value:"INFILTRATION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadSourceEnum=Ut;class Ht{}Ht.SENSIBLE={type:3,value:"SENSIBLE"},Ht.LATENT={type:3,value:"LATENT"},Ht.RADIANT={type:3,value:"RADIANT"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadTypeEnum=Ht;class Gt{}Gt.CONTINUOUS={type:3,value:"CONTINUOUS"},Gt.DISCRETE={type:3,value:"DISCRETE"},Gt.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Gt.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Gt.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Gt.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Gt;class kt{}kt.ANNUAL={type:3,value:"ANNUAL"},kt.MONTHLY={type:3,value:"MONTHLY"},kt.WEEKLY={type:3,value:"WEEKLY"},kt.DAILY={type:3,value:"DAILY"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesScheduleTypeEnum=kt;class Vt{}Vt.CURRENT={type:3,value:"CURRENT"},Vt.FREQUENCY={type:3,value:"FREQUENCY"},Vt.VOLTAGE={type:3,value:"VOLTAGE"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Vt;class jt{}jt.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},jt.CONTINUOUS={type:3,value:"CONTINUOUS"},jt.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},jt.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=jt;class Qt{}Qt.ELEVATOR={type:3,value:"ELEVATOR"},Qt.ESCALATOR={type:3,value:"ESCALATOR"},Qt.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Qt;class Wt{}Wt.CARTESIAN={type:3,value:"CARTESIAN"},Wt.PARAMETER={type:3,value:"PARAMETER"},Wt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Wt;class zt{}zt.FINNED={type:3,value:"FINNED"},zt.USERDEFINED={type:3,value:"USERDEFINED"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=zt;class Kt{}Kt.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Kt.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Kt.AREAUNIT={type:3,value:"AREAUNIT"},Kt.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Kt.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Kt.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Kt.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Kt.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Kt.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Kt.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Kt.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Kt.FORCEUNIT={type:3,value:"FORCEUNIT"},Kt.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Kt.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Kt.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Kt.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Kt.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Kt.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Kt.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Kt.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Kt.MASSUNIT={type:3,value:"MASSUNIT"},Kt.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Kt.POWERUNIT={type:3,value:"POWERUNIT"},Kt.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Kt.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Kt.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Kt.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Kt.TIMEUNIT={type:3,value:"TIMEUNIT"},Kt.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Kt;class Yt{}Yt.AIRHANDLER={type:3,value:"AIRHANDLER"},Yt.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Yt.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Yt.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Yt;class Xt{}Xt.AIRRELEASE={type:3,value:"AIRRELEASE"},Xt.ANTIVACUUM={type:3,value:"ANTIVACUUM"},Xt.CHANGEOVER={type:3,value:"CHANGEOVER"},Xt.CHECK={type:3,value:"CHECK"},Xt.COMMISSIONING={type:3,value:"COMMISSIONING"},Xt.DIVERTING={type:3,value:"DIVERTING"},Xt.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},Xt.DOUBLECHECK={type:3,value:"DOUBLECHECK"},Xt.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},Xt.FAUCET={type:3,value:"FAUCET"},Xt.FLUSHING={type:3,value:"FLUSHING"},Xt.GASCOCK={type:3,value:"GASCOCK"},Xt.GASTAP={type:3,value:"GASTAP"},Xt.ISOLATING={type:3,value:"ISOLATING"},Xt.MIXING={type:3,value:"MIXING"},Xt.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},Xt.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},Xt.REGULATING={type:3,value:"REGULATING"},Xt.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},Xt.STEAMTRAP={type:3,value:"STEAMTRAP"},Xt.STOPCOCK={type:3,value:"STOPCOCK"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=Xt;class Zt{}Zt.COMPRESSION={type:3,value:"COMPRESSION"},Zt.SPRING={type:3,value:"SPRING"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Zt;class qt{}qt.STANDARD={type:3,value:"STANDARD"},qt.POLYGONAL={type:3,value:"POLYGONAL"},qt.SHEAR={type:3,value:"SHEAR"},qt.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},qt.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=qt;class Jt{}Jt.FLOORTRAP={type:3,value:"FLOORTRAP"},Jt.FLOORWASTE={type:3,value:"FLOORWASTE"},Jt.GULLYSUMP={type:3,value:"GULLYSUMP"},Jt.GULLYTRAP={type:3,value:"GULLYTRAP"},Jt.GREASEINTERCEPTOR={type:3,value:"GREASEINTERCEPTOR"},Jt.OILINTERCEPTOR={type:3,value:"OILINTERCEPTOR"},Jt.PETROLINTERCEPTOR={type:3,value:"PETROLINTERCEPTOR"},Jt.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Jt.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Jt.WASTETRAP={type:3,value:"WASTETRAP"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Jt;class $t{}$t.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},$t.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},$t.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},$t.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},$t.TOPHUNG={type:3,value:"TOPHUNG"},$t.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},$t.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},$t.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},$t.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},$t.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},$t.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},$t.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},$t.OTHEROPERATION={type:3,value:"OTHEROPERATION"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=$t;class es{}es.LEFT={type:3,value:"LEFT"},es.MIDDLE={type:3,value:"MIDDLE"},es.RIGHT={type:3,value:"RIGHT"},es.BOTTOM={type:3,value:"BOTTOM"},es.TOP={type:3,value:"TOP"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=es;class ts{}ts.ALUMINIUM={type:3,value:"ALUMINIUM"},ts.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},ts.STEEL={type:3,value:"STEEL"},ts.WOOD={type:3,value:"WOOD"},ts.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},ts.PLASTIC={type:3,value:"PLASTIC"},ts.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=ts;class ss{}ss.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ss.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ss.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ss.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ss.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ss.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ss.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ss.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ss.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ss;class is{}is.ACTUAL={type:3,value:"ACTUAL"},is.BASELINE={type:3,value:"BASELINE"},is.PLANNED={type:3,value:"PLANNED"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkControlTypeEnum=is;e.IfcActorRole=class extends dg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class rs extends dg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=rs;e.IfcApplication=class extends dg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class os extends dg{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.type=411424972}}e.IfcAppliedValue=os;e.IfcAppliedValueRelationship=class extends dg{constructor(e,t,s,i,r,o){super(e),this.ComponentOfTotal=t,this.Components=s,this.ArithmeticOperator=i,this.Name=r,this.Description=o,this.type=1110488051}};e.IfcApproval=class extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.Description=t,this.ApprovalDateTime=s,this.ApprovalStatus=i,this.ApprovalLevel=r,this.ApprovalQualifier=o,this.Name=n,this.Identifier=a,this.type=130549933}};e.IfcApprovalActorRelationship=class extends dg{constructor(e,t,s,i){super(e),this.Actor=t,this.Approval=s,this.Role=i,this.type=2080292479}};e.IfcApprovalPropertyRelationship=class extends dg{constructor(e,t,s){super(e),this.ApprovedProperties=t,this.Approval=s,this.type=390851274}};e.IfcApprovalRelationship=class extends dg{constructor(e,t,s,i,r){super(e),this.RelatedApproval=t,this.RelatingApproval=s,this.Description=i,this.Name=r,this.type=3869604511}};class ns extends dg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=ns;e.IfcBoundaryEdgeCondition=class extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessByLengthX=s,this.LinearStiffnessByLengthY=i,this.LinearStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends ns{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.LinearStiffnessByAreaX=s,this.LinearStiffnessByAreaY=i,this.LinearStiffnessByAreaZ=r,this.type=3367102660}};class as extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=as;e.IfcBoundaryNodeConditionWarping=class extends as{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};e.IfcCalendarDate=class extends dg{constructor(e,t,s,i){super(e),this.DayComponent=t,this.MonthComponent=s,this.YearComponent=i,this.type=622194075}};e.IfcClassification=class extends dg{constructor(e,t,s,i,r){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.type=747523909}};e.IfcClassificationItem=class extends dg{constructor(e,t,s,i){super(e),this.Notation=t,this.ItemOf=s,this.Title=i,this.type=1767535486}};e.IfcClassificationItemRelationship=class extends dg{constructor(e,t,s){super(e),this.RelatingItem=t,this.RelatedItems=s,this.type=1098599126}};e.IfcClassificationNotation=class extends dg{constructor(e,t){super(e),this.NotationFacets=t,this.type=938368621}};e.IfcClassificationNotationFacet=class extends dg{constructor(e,t){super(e),this.NotationValue=t,this.type=3639012971}};class ls extends dg{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=ls;class hs extends dg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=hs;class cs extends hs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=cs;e.IfcConnectionPortGeometry=class extends hs{constructor(e,t,s,i){super(e),this.LocationAtRelatingElement=t,this.LocationAtRelatedElement=s,this.ProfileOfPort=i,this.type=4257277454}};e.IfcConnectionSurfaceGeometry=class extends hs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};class As extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=As;e.IfcConstraintAggregationRelationship=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.LogicalAggregator=o,this.type=1658513725}};e.IfcConstraintClassificationRelationship=class extends dg{constructor(e,t,s){super(e),this.ClassifiedConstraint=t,this.RelatedClassifications=s,this.type=613356794}};e.IfcConstraintRelationship=class extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.type=347226245}};e.IfcCoordinatedUniversalTimeOffset=class extends dg{constructor(e,t,s,i){super(e),this.HourOffset=t,this.MinuteOffset=s,this.Sense=i,this.type=1065062679}};e.IfcCostValue=class extends os{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.CostType=a,this.Condition=l,this.type=602808272}};e.IfcCurrencyRelationship=class extends dg{constructor(e,t,s,i,r,o){super(e),this.RelatingMonetaryUnit=t,this.RelatedMonetaryUnit=s,this.ExchangeRate=i,this.RateDateTime=r,this.RateSource=o,this.type=539742890}};e.IfcCurveStyleFont=class extends dg{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends dg{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};e.IfcDateAndTime=class extends dg{constructor(e,t,s){super(e),this.DateComponent=t,this.TimeComponent=s,this.type=1072939445}};e.IfcDerivedUnit=class extends dg{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends dg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};e.IfcDocumentElectronicFormat=class extends dg{constructor(e,t,s,i){super(e),this.FileExtension=t,this.MimeContentType=s,this.MimeSubtype=i,this.type=1376555844}};e.IfcDocumentInformation=class extends dg{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.DocumentId=t,this.Name=s,this.Description=i,this.DocumentReferences=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends dg{constructor(e,t,s,i){super(e),this.RelatingDocument=t,this.RelatedDocuments=s,this.RelationshipType=i,this.type=770865208}};class us extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=3796139169}}e.IfcDraughtingCalloutRelationship=us;e.IfcEnvironmentalImpactValue=class extends os{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.ImpactType=a,this.Category=l,this.UserDefinedCategory=h,this.type=1648886627}};class ps extends dg{constructor(e,t,s,i){super(e),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ps;e.IfcExternallyDefinedHatchStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedSymbol=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3207319532}};e.IfcExternallyDefinedTextFont=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends dg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends dg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.LibraryReference=o,this.type=2655187982}};e.IfcLibraryReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3452421091}};e.IfcLightDistributionData=class extends dg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends dg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcLocalTime=class extends dg{constructor(e,t,s,i,r,o){super(e),this.HourComponent=t,this.MinuteComponent=s,this.SecondComponent=i,this.Zone=r,this.DaylightSavingOffset=o,this.type=30780891}};e.IfcMaterial=class extends dg{constructor(e,t){super(e),this.Name=t,this.type=1838606355}};e.IfcMaterialClassificationRelationship=class extends dg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};e.IfcMaterialLayer=class extends dg{constructor(e,t,s,i){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.type=248100487}};e.IfcMaterialLayerSet=class extends dg{constructor(e,t,s){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.type=3303938423}};e.IfcMaterialLayerSetUsage=class extends dg{constructor(e,t,s,i,r){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.type=1303795690}};e.IfcMaterialList=class extends dg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ds extends dg{constructor(e,t){super(e),this.Material=t,this.type=3265635763}}e.IfcMaterialProperties=ds;e.IfcMeasureWithUnit=class extends dg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};class fs extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.type=4256014907}}e.IfcMechanicalMaterialProperties=fs;e.IfcMechanicalSteelMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.YieldStress=a,this.UltimateStress=l,this.UltimateStrain=h,this.HardeningModule=c,this.ProportionalStress=A,this.PlasticStrain=u,this.Relaxations=p,this.type=677618848}};e.IfcMetric=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.type=3368373690}};e.IfcMonetaryUnit=class extends dg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Es extends dg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Es;class ms extends dg{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=ms;e.IfcObjective=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.ResultValues=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOpticalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t),this.Material=t,this.VisibleTransmittance=s,this.SolarTransmittance=i,this.ThermalIrTransmittance=r,this.ThermalIrEmissivityBack=o,this.ThermalIrEmissivityFront=n,this.VisibleReflectanceBack=a,this.VisibleReflectanceFront=l,this.SolarReflectanceFront=h,this.SolarReflectanceBack=c,this.type=1227763645}};e.IfcOrganization=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Id=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOrganizationRelationship=class extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOwnerHistory=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Id=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends dg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ys extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ys;class gs extends ys{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=gs;e.IfcPostalAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class Is extends dg{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=Is;class vs extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=990879717}}e.IfcPreDefinedSymbol=vs;e.IfcPreDefinedTerminatorSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=3213052703}};class Ts extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=Ts;class _s extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=_s;e.IfcPresentationLayerWithStyle=class extends _s{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class Rs extends dg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=Rs;e.IfcPresentationStyleAssignment=class extends dg{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class Ps extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=Ps;e.IfcProductsOfCombustionProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.N20Content=i,this.COContent=r,this.CO2Content=o,this.type=2267347899}};class Ds extends dg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ds;class Ns extends dg{constructor(e,t,s){super(e),this.ProfileName=t,this.ProfileDefinition=s,this.type=2802850158}}e.IfcProfileProperties=Ns;class bs extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=bs;e.IfcPropertyConstraintRelationship=class extends dg{constructor(e,t,s,i,r){super(e),this.RelatingConstraint=t,this.RelatedProperties=s,this.Name=i,this.Description=r,this.type=3896028662}};e.IfcPropertyDependencyRelationship=class extends dg{constructor(e,t,s,i,r,o){super(e),this.DependingProperty=t,this.DependantProperty=s,this.Name=i,this.Description=r,this.Expression=o,this.type=148025276}};e.IfcPropertyEnumeration=class extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.type=2044713172}};e.IfcQuantityCount=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.type=2093928680}};e.IfcQuantityLength=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.type=931644368}};e.IfcQuantityTime=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.type=3252649465}};e.IfcQuantityVolume=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.type=2405470396}};e.IfcQuantityWeight=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.type=825690147}};e.IfcReferencesValueDocument=class extends dg{constructor(e,t,s,i,r){super(e),this.ReferencedDocument=t,this.ReferencingValues=s,this.Name=i,this.Description=r,this.type=2692823254}};e.IfcReinforcementBarProperties=class extends dg{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};e.IfcRelaxation=class extends dg{constructor(e,t,s){super(e),this.RelaxationValue=t,this.InitialStress=s,this.type=1222501353}};class Cs extends dg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=Cs;class Os extends dg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=Os;class Ss extends dg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ss;e.IfcRepresentationMap=class extends dg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};e.IfcRibPlateProfileProperties=class extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.Thickness=i,this.RibHeight=r,this.RibWidth=o,this.RibSpacing=n,this.Direction=a,this.type=3679540991}};class xs extends dg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=xs;e.IfcSIUnit=class extends Es{constructor(e,t,s,i){super(e,new pg(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};e.IfcSectionProperties=class extends dg{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends dg{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcShapeAspect=class extends dg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ws extends Cs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ws;e.IfcShapeRepresentation=class extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Bs extends bs{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=Bs;class Fs extends dg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Fs;class Ms extends dg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Ms;class Ls extends Ms{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ls;e.IfcStructuralLoadTemperature=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaT_Constant=s,this.DeltaT_Y=i,this.DeltaT_Z=r,this.type=3408363356}};class Us extends Cs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Us;class Hs extends Ss{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}}e.IfcStyledItem=Hs;e.IfcStyledRepresentation=class extends Us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceStyle=class extends Rs{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends dg{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends dg{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Gs extends dg{constructor(e,t){super(e),this.SurfaceColour=t,this.type=846575682}}e.IfcSurfaceStyleShading=Gs;e.IfcSurfaceStyleWithTextures=class extends dg{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class ks extends dg{constructor(e,t,s,i,r){super(e),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.type=626085974}}e.IfcSurfaceTexture=ks;e.IfcSymbolStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.StyleOfSymbol=s,this.type=1290481447}};e.IfcTable=class extends dg{constructor(e,t,s){super(e),this.Name=t,this.Rows=s,this.type=985171141}};e.IfcTableRow=class extends dg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};e.IfcTelecomAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.type=912023232}};e.IfcTextStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.type=1447204868}};e.IfcTextStyleFontModel=class extends Ts{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTextStyleForDefinedFont=class extends dg{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};e.IfcTextStyleWithBoxCharacteristics=class extends dg{constructor(e,t,s,i,r,o){super(e),this.BoxHeight=t,this.BoxWidth=s,this.BoxSlantAngle=i,this.BoxRotateAngle=r,this.CharacterSpacing=o,this.type=1484833681}};class Vs extends dg{constructor(e){super(e),this.type=280115917}}e.IfcTextureCoordinate=Vs;e.IfcTextureCoordinateGenerator=class extends Vs{constructor(e,t,s){super(e),this.Mode=t,this.Parameter=s,this.type=1742049831}};e.IfcTextureMap=class extends Vs{constructor(e,t){super(e),this.TextureMaps=t,this.type=2552916305}};e.IfcTextureVertex=class extends dg{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcThermalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.BoilingPoint=i,this.FreezingPoint=r,this.ThermalConductivity=o,this.type=3317419933}};class js extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=js;e.IfcTimeSeriesReferenceRelationship=class extends dg{constructor(e,t,s){super(e),this.ReferencedTimeSeries=t,this.TimeSeriesReferences=s,this.type=1718945513}};e.IfcTimeSeriesValue=class extends dg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Qs extends Ss{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Qs;e.IfcTopologyRepresentation=class extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends dg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Ws extends Qs{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Ws;e.IfcVertexBasedTextureMap=class extends dg{constructor(e,t,s){super(e),this.TextureVertices=t,this.TexturePoints=s,this.type=3304826586}};e.IfcVertexPoint=class extends Ws{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends dg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWaterProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l){super(e,t),this.Material=t,this.IsPotable=s,this.Hardness=i,this.AlkalinityConcentration=r,this.AcidityConcentration=o,this.ImpuritiesContent=n,this.PHLevel=a,this.DissolvedSolidsContent=l,this.type=1065908215}};class zs extends Hs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2442683028}}e.IfcAnnotationOccurrence=zs;e.IfcAnnotationSurfaceOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=962685235}};class Ks extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3612888222}}e.IfcAnnotationSymbolOccurrence=Ks;e.IfcAnnotationTextOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2297822566}};class Ys extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Ys;class Xs extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Xs;e.IfcArbitraryProfileDefWithVoids=class extends Ys{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends ks{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.RasterFormat=o,this.RasterCode=n,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Xs{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassificationReference=class extends ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.ReferencedSource=r,this.type=647927063}};e.IfcColourRgb=class extends ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};e.IfcCompositeProfileDef=class extends Ds{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Zs extends Qs{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Zs;e.IfcConnectionCurveGeometry=class extends hs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends cs{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Es{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};e.IfcConversionBasedUnit=class extends Es{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}};e.IfcCurveStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.type=3800577675}};e.IfcDerivedProfileDef=class extends Ds{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}};e.IfcDimensionCalloutRelationship=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=2273265877}};e.IfcDimensionPair=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=1694125774}};e.IfcDocumentReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3732053477}};e.IfcDraughtingPreDefinedTextFont=class extends Ts{constructor(e,t){super(e,t),this.Name=t,this.type=4170525392}};class qs extends Qs{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=qs;e.IfcEdgeCurve=class extends qs{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcExtendedMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.ExtendedProperties=s,this.Description=i,this.Name=r,this.type=1860660968}};class Js extends Qs{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Js;class $s extends Qs{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=$s;e.IfcFaceOuterBound=class extends $s{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};e.IfcFaceSurface=class extends Js{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}};e.IfcFailureConnectionCondition=class extends Fs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.FillStyles=s,this.type=738692330}};e.IfcFuelProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.CombustionTemperature=s,this.CarbonContent=i,this.LowerHeatingValue=r,this.HigherHeatingValue=o,this.type=3857492461}};e.IfcGeneralMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.MolecularWeight=s,this.Porosity=i,this.MassDensity=r,this.type=803998398}};class ei extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.type=1446786286}}e.IfcGeneralProfileProperties=ei;class ti extends Os{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=ti;class si extends Ss{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=si;e.IfcGeometricRepresentationSubContext=class extends ti{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new pg(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class ii extends si{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=ii;e.IfcGridPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class ri extends si{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=ri;e.IfcHygroscopicMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.UpperVaporResistanceFactor=s,this.LowerVaporResistanceFactor=i,this.IsothermalMoistureCapacity=r,this.VaporPermeability=o,this.MoistureDiffusivity=n,this.type=2445078500}};e.IfcImageTexture=class extends ks{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.UrlReference=o,this.type=3905492369}};e.IfcIrregularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};class oi extends si{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=oi;e.IfcLightSourceAmbient=class extends oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends oi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class ni extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=ni;e.IfcLightSourceSpot=class extends ni{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class ai extends Qs{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=ai;e.IfcMappedItem=class extends Ss{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterialDefinitionRepresentation=class extends Ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMechanicalConcreteMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.CompressiveStrength=a,this.MaxAggregateSize=l,this.AdmixturesDescription=h,this.Workability=c,this.ProtectivePoreRatio=A,this.WaterImpermeability=u,this.type=1430189142}};class li extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=li;class hi extends si{constructor(e,t){super(e),this.RepeatFactor=t,this.type=2833995503}}e.IfcOneDirectionRepeatFactor=hi;e.IfcOpenShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrientedEdge=class extends qs{constructor(e,t,s){super(e,new pg(0),new pg(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class ci extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=ci;e.IfcPath=class extends Qs{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ys{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends ks{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.Width=o,this.Height=n,this.ColourComponents=a,this.Pixel=l,this.type=597895409}};class Ai extends si{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Ai;class ui extends si{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=ui;class pi extends si{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=pi;e.IfcPointOnCurve=class extends pi{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends pi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends ai{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends ri{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class di extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=di;class fi extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=fi;e.IfcPreDefinedDimensionSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=433424934}};e.IfcPreDefinedPointMarkerSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=179317114}};e.IfcProductDefinitionShape=class extends Ps{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcPropertyBoundedValue=class extends Bs{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.type=871118103}};class Ei extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=Ei;e.IfcPropertyEnumeratedValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};class mi extends Ei{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=mi;e.IfcPropertySingleValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends Bs{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.type=110355661}};class yi extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=yi;e.IfcRegularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementDefinitionProperties=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class gi extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=gi;e.IfcRoundedRectangleProfileDef=class extends yi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionedSpine=class extends si{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcServiceLifeFactor=class extends mi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PredefinedType=o,this.UpperValue=n,this.MostUsedValue=a,this.LowerValue=l,this.type=2411513650}};e.IfcShellBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};e.IfcSlippageConnectionCondition=class extends Fs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class Ii extends si{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=Ii;e.IfcSoundProperties=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.IsAttenuating=o,this.SoundScale=n,this.SoundValues=a,this.type=2485662743}};e.IfcSoundValue=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.SoundLevelTimeSeries=o,this.Frequency=n,this.SoundLevelSingleValue=a,this.type=1202362311}};e.IfcSpaceThermalLoadProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableValueRatio=o,this.ThermalLoadSource=n,this.PropertySource=a,this.SourceDescription=l,this.MaximumValue=h,this.MinimumValue=c,this.ThermalLoadTimeSeriesValues=A,this.UserDefinedThermalLoadSource=u,this.UserDefinedPropertySource=p,this.ThermalLoadType=d,this.type=390701378}};e.IfcStructuralLoadLinearForce=class extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class vi extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=vi;e.IfcStructuralLoadSingleDisplacementDistortion=class extends vi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ti extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ti;e.IfcStructuralLoadSingleForceWarping=class extends Ti{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};class _i extends ei{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o,n,a),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.type=3843319758}}e.IfcStructuralProfileProperties=_i;e.IfcStructuralSteelProfileProperties=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P,D,N){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.ShearAreaZ=R,this.ShearAreaY=P,this.PlasticShapeFactorY=D,this.PlasticShapeFactorZ=N,this.type=3653947884}};e.IfcSubedge=class extends qs{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Ri extends si{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Ri;e.IfcSurfaceStyleRendering=class extends Gs{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class Pi extends Ii{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=Pi;e.IfcSweptDiskSolid=class extends Ii{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}};class Di extends Ri{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Di;e.IfcTShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.CentreOfGravityInY=p,this.type=3071757647}};class Ni extends Ks{constructor(e,t,s,i,r){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.type=3028897424}}e.IfcTerminatorSymbol=Ni;class bi extends si{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=bi;e.IfcTextLiteralWithExtent=class extends bi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTrapeziumProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};e.IfcTwoDirectionRepeatFactor=class extends hi{constructor(e,t,s){super(e,t),this.RepeatFactor=t,this.SecondRepeatFactor=s,this.type=1345879162}};class Ci extends li{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Ci;class Oi extends Ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=Oi;e.IfcUShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.CentreOfGravityInX=A,this.type=427810014}};e.IfcVector=class extends si{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends ai{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.type=336235671}};e.IfcWindowPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};e.IfcWindowStyle=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};class Si extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3288037868}}e.IfcAnnotationCurveOccurrence=Si;e.IfcAnnotationFillArea=class extends si{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAnnotationFillAreaOccurrence=class extends zs{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.FillStyleTarget=r,this.GlobalOrLocal=o,this.type=2265737646}};e.IfcAnnotationSurface=class extends si{constructor(e,t,s){super(e),this.Item=t,this.TextureCoordinates=s,this.type=1302238472}};e.IfcAxis1Placement=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Ai{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class xi extends si{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=xi;class wi extends Ri{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=wi;e.IfcBoundingBox=class extends si{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends ri{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.CentreOfGravityInX=h,this.type=2898889636}};e.IfcCartesianPoint=class extends pi{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Bi extends si{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Bi;class Fi extends Bi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Fi;e.IfcCartesianTransformationOperator2DnonUniform=class extends Fi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Mi extends Bi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Mi;e.IfcCartesianTransformationOperator3DnonUniform=class extends Mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Li extends ci{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Li;e.IfcClosedShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcCompositeCurveSegment=class extends si{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}};e.IfcCraneRailAShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.BaseWidth2=o,this.Radius=n,this.HeadWidth=a,this.HeadDepth2=l,this.HeadDepth3=h,this.WebThickness=c,this.BaseWidth4=A,this.BaseDepth1=u,this.BaseDepth2=p,this.BaseDepth3=d,this.CentreOfGravityInY=f,this.type=4133800736}};e.IfcCraneRailFShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.HeadWidth=o,this.Radius=n,this.HeadDepth2=a,this.HeadDepth3=l,this.WebThickness=h,this.BaseDepth1=c,this.BaseDepth2=A,this.CentreOfGravityInY=u,this.type=194851669}};class Ui extends si{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Ui;e.IfcCsgSolid=class extends Ii{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Hi extends si{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Hi;e.IfcCurveBoundedPlane=class extends wi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcDefinedSymbol=class extends si{constructor(e,t,s){super(e),this.Definition=t,this.Target=s,this.type=693772133}};e.IfcDimensionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=606661476}};e.IfcDimensionCurveTerminator=class extends Ni{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.Role=o,this.type=4054601972}};e.IfcDirection=class extends si{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.type=2963535650}};e.IfcDoorPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorStyle=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};class Gi extends si{constructor(e,t){super(e),this.Contents=t,this.type=3073041342}}e.IfcDraughtingCallout=Gi;e.IfcDraughtingPreDefinedColour=class extends di{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends fi{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};e.IfcEdgeLoop=class extends ai{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class ki extends Oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=ki;class Vi extends Ri{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Vi;e.IfcEllipseProfileDef=class extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};class ji extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.type=80994333}}e.IfcEnergyProperties=ji;e.IfcExtrudedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}};e.IfcFaceBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends si{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTileSymbolWithStyle=class extends si{constructor(e,t){super(e),this.Symbol=t,this.type=4203026998}};e.IfcFillAreaStyleTiles=class extends si{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFluidFlowProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PropertySource=o,this.FlowConditionTimeSeries=n,this.VelocityTimeSeries=a,this.FlowrateTimeSeries=l,this.Fluid=h,this.PressureTimeSeries=c,this.UserDefinedPropertySource=A,this.TemperatureSingleValue=u,this.WetBulbTemperatureSingleValue=p,this.WetBulbTemperatureTimeSeries=d,this.TemperatureTimeSeries=f,this.FlowrateSingleValue=E,this.FlowConditionSingleValue=m,this.VelocitySingleValue=y,this.PressureSingleValue=g,this.type=3455213021}};class Qi extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Qi;e.IfcFurnitureType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.type=1268542332}};e.IfcGeometricCurveSet=class extends ii{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};class Wi extends ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.type=1484403080}}e.IfcIShapeProfileDef=Wi;e.IfcLShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.CentreOfGravityInX=c,this.CentreOfGravityInY=A,this.type=572779678}};e.IfcLine=class extends Hi{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class zi extends Ii{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=zi;class Ki extends li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Ki;e.IfcOffsetCurve2D=class extends Hi{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Hi{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPermeableCoveringProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPlanarBox=class extends ui{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Vi{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class Yi extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2945172077}}e.IfcProcess=Yi;class Xi extends Ki{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xi;e.IfcProject=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=4194566429}};e.IfcPropertySet=class extends mi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcProxy=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends wi{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};class Zi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=Zi;class qi extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}}e.IfcRelAssignsToActor=qi;class Ji extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}}e.IfcRelAssignsToControl=Ji;e.IfcRelAssignsToGroup=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}};e.IfcRelAssignsToProcess=class extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToProjectOrder=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=3372526763}};e.IfcRelAssignsToResource=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $i extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$i;e.IfcRelAssociatesAppliedValue=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingAppliedValue=n,this.type=1327628568}};e.IfcRelAssociatesApproval=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileProperties=class extends $i{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileProperties=n,this.ProfileSectionLocation=a,this.ProfileOrientation=l,this.type=2851387026}};class er extends gi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=er;class tr extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tr;e.IfcRelConnectsPathElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};e.IfcRelConnectsStructuralElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralMember=n,this.type=3912681535}};class sr extends er{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sr;e.IfcRelConnectsWithEccentricity=class extends sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedSpace=o,this.RelatedCoverings=n,this.type=2802773753}};class ir extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=2551354335}}e.IfcRelDecomposes=ir;class rr extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=693640335}}e.IfcRelDefines=rr;class or extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}}e.IfcRelDefinesByProperties=or;e.IfcRelDefinesByType=class extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInteractionRequirements=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DailyInteraction=o,this.ImportanceRating=n,this.LocationOfInteraction=a,this.RelatedSpaceProgram=l,this.RelatingSpaceProgram=h,this.type=4189434867}};e.IfcRelNests=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelOccupiesSpaces=class extends qi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=2051452291}};e.IfcRelOverridesProperties=class extends or{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.OverridingProperties=a,this.type=202636808}};e.IfcRelProjectsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSchedulesCostItems=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=1058617721}};e.IfcRelSequence=class extends er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.type=4122056220}};e.IfcRelServicesBuildings=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};e.IfcRelSpaceBoundary=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}};e.IfcRelVoidsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};class nr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2914609552}}e.IfcResource=nr;e.IfcRevolvedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}};e.IfcRightCircularCone=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class ar extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=ar;class lr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=lr;e.IfcSphere=class extends Ui{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};class hr extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=hr;class cr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=cr;class Ar extends cr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=Ar;class ur extends hr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=ur;class pr extends Ar{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=pr;e.IfcStructuralSurfaceMemberVarying=class extends pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.SubsequentThickness=c,this.VaryingThicknessLocation=A,this.type=2218152070}};e.IfcStructuredDimensionCallout=class extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=4070609034}};e.IfcSurfaceCurveSweptAreaSolid=class extends Pi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Di{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Di{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1580310250}};class dr extends Yi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.type=3473067441}}e.IfcTask=dr;e.IfcTransportElementType=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class fr extends Ki{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=fr;e.IfcAnnotation=class extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};e.IfcAsymmetricIShapeProfileDef=class extends Wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.CentreOfGravityInY=u,this.type=3207858831}};e.IfcBlock=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends xi{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Er extends Hi{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Er;e.IfcBuilding=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class mr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=mr;e.IfcBuildingStorey=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcCircleHollowProfileDef=class extends Li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcColumnType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};class yr extends Er{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=yr;class gr extends Hi{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=gr;class Ir extends nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=2559216714}}e.IfcConstructionResource=Ir;class vr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3293443760}}e.IfcControl=vr;e.IfcCostItem=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3895139033}};e.IfcCostSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SubmittedBy=n,this.PreparedBy=a,this.SubmittedOn=l,this.Status=h,this.TargetUsers=c,this.UpdateDate=A,this.ID=u,this.PredefinedType=p,this.type=1419761937}};e.IfcCoveringType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3295246426}};e.IfcCurtainWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};class Tr extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=681481545}}e.IfcDimensionCurveDirectedCallout=Tr;class _r extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=_r;class Rr extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Rr;e.IfcElectricalBaseProperties=class extends ji{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.ElectricCurrentType=a,this.InputVoltage=l,this.InputFrequency=h,this.FullLoadCurrent=c,this.MinimumCircuitCurrent=A,this.MaximumPowerInput=u,this.RatedPowerInput=p,this.InputPhase=d,this.type=360485395}};class Pr extends Xi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Pr;e.IfcElementAssembly=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};class Dr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Dr;class Nr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Nr;e.IfcEllipse=class extends gr{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=br;e.IfcEquipmentElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1962604670}};e.IfcEquipmentStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3272907226}};e.IfcEvaporativeCoolerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcFacetedBrep=class extends zi{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}};e.IfcFacetedBrepWithVoids=class extends zi{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Cr extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=647756555}}e.IfcFastener=Cr;class Or extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2489546625}}e.IfcFastenerType=Or;class Sr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Sr;class xr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=xr;class wr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=wr;class Br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Br;class Fr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Fr;e.IfcFlowMeterType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Mr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Mr;class Lr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Lr;class Ur extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=Ur;class Hr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=Hr;class Gr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=Gr;e.IfcFurnishingElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}};e.IfcFurnitureStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=814719939}};e.IfcGasTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=200128114}};e.IfcGrid=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.type=3009204131}};class kr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=kr;e.IfcHeatExchangerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcInventory=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.InventoryType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SkillSet=c,this.type=3827777499}};e.IfcLampType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcLinearDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2506943328}};e.IfcMechanicalFastener=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2108223431}};e.IfcMemberType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcMove=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.MoveFrom=A,this.MoveTo=u,this.PunchList=p,this.type=1916936684}};e.IfcOccupant=class extends fr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3588315303}};e.IfcOrderAction=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.ActionID=A,this.type=3425660407}};e.IfcOutletType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LifeCyclePhase=n,this.type=2382730787}};e.IfcPermit=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PermitID=n,this.type=3327091369}};e.IfcPipeFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolyline=class extends Er{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class Vr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=Vr;e.IfcProcedure=class extends Yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ProcedureID=n,this.ProcedureType=a,this.UserDefinedProcedureType=l,this.type=2744685151}};e.IfcProjectOrder=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ID=n,this.PredefinedType=a,this.Status=l,this.type=2904328755}};e.IfcProjectOrderRecord=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Records=n,this.PredefinedType=a,this.type=3642467123}};e.IfcProjectionElement=class extends xr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRadiusDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=3248260540}};e.IfcRailingType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRelAggregates=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRelAssignsTasks=class extends Ji{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.TimeForTask=l,this.type=2863920197}};e.IfcSanitaryTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcScheduleTimeControl=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ActualStart=n,this.EarlyStart=a,this.LateStart=l,this.ScheduleStart=h,this.ActualFinish=c,this.EarlyFinish=A,this.LateFinish=u,this.ScheduleFinish=p,this.ScheduleDuration=d,this.ActualDuration=f,this.RemainingTime=E,this.FreeFloat=m,this.TotalFloat=y,this.IsCritical=g,this.StatusTime=I,this.StartFloat=v,this.FinishFloat=T,this.Completion=_,this.type=3517283431}};e.IfcServiceLife=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ServiceLifeType=n,this.ServiceLifeDuration=a,this.type=4105383287}};e.IfcSite=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSpace=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.InteriorOrExteriorSpace=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceProgram=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SpaceProgramIdentifier=n,this.MaxRequiredArea=a,this.MinRequiredArea=l,this.RequestedLocation=h,this.StandardRequiredArea=c,this.type=652456506}};e.IfcSpaceType=class extends lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3812236995}};e.IfcStackTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};class jr extends hr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=682877961}}e.IfcStructuralAction=jr;class Qr extends cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=Qr;e.IfcStructuralCurveConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=4243806635}};class Wr extends Ar{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=214636428}}e.IfcStructuralCurveMember=Wr;e.IfcStructuralCurveMemberVarying=class extends Wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=2445595289}};class zr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1807405624}}e.IfcStructuralLinearAction=zr;e.IfcStructuralLinearActionVarying=class extends zr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=1721250024}};e.IfcStructuralLoadGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}};class Kr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1621171031}}e.IfcStructuralPlanarAction=Kr;e.IfcStructuralPlanarActionVarying=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=3987759626}};e.IfcStructuralPointAction=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=2082059205}};e.IfcStructuralPointConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=734778138}};e.IfcStructuralPointReaction=class extends ur{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};e.IfcStructuralSurfaceConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SubContractor=c,this.JobDescription=A,this.type=148013059}};e.IfcSwitchingDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class Yr extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=Yr;e.IfcTankType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTimeSeriesSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ApplicableDates=n,this.TimeSeriesScheduleType=a,this.TimeSeries=l,this.type=1637806684}};e.IfcTransformerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OperationType=h,this.CapacityByWeight=c,this.CapacityByNumber=A,this.type=1620046519}};e.IfcTrimmedCurve=class extends Er{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVirtualElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};class Xr extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=1028945134}}e.IfcWorkControl=Xr;e.IfcWorkPlan=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=4218914973}};e.IfcWorkSchedule=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=3342526732}};e.IfcZone=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1033361043}};e.Ifc2DCompositeCurve=class extends yr{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1213861670}};e.IfcActionRequest=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.RequestID=n,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAngularDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2470393545}};e.IfcAsset=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.AssetID=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};class Zr extends Er{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Zr;e.IfcBeamType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};class qr extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1916977116}}e.IfcBezierCurve=qr;e.IfcBoilerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Jr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=Jr;class $r extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=52481810}}e.IfcBuildingElementComponent=$r;e.IfcBuildingElementPart=class extends $r{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2979338954}};e.IfcBuildingElementProxy=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.CompositionType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcCableCarrierFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcCircle=class extends gr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCoilType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=843113511}};e.IfcCompressorType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcCondition=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2188551683}};e.IfcConditionCriterion=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Criterion=n,this.CriterionDateTime=a,this.type=1163958913}};e.IfcConstructionEquipmentResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.Suppliers=c,this.UsageRatio=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=488727124}};e.IfcCooledBeamType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3495092785}};e.IfcDamperType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiameterDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=4147604152}};e.IfcDiscreteAccessory=class extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1335981549}};class eo extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2635815018}}e.IfcDiscreteAccessoryType=eo;e.IfcDistributionChamberElementType=class extends Rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class to extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=to;class so extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=so;class io extends so{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=io;e.IfcDistributionPort=class extends Vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.type=3041715199}};e.IfcDoor=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=395920057}};e.IfcDuctFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};class ro extends wr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.type=855621170}}e.IfcEdgeFeature=ro;e.IfcElectricApplianceType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricFlowStorageDeviceType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricHeaterType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1365060375}};e.IfcElectricMotorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};e.IfcElectricalCircuit=class extends Yr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1634875225}};e.IfcElectricalElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=857184966}};e.IfcEnergyConversionDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}};e.IfcFanType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class oo extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=oo;e.IfcFlowFitting=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}};e.IfcFlowInstrumentType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMovingDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}};e.IfcFlowSegment=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}};e.IfcFlowStorageDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}};e.IfcFlowTerminal=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}};e.IfcFlowTreatmentDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}};e.IfcFooting=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcMember=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1073191201}};e.IfcPile=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPlate=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3171933400}};e.IfcRailing=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=3024970846}};e.IfcRampFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3283111854}};e.IfcRationalBezierCurve=class extends qr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.WeightsData=n,this.type=3055160366}};class no extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=no;e.IfcReinforcingMesh=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.type=2320036040}};e.IfcRoof=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=2016517767}};e.IfcRoundedEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Radius=c,this.type=1376911519}};e.IfcSensorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcSlab=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcStair=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=331165859}};e.IfcStairFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRiser=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends Yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.type=2515109513}};e.IfcTendon=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=2347447852}};e.IfcVibrationIsolatorType=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};class ao extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2391406946}}e.IfcWall=ao;e.IfcWallStandardCase=class extends ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3512223829}};e.IfcWindow=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=3304561284}};e.IfcActuatorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAlarmType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcBeam=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=753842376}};e.IfcChamferEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Width=c,this.Height=A,this.type=2454782716}};e.IfcControllerType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcDistributionChamberElement=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1052013943}};e.IfcDistributionControlElement=class extends so{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ControlElementId=h,this.type=1062813311}};e.IfcElectricDistributionPoint=class extends oo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.DistributionPointFunction=h,this.UserDefinedFunction=c,this.type=3700593921}};e.IfcReinforcingBar=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.BarRole=p,this.BarSurface=d,this.type=979691226}}}(og||(og={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.SNOW_S={type:3,value:"SNOW_S"},i.WIND_W={type:3,value:"WIND_W"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.FIRE={type:3,value:"FIRE"},i.IMPULSE={type:3,value:"IMPULSE"},i.IMPACT={type:3,value:"IMPACT"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.ERECTION={type:3,value:"ERECTION"},i.PROPPING={type:3,value:"PROPPING"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.CREEP={type:3,value:"CREEP"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.ICE={type:3,value:"ICE"},i.CURRENT={type:3,value:"CURRENT"},i.WAVE={type:3,value:"WAVE"},i.RAIN={type:3,value:"RAIN"},i.BRAKES={type:3,value:"BRAKES"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.HOME={type:3,value:"HOME"},n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.AMPLIFIER={type:3,value:"AMPLIFIER"},f.CAMERA={type:3,value:"CAMERA"},f.DISPLAY={type:3,value:"DISPLAY"},f.MICROPHONE={type:3,value:"MICROPHONE"},f.PLAYER={type:3,value:"PLAYER"},f.PROJECTOR={type:3,value:"PROJECTOR"},f.RECEIVER={type:3,value:"RECEIVER"},f.SPEAKER={type:3,value:"SPEAKER"},f.SWITCHER={type:3,value:"SWITCHER"},f.TELEPHONE={type:3,value:"TELEPHONE"},f.TUNER={type:3,value:"TUNER"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=f;class E{}E.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},E.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},E.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},E.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},E.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},E.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=E;class m{}m.PLANE_SURF={type:3,value:"PLANE_SURF"},m.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},m.CONICAL_SURF={type:3,value:"CONICAL_SURF"},m.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},m.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},m.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},m.RULED_SURF={type:3,value:"RULED_SURF"},m.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},m.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},m.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},m.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=m;class y{}y.BEAM={type:3,value:"BEAM"},y.JOIST={type:3,value:"JOIST"},y.HOLLOWCORE={type:3,value:"HOLLOWCORE"},y.LINTEL={type:3,value:"LINTEL"},y.SPANDREL={type:3,value:"SPANDREL"},y.T_BEAM={type:3,value:"T_BEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=y;class g{}g.GREATERTHAN={type:3,value:"GREATERTHAN"},g.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},g.LESSTHAN={type:3,value:"LESSTHAN"},g.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},g.EQUALTO={type:3,value:"EQUALTO"},g.NOTEQUALTO={type:3,value:"NOTEQUALTO"},g.INCLUDES={type:3,value:"INCLUDES"},g.NOTINCLUDES={type:3,value:"NOTINCLUDES"},g.INCLUDEDIN={type:3,value:"INCLUDEDIN"},g.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},e.IfcBenchmarkEnum=g;class I{}I.WATER={type:3,value:"WATER"},I.STEAM={type:3,value:"STEAM"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=I;class v{}v.UNION={type:3,value:"UNION"},v.INTERSECTION={type:3,value:"INTERSECTION"},v.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=v;class T{}T.INSULATION={type:3,value:"INSULATION"},T.PRECASTPANEL={type:3,value:"PRECASTPANEL"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=T;class _{}_.COMPLEX={type:3,value:"COMPLEX"},_.ELEMENT={type:3,value:"ELEMENT"},_.PARTIAL={type:3,value:"PARTIAL"},_.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},_.PROVISIONFORSPACE={type:3,value:"PROVISIONFORSPACE"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=_;class R{}R.FENESTRATION={type:3,value:"FENESTRATION"},R.FOUNDATION={type:3,value:"FOUNDATION"},R.LOADBEARING={type:3,value:"LOADBEARING"},R.OUTERSHELL={type:3,value:"OUTERSHELL"},R.SHADING={type:3,value:"SHADING"},R.TRANSPORT={type:3,value:"TRANSPORT"},R.USERDEFINED={type:3,value:"USERDEFINED"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=R;class P{}P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=P;class D{}D.BEND={type:3,value:"BEND"},D.CROSS={type:3,value:"CROSS"},D.REDUCER={type:3,value:"REDUCER"},D.TEE={type:3,value:"TEE"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=D;class N{}N.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},N.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},N.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},N.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=N;class b{}b.CONNECTOR={type:3,value:"CONNECTOR"},b.ENTRY={type:3,value:"ENTRY"},b.EXIT={type:3,value:"EXIT"},b.JUNCTION={type:3,value:"JUNCTION"},b.TRANSITION={type:3,value:"TRANSITION"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=b;class C{}C.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},C.CABLESEGMENT={type:3,value:"CABLESEGMENT"},C.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},C.CORESEGMENT={type:3,value:"CORESEGMENT"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=C;class O{}O.NOCHANGE={type:3,value:"NOCHANGE"},O.MODIFIED={type:3,value:"MODIFIED"},O.ADDED={type:3,value:"ADDED"},O.DELETED={type:3,value:"DELETED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=O;class S{}S.AIRCOOLED={type:3,value:"AIRCOOLED"},S.WATERCOOLED={type:3,value:"WATERCOOLED"},S.HEATRECOVERY={type:3,value:"HEATRECOVERY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=S;class x{}x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=x;class w{}w.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},w.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},w.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},w.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},w.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},w.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},w.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=w;class B{}B.COLUMN={type:3,value:"COLUMN"},B.PILASTER={type:3,value:"PILASTER"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=B;class F{}F.ANTENNA={type:3,value:"ANTENNA"},F.COMPUTER={type:3,value:"COMPUTER"},F.FAX={type:3,value:"FAX"},F.GATEWAY={type:3,value:"GATEWAY"},F.MODEM={type:3,value:"MODEM"},F.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},F.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},F.NETWORKHUB={type:3,value:"NETWORKHUB"},F.PRINTER={type:3,value:"PRINTER"},F.REPEATER={type:3,value:"REPEATER"},F.ROUTER={type:3,value:"ROUTER"},F.SCANNER={type:3,value:"SCANNER"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=F;class M{}M.P_COMPLEX={type:3,value:"P_COMPLEX"},M.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=M;class L{}L.DYNAMIC={type:3,value:"DYNAMIC"},L.RECIPROCATING={type:3,value:"RECIPROCATING"},L.ROTARY={type:3,value:"ROTARY"},L.SCROLL={type:3,value:"SCROLL"},L.TROCHOIDAL={type:3,value:"TROCHOIDAL"},L.SINGLESTAGE={type:3,value:"SINGLESTAGE"},L.BOOSTER={type:3,value:"BOOSTER"},L.OPENTYPE={type:3,value:"OPENTYPE"},L.HERMETIC={type:3,value:"HERMETIC"},L.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},L.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},L.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},L.ROTARYVANE={type:3,value:"ROTARYVANE"},L.SINGLESCREW={type:3,value:"SINGLESCREW"},L.TWINSCREW={type:3,value:"TWINSCREW"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=L;class U{}U.AIRCOOLED={type:3,value:"AIRCOOLED"},U.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},U.WATERCOOLED={type:3,value:"WATERCOOLED"},U.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},U.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},U.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},U.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=U;class H{}H.ATPATH={type:3,value:"ATPATH"},H.ATSTART={type:3,value:"ATSTART"},H.ATEND={type:3,value:"ATEND"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=H;class G{}G.HARD={type:3,value:"HARD"},G.SOFT={type:3,value:"SOFT"},G.ADVISORY={type:3,value:"ADVISORY"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=G;class k{}k.DEMOLISHING={type:3,value:"DEMOLISHING"},k.EARTHMOVING={type:3,value:"EARTHMOVING"},k.ERECTING={type:3,value:"ERECTING"},k.HEATING={type:3,value:"HEATING"},k.LIGHTING={type:3,value:"LIGHTING"},k.PAVING={type:3,value:"PAVING"},k.PUMPING={type:3,value:"PUMPING"},k.TRANSPORTING={type:3,value:"TRANSPORTING"},k.USERDEFINED={type:3,value:"USERDEFINED"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=k;class V{}V.AGGREGATES={type:3,value:"AGGREGATES"},V.CONCRETE={type:3,value:"CONCRETE"},V.DRYWALL={type:3,value:"DRYWALL"},V.FUEL={type:3,value:"FUEL"},V.GYPSUM={type:3,value:"GYPSUM"},V.MASONRY={type:3,value:"MASONRY"},V.METAL={type:3,value:"METAL"},V.PLASTIC={type:3,value:"PLASTIC"},V.WOOD={type:3,value:"WOOD"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},V.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=V;class j{}j.ASSEMBLY={type:3,value:"ASSEMBLY"},j.FORMWORK={type:3,value:"FORMWORK"},j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=j;class Q{}Q.FLOATING={type:3,value:"FLOATING"},Q.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},Q.PROPORTIONAL={type:3,value:"PROPORTIONAL"},Q.MULTIPOSITION={type:3,value:"MULTIPOSITION"},Q.TWOPOSITION={type:3,value:"TWOPOSITION"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=Q;class W{}W.ACTIVE={type:3,value:"ACTIVE"},W.PASSIVE={type:3,value:"PASSIVE"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=W;class z{}z.NATURALDRAFT={type:3,value:"NATURALDRAFT"},z.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},z.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=z;class K{}K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=K;class Y{}Y.BUDGET={type:3,value:"BUDGET"},Y.COSTPLAN={type:3,value:"COSTPLAN"},Y.ESTIMATE={type:3,value:"ESTIMATE"},Y.TENDER={type:3,value:"TENDER"},Y.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},Y.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},Y.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=Y;class X{}X.CEILING={type:3,value:"CEILING"},X.FLOORING={type:3,value:"FLOORING"},X.CLADDING={type:3,value:"CLADDING"},X.ROOFING={type:3,value:"ROOFING"},X.MOLDING={type:3,value:"MOLDING"},X.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},X.INSULATION={type:3,value:"INSULATION"},X.MEMBRANE={type:3,value:"MEMBRANE"},X.SLEEVING={type:3,value:"SLEEVING"},X.WRAPPING={type:3,value:"WRAPPING"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=X;class Z{}Z.OFFICE={type:3,value:"OFFICE"},Z.SITE={type:3,value:"SITE"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=Z;class q{}q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=q;class J{}J.LINEAR={type:3,value:"LINEAR"},J.LOG_LINEAR={type:3,value:"LOG_LINEAR"},J.LOG_LOG={type:3,value:"LOG_LOG"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=J;class ${}$.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},$.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},$.BLASTDAMPER={type:3,value:"BLASTDAMPER"},$.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},$.FIREDAMPER={type:3,value:"FIREDAMPER"},$.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},$.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},$.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},$.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},$.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},$.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=$;class ee{}ee.MEASURED={type:3,value:"MEASURED"},ee.PREDICTED={type:3,value:"PREDICTED"},ee.SIMULATED={type:3,value:"SIMULATED"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=ee;class te{}te.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},te.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},te.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},te.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},te.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},te.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},te.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},te.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},te.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},te.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},te.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},te.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},te.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},te.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},te.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},te.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},te.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},te.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},te.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},te.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},te.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},te.TORQUEUNIT={type:3,value:"TORQUEUNIT"},te.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},te.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},te.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},te.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},te.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},te.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},te.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},te.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},te.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},te.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},te.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},te.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},te.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},te.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},te.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},te.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},te.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},te.PHUNIT={type:3,value:"PHUNIT"},te.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},te.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},te.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},te.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},te.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},te.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},te.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},te.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},te.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},te.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},te.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},te.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},te.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=te;class se{}se.POSITIVE={type:3,value:"POSITIVE"},se.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=se;class ie{}ie.ANCHORPLATE={type:3,value:"ANCHORPLATE"},ie.BRACKET={type:3,value:"BRACKET"},ie.SHOE={type:3,value:"SHOE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=ie;class re{}re.FORMEDDUCT={type:3,value:"FORMEDDUCT"},re.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},re.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},re.MANHOLE={type:3,value:"MANHOLE"},re.METERCHAMBER={type:3,value:"METERCHAMBER"},re.SUMP={type:3,value:"SUMP"},re.TRENCH={type:3,value:"TRENCH"},re.VALVECHAMBER={type:3,value:"VALVECHAMBER"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=re;class oe{}oe.CABLE={type:3,value:"CABLE"},oe.CABLECARRIER={type:3,value:"CABLECARRIER"},oe.DUCT={type:3,value:"DUCT"},oe.PIPE={type:3,value:"PIPE"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=oe;class ne{}ne.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},ne.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},ne.CHEMICAL={type:3,value:"CHEMICAL"},ne.CHILLEDWATER={type:3,value:"CHILLEDWATER"},ne.COMMUNICATION={type:3,value:"COMMUNICATION"},ne.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},ne.CONDENSERWATER={type:3,value:"CONDENSERWATER"},ne.CONTROL={type:3,value:"CONTROL"},ne.CONVEYING={type:3,value:"CONVEYING"},ne.DATA={type:3,value:"DATA"},ne.DISPOSAL={type:3,value:"DISPOSAL"},ne.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},ne.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},ne.DRAINAGE={type:3,value:"DRAINAGE"},ne.EARTHING={type:3,value:"EARTHING"},ne.ELECTRICAL={type:3,value:"ELECTRICAL"},ne.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},ne.EXHAUST={type:3,value:"EXHAUST"},ne.FIREPROTECTION={type:3,value:"FIREPROTECTION"},ne.FUEL={type:3,value:"FUEL"},ne.GAS={type:3,value:"GAS"},ne.HAZARDOUS={type:3,value:"HAZARDOUS"},ne.HEATING={type:3,value:"HEATING"},ne.LIGHTING={type:3,value:"LIGHTING"},ne.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},ne.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},ne.OIL={type:3,value:"OIL"},ne.OPERATIONAL={type:3,value:"OPERATIONAL"},ne.POWERGENERATION={type:3,value:"POWERGENERATION"},ne.RAINWATER={type:3,value:"RAINWATER"},ne.REFRIGERATION={type:3,value:"REFRIGERATION"},ne.SECURITY={type:3,value:"SECURITY"},ne.SEWAGE={type:3,value:"SEWAGE"},ne.SIGNAL={type:3,value:"SIGNAL"},ne.STORMWATER={type:3,value:"STORMWATER"},ne.TELEPHONE={type:3,value:"TELEPHONE"},ne.TV={type:3,value:"TV"},ne.VACUUM={type:3,value:"VACUUM"},ne.VENT={type:3,value:"VENT"},ne.VENTILATION={type:3,value:"VENTILATION"},ne.WASTEWATER={type:3,value:"WASTEWATER"},ne.WATERSUPPLY={type:3,value:"WATERSUPPLY"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=ne;class ae{}ae.PUBLIC={type:3,value:"PUBLIC"},ae.RESTRICTED={type:3,value:"RESTRICTED"},ae.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ae.PERSONAL={type:3,value:"PERSONAL"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ae;class le{}le.DRAFT={type:3,value:"DRAFT"},le.FINALDRAFT={type:3,value:"FINALDRAFT"},le.FINAL={type:3,value:"FINAL"},le.REVISION={type:3,value:"REVISION"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=le;class he{}he.SWINGING={type:3,value:"SWINGING"},he.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},he.SLIDING={type:3,value:"SLIDING"},he.FOLDING={type:3,value:"FOLDING"},he.REVOLVING={type:3,value:"REVOLVING"},he.ROLLINGUP={type:3,value:"ROLLINGUP"},he.FIXEDPANEL={type:3,value:"FIXEDPANEL"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=he;class ce{}ce.LEFT={type:3,value:"LEFT"},ce.MIDDLE={type:3,value:"MIDDLE"},ce.RIGHT={type:3,value:"RIGHT"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=ce;class Ae{}Ae.ALUMINIUM={type:3,value:"ALUMINIUM"},Ae.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ae.STEEL={type:3,value:"STEEL"},Ae.WOOD={type:3,value:"WOOD"},Ae.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ae.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Ae.PLASTIC={type:3,value:"PLASTIC"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Ae;class ue{}ue.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},ue.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},ue.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},ue.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},ue.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},ue.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},ue.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},ue.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},ue.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},ue.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},ue.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},ue.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},ue.REVOLVING={type:3,value:"REVOLVING"},ue.ROLLINGUP={type:3,value:"ROLLINGUP"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=ue;class pe{}pe.DOOR={type:3,value:"DOOR"},pe.GATE={type:3,value:"GATE"},pe.TRAPDOOR={type:3,value:"TRAPDOOR"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=pe;class de{}de.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},de.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},de.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},de.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},de.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},de.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},de.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},de.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},de.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},de.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},de.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},de.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},de.REVOLVING={type:3,value:"REVOLVING"},de.ROLLINGUP={type:3,value:"ROLLINGUP"},de.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},de.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=de;class fe{}fe.BEND={type:3,value:"BEND"},fe.CONNECTOR={type:3,value:"CONNECTOR"},fe.ENTRY={type:3,value:"ENTRY"},fe.EXIT={type:3,value:"EXIT"},fe.JUNCTION={type:3,value:"JUNCTION"},fe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},fe.TRANSITION={type:3,value:"TRANSITION"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=fe;class Ee{}Ee.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ee.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Ee;class me{}me.FLATOVAL={type:3,value:"FLATOVAL"},me.RECTANGULAR={type:3,value:"RECTANGULAR"},me.ROUND={type:3,value:"ROUND"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=me;class ye{}ye.DISHWASHER={type:3,value:"DISHWASHER"},ye.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ye.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},ye.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ye.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},ye.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},ye.FREEZER={type:3,value:"FREEZER"},ye.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ye.HANDDRYER={type:3,value:"HANDDRYER"},ye.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},ye.MICROWAVE={type:3,value:"MICROWAVE"},ye.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ye.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ye.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ye.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ye.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ye;class ge{}ge.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},ge.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},ge.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},ge.SWITCHBOARD={type:3,value:"SWITCHBOARD"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=ge;class Ie{}Ie.BATTERY={type:3,value:"BATTERY"},Ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Ie.UPS={type:3,value:"UPS"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Ie;class ve{}ve.CHP={type:3,value:"CHP"},ve.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},ve.STANDALONE={type:3,value:"STANDALONE"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=ve;class Te{}Te.DC={type:3,value:"DC"},Te.INDUCTION={type:3,value:"INDUCTION"},Te.POLYPHASE={type:3,value:"POLYPHASE"},Te.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},Te.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=Te;class _e{}_e.TIMECLOCK={type:3,value:"TIMECLOCK"},_e.TIMEDELAY={type:3,value:"TIMEDELAY"},_e.RELAY={type:3,value:"RELAY"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=_e;class Re{}Re.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},Re.ARCH={type:3,value:"ARCH"},Re.BEAM_GRID={type:3,value:"BEAM_GRID"},Re.BRACED_FRAME={type:3,value:"BRACED_FRAME"},Re.GIRDER={type:3,value:"GIRDER"},Re.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},Re.RIGID_FRAME={type:3,value:"RIGID_FRAME"},Re.SLAB_FIELD={type:3,value:"SLAB_FIELD"},Re.TRUSS={type:3,value:"TRUSS"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=Re;class Pe{}Pe.COMPLEX={type:3,value:"COMPLEX"},Pe.ELEMENT={type:3,value:"ELEMENT"},Pe.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Pe;class De{}De.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},De.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=De;class Ne{}Ne.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Ne.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Ne.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Ne.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Ne.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Ne.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Ne.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Ne;class be{}be.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},be.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},be.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},be.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},be.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},be.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=be;class Ce{}Ce.EVENTRULE={type:3,value:"EVENTRULE"},Ce.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},Ce.EVENTTIME={type:3,value:"EVENTTIME"},Ce.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=Ce;class Oe{}Oe.STARTEVENT={type:3,value:"STARTEVENT"},Oe.ENDEVENT={type:3,value:"ENDEVENT"},Oe.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Oe;class Se{}Se.EXTERNAL={type:3,value:"EXTERNAL"},Se.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Se.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Se.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Se;class xe{}xe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},xe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},xe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},xe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},xe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},xe.VANEAXIAL={type:3,value:"VANEAXIAL"},xe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=xe;class we{}we.GLUE={type:3,value:"GLUE"},we.MORTAR={type:3,value:"MORTAR"},we.WELD={type:3,value:"WELD"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=we;class Be{}Be.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},Be.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},Be.ODORFILTER={type:3,value:"ODORFILTER"},Be.OILFILTER={type:3,value:"OILFILTER"},Be.STRAINER={type:3,value:"STRAINER"},Be.WATERFILTER={type:3,value:"WATERFILTER"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=Be;class Fe{}Fe.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Fe.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Fe.HOSEREEL={type:3,value:"HOSEREEL"},Fe.SPRINKLER={type:3,value:"SPRINKLER"},Fe.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Fe;class Me{}Me.SOURCE={type:3,value:"SOURCE"},Me.SINK={type:3,value:"SINK"},Me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=Me;class Le{}Le.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},Le.THERMOMETER={type:3,value:"THERMOMETER"},Le.AMMETER={type:3,value:"AMMETER"},Le.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},Le.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},Le.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},Le.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},Le.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=Le;class Ue{}Ue.ENERGYMETER={type:3,value:"ENERGYMETER"},Ue.GASMETER={type:3,value:"GASMETER"},Ue.OILMETER={type:3,value:"OILMETER"},Ue.WATERMETER={type:3,value:"WATERMETER"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=Ue;class He{}He.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},He.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},He.PAD_FOOTING={type:3,value:"PAD_FOOTING"},He.PILE_CAP={type:3,value:"PILE_CAP"},He.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=He;class Ge{}Ge.CHAIR={type:3,value:"CHAIR"},Ge.TABLE={type:3,value:"TABLE"},Ge.DESK={type:3,value:"DESK"},Ge.BED={type:3,value:"BED"},Ge.FILECABINET={type:3,value:"FILECABINET"},Ge.SHELF={type:3,value:"SHELF"},Ge.SOFA={type:3,value:"SOFA"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=Ge;class ke{}ke.TERRAIN={type:3,value:"TERRAIN"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=ke;class Ve{}Ve.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Ve.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Ve.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Ve.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Ve.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Ve.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Ve.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Ve;class je{}je.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},je.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=je;class Qe{}Qe.RECTANGULAR={type:3,value:"RECTANGULAR"},Qe.RADIAL={type:3,value:"RADIAL"},Qe.TRIANGULAR={type:3,value:"TRIANGULAR"},Qe.IRREGULAR={type:3,value:"IRREGULAR"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=Qe;class We{}We.PLATE={type:3,value:"PLATE"},We.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=We;class ze{}ze.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ze.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ze.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ze.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ze.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ze.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ze.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ze.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ze.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ze.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ze.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ze.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ze.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ze;class Ke{}Ke.CYCLONIC={type:3,value:"CYCLONIC"},Ke.GREASE={type:3,value:"GREASE"},Ke.OIL={type:3,value:"OIL"},Ke.PETROL={type:3,value:"PETROL"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=Ke;class Ye{}Ye.INTERNAL={type:3,value:"INTERNAL"},Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=Ye;class Xe{}Xe.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Xe.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Xe.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Xe;class Ze{}Ze.DATA={type:3,value:"DATA"},Ze.POWER={type:3,value:"POWER"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ze;class qe{}qe.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},qe.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},qe.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},qe.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=qe;class Je{}Je.ADMINISTRATION={type:3,value:"ADMINISTRATION"},Je.CARPENTRY={type:3,value:"CARPENTRY"},Je.CLEANING={type:3,value:"CLEANING"},Je.CONCRETE={type:3,value:"CONCRETE"},Je.DRYWALL={type:3,value:"DRYWALL"},Je.ELECTRIC={type:3,value:"ELECTRIC"},Je.FINISHING={type:3,value:"FINISHING"},Je.FLOORING={type:3,value:"FLOORING"},Je.GENERAL={type:3,value:"GENERAL"},Je.HVAC={type:3,value:"HVAC"},Je.LANDSCAPING={type:3,value:"LANDSCAPING"},Je.MASONRY={type:3,value:"MASONRY"},Je.PAINTING={type:3,value:"PAINTING"},Je.PAVING={type:3,value:"PAVING"},Je.PLUMBING={type:3,value:"PLUMBING"},Je.ROOFING={type:3,value:"ROOFING"},Je.SITEGRADING={type:3,value:"SITEGRADING"},Je.STEELWORK={type:3,value:"STEELWORK"},Je.SURVEYING={type:3,value:"SURVEYING"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=Je;class $e{}$e.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},$e.FLUORESCENT={type:3,value:"FLUORESCENT"},$e.HALOGEN={type:3,value:"HALOGEN"},$e.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},$e.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},$e.LED={type:3,value:"LED"},$e.METALHALIDE={type:3,value:"METALHALIDE"},$e.OLED={type:3,value:"OLED"},$e.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=$e;class et{}et.AXIS1={type:3,value:"AXIS1"},et.AXIS2={type:3,value:"AXIS2"},et.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=et;class tt{}tt.TYPE_A={type:3,value:"TYPE_A"},tt.TYPE_B={type:3,value:"TYPE_B"},tt.TYPE_C={type:3,value:"TYPE_C"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=tt;class st{}st.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},st.FLUORESCENT={type:3,value:"FLUORESCENT"},st.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},st.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},st.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},st.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},st.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},st.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},st.METALHALIDE={type:3,value:"METALHALIDE"},st.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=st;class it{}it.POINTSOURCE={type:3,value:"POINTSOURCE"},it.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},it.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=it;class rt{}rt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},rt.LOAD_CASE={type:3,value:"LOAD_CASE"},rt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=rt;class ot{}ot.LOGICALAND={type:3,value:"LOGICALAND"},ot.LOGICALOR={type:3,value:"LOGICALOR"},ot.LOGICALXOR={type:3,value:"LOGICALXOR"},ot.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},ot.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},e.IfcLogicalOperatorEnum=ot;class nt{}nt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},nt.BOLT={type:3,value:"BOLT"},nt.DOWEL={type:3,value:"DOWEL"},nt.NAIL={type:3,value:"NAIL"},nt.NAILPLATE={type:3,value:"NAILPLATE"},nt.RIVET={type:3,value:"RIVET"},nt.SCREW={type:3,value:"SCREW"},nt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},nt.STAPLE={type:3,value:"STAPLE"},nt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=nt;class at{}at.AIRSTATION={type:3,value:"AIRSTATION"},at.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},at.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},at.OXYGENPLANT={type:3,value:"OXYGENPLANT"},at.VACUUMSTATION={type:3,value:"VACUUMSTATION"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=at;class lt{}lt.BRACE={type:3,value:"BRACE"},lt.CHORD={type:3,value:"CHORD"},lt.COLLAR={type:3,value:"COLLAR"},lt.MEMBER={type:3,value:"MEMBER"},lt.MULLION={type:3,value:"MULLION"},lt.PLATE={type:3,value:"PLATE"},lt.POST={type:3,value:"POST"},lt.PURLIN={type:3,value:"PURLIN"},lt.RAFTER={type:3,value:"RAFTER"},lt.STRINGER={type:3,value:"STRINGER"},lt.STRUT={type:3,value:"STRUT"},lt.STUD={type:3,value:"STUD"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=lt;class ht{}ht.BELTDRIVE={type:3,value:"BELTDRIVE"},ht.COUPLING={type:3,value:"COUPLING"},ht.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},ht.USERDEFINED={type:3,value:"USERDEFINED"},ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=ht;class ct{}ct.NULL={type:3,value:"NULL"},e.IfcNullStyle=ct;class At{}At.PRODUCT={type:3,value:"PRODUCT"},At.PROCESS={type:3,value:"PROCESS"},At.CONTROL={type:3,value:"CONTROL"},At.RESOURCE={type:3,value:"RESOURCE"},At.ACTOR={type:3,value:"ACTOR"},At.GROUP={type:3,value:"GROUP"},At.PROJECT={type:3,value:"PROJECT"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=At;class ut{}ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},ut.CODEWAIVER={type:3,value:"CODEWAIVER"},ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},ut.EXTERNAL={type:3,value:"EXTERNAL"},ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},ut.MODELVIEW={type:3,value:"MODELVIEW"},ut.PARAMETER={type:3,value:"PARAMETER"},ut.REQUIREMENT={type:3,value:"REQUIREMENT"},ut.SPECIFICATION={type:3,value:"SPECIFICATION"},ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=ut;class pt{}pt.ASSIGNEE={type:3,value:"ASSIGNEE"},pt.ASSIGNOR={type:3,value:"ASSIGNOR"},pt.LESSEE={type:3,value:"LESSEE"},pt.LESSOR={type:3,value:"LESSOR"},pt.LETTINGAGENT={type:3,value:"LETTINGAGENT"},pt.OWNER={type:3,value:"OWNER"},pt.TENANT={type:3,value:"TENANT"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=pt;class dt{}dt.OPENING={type:3,value:"OPENING"},dt.RECESS={type:3,value:"RECESS"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=dt;class ft{}ft.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},ft.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},ft.POWEROUTLET={type:3,value:"POWEROUTLET"},ft.DATAOUTLET={type:3,value:"DATAOUTLET"},ft.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},ft.USERDEFINED={type:3,value:"USERDEFINED"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=ft;class Et{}Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=Et;class mt{}mt.GRILL={type:3,value:"GRILL"},mt.LOUVER={type:3,value:"LOUVER"},mt.SCREEN={type:3,value:"SCREEN"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=mt;class yt{}yt.ACCESS={type:3,value:"ACCESS"},yt.BUILDING={type:3,value:"BUILDING"},yt.WORK={type:3,value:"WORK"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=yt;class gt{}gt.PHYSICAL={type:3,value:"PHYSICAL"},gt.VIRTUAL={type:3,value:"VIRTUAL"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=gt;class It{}It.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},It.COMPOSITE={type:3,value:"COMPOSITE"},It.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},It.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=It;class vt{}vt.BORED={type:3,value:"BORED"},vt.DRIVEN={type:3,value:"DRIVEN"},vt.JETGROUTING={type:3,value:"JETGROUTING"},vt.COHESION={type:3,value:"COHESION"},vt.FRICTION={type:3,value:"FRICTION"},vt.SUPPORT={type:3,value:"SUPPORT"},vt.USERDEFINED={type:3,value:"USERDEFINED"},vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=vt;class Tt{}Tt.BEND={type:3,value:"BEND"},Tt.CONNECTOR={type:3,value:"CONNECTOR"},Tt.ENTRY={type:3,value:"ENTRY"},Tt.EXIT={type:3,value:"EXIT"},Tt.JUNCTION={type:3,value:"JUNCTION"},Tt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Tt.TRANSITION={type:3,value:"TRANSITION"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Tt;class _t{}_t.CULVERT={type:3,value:"CULVERT"},_t.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},_t.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},_t.GUTTER={type:3,value:"GUTTER"},_t.SPOOL={type:3,value:"SPOOL"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=_t;class Rt{}Rt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Rt.SHEET={type:3,value:"SHEET"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Rt;class Pt{}Pt.CURVE3D={type:3,value:"CURVE3D"},Pt.PCURVE_S1={type:3,value:"PCURVE_S1"},Pt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Pt;class Dt{}Dt.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Dt.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Dt.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Dt.CALIBRATION={type:3,value:"CALIBRATION"},Dt.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Dt.SHUTDOWN={type:3,value:"SHUTDOWN"},Dt.STARTUP={type:3,value:"STARTUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Dt;class Nt{}Nt.CURVE={type:3,value:"CURVE"},Nt.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=Nt;class bt{}bt.CHANGEORDER={type:3,value:"CHANGEORDER"},bt.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},bt.MOVEORDER={type:3,value:"MOVEORDER"},bt.PURCHASEORDER={type:3,value:"PURCHASEORDER"},bt.WORKORDER={type:3,value:"WORKORDER"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=bt;class Ct{}Ct.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},Ct.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=Ct;class Ot{}Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=Ot;class St{}St.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},St.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},St.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},St.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},St.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},St.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},St.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=St;class xt{}xt.ELECTRONIC={type:3,value:"ELECTRONIC"},xt.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},xt.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},xt.THERMAL={type:3,value:"THERMAL"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=xt;class wt{}wt.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},wt.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},wt.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},wt.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},wt.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},wt.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},wt.VARISTOR={type:3,value:"VARISTOR"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=wt;class Bt{}Bt.CIRCULATOR={type:3,value:"CIRCULATOR"},Bt.ENDSUCTION={type:3,value:"ENDSUCTION"},Bt.SPLITCASE={type:3,value:"SPLITCASE"},Bt.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},Bt.SUMPPUMP={type:3,value:"SUMPPUMP"},Bt.VERTICALINLINE={type:3,value:"VERTICALINLINE"},Bt.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=Bt;class Ft{}Ft.HANDRAIL={type:3,value:"HANDRAIL"},Ft.GUARDRAIL={type:3,value:"GUARDRAIL"},Ft.BALUSTRADE={type:3,value:"BALUSTRADE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=Ft;class Mt{}Mt.STRAIGHT={type:3,value:"STRAIGHT"},Mt.SPIRAL={type:3,value:"SPIRAL"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=Mt;class Lt{}Lt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},Lt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},Lt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},Lt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},Lt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},Lt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},Lt.USERDEFINED={type:3,value:"USERDEFINED"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=Lt;class Ut{}Ut.DAILY={type:3,value:"DAILY"},Ut.WEEKLY={type:3,value:"WEEKLY"},Ut.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},Ut.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},Ut.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},Ut.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},Ut.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},Ut.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=Ut;class Ht{}Ht.BLINN={type:3,value:"BLINN"},Ht.FLAT={type:3,value:"FLAT"},Ht.GLASS={type:3,value:"GLASS"},Ht.MATT={type:3,value:"MATT"},Ht.METAL={type:3,value:"METAL"},Ht.MIRROR={type:3,value:"MIRROR"},Ht.PHONG={type:3,value:"PHONG"},Ht.PLASTIC={type:3,value:"PLASTIC"},Ht.STRAUSS={type:3,value:"STRAUSS"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Ht;class Gt{}Gt.MAIN={type:3,value:"MAIN"},Gt.SHEAR={type:3,value:"SHEAR"},Gt.LIGATURE={type:3,value:"LIGATURE"},Gt.STUD={type:3,value:"STUD"},Gt.PUNCHING={type:3,value:"PUNCHING"},Gt.EDGE={type:3,value:"EDGE"},Gt.RING={type:3,value:"RING"},Gt.ANCHORING={type:3,value:"ANCHORING"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=Gt;class kt{}kt.PLAIN={type:3,value:"PLAIN"},kt.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=kt;class Vt{}Vt.ANCHORING={type:3,value:"ANCHORING"},Vt.EDGE={type:3,value:"EDGE"},Vt.LIGATURE={type:3,value:"LIGATURE"},Vt.MAIN={type:3,value:"MAIN"},Vt.PUNCHING={type:3,value:"PUNCHING"},Vt.RING={type:3,value:"RING"},Vt.SHEAR={type:3,value:"SHEAR"},Vt.STUD={type:3,value:"STUD"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=jt;class Qt{}Qt.SUPPLIER={type:3,value:"SUPPLIER"},Qt.MANUFACTURER={type:3,value:"MANUFACTURER"},Qt.CONTRACTOR={type:3,value:"CONTRACTOR"},Qt.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Qt.ARCHITECT={type:3,value:"ARCHITECT"},Qt.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Qt.COSTENGINEER={type:3,value:"COSTENGINEER"},Qt.CLIENT={type:3,value:"CLIENT"},Qt.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Qt.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Qt.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Qt.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Qt.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Qt.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Qt.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Qt.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Qt.ENGINEER={type:3,value:"ENGINEER"},Qt.OWNER={type:3,value:"OWNER"},Qt.CONSULTANT={type:3,value:"CONSULTANT"},Qt.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Qt.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Qt.RESELLER={type:3,value:"RESELLER"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Qt;class Wt{}Wt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Wt.SHED_ROOF={type:3,value:"SHED_ROOF"},Wt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Wt.HIP_ROOF={type:3,value:"HIP_ROOF"},Wt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Wt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Wt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Wt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Wt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Wt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Wt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Wt.DOME_ROOF={type:3,value:"DOME_ROOF"},Wt.FREEFORM={type:3,value:"FREEFORM"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Wt;class zt{}zt.EXA={type:3,value:"EXA"},zt.PETA={type:3,value:"PETA"},zt.TERA={type:3,value:"TERA"},zt.GIGA={type:3,value:"GIGA"},zt.MEGA={type:3,value:"MEGA"},zt.KILO={type:3,value:"KILO"},zt.HECTO={type:3,value:"HECTO"},zt.DECA={type:3,value:"DECA"},zt.DECI={type:3,value:"DECI"},zt.CENTI={type:3,value:"CENTI"},zt.MILLI={type:3,value:"MILLI"},zt.MICRO={type:3,value:"MICRO"},zt.NANO={type:3,value:"NANO"},zt.PICO={type:3,value:"PICO"},zt.FEMTO={type:3,value:"FEMTO"},zt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=zt;class Kt{}Kt.AMPERE={type:3,value:"AMPERE"},Kt.BECQUEREL={type:3,value:"BECQUEREL"},Kt.CANDELA={type:3,value:"CANDELA"},Kt.COULOMB={type:3,value:"COULOMB"},Kt.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Kt.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Kt.FARAD={type:3,value:"FARAD"},Kt.GRAM={type:3,value:"GRAM"},Kt.GRAY={type:3,value:"GRAY"},Kt.HENRY={type:3,value:"HENRY"},Kt.HERTZ={type:3,value:"HERTZ"},Kt.JOULE={type:3,value:"JOULE"},Kt.KELVIN={type:3,value:"KELVIN"},Kt.LUMEN={type:3,value:"LUMEN"},Kt.LUX={type:3,value:"LUX"},Kt.METRE={type:3,value:"METRE"},Kt.MOLE={type:3,value:"MOLE"},Kt.NEWTON={type:3,value:"NEWTON"},Kt.OHM={type:3,value:"OHM"},Kt.PASCAL={type:3,value:"PASCAL"},Kt.RADIAN={type:3,value:"RADIAN"},Kt.SECOND={type:3,value:"SECOND"},Kt.SIEMENS={type:3,value:"SIEMENS"},Kt.SIEVERT={type:3,value:"SIEVERT"},Kt.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Kt.STERADIAN={type:3,value:"STERADIAN"},Kt.TESLA={type:3,value:"TESLA"},Kt.VOLT={type:3,value:"VOLT"},Kt.WATT={type:3,value:"WATT"},Kt.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Kt;class Yt{}Yt.BATH={type:3,value:"BATH"},Yt.BIDET={type:3,value:"BIDET"},Yt.CISTERN={type:3,value:"CISTERN"},Yt.SHOWER={type:3,value:"SHOWER"},Yt.SINK={type:3,value:"SINK"},Yt.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Yt.TOILETPAN={type:3,value:"TOILETPAN"},Yt.URINAL={type:3,value:"URINAL"},Yt.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Yt.WCSEAT={type:3,value:"WCSEAT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Yt;class Xt{}Xt.UNIFORM={type:3,value:"UNIFORM"},Xt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=Xt;class Zt{}Zt.COSENSOR={type:3,value:"COSENSOR"},Zt.CO2SENSOR={type:3,value:"CO2SENSOR"},Zt.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Zt.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Zt.FIRESENSOR={type:3,value:"FIRESENSOR"},Zt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Zt.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Zt.GASSENSOR={type:3,value:"GASSENSOR"},Zt.HEATSENSOR={type:3,value:"HEATSENSOR"},Zt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Zt.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Zt.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Zt.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Zt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Zt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Zt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Zt.PHSENSOR={type:3,value:"PHSENSOR"},Zt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Zt.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Zt.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Zt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Zt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Zt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Zt.WINDSENSOR={type:3,value:"WINDSENSOR"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Zt;class qt{}qt.START_START={type:3,value:"START_START"},qt.START_FINISH={type:3,value:"START_FINISH"},qt.FINISH_START={type:3,value:"FINISH_START"},qt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=qt;class Jt{}Jt.JALOUSIE={type:3,value:"JALOUSIE"},Jt.SHUTTER={type:3,value:"SHUTTER"},Jt.AWNING={type:3,value:"AWNING"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=Jt;class $t{}$t.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},$t.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},$t.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},$t.P_LISTVALUE={type:3,value:"P_LISTVALUE"},$t.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},$t.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},$t.Q_LENGTH={type:3,value:"Q_LENGTH"},$t.Q_AREA={type:3,value:"Q_AREA"},$t.Q_VOLUME={type:3,value:"Q_VOLUME"},$t.Q_COUNT={type:3,value:"Q_COUNT"},$t.Q_WEIGHT={type:3,value:"Q_WEIGHT"},$t.Q_TIME={type:3,value:"Q_TIME"},e.IfcSimplePropertyTemplateTypeEnum=$t;class es{}es.FLOOR={type:3,value:"FLOOR"},es.ROOF={type:3,value:"ROOF"},es.LANDING={type:3,value:"LANDING"},es.BASESLAB={type:3,value:"BASESLAB"},es.USERDEFINED={type:3,value:"USERDEFINED"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=es;class ts{}ts.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},ts.SOLARPANEL={type:3,value:"SOLARPANEL"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=ts;class ss{}ss.CONVECTOR={type:3,value:"CONVECTOR"},ss.RADIATOR={type:3,value:"RADIATOR"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=ss;class is{}is.SPACE={type:3,value:"SPACE"},is.PARKING={type:3,value:"PARKING"},is.GFA={type:3,value:"GFA"},is.INTERNAL={type:3,value:"INTERNAL"},is.EXTERNAL={type:3,value:"EXTERNAL"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=is;class rs{}rs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},rs.FIRESAFETY={type:3,value:"FIRESAFETY"},rs.LIGHTING={type:3,value:"LIGHTING"},rs.OCCUPANCY={type:3,value:"OCCUPANCY"},rs.SECURITY={type:3,value:"SECURITY"},rs.THERMAL={type:3,value:"THERMAL"},rs.TRANSPORT={type:3,value:"TRANSPORT"},rs.VENTILATION={type:3,value:"VENTILATION"},rs.USERDEFINED={type:3,value:"USERDEFINED"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=rs;class os{}os.BIRDCAGE={type:3,value:"BIRDCAGE"},os.COWL={type:3,value:"COWL"},os.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=os;class ns{}ns.STRAIGHT={type:3,value:"STRAIGHT"},ns.WINDER={type:3,value:"WINDER"},ns.SPIRAL={type:3,value:"SPIRAL"},ns.CURVED={type:3,value:"CURVED"},ns.FREEFORM={type:3,value:"FREEFORM"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=ns;class as{}as.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},as.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},as.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},as.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},as.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},as.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},as.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},as.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},as.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},as.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},as.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},as.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},as.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},as.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=as;class ls{}ls.READWRITE={type:3,value:"READWRITE"},ls.READONLY={type:3,value:"READONLY"},ls.LOCKED={type:3,value:"LOCKED"},ls.READWRITELOCKED={type:3,value:"READWRITELOCKED"},ls.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=ls;class hs{}hs.CONST={type:3,value:"CONST"},hs.LINEAR={type:3,value:"LINEAR"},hs.POLYGONAL={type:3,value:"POLYGONAL"},hs.EQUIDISTANT={type:3,value:"EQUIDISTANT"},hs.SINUS={type:3,value:"SINUS"},hs.PARABOLA={type:3,value:"PARABOLA"},hs.DISCRETE={type:3,value:"DISCRETE"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=hs;class cs{}cs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},cs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},cs.CABLE={type:3,value:"CABLE"},cs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},cs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=cs;class As{}As.CONST={type:3,value:"CONST"},As.BILINEAR={type:3,value:"BILINEAR"},As.DISCRETE={type:3,value:"DISCRETE"},As.ISOCONTOUR={type:3,value:"ISOCONTOUR"},As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=As;class us{}us.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},us.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},us.SHELL={type:3,value:"SHELL"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=us;class ps{}ps.PURCHASE={type:3,value:"PURCHASE"},ps.WORK={type:3,value:"WORK"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=ps;class ds{}ds.MARK={type:3,value:"MARK"},ds.TAG={type:3,value:"TAG"},ds.TREATMENT={type:3,value:"TREATMENT"},ds.USERDEFINED={type:3,value:"USERDEFINED"},ds.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=ds;class fs{}fs.POSITIVE={type:3,value:"POSITIVE"},fs.NEGATIVE={type:3,value:"NEGATIVE"},fs.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=fs;class Es{}Es.CONTACTOR={type:3,value:"CONTACTOR"},Es.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Es.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Es.KEYPAD={type:3,value:"KEYPAD"},Es.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Es.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Es.STARTER={type:3,value:"STARTER"},Es.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Es.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Es.USERDEFINED={type:3,value:"USERDEFINED"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Es;class ms{}ms.PANEL={type:3,value:"PANEL"},ms.WORKSURFACE={type:3,value:"WORKSURFACE"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=ms;class ys{}ys.BASIN={type:3,value:"BASIN"},ys.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ys.EXPANSION={type:3,value:"EXPANSION"},ys.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ys.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ys.STORAGE={type:3,value:"STORAGE"},ys.VESSEL={type:3,value:"VESSEL"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ys;class gs{}gs.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},gs.WORKTIME={type:3,value:"WORKTIME"},gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=gs;class Is{}Is.ATTENDANCE={type:3,value:"ATTENDANCE"},Is.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Is.DEMOLITION={type:3,value:"DEMOLITION"},Is.DISMANTLE={type:3,value:"DISMANTLE"},Is.DISPOSAL={type:3,value:"DISPOSAL"},Is.INSTALLATION={type:3,value:"INSTALLATION"},Is.LOGISTIC={type:3,value:"LOGISTIC"},Is.MAINTENANCE={type:3,value:"MAINTENANCE"},Is.MOVE={type:3,value:"MOVE"},Is.OPERATION={type:3,value:"OPERATION"},Is.REMOVAL={type:3,value:"REMOVAL"},Is.RENOVATION={type:3,value:"RENOVATION"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=Is;class vs{}vs.COUPLER={type:3,value:"COUPLER"},vs.FIXED_END={type:3,value:"FIXED_END"},vs.TENSIONING_END={type:3,value:"TENSIONING_END"},vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=vs;class Ts{}Ts.BAR={type:3,value:"BAR"},Ts.COATED={type:3,value:"COATED"},Ts.STRAND={type:3,value:"STRAND"},Ts.WIRE={type:3,value:"WIRE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Ts;class _s{}_s.LEFT={type:3,value:"LEFT"},_s.RIGHT={type:3,value:"RIGHT"},_s.UP={type:3,value:"UP"},_s.DOWN={type:3,value:"DOWN"},e.IfcTextPath=_s;class Rs{}Rs.CONTINUOUS={type:3,value:"CONTINUOUS"},Rs.DISCRETE={type:3,value:"DISCRETE"},Rs.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Rs.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Rs.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Rs.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Rs;class Ps{}Ps.CURRENT={type:3,value:"CURRENT"},Ps.FREQUENCY={type:3,value:"FREQUENCY"},Ps.INVERTER={type:3,value:"INVERTER"},Ps.RECTIFIER={type:3,value:"RECTIFIER"},Ps.VOLTAGE={type:3,value:"VOLTAGE"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Ps;class Ds{}Ds.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},Ds.CONTINUOUS={type:3,value:"CONTINUOUS"},Ds.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},Ds.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=Ds;class Ns{}Ns.ELEVATOR={type:3,value:"ELEVATOR"},Ns.ESCALATOR={type:3,value:"ESCALATOR"},Ns.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ns.CRANEWAY={type:3,value:"CRANEWAY"},Ns.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ns.USERDEFINED={type:3,value:"USERDEFINED"},Ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ns;class bs{}bs.CARTESIAN={type:3,value:"CARTESIAN"},bs.PARAMETER={type:3,value:"PARAMETER"},bs.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=bs;class Cs{}Cs.FINNED={type:3,value:"FINNED"},Cs.USERDEFINED={type:3,value:"USERDEFINED"},Cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=Cs;class Os{}Os.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Os.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Os.AREAUNIT={type:3,value:"AREAUNIT"},Os.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Os.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Os.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Os.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Os.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Os.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Os.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Os.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Os.FORCEUNIT={type:3,value:"FORCEUNIT"},Os.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Os.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Os.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Os.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Os.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Os.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Os.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Os.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Os.MASSUNIT={type:3,value:"MASSUNIT"},Os.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Os.POWERUNIT={type:3,value:"POWERUNIT"},Os.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Os.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Os.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Os.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Os.TIMEUNIT={type:3,value:"TIMEUNIT"},Os.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Os.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Os;class Ss{}Ss.ALARMPANEL={type:3,value:"ALARMPANEL"},Ss.CONTROLPANEL={type:3,value:"CONTROLPANEL"},Ss.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},Ss.INDICATORPANEL={type:3,value:"INDICATORPANEL"},Ss.MIMICPANEL={type:3,value:"MIMICPANEL"},Ss.HUMIDISTAT={type:3,value:"HUMIDISTAT"},Ss.THERMOSTAT={type:3,value:"THERMOSTAT"},Ss.WEATHERSTATION={type:3,value:"WEATHERSTATION"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=Ss;class xs{}xs.AIRHANDLER={type:3,value:"AIRHANDLER"},xs.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},xs.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},xs.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},xs.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=xs;class ws{}ws.AIRRELEASE={type:3,value:"AIRRELEASE"},ws.ANTIVACUUM={type:3,value:"ANTIVACUUM"},ws.CHANGEOVER={type:3,value:"CHANGEOVER"},ws.CHECK={type:3,value:"CHECK"},ws.COMMISSIONING={type:3,value:"COMMISSIONING"},ws.DIVERTING={type:3,value:"DIVERTING"},ws.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},ws.DOUBLECHECK={type:3,value:"DOUBLECHECK"},ws.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},ws.FAUCET={type:3,value:"FAUCET"},ws.FLUSHING={type:3,value:"FLUSHING"},ws.GASCOCK={type:3,value:"GASCOCK"},ws.GASTAP={type:3,value:"GASTAP"},ws.ISOLATING={type:3,value:"ISOLATING"},ws.MIXING={type:3,value:"MIXING"},ws.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},ws.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},ws.REGULATING={type:3,value:"REGULATING"},ws.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},ws.STEAMTRAP={type:3,value:"STEAMTRAP"},ws.STOPCOCK={type:3,value:"STOPCOCK"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=ws;class Bs{}Bs.COMPRESSION={type:3,value:"COMPRESSION"},Bs.SPRING={type:3,value:"SPRING"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Bs;class Fs{}Fs.CUTOUT={type:3,value:"CUTOUT"},Fs.NOTCH={type:3,value:"NOTCH"},Fs.HOLE={type:3,value:"HOLE"},Fs.MITER={type:3,value:"MITER"},Fs.CHAMFER={type:3,value:"CHAMFER"},Fs.EDGE={type:3,value:"EDGE"},Fs.USERDEFINED={type:3,value:"USERDEFINED"},Fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Fs;class Ms{}Ms.MOVABLE={type:3,value:"MOVABLE"},Ms.PARAPET={type:3,value:"PARAPET"},Ms.PARTITIONING={type:3,value:"PARTITIONING"},Ms.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},Ms.SHEAR={type:3,value:"SHEAR"},Ms.SOLIDWALL={type:3,value:"SOLIDWALL"},Ms.STANDARD={type:3,value:"STANDARD"},Ms.POLYGONAL={type:3,value:"POLYGONAL"},Ms.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=Ms;class Ls{}Ls.FLOORTRAP={type:3,value:"FLOORTRAP"},Ls.FLOORWASTE={type:3,value:"FLOORWASTE"},Ls.GULLYSUMP={type:3,value:"GULLYSUMP"},Ls.GULLYTRAP={type:3,value:"GULLYTRAP"},Ls.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ls.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ls.WASTETRAP={type:3,value:"WASTETRAP"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ls;class Us{}Us.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Us.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Us.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Us.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Us.TOPHUNG={type:3,value:"TOPHUNG"},Us.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Us.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Us.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Us.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Us.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Us.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Us.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Us.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Us;class Hs{}Hs.LEFT={type:3,value:"LEFT"},Hs.MIDDLE={type:3,value:"MIDDLE"},Hs.RIGHT={type:3,value:"RIGHT"},Hs.BOTTOM={type:3,value:"BOTTOM"},Hs.TOP={type:3,value:"TOP"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Hs;class Gs{}Gs.ALUMINIUM={type:3,value:"ALUMINIUM"},Gs.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Gs.STEEL={type:3,value:"STEEL"},Gs.WOOD={type:3,value:"WOOD"},Gs.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Gs.PLASTIC={type:3,value:"PLASTIC"},Gs.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Gs;class ks{}ks.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ks.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ks.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ks.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ks.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ks.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ks.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ks.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ks.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ks;class Vs{}Vs.WINDOW={type:3,value:"WINDOW"},Vs.SKYLIGHT={type:3,value:"SKYLIGHT"},Vs.LIGHTDOME={type:3,value:"LIGHTDOME"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Vs;class js{}js.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},js.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},js.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},js.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},js.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},js.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},js.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},js.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},js.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=js;class Qs{}Qs.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Qs.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Qs.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Qs.USERDEFINED={type:3,value:"USERDEFINED"},Qs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Qs;class Ws{}Ws.ACTUAL={type:3,value:"ACTUAL"},Ws.BASELINE={type:3,value:"BASELINE"},Ws.PLANNED={type:3,value:"PLANNED"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=Ws;class zs{}zs.ACTUAL={type:3,value:"ACTUAL"},zs.BASELINE={type:3,value:"BASELINE"},zs.PLANNED={type:3,value:"PLANNED"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=zs;e.IfcActorRole=class extends dg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Ks extends dg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Ks;e.IfcApplication=class extends dg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Ys extends dg{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Ys;e.IfcApproval=class extends dg{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Xs extends dg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Xs;e.IfcBoundaryEdgeCondition=class extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Xs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Zs extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Zs;e.IfcBoundaryNodeConditionWarping=class extends Zs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class qs extends dg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=qs;class Js extends qs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Js;e.IfcConnectionSurfaceGeometry=class extends qs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends qs{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class $s extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=$s;class ei extends dg{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=ei;class ti extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ti;e.IfcCostValue=class extends Ys{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends dg{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends dg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class si extends dg{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=si;class ii extends dg{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ii;e.IfcExternallyDefinedHatchStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends dg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends dg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends si{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends dg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends dg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends ei{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends dg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class ri extends dg{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=ri;class oi extends ri{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=oi;e.IfcMaterialLayerSet=class extends ri{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends dg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ni extends ri{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=ni;e.IfcMaterialProfileSet=class extends ri{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends ni{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class ai extends dg{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=ai;e.IfcMeasureWithUnit=class extends dg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends dg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class li extends dg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=li;class hi extends dg{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=hi;e.IfcObjective=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends dg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ci extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ci;class Ai extends ci{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=Ai;e.IfcPostalAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class ui extends dg{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=ui;class pi extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=pi;e.IfcPresentationLayerWithStyle=class extends pi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class di extends dg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=di;e.IfcPresentationStyleAssignment=class extends dg{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class fi extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=fi;class Ei extends dg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ei;e.IfcProjectedCRS=class extends ti{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class mi extends dg{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=mi;e.IfcPropertyEnumeration=class extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityTime=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends dg{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class yi extends dg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=yi;class gi extends dg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=gi;class Ii extends dg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ii;e.IfcRepresentationMap=class extends dg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class vi extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=vi;class Ti extends dg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=Ti;e.IfcSIUnit=class extends li{constructor(e,t,s,i){super(e,new pg(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};class _i extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=_i;e.IfcShapeAspect=class extends dg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class Ri extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=Ri;e.IfcShapeRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Pi extends dg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Pi;class Di extends dg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Di;e.IfcStructuralLoadConfiguration=class extends Di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class Ni extends Di{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=Ni;class bi extends Ni{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=bi;e.IfcStructuralLoadTemperature=class extends bi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class Ci extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Ci;e.IfcStyledItem=class extends Ii{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends Ci{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends Ni{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends ui{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends ui{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Oi extends ui{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=Oi;e.IfcSurfaceStyleWithTextures=class extends ui{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class Si extends ui{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=Si;e.IfcTable=class extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends dg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class xi extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=xi;e.IfcTaskTimeRecurring=class extends xi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends ui{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends ui{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class wi extends ui{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=wi;e.IfcTextureCoordinateGenerator=class extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};e.IfcTextureMap=class extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends ui{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends ui{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends dg{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class Bi extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=Bi;e.IfcTimeSeriesValue=class extends dg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Fi extends Ii{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Fi;e.IfcTopologyRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends dg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Mi extends Fi{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Mi;e.IfcVertexPoint=class extends Mi{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends dg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends _i{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.Start=o,this.Finish=n,this.type=1236880293}};e.IfcApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Li extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Li;class Ui extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Ui;e.IfcArbitraryProfileDefWithVoids=class extends Li{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends Si{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Ui{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends si{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Location=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends ui{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Hi extends ui{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Hi;e.IfcCompositeProfileDef=class extends Ei{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Gi extends Fi{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Gi;e.IfcConnectionCurveGeometry=class extends qs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Js{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends li{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class ki extends li{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=ki;e.IfcConversionBasedUnitWithOffset=class extends ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends vi{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends ui{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends ui{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends ui{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Vi extends Ei{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Vi;e.IfcDocumentInformation=class extends si{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends ii{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class ji extends Fi{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=ji;e.IfcEdgeCurve=class extends ji{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends _i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class Qi extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=Qi;e.IfcExternalReferenceRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Wi extends Fi{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Wi;class zi extends Fi{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=zi;e.IfcFaceOuterBound=class extends zi{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Ki extends Wi{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Ki;e.IfcFailureConnectionCondition=class extends Pi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelorDraughting=i,this.type=738692330}};class Yi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Yi;class Xi extends Ii{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Xi;e.IfcGeometricRepresentationSubContext=class extends Yi{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new pg(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class Zi extends Xi{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Zi;e.IfcGridPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class qi extends Xi{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=qi;e.IfcImageTexture=class extends Si{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends ui{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class Ji extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=Ji;e.IfcIndexedTriangleTextureMap=class extends Ji{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends _i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class $i extends Xi{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=$i;e.IfcLightSourceAmbient=class extends $i{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends $i{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class er extends $i{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=er;e.IfcLightSourceSpot=class extends er{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class tr extends Fi{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=tr;e.IfcMappedItem=class extends Ii{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends ri{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends fi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends ai{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class sr extends ai{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=sr;e.IfcMaterialProfileSetUsageTapering=class extends sr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.Expression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Vi{constructor(e,t,s,i,r){super(e,t,s,i,new pg(0),r),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Label=r,this.type=2998442950}};class ir extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=ir;e.IfcOpenShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends ji{constructor(e,t,s){super(e,new pg(0),new pg(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class rr extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=rr;e.IfcPath=class extends Fi{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ci{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends Si{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class or extends Xi{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=or;class nr extends Xi{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=nr;class ar extends Xi{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=ar;e.IfcPointOnCurve=class extends ar{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends ar{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends tr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends qi{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class lr extends ui{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=lr;class hr extends mi{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=hr;class cr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=cr;e.IfcProductDefinitionShape=class extends fi{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class Ar extends mi{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Ar;class ur extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=ur;e.IfcPropertyDependencyRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class pr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=pr;class dr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=dr;class fr extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=fr;class Er extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=Er;e.IfcRegularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class mr extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=mr;e.IfcResourceApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends Er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends hr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Xi{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcShellBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class yr extends Ar{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=yr;e.IfcSlippageConnectionCondition=class extends Pi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class gr extends Xi{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=gr;e.IfcStructuralLoadLinearForce=class extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends bi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class Ir extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=Ir;e.IfcStructuralLoadSingleDisplacementDistortion=class extends Ir{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class vr extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=vr;e.IfcStructuralLoadSingleForceWarping=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends ji{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Tr extends Xi{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Tr;e.IfcSurfaceStyleRendering=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class _r extends gr{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=_r;class Rr extends gr{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=Rr;e.IfcSweptDiskSolidPolygonal=class extends Rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Pr extends Tr{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Pr;e.IfcTShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class Dr extends Xi{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=Dr;class Nr extends Xi{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Nr;e.IfcTextLiteralWithExtent=class extends Nr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends cr{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class br extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=br;class Cr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Cr;class Or extends br{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=Or;class Sr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=Sr;e.IfcUShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Xi{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends tr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowStyle=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Ki{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Xi{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends or{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class xr extends Xi{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=xr;class wr extends Tr{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=wr;e.IfcBoundingBox=class extends Xi{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends qi{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends ar{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Br extends Xi{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Br;e.IfcCartesianPointList2D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=2059837836}};class Fr extends Xi{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Fr;class Mr extends Fr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Mr;e.IfcCartesianTransformationOperator2DnonUniform=class extends Mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Lr extends Fr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Lr;e.IfcCartesianTransformationOperator3DnonUniform=class extends Lr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Ur extends rr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Ur;e.IfcClosedShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Hi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Ar{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Hr extends Xi{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Hr;class Gr extends Sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=Gr;class kr extends ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=kr;e.IfcCrewResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class Vr extends Xi{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Vr;e.IfcCsgSolid=class extends gr{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class jr extends Xi{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=jr;e.IfcCurveBoundedPlane=class extends wr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends wr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcDirection=class extends Xi{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorStyle=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};e.IfcEdgeLoop=class extends tr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends fr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Qr extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Qr;class Wr extends Tr{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Wr;e.IfcEllipseProfileDef=class extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class zr extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=zr;e.IfcExtrudedAreaSolidTapered=class extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Xi{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFixedReferenceSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}};class Kr extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Kr;e.IfcFurnitureType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Zi{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class Yr extends Dr{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=Yr;e.IfcIndexedPolygonalFaceWithVoids=class extends Yr{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcLShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends jr{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Xr extends gr{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Xr;class Zr extends ir{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Zr;e.IfcOffsetCurve2D=class extends jr{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends jr{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPcurve=class extends jr{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends nr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Wr{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class qr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=qr;class Jr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=Jr;class $r extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=$r;e.IfcProcedureType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class eo extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=eo;class to extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=to;e.IfcProject=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends yr{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends pr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends dr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends yr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class so extends dr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=so;e.IfcProxy=class extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends Er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends wr{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class io extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=io;e.IfcRelAssignsToActor=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class ro extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=ro;e.IfcRelAssignsToGroupByFactor=class extends ro{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class oo extends mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=oo;e.IfcRelAssociatesApproval=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends oo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};class no extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=no;class ao extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=ao;e.IfcRelConnectsPathElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class lo extends no{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=lo;e.IfcRelConnectsWithEccentricity=class extends lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class ho extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=ho;class co extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=co;e.IfcRelDefinesByObject=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceType=l,this.ImpliedOrder=h,this.type=427948657}};e.IfcRelNests=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelProjectsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class Ao extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=Ao;class uo extends Ao{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=uo;e.IfcRelSpaceBoundary2ndLevel=class extends uo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Hr{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class po extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=po;class fo extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=fo;e.IfcRevolvedAreaSolidTapered=class extends fo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};e.IfcSimplePropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class Eo extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=Eo;class mo extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=mo;class yo extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=yo;class go extends mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=go;e.IfcSpatialZone=class extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends Vr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class Io extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=Io;class vo extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=vo;class To extends vo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=To;class _o extends Io{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=_o;class Ro extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=Ro;e.IfcStructuralSurfaceMemberVarying=class extends Ro{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class Po extends jr{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=Po;e.IfcSurfaceCurveSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Pr{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Pr{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Do extends Dr{constructor(e,t){super(e),this.Coordinates=t,this.type=2387106220}}e.IfcTessellatedFaceSet=Do;e.IfcToroidalSurface=class extends Wr{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};e.IfcTransportElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};e.IfcTriangulatedFaceSet=class extends Do{constructor(e,t,s,i,r,o){super(e,t),this.Coordinates=t,this.Normals=s,this.Closed=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}};e.IfcWindowLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class No extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=No;class bo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=bo;e.IfcAdvancedBrepWithVoids=class extends bo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};class Co extends wr{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Co;class Oo extends Co{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=Oo;e.IfcBlock=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends xr{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class So extends jr{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=So;e.IfcBuilding=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class xo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=xo;e.IfcBuildingStorey=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcChimneyType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Ur{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcColumnType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class wo extends So{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=wo;class Bo extends wo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=Bo;class Fo extends jr{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=Fo;e.IfcConstructionEquipmentResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Mo extends po{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Mo;class Lo extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Lo;e.IfcCostItem=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCoveringType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Uo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Uo;class Ho extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Ho;e.IfcDoorLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends Jr{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Go extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Go;e.IfcElementAssembly=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class ko extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=ko;class Vo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Vo;e.IfcEllipse=class extends Fo{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=jo;e.IfcEngineType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class Qo extends Eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=Qo;class Wo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Wo;e.IfcFacetedBrepWithVoids=class extends Wo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};e.IfcFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class zo extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=zo;class Ko extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Ko;class Yo extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Yo;class Xo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Xo;class Zo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Zo;e.IfcFlowMeterType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class qo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=qo;class Jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Jo;class $o extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=$o;class en extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=en;class tn extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=tn;e.IfcFootingType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class sn extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=sn;e.IfcFurniture=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};e.IfcGrid=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};class rn extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=rn;e.IfcHeatExchangerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcIndexedPolyCurve=class extends So{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcMechanicalFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcOccupant=class extends No{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};class on extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}}e.IfcOpeningElement=on;e.IfcOpeningStandardCase=class extends on{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3079942009}};e.IfcOutletType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends Lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Do{constructor(e,t,s,i,r){super(e,t),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends So{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class nn extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=nn;e.IfcProcedure=class extends eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailingType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends Oo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};class an extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=an;class ln extends Vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ln;e.IfcReinforcingMesh=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAggregates=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoofType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcShadingDeviceType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSite=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class hn extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=hn;class cn extends vo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=cn;class An extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=An;e.IfcStructuralCurveConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.Axis=h,this.type=4243806635}};class un extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=un;e.IfcStructuralCurveMemberVarying=class extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends An{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class pn extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=pn;e.IfcStructuralPointAction=class extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class dn extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=dn;e.IfcStructuralSurfaceConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends zo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class fn extends rn{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=fn;e.IfcSystemFurnitureElement=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTransformerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTrimmedCurve=class extends So{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVibrationIsolator=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcVoidingFeature=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class En extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=En;e.IfcWorkPlan=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends fn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAsset=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class mn extends So{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=yn;e.IfcBeamType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBoilerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class gn extends Bo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=gn;class In extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=In;e.IfcBuildingElementPart=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxy=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};e.IfcBurnerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends Fo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};class vn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}}e.IfcColumn=vn;e.IfcColumnStandardCase=class extends vn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=905975707}};e.IfcCommunicationsApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcCooledBeamType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiscreteAccessory=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionChamberElementType=class extends Ho{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Tn extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Tn;class _n extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=_n;class Rn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Rn;e.IfcDistributionPort=class extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Pn extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Pn;class Dn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}}e.IfcDoor=Dn;e.IfcDoorStandardCase=class extends Dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=3242481149}};e.IfcDuctFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcElectricApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Nn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Nn;e.IfcEngine=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends Qo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=bn;class Cn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=Cn;e.IfcFlowInstrumentType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class On extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=On;class Sn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Sn;class xn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=xn;class wn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=wn;class Bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=Bn;e.IfcFooting=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcHeatExchanger=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcLamp=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};e.IfcMedicalDevice=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};class Fn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}}e.IfcMember=Fn;e.IfcMemberStandardCase=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1911478936}};e.IfcMotorConnection=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcOuterBoundaryCurve=class extends gn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPile=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};class Mn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}}e.IfcPlate=Mn;e.IfcPlateStandardCase=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1156407060}};e.IfcProtectiveDevice=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRailing=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcingBar=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};class Ln extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}}e.IfcSlab=Ln;e.IfcSlabElementedCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3127900445}};e.IfcSlabStandardCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3027962421}};e.IfcSolarDevice=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTransformer=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTubeBundle=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Un extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Un;e.IfcWallElementedCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4156078855}};e.IfcWallStandardCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};class Hn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}}e.IfcWindow=Hn;e.IfcWindowStandardCase=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=486154966}};e.IfcActuatorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAudioVisualAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};class Gn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}}e.IfcBeam=Gn;e.IfcBeamStandardCase=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2906023776}};e.IfcBoiler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBurner=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcChiller=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcCooledBeam=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionChamberElement=class extends Rn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class kn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=kn;e.IfcDuctFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricGenerator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcProtectiveDeviceTrippingUnit=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(ng||(ng={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.BRAKES={type:3,value:"BRAKES"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.CREEP={type:3,value:"CREEP"},i.CURRENT={type:3,value:"CURRENT"},i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.ERECTION={type:3,value:"ERECTION"},i.FIRE={type:3,value:"FIRE"},i.ICE={type:3,value:"ICE"},i.IMPACT={type:3,value:"IMPACT"},i.IMPULSE={type:3,value:"IMPULSE"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.PROPPING={type:3,value:"PROPPING"},i.RAIN={type:3,value:"RAIN"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.SNOW_S={type:3,value:"SNOW_S"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.WAVE={type:3,value:"WAVE"},i.WIND_W={type:3,value:"WIND_W"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.HOME={type:3,value:"HOME"},n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.RAILWAYCROCODILE={type:3,value:"RAILWAYCROCODILE"},c.RAILWAYDETONATOR={type:3,value:"RAILWAYDETONATOR"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.BLOSSCURVE={type:3,value:"BLOSSCURVE"},A.CONSTANTCANT={type:3,value:"CONSTANTCANT"},A.COSINECURVE={type:3,value:"COSINECURVE"},A.HELMERTCURVE={type:3,value:"HELMERTCURVE"},A.LINEARTRANSITION={type:3,value:"LINEARTRANSITION"},A.SINECURVE={type:3,value:"SINECURVE"},A.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentCantSegmentTypeEnum=A;class u{}u.BLOSSCURVE={type:3,value:"BLOSSCURVE"},u.CIRCULARARC={type:3,value:"CIRCULARARC"},u.CLOTHOID={type:3,value:"CLOTHOID"},u.COSINECURVE={type:3,value:"COSINECURVE"},u.CUBIC={type:3,value:"CUBIC"},u.HELMERTCURVE={type:3,value:"HELMERTCURVE"},u.LINE={type:3,value:"LINE"},u.SINECURVE={type:3,value:"SINECURVE"},u.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentHorizontalSegmentTypeEnum=u;class p{}p.USERDEFINED={type:3,value:"USERDEFINED"},p.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlignmentTypeEnum=p;class d{}d.CIRCULARARC={type:3,value:"CIRCULARARC"},d.CLOTHOID={type:3,value:"CLOTHOID"},d.CONSTANTGRADIENT={type:3,value:"CONSTANTGRADIENT"},d.PARABOLICARC={type:3,value:"PARABOLICARC"},e.IfcAlignmentVerticalSegmentTypeEnum=d;class f{}f.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},f.LOADING_3D={type:3,value:"LOADING_3D"},f.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=f;class E{}E.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},E.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},E.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},E.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=E;class m{}m.ASBUILTAREA={type:3,value:"ASBUILTAREA"},m.ASBUILTLINE={type:3,value:"ASBUILTLINE"},m.ASBUILTPOINT={type:3,value:"ASBUILTPOINT"},m.ASSUMEDAREA={type:3,value:"ASSUMEDAREA"},m.ASSUMEDLINE={type:3,value:"ASSUMEDLINE"},m.ASSUMEDPOINT={type:3,value:"ASSUMEDPOINT"},m.NON_PHYSICAL_SIGNAL={type:3,value:"NON_PHYSICAL_SIGNAL"},m.SUPERELEVATIONEVENT={type:3,value:"SUPERELEVATIONEVENT"},m.WIDTHEVENT={type:3,value:"WIDTHEVENT"},m.USERDEFINED={type:3,value:"USERDEFINED"},m.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnnotationTypeEnum=m;class y{}y.ADD={type:3,value:"ADD"},y.DIVIDE={type:3,value:"DIVIDE"},y.MULTIPLY={type:3,value:"MULTIPLY"},y.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=y;class g{}g.FACTORY={type:3,value:"FACTORY"},g.SITE={type:3,value:"SITE"},g.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=g;class I{}I.AMPLIFIER={type:3,value:"AMPLIFIER"},I.CAMERA={type:3,value:"CAMERA"},I.COMMUNICATIONTERMINAL={type:3,value:"COMMUNICATIONTERMINAL"},I.DISPLAY={type:3,value:"DISPLAY"},I.MICROPHONE={type:3,value:"MICROPHONE"},I.PLAYER={type:3,value:"PLAYER"},I.PROJECTOR={type:3,value:"PROJECTOR"},I.RECEIVER={type:3,value:"RECEIVER"},I.RECORDINGEQUIPMENT={type:3,value:"RECORDINGEQUIPMENT"},I.SPEAKER={type:3,value:"SPEAKER"},I.SWITCHER={type:3,value:"SWITCHER"},I.TELEPHONE={type:3,value:"TELEPHONE"},I.TUNER={type:3,value:"TUNER"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=I;class v{}v.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},v.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},v.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},v.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},v.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},v.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=v;class T{}T.CONICAL_SURF={type:3,value:"CONICAL_SURF"},T.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},T.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},T.PLANE_SURF={type:3,value:"PLANE_SURF"},T.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},T.RULED_SURF={type:3,value:"RULED_SURF"},T.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},T.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},T.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},T.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},T.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=T;class _{}_.BEAM={type:3,value:"BEAM"},_.CORNICE={type:3,value:"CORNICE"},_.DIAPHRAGM={type:3,value:"DIAPHRAGM"},_.EDGEBEAM={type:3,value:"EDGEBEAM"},_.GIRDER_SEGMENT={type:3,value:"GIRDER_SEGMENT"},_.HATSTONE={type:3,value:"HATSTONE"},_.HOLLOWCORE={type:3,value:"HOLLOWCORE"},_.JOIST={type:3,value:"JOIST"},_.LINTEL={type:3,value:"LINTEL"},_.PIERCAP={type:3,value:"PIERCAP"},_.SPANDREL={type:3,value:"SPANDREL"},_.T_BEAM={type:3,value:"T_BEAM"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=_;class R{}R.FIXED_MOVEMENT={type:3,value:"FIXED_MOVEMENT"},R.FREE_MOVEMENT={type:3,value:"FREE_MOVEMENT"},R.GUIDED_LONGITUDINAL={type:3,value:"GUIDED_LONGITUDINAL"},R.GUIDED_TRANSVERSAL={type:3,value:"GUIDED_TRANSVERSAL"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeDisplacementEnum=R;class P{}P.CYLINDRICAL={type:3,value:"CYLINDRICAL"},P.DISK={type:3,value:"DISK"},P.ELASTOMERIC={type:3,value:"ELASTOMERIC"},P.GUIDE={type:3,value:"GUIDE"},P.POT={type:3,value:"POT"},P.ROCKER={type:3,value:"ROCKER"},P.ROLLER={type:3,value:"ROLLER"},P.SPHERICAL={type:3,value:"SPHERICAL"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeEnum=P;class D{}D.EQUALTO={type:3,value:"EQUALTO"},D.GREATERTHAN={type:3,value:"GREATERTHAN"},D.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},D.INCLUDEDIN={type:3,value:"INCLUDEDIN"},D.INCLUDES={type:3,value:"INCLUDES"},D.LESSTHAN={type:3,value:"LESSTHAN"},D.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},D.NOTEQUALTO={type:3,value:"NOTEQUALTO"},D.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},D.NOTINCLUDES={type:3,value:"NOTINCLUDES"},e.IfcBenchmarkEnum=D;class N{}N.STEAM={type:3,value:"STEAM"},N.WATER={type:3,value:"WATER"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=N;class b{}b.DIFFERENCE={type:3,value:"DIFFERENCE"},b.INTERSECTION={type:3,value:"INTERSECTION"},b.UNION={type:3,value:"UNION"},e.IfcBooleanOperator=b;class C{}C.ABUTMENT={type:3,value:"ABUTMENT"},C.DECK={type:3,value:"DECK"},C.DECK_SEGMENT={type:3,value:"DECK_SEGMENT"},C.FOUNDATION={type:3,value:"FOUNDATION"},C.PIER={type:3,value:"PIER"},C.PIER_SEGMENT={type:3,value:"PIER_SEGMENT"},C.PYLON={type:3,value:"PYLON"},C.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},C.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},C.SURFACESTRUCTURE={type:3,value:"SURFACESTRUCTURE"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgePartTypeEnum=C;class O{}O.ARCHED={type:3,value:"ARCHED"},O.CABLE_STAYED={type:3,value:"CABLE_STAYED"},O.CANTILEVER={type:3,value:"CANTILEVER"},O.CULVERT={type:3,value:"CULVERT"},O.FRAMEWORK={type:3,value:"FRAMEWORK"},O.GIRDER={type:3,value:"GIRDER"},O.SUSPENSION={type:3,value:"SUSPENSION"},O.TRUSS={type:3,value:"TRUSS"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgeTypeEnum=O;class S{}S.APRON={type:3,value:"APRON"},S.ARMOURUNIT={type:3,value:"ARMOURUNIT"},S.INSULATION={type:3,value:"INSULATION"},S.PRECASTPANEL={type:3,value:"PRECASTPANEL"},S.SAFETYCAGE={type:3,value:"SAFETYCAGE"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=S;class x{}x.COMPLEX={type:3,value:"COMPLEX"},x.ELEMENT={type:3,value:"ELEMENT"},x.PARTIAL={type:3,value:"PARTIAL"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=x;class w{}w.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},w.FENESTRATION={type:3,value:"FENESTRATION"},w.FOUNDATION={type:3,value:"FOUNDATION"},w.LOADBEARING={type:3,value:"LOADBEARING"},w.OUTERSHELL={type:3,value:"OUTERSHELL"},w.PRESTRESSING={type:3,value:"PRESTRESSING"},w.REINFORCING={type:3,value:"REINFORCING"},w.SHADING={type:3,value:"SHADING"},w.TRANSPORT={type:3,value:"TRANSPORT"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=w;class B{}B.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},B.FENESTRATION={type:3,value:"FENESTRATION"},B.FOUNDATION={type:3,value:"FOUNDATION"},B.LOADBEARING={type:3,value:"LOADBEARING"},B.MOORING={type:3,value:"MOORING"},B.OUTERSHELL={type:3,value:"OUTERSHELL"},B.PRESTRESSING={type:3,value:"PRESTRESSING"},B.RAILWAYLINE={type:3,value:"RAILWAYLINE"},B.RAILWAYTRACK={type:3,value:"RAILWAYTRACK"},B.REINFORCING={type:3,value:"REINFORCING"},B.SHADING={type:3,value:"SHADING"},B.TRACKCIRCUIT={type:3,value:"TRACKCIRCUIT"},B.TRANSPORT={type:3,value:"TRANSPORT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuiltSystemTypeEnum=B;class F{}F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=F;class M{}M.BEND={type:3,value:"BEND"},M.CONNECTOR={type:3,value:"CONNECTOR"},M.CROSS={type:3,value:"CROSS"},M.JUNCTION={type:3,value:"JUNCTION"},M.TEE={type:3,value:"TEE"},M.TRANSITION={type:3,value:"TRANSITION"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=M;class L{}L.CABLEBRACKET={type:3,value:"CABLEBRACKET"},L.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},L.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},L.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},L.CATENARYWIRE={type:3,value:"CATENARYWIRE"},L.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},L.DROPPER={type:3,value:"DROPPER"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=L;class U{}U.CONNECTOR={type:3,value:"CONNECTOR"},U.ENTRY={type:3,value:"ENTRY"},U.EXIT={type:3,value:"EXIT"},U.FANOUT={type:3,value:"FANOUT"},U.JUNCTION={type:3,value:"JUNCTION"},U.TRANSITION={type:3,value:"TRANSITION"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=U;class H{}H.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},H.CABLESEGMENT={type:3,value:"CABLESEGMENT"},H.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},H.CONTACTWIRESEGMENT={type:3,value:"CONTACTWIRESEGMENT"},H.CORESEGMENT={type:3,value:"CORESEGMENT"},H.FIBERSEGMENT={type:3,value:"FIBERSEGMENT"},H.FIBERTUBE={type:3,value:"FIBERTUBE"},H.OPTICALCABLESEGMENT={type:3,value:"OPTICALCABLESEGMENT"},H.STITCHWIRE={type:3,value:"STITCHWIRE"},H.WIREPAIRSEGMENT={type:3,value:"WIREPAIRSEGMENT"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=H;class G{}G.CAISSON={type:3,value:"CAISSON"},G.WELL={type:3,value:"WELL"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCaissonFoundationTypeEnum=G;class k{}k.ADDED={type:3,value:"ADDED"},k.DELETED={type:3,value:"DELETED"},k.MODIFIED={type:3,value:"MODIFIED"},k.NOCHANGE={type:3,value:"NOCHANGE"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=k;class V{}V.AIRCOOLED={type:3,value:"AIRCOOLED"},V.HEATRECOVERY={type:3,value:"HEATRECOVERY"},V.WATERCOOLED={type:3,value:"WATERCOOLED"},V.USERDEFINED={type:3,value:"USERDEFINED"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=V;class j{}j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=j;class Q{}Q.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},Q.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},Q.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},Q.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},Q.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},Q.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},Q.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=Q;class W{}W.COLUMN={type:3,value:"COLUMN"},W.PIERSTEM={type:3,value:"PIERSTEM"},W.PIERSTEM_SEGMENT={type:3,value:"PIERSTEM_SEGMENT"},W.PILASTER={type:3,value:"PILASTER"},W.STANDCOLUMN={type:3,value:"STANDCOLUMN"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=W;class z{}z.ANTENNA={type:3,value:"ANTENNA"},z.AUTOMATON={type:3,value:"AUTOMATON"},z.COMPUTER={type:3,value:"COMPUTER"},z.FAX={type:3,value:"FAX"},z.GATEWAY={type:3,value:"GATEWAY"},z.INTELLIGENTPERIPHERAL={type:3,value:"INTELLIGENTPERIPHERAL"},z.IPNETWORKEQUIPMENT={type:3,value:"IPNETWORKEQUIPMENT"},z.LINESIDEELECTRONICUNIT={type:3,value:"LINESIDEELECTRONICUNIT"},z.MODEM={type:3,value:"MODEM"},z.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},z.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},z.NETWORKHUB={type:3,value:"NETWORKHUB"},z.OPTICALLINETERMINAL={type:3,value:"OPTICALLINETERMINAL"},z.OPTICALNETWORKUNIT={type:3,value:"OPTICALNETWORKUNIT"},z.PRINTER={type:3,value:"PRINTER"},z.RADIOBLOCKCENTER={type:3,value:"RADIOBLOCKCENTER"},z.REPEATER={type:3,value:"REPEATER"},z.ROUTER={type:3,value:"ROUTER"},z.SCANNER={type:3,value:"SCANNER"},z.TELECOMMAND={type:3,value:"TELECOMMAND"},z.TELEPHONYEXCHANGE={type:3,value:"TELEPHONYEXCHANGE"},z.TRANSITIONCOMPONENT={type:3,value:"TRANSITIONCOMPONENT"},z.TRANSPONDER={type:3,value:"TRANSPONDER"},z.TRANSPORTEQUIPMENT={type:3,value:"TRANSPORTEQUIPMENT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=z;class K{}K.P_COMPLEX={type:3,value:"P_COMPLEX"},K.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=K;class Y{}Y.BOOSTER={type:3,value:"BOOSTER"},Y.DYNAMIC={type:3,value:"DYNAMIC"},Y.HERMETIC={type:3,value:"HERMETIC"},Y.OPENTYPE={type:3,value:"OPENTYPE"},Y.RECIPROCATING={type:3,value:"RECIPROCATING"},Y.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},Y.ROTARY={type:3,value:"ROTARY"},Y.ROTARYVANE={type:3,value:"ROTARYVANE"},Y.SCROLL={type:3,value:"SCROLL"},Y.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},Y.SINGLESCREW={type:3,value:"SINGLESCREW"},Y.SINGLESTAGE={type:3,value:"SINGLESTAGE"},Y.TROCHOIDAL={type:3,value:"TROCHOIDAL"},Y.TWINSCREW={type:3,value:"TWINSCREW"},Y.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=Y;class X{}X.AIRCOOLED={type:3,value:"AIRCOOLED"},X.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},X.WATERCOOLED={type:3,value:"WATERCOOLED"},X.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},X.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},X.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},X.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=X;class Z{}Z.ATEND={type:3,value:"ATEND"},Z.ATPATH={type:3,value:"ATPATH"},Z.ATSTART={type:3,value:"ATSTART"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=Z;class q{}q.ADVISORY={type:3,value:"ADVISORY"},q.HARD={type:3,value:"HARD"},q.SOFT={type:3,value:"SOFT"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=q;class J{}J.DEMOLISHING={type:3,value:"DEMOLISHING"},J.EARTHMOVING={type:3,value:"EARTHMOVING"},J.ERECTING={type:3,value:"ERECTING"},J.HEATING={type:3,value:"HEATING"},J.LIGHTING={type:3,value:"LIGHTING"},J.PAVING={type:3,value:"PAVING"},J.PUMPING={type:3,value:"PUMPING"},J.TRANSPORTING={type:3,value:"TRANSPORTING"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=J;class ${}$.AGGREGATES={type:3,value:"AGGREGATES"},$.CONCRETE={type:3,value:"CONCRETE"},$.DRYWALL={type:3,value:"DRYWALL"},$.FUEL={type:3,value:"FUEL"},$.GYPSUM={type:3,value:"GYPSUM"},$.MASONRY={type:3,value:"MASONRY"},$.METAL={type:3,value:"METAL"},$.PLASTIC={type:3,value:"PLASTIC"},$.WOOD={type:3,value:"WOOD"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=$;class ee{}ee.ASSEMBLY={type:3,value:"ASSEMBLY"},ee.FORMWORK={type:3,value:"FORMWORK"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=ee;class te{}te.FLOATING={type:3,value:"FLOATING"},te.MULTIPOSITION={type:3,value:"MULTIPOSITION"},te.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},te.PROPORTIONAL={type:3,value:"PROPORTIONAL"},te.TWOPOSITION={type:3,value:"TWOPOSITION"},te.USERDEFINED={type:3,value:"USERDEFINED"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=te;class se{}se.BELTCONVEYOR={type:3,value:"BELTCONVEYOR"},se.BUCKETCONVEYOR={type:3,value:"BUCKETCONVEYOR"},se.CHUTECONVEYOR={type:3,value:"CHUTECONVEYOR"},se.SCREWCONVEYOR={type:3,value:"SCREWCONVEYOR"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConveyorSegmentTypeEnum=se;class ie{}ie.ACTIVE={type:3,value:"ACTIVE"},ie.PASSIVE={type:3,value:"PASSIVE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=ie;class re{}re.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},re.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},re.NATURALDRAFT={type:3,value:"NATURALDRAFT"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=re;class oe{}oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=oe;class ne{}ne.BUDGET={type:3,value:"BUDGET"},ne.COSTPLAN={type:3,value:"COSTPLAN"},ne.ESTIMATE={type:3,value:"ESTIMATE"},ne.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},ne.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},ne.TENDER={type:3,value:"TENDER"},ne.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=ne;class ae{}ae.ARMOUR={type:3,value:"ARMOUR"},ae.BALLASTBED={type:3,value:"BALLASTBED"},ae.CORE={type:3,value:"CORE"},ae.FILTER={type:3,value:"FILTER"},ae.PAVEMENT={type:3,value:"PAVEMENT"},ae.PROTECTION={type:3,value:"PROTECTION"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCourseTypeEnum=ae;class le{}le.CEILING={type:3,value:"CEILING"},le.CLADDING={type:3,value:"CLADDING"},le.COPING={type:3,value:"COPING"},le.FLOORING={type:3,value:"FLOORING"},le.INSULATION={type:3,value:"INSULATION"},le.MEMBRANE={type:3,value:"MEMBRANE"},le.MOLDING={type:3,value:"MOLDING"},le.ROOFING={type:3,value:"ROOFING"},le.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},le.SLEEVING={type:3,value:"SLEEVING"},le.TOPPING={type:3,value:"TOPPING"},le.WRAPPING={type:3,value:"WRAPPING"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=le;class he{}he.OFFICE={type:3,value:"OFFICE"},he.SITE={type:3,value:"SITE"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=he;class ce{}ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=ce;class Ae{}Ae.LINEAR={type:3,value:"LINEAR"},Ae.LOG_LINEAR={type:3,value:"LOG_LINEAR"},Ae.LOG_LOG={type:3,value:"LOG_LOG"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=Ae;class ue{}ue.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},ue.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},ue.BLASTDAMPER={type:3,value:"BLASTDAMPER"},ue.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},ue.FIREDAMPER={type:3,value:"FIREDAMPER"},ue.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},ue.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},ue.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},ue.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},ue.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},ue.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=ue;class pe{}pe.MEASURED={type:3,value:"MEASURED"},pe.PREDICTED={type:3,value:"PREDICTED"},pe.SIMULATED={type:3,value:"SIMULATED"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=pe;class de{}de.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},de.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},de.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},de.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},de.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},de.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},de.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},de.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},de.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},de.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},de.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},de.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},de.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},de.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},de.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},de.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},de.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},de.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},de.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},de.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},de.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},de.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},de.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},de.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},de.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},de.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},de.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},de.PHUNIT={type:3,value:"PHUNIT"},de.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},de.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},de.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},de.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},de.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},de.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},de.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},de.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},de.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},de.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},de.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},de.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},de.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},de.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},de.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},de.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},de.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},de.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},de.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},de.TORQUEUNIT={type:3,value:"TORQUEUNIT"},de.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},de.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},de.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},de.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},de.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=de;class fe{}fe.NEGATIVE={type:3,value:"NEGATIVE"},fe.POSITIVE={type:3,value:"POSITIVE"},e.IfcDirectionSenseEnum=fe;class Ee{}Ee.ANCHORPLATE={type:3,value:"ANCHORPLATE"},Ee.BIRDPROTECTION={type:3,value:"BIRDPROTECTION"},Ee.BRACKET={type:3,value:"BRACKET"},Ee.CABLEARRANGER={type:3,value:"CABLEARRANGER"},Ee.ELASTIC_CUSHION={type:3,value:"ELASTIC_CUSHION"},Ee.EXPANSION_JOINT_DEVICE={type:3,value:"EXPANSION_JOINT_DEVICE"},Ee.FILLER={type:3,value:"FILLER"},Ee.FLASHING={type:3,value:"FLASHING"},Ee.INSULATOR={type:3,value:"INSULATOR"},Ee.LOCK={type:3,value:"LOCK"},Ee.PANEL_STRENGTHENING={type:3,value:"PANEL_STRENGTHENING"},Ee.POINTMACHINEMOUNTINGDEVICE={type:3,value:"POINTMACHINEMOUNTINGDEVICE"},Ee.POINT_MACHINE_LOCKING_DEVICE={type:3,value:"POINT_MACHINE_LOCKING_DEVICE"},Ee.RAILBRACE={type:3,value:"RAILBRACE"},Ee.RAILPAD={type:3,value:"RAILPAD"},Ee.RAIL_LUBRICATION={type:3,value:"RAIL_LUBRICATION"},Ee.RAIL_MECHANICAL_EQUIPMENT={type:3,value:"RAIL_MECHANICAL_EQUIPMENT"},Ee.SHOE={type:3,value:"SHOE"},Ee.SLIDINGCHAIR={type:3,value:"SLIDINGCHAIR"},Ee.SOUNDABSORPTION={type:3,value:"SOUNDABSORPTION"},Ee.TENSIONINGEQUIPMENT={type:3,value:"TENSIONINGEQUIPMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=Ee;class me{}me.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},me.DISPATCHINGBOARD={type:3,value:"DISPATCHINGBOARD"},me.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},me.DISTRIBUTIONFRAME={type:3,value:"DISTRIBUTIONFRAME"},me.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},me.SWITCHBOARD={type:3,value:"SWITCHBOARD"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionBoardTypeEnum=me;class ye{}ye.FORMEDDUCT={type:3,value:"FORMEDDUCT"},ye.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},ye.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},ye.MANHOLE={type:3,value:"MANHOLE"},ye.METERCHAMBER={type:3,value:"METERCHAMBER"},ye.SUMP={type:3,value:"SUMP"},ye.TRENCH={type:3,value:"TRENCH"},ye.VALVECHAMBER={type:3,value:"VALVECHAMBER"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=ye;class ge{}ge.CABLE={type:3,value:"CABLE"},ge.CABLECARRIER={type:3,value:"CABLECARRIER"},ge.DUCT={type:3,value:"DUCT"},ge.PIPE={type:3,value:"PIPE"},ge.WIRELESS={type:3,value:"WIRELESS"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=ge;class Ie{}Ie.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},Ie.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},Ie.CATENARY_SYSTEM={type:3,value:"CATENARY_SYSTEM"},Ie.CHEMICAL={type:3,value:"CHEMICAL"},Ie.CHILLEDWATER={type:3,value:"CHILLEDWATER"},Ie.COMMUNICATION={type:3,value:"COMMUNICATION"},Ie.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},Ie.CONDENSERWATER={type:3,value:"CONDENSERWATER"},Ie.CONTROL={type:3,value:"CONTROL"},Ie.CONVEYING={type:3,value:"CONVEYING"},Ie.DATA={type:3,value:"DATA"},Ie.DISPOSAL={type:3,value:"DISPOSAL"},Ie.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},Ie.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},Ie.DRAINAGE={type:3,value:"DRAINAGE"},Ie.EARTHING={type:3,value:"EARTHING"},Ie.ELECTRICAL={type:3,value:"ELECTRICAL"},Ie.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},Ie.EXHAUST={type:3,value:"EXHAUST"},Ie.FIREPROTECTION={type:3,value:"FIREPROTECTION"},Ie.FIXEDTRANSMISSIONNETWORK={type:3,value:"FIXEDTRANSMISSIONNETWORK"},Ie.FUEL={type:3,value:"FUEL"},Ie.GAS={type:3,value:"GAS"},Ie.HAZARDOUS={type:3,value:"HAZARDOUS"},Ie.HEATING={type:3,value:"HEATING"},Ie.LIGHTING={type:3,value:"LIGHTING"},Ie.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},Ie.MOBILENETWORK={type:3,value:"MOBILENETWORK"},Ie.MONITORINGSYSTEM={type:3,value:"MONITORINGSYSTEM"},Ie.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},Ie.OIL={type:3,value:"OIL"},Ie.OPERATIONAL={type:3,value:"OPERATIONAL"},Ie.OPERATIONALTELEPHONYSYSTEM={type:3,value:"OPERATIONALTELEPHONYSYSTEM"},Ie.OVERHEAD_CONTACTLINE_SYSTEM={type:3,value:"OVERHEAD_CONTACTLINE_SYSTEM"},Ie.POWERGENERATION={type:3,value:"POWERGENERATION"},Ie.RAINWATER={type:3,value:"RAINWATER"},Ie.REFRIGERATION={type:3,value:"REFRIGERATION"},Ie.RETURN_CIRCUIT={type:3,value:"RETURN_CIRCUIT"},Ie.SECURITY={type:3,value:"SECURITY"},Ie.SEWAGE={type:3,value:"SEWAGE"},Ie.SIGNAL={type:3,value:"SIGNAL"},Ie.STORMWATER={type:3,value:"STORMWATER"},Ie.TELEPHONE={type:3,value:"TELEPHONE"},Ie.TV={type:3,value:"TV"},Ie.VACUUM={type:3,value:"VACUUM"},Ie.VENT={type:3,value:"VENT"},Ie.VENTILATION={type:3,value:"VENTILATION"},Ie.WASTEWATER={type:3,value:"WASTEWATER"},Ie.WATERSUPPLY={type:3,value:"WATERSUPPLY"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=Ie;class ve{}ve.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ve.PERSONAL={type:3,value:"PERSONAL"},ve.PUBLIC={type:3,value:"PUBLIC"},ve.RESTRICTED={type:3,value:"RESTRICTED"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ve;class Te{}Te.DRAFT={type:3,value:"DRAFT"},Te.FINAL={type:3,value:"FINAL"},Te.FINALDRAFT={type:3,value:"FINALDRAFT"},Te.REVISION={type:3,value:"REVISION"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=Te;class _e{}_e.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},_e.FIXEDPANEL={type:3,value:"FIXEDPANEL"},_e.FOLDING={type:3,value:"FOLDING"},_e.REVOLVING={type:3,value:"REVOLVING"},_e.ROLLINGUP={type:3,value:"ROLLINGUP"},_e.SLIDING={type:3,value:"SLIDING"},_e.SWINGING={type:3,value:"SWINGING"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=_e;class Re{}Re.LEFT={type:3,value:"LEFT"},Re.MIDDLE={type:3,value:"MIDDLE"},Re.RIGHT={type:3,value:"RIGHT"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Re;class Pe{}Pe.ALUMINIUM={type:3,value:"ALUMINIUM"},Pe.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Pe.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Pe.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Pe.PLASTIC={type:3,value:"PLASTIC"},Pe.STEEL={type:3,value:"STEEL"},Pe.WOOD={type:3,value:"WOOD"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Pe;class De{}De.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},De.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},De.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},De.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},De.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},De.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},De.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},De.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},De.REVOLVING={type:3,value:"REVOLVING"},De.ROLLINGUP={type:3,value:"ROLLINGUP"},De.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},De.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},De.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},De.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=De;class Ne{}Ne.BOOM_BARRIER={type:3,value:"BOOM_BARRIER"},Ne.DOOR={type:3,value:"DOOR"},Ne.GATE={type:3,value:"GATE"},Ne.TRAPDOOR={type:3,value:"TRAPDOOR"},Ne.TURNSTILE={type:3,value:"TURNSTILE"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=Ne;class be{}be.DOUBLE_PANEL_DOUBLE_SWING={type:3,value:"DOUBLE_PANEL_DOUBLE_SWING"},be.DOUBLE_PANEL_FOLDING={type:3,value:"DOUBLE_PANEL_FOLDING"},be.DOUBLE_PANEL_LIFTING_VERTICAL={type:3,value:"DOUBLE_PANEL_LIFTING_VERTICAL"},be.DOUBLE_PANEL_SINGLE_SWING={type:3,value:"DOUBLE_PANEL_SINGLE_SWING"},be.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT"},be.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT"},be.DOUBLE_PANEL_SLIDING={type:3,value:"DOUBLE_PANEL_SLIDING"},be.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},be.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},be.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},be.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},be.LIFTING_HORIZONTAL={type:3,value:"LIFTING_HORIZONTAL"},be.LIFTING_VERTICAL_LEFT={type:3,value:"LIFTING_VERTICAL_LEFT"},be.LIFTING_VERTICAL_RIGHT={type:3,value:"LIFTING_VERTICAL_RIGHT"},be.REVOLVING_HORIZONTAL={type:3,value:"REVOLVING_HORIZONTAL"},be.REVOLVING_VERTICAL={type:3,value:"REVOLVING_VERTICAL"},be.ROLLINGUP={type:3,value:"ROLLINGUP"},be.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},be.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},be.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},be.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},be.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},be.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=be;class Ce{}Ce.BEND={type:3,value:"BEND"},Ce.CONNECTOR={type:3,value:"CONNECTOR"},Ce.ENTRY={type:3,value:"ENTRY"},Ce.EXIT={type:3,value:"EXIT"},Ce.JUNCTION={type:3,value:"JUNCTION"},Ce.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ce.TRANSITION={type:3,value:"TRANSITION"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=Ce;class Oe{}Oe.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Oe.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Oe;class Se{}Se.FLATOVAL={type:3,value:"FLATOVAL"},Se.RECTANGULAR={type:3,value:"RECTANGULAR"},Se.ROUND={type:3,value:"ROUND"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=Se;class xe{}xe.BASE_EXCAVATION={type:3,value:"BASE_EXCAVATION"},xe.CUT={type:3,value:"CUT"},xe.DREDGING={type:3,value:"DREDGING"},xe.EXCAVATION={type:3,value:"EXCAVATION"},xe.OVEREXCAVATION={type:3,value:"OVEREXCAVATION"},xe.PAVEMENTMILLING={type:3,value:"PAVEMENTMILLING"},xe.STEPEXCAVATION={type:3,value:"STEPEXCAVATION"},xe.TOPSOILREMOVAL={type:3,value:"TOPSOILREMOVAL"},xe.TRENCH={type:3,value:"TRENCH"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksCutTypeEnum=xe;class we{}we.BACKFILL={type:3,value:"BACKFILL"},we.COUNTERWEIGHT={type:3,value:"COUNTERWEIGHT"},we.EMBANKMENT={type:3,value:"EMBANKMENT"},we.SLOPEFILL={type:3,value:"SLOPEFILL"},we.SUBGRADE={type:3,value:"SUBGRADE"},we.SUBGRADEBED={type:3,value:"SUBGRADEBED"},we.TRANSITIONSECTION={type:3,value:"TRANSITIONSECTION"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksFillTypeEnum=we;class Be{}Be.DISHWASHER={type:3,value:"DISHWASHER"},Be.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},Be.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},Be.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},Be.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},Be.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},Be.FREEZER={type:3,value:"FREEZER"},Be.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},Be.HANDDRYER={type:3,value:"HANDDRYER"},Be.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},Be.MICROWAVE={type:3,value:"MICROWAVE"},Be.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},Be.REFRIGERATOR={type:3,value:"REFRIGERATOR"},Be.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},Be.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},Be.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=Be;class Fe{}Fe.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},Fe.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},Fe.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},Fe.SWITCHBOARD={type:3,value:"SWITCHBOARD"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=Fe;class Me{}Me.BATTERY={type:3,value:"BATTERY"},Me.CAPACITOR={type:3,value:"CAPACITOR"},Me.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Me.COMPENSATOR={type:3,value:"COMPENSATOR"},Me.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Me.INDUCTOR={type:3,value:"INDUCTOR"},Me.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Me.RECHARGER={type:3,value:"RECHARGER"},Me.UPS={type:3,value:"UPS"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Me;class Le{}Le.ELECTRONICFILTER={type:3,value:"ELECTRONICFILTER"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowTreatmentDeviceTypeEnum=Le;class Ue{}Ue.CHP={type:3,value:"CHP"},Ue.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},Ue.STANDALONE={type:3,value:"STANDALONE"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=Ue;class He{}He.DC={type:3,value:"DC"},He.INDUCTION={type:3,value:"INDUCTION"},He.POLYPHASE={type:3,value:"POLYPHASE"},He.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},He.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=He;class Ge{}Ge.RELAY={type:3,value:"RELAY"},Ge.TIMECLOCK={type:3,value:"TIMECLOCK"},Ge.TIMEDELAY={type:3,value:"TIMEDELAY"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=Ge;class ke{}ke.ABUTMENT={type:3,value:"ABUTMENT"},ke.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},ke.ARCH={type:3,value:"ARCH"},ke.BEAM_GRID={type:3,value:"BEAM_GRID"},ke.BRACED_FRAME={type:3,value:"BRACED_FRAME"},ke.CROSS_BRACING={type:3,value:"CROSS_BRACING"},ke.DECK={type:3,value:"DECK"},ke.DILATATIONPANEL={type:3,value:"DILATATIONPANEL"},ke.ENTRANCEWORKS={type:3,value:"ENTRANCEWORKS"},ke.GIRDER={type:3,value:"GIRDER"},ke.GRID={type:3,value:"GRID"},ke.MAST={type:3,value:"MAST"},ke.PIER={type:3,value:"PIER"},ke.PYLON={type:3,value:"PYLON"},ke.RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY={type:3,value:"RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY"},ke.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},ke.RIGID_FRAME={type:3,value:"RIGID_FRAME"},ke.SHELTER={type:3,value:"SHELTER"},ke.SIGNALASSEMBLY={type:3,value:"SIGNALASSEMBLY"},ke.SLAB_FIELD={type:3,value:"SLAB_FIELD"},ke.SUMPBUSTER={type:3,value:"SUMPBUSTER"},ke.SUPPORTINGASSEMBLY={type:3,value:"SUPPORTINGASSEMBLY"},ke.SUSPENSIONASSEMBLY={type:3,value:"SUSPENSIONASSEMBLY"},ke.TRACKPANEL={type:3,value:"TRACKPANEL"},ke.TRACTION_SWITCHING_ASSEMBLY={type:3,value:"TRACTION_SWITCHING_ASSEMBLY"},ke.TRAFFIC_CALMING_DEVICE={type:3,value:"TRAFFIC_CALMING_DEVICE"},ke.TRUSS={type:3,value:"TRUSS"},ke.TURNOUTPANEL={type:3,value:"TURNOUTPANEL"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=ke;class Ve{}Ve.COMPLEX={type:3,value:"COMPLEX"},Ve.ELEMENT={type:3,value:"ELEMENT"},Ve.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Ve;class je{}je.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},je.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=je;class Qe{}Qe.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Qe.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Qe.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Qe.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Qe.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Qe.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Qe.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Qe;class We{}We.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},We.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},We.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},We.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},We.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},We.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=We;class ze{}ze.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},ze.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},ze.EVENTRULE={type:3,value:"EVENTRULE"},ze.EVENTTIME={type:3,value:"EVENTTIME"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=ze;class Ke{}Ke.ENDEVENT={type:3,value:"ENDEVENT"},Ke.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Ke.STARTEVENT={type:3,value:"STARTEVENT"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Ke;class Ye{}Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Ye;class Xe{}Xe.ABOVEGROUND={type:3,value:"ABOVEGROUND"},Xe.BELOWGROUND={type:3,value:"BELOWGROUND"},Xe.JUNCTION={type:3,value:"JUNCTION"},Xe.LEVELCROSSING={type:3,value:"LEVELCROSSING"},Xe.SEGMENT={type:3,value:"SEGMENT"},Xe.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},Xe.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},Xe.TERMINAL={type:3,value:"TERMINAL"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityPartCommonTypeEnum=Xe;class Ze{}Ze.LATERAL={type:3,value:"LATERAL"},Ze.LONGITUDINAL={type:3,value:"LONGITUDINAL"},Ze.REGION={type:3,value:"REGION"},Ze.VERTICAL={type:3,value:"VERTICAL"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityUsageEnum=Ze;class qe{}qe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},qe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},qe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},qe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},qe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},qe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},qe.VANEAXIAL={type:3,value:"VANEAXIAL"},qe.USERDEFINED={type:3,value:"USERDEFINED"},qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=qe;class Je{}Je.GLUE={type:3,value:"GLUE"},Je.MORTAR={type:3,value:"MORTAR"},Je.WELD={type:3,value:"WELD"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=Je;class $e{}$e.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},$e.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},$e.ODORFILTER={type:3,value:"ODORFILTER"},$e.OILFILTER={type:3,value:"OILFILTER"},$e.STRAINER={type:3,value:"STRAINER"},$e.WATERFILTER={type:3,value:"WATERFILTER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=$e;class et{}et.BREECHINGINLET={type:3,value:"BREECHINGINLET"},et.FIREHYDRANT={type:3,value:"FIREHYDRANT"},et.FIREMONITOR={type:3,value:"FIREMONITOR"},et.HOSEREEL={type:3,value:"HOSEREEL"},et.SPRINKLER={type:3,value:"SPRINKLER"},et.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},et.USERDEFINED={type:3,value:"USERDEFINED"},et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=et;class tt{}tt.SINK={type:3,value:"SINK"},tt.SOURCE={type:3,value:"SOURCE"},tt.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=tt;class st{}st.AMMETER={type:3,value:"AMMETER"},st.COMBINED={type:3,value:"COMBINED"},st.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},st.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},st.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},st.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},st.THERMOMETER={type:3,value:"THERMOMETER"},st.VOLTMETER={type:3,value:"VOLTMETER"},st.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},st.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=st;class it{}it.ENERGYMETER={type:3,value:"ENERGYMETER"},it.GASMETER={type:3,value:"GASMETER"},it.OILMETER={type:3,value:"OILMETER"},it.WATERMETER={type:3,value:"WATERMETER"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=it;class rt{}rt.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},rt.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},rt.PAD_FOOTING={type:3,value:"PAD_FOOTING"},rt.PILE_CAP={type:3,value:"PILE_CAP"},rt.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=rt;class ot{}ot.BED={type:3,value:"BED"},ot.CHAIR={type:3,value:"CHAIR"},ot.DESK={type:3,value:"DESK"},ot.FILECABINET={type:3,value:"FILECABINET"},ot.SHELF={type:3,value:"SHELF"},ot.SOFA={type:3,value:"SOFA"},ot.TABLE={type:3,value:"TABLE"},ot.TECHNICALCABINET={type:3,value:"TECHNICALCABINET"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=ot;class nt{}nt.SOIL_BORING_POINT={type:3,value:"SOIL_BORING_POINT"},nt.TERRAIN={type:3,value:"TERRAIN"},nt.VEGETATION={type:3,value:"VEGETATION"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=nt;class at{}at.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},at.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},at.MODEL_VIEW={type:3,value:"MODEL_VIEW"},at.PLAN_VIEW={type:3,value:"PLAN_VIEW"},at.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},at.SECTION_VIEW={type:3,value:"SECTION_VIEW"},at.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=at;class lt{}lt.SOLID={type:3,value:"SOLID"},lt.VOID={type:3,value:"VOID"},lt.WATER={type:3,value:"WATER"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeotechnicalStratumTypeEnum=lt;class ht{}ht.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},ht.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=ht;class ct{}ct.IRREGULAR={type:3,value:"IRREGULAR"},ct.RADIAL={type:3,value:"RADIAL"},ct.RECTANGULAR={type:3,value:"RECTANGULAR"},ct.TRIANGULAR={type:3,value:"TRIANGULAR"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=ct;class At{}At.PLATE={type:3,value:"PLATE"},At.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},At.TURNOUTHEATING={type:3,value:"TURNOUTHEATING"},At.USERDEFINED={type:3,value:"USERDEFINED"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=At;class ut{}ut.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ut.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ut.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ut.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ut.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ut.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ut.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ut.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ut.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ut.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ut.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ut.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ut.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ut;class pt{}pt.BUMPER={type:3,value:"BUMPER"},pt.CRASHCUSHION={type:3,value:"CRASHCUSHION"},pt.DAMPINGSYSTEM={type:3,value:"DAMPINGSYSTEM"},pt.FENDER={type:3,value:"FENDER"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcImpactProtectionDeviceTypeEnum=pt;class dt{}dt.CYCLONIC={type:3,value:"CYCLONIC"},dt.GREASE={type:3,value:"GREASE"},dt.OIL={type:3,value:"OIL"},dt.PETROL={type:3,value:"PETROL"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=dt;class ft{}ft.EXTERNAL={type:3,value:"EXTERNAL"},ft.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},ft.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},ft.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},ft.INTERNAL={type:3,value:"INTERNAL"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=ft;class Et{}Et.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Et.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Et.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Et;class mt{}mt.DATA={type:3,value:"DATA"},mt.POWER={type:3,value:"POWER"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=mt;class yt{}yt.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},yt.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},yt.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},yt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=yt;class gt{}gt.ADMINISTRATION={type:3,value:"ADMINISTRATION"},gt.CARPENTRY={type:3,value:"CARPENTRY"},gt.CLEANING={type:3,value:"CLEANING"},gt.CONCRETE={type:3,value:"CONCRETE"},gt.DRYWALL={type:3,value:"DRYWALL"},gt.ELECTRIC={type:3,value:"ELECTRIC"},gt.FINISHING={type:3,value:"FINISHING"},gt.FLOORING={type:3,value:"FLOORING"},gt.GENERAL={type:3,value:"GENERAL"},gt.HVAC={type:3,value:"HVAC"},gt.LANDSCAPING={type:3,value:"LANDSCAPING"},gt.MASONRY={type:3,value:"MASONRY"},gt.PAINTING={type:3,value:"PAINTING"},gt.PAVING={type:3,value:"PAVING"},gt.PLUMBING={type:3,value:"PLUMBING"},gt.ROOFING={type:3,value:"ROOFING"},gt.SITEGRADING={type:3,value:"SITEGRADING"},gt.STEELWORK={type:3,value:"STEELWORK"},gt.SURVEYING={type:3,value:"SURVEYING"},gt.USERDEFINED={type:3,value:"USERDEFINED"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=gt;class It{}It.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},It.FLUORESCENT={type:3,value:"FLUORESCENT"},It.HALOGEN={type:3,value:"HALOGEN"},It.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},It.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},It.LED={type:3,value:"LED"},It.METALHALIDE={type:3,value:"METALHALIDE"},It.OLED={type:3,value:"OLED"},It.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=It;class vt{}vt.AXIS1={type:3,value:"AXIS1"},vt.AXIS2={type:3,value:"AXIS2"},vt.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=vt;class Tt{}Tt.TYPE_A={type:3,value:"TYPE_A"},Tt.TYPE_B={type:3,value:"TYPE_B"},Tt.TYPE_C={type:3,value:"TYPE_C"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Tt;class _t{}_t.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},_t.FLUORESCENT={type:3,value:"FLUORESCENT"},_t.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},_t.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},_t.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},_t.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},_t.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},_t.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},_t.METALHALIDE={type:3,value:"METALHALIDE"},_t.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=_t;class Rt{}Rt.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},Rt.POINTSOURCE={type:3,value:"POINTSOURCE"},Rt.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=Rt;class Pt{}Pt.HOSEREEL={type:3,value:"HOSEREEL"},Pt.LOADINGARM={type:3,value:"LOADINGARM"},Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLiquidTerminalTypeEnum=Pt;class Dt{}Dt.LOAD_CASE={type:3,value:"LOAD_CASE"},Dt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Dt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Dt;class Nt{}Nt.LOGICALAND={type:3,value:"LOGICALAND"},Nt.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},Nt.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},Nt.LOGICALOR={type:3,value:"LOGICALOR"},Nt.LOGICALXOR={type:3,value:"LOGICALXOR"},e.IfcLogicalOperatorEnum=Nt;class bt{}bt.BARRIERBEACH={type:3,value:"BARRIERBEACH"},bt.BREAKWATER={type:3,value:"BREAKWATER"},bt.CANAL={type:3,value:"CANAL"},bt.DRYDOCK={type:3,value:"DRYDOCK"},bt.FLOATINGDOCK={type:3,value:"FLOATINGDOCK"},bt.HYDROLIFT={type:3,value:"HYDROLIFT"},bt.JETTY={type:3,value:"JETTY"},bt.LAUNCHRECOVERY={type:3,value:"LAUNCHRECOVERY"},bt.MARINEDEFENCE={type:3,value:"MARINEDEFENCE"},bt.NAVIGATIONALCHANNEL={type:3,value:"NAVIGATIONALCHANNEL"},bt.PORT={type:3,value:"PORT"},bt.QUAY={type:3,value:"QUAY"},bt.REVETMENT={type:3,value:"REVETMENT"},bt.SHIPLIFT={type:3,value:"SHIPLIFT"},bt.SHIPLOCK={type:3,value:"SHIPLOCK"},bt.SHIPYARD={type:3,value:"SHIPYARD"},bt.SLIPWAY={type:3,value:"SLIPWAY"},bt.WATERWAY={type:3,value:"WATERWAY"},bt.WATERWAYSHIPLIFT={type:3,value:"WATERWAYSHIPLIFT"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarineFacilityTypeEnum=bt;class Ct{}Ct.ABOVEWATERLINE={type:3,value:"ABOVEWATERLINE"},Ct.ANCHORAGE={type:3,value:"ANCHORAGE"},Ct.APPROACHCHANNEL={type:3,value:"APPROACHCHANNEL"},Ct.BELOWWATERLINE={type:3,value:"BELOWWATERLINE"},Ct.BERTHINGSTRUCTURE={type:3,value:"BERTHINGSTRUCTURE"},Ct.CHAMBER={type:3,value:"CHAMBER"},Ct.CILL_LEVEL={type:3,value:"CILL_LEVEL"},Ct.COPELEVEL={type:3,value:"COPELEVEL"},Ct.CORE={type:3,value:"CORE"},Ct.CREST={type:3,value:"CREST"},Ct.GATEHEAD={type:3,value:"GATEHEAD"},Ct.GUDINGSTRUCTURE={type:3,value:"GUDINGSTRUCTURE"},Ct.HIGHWATERLINE={type:3,value:"HIGHWATERLINE"},Ct.LANDFIELD={type:3,value:"LANDFIELD"},Ct.LEEWARDSIDE={type:3,value:"LEEWARDSIDE"},Ct.LOWWATERLINE={type:3,value:"LOWWATERLINE"},Ct.MANUFACTURING={type:3,value:"MANUFACTURING"},Ct.NAVIGATIONALAREA={type:3,value:"NAVIGATIONALAREA"},Ct.PROTECTION={type:3,value:"PROTECTION"},Ct.SHIPTRANSFER={type:3,value:"SHIPTRANSFER"},Ct.STORAGEAREA={type:3,value:"STORAGEAREA"},Ct.VEHICLESERVICING={type:3,value:"VEHICLESERVICING"},Ct.WATERFIELD={type:3,value:"WATERFIELD"},Ct.WEATHERSIDE={type:3,value:"WEATHERSIDE"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarinePartTypeEnum=Ct;class Ot{}Ot.ANCHORBOLT={type:3,value:"ANCHORBOLT"},Ot.BOLT={type:3,value:"BOLT"},Ot.CHAIN={type:3,value:"CHAIN"},Ot.COUPLER={type:3,value:"COUPLER"},Ot.DOWEL={type:3,value:"DOWEL"},Ot.NAIL={type:3,value:"NAIL"},Ot.NAILPLATE={type:3,value:"NAILPLATE"},Ot.RAILFASTENING={type:3,value:"RAILFASTENING"},Ot.RAILJOINT={type:3,value:"RAILJOINT"},Ot.RIVET={type:3,value:"RIVET"},Ot.ROPE={type:3,value:"ROPE"},Ot.SCREW={type:3,value:"SCREW"},Ot.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},Ot.STAPLE={type:3,value:"STAPLE"},Ot.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=Ot;class St{}St.AIRSTATION={type:3,value:"AIRSTATION"},St.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},St.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},St.OXYGENPLANT={type:3,value:"OXYGENPLANT"},St.VACUUMSTATION={type:3,value:"VACUUMSTATION"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=St;class xt{}xt.ARCH_SEGMENT={type:3,value:"ARCH_SEGMENT"},xt.BRACE={type:3,value:"BRACE"},xt.CHORD={type:3,value:"CHORD"},xt.COLLAR={type:3,value:"COLLAR"},xt.MEMBER={type:3,value:"MEMBER"},xt.MULLION={type:3,value:"MULLION"},xt.PLATE={type:3,value:"PLATE"},xt.POST={type:3,value:"POST"},xt.PURLIN={type:3,value:"PURLIN"},xt.RAFTER={type:3,value:"RAFTER"},xt.STAY_CABLE={type:3,value:"STAY_CABLE"},xt.STIFFENING_RIB={type:3,value:"STIFFENING_RIB"},xt.STRINGER={type:3,value:"STRINGER"},xt.STRUCTURALCABLE={type:3,value:"STRUCTURALCABLE"},xt.STRUT={type:3,value:"STRUT"},xt.STUD={type:3,value:"STUD"},xt.SUSPENDER={type:3,value:"SUSPENDER"},xt.SUSPENSION_CABLE={type:3,value:"SUSPENSION_CABLE"},xt.TIEBAR={type:3,value:"TIEBAR"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=xt;class wt{}wt.ACCESSPOINT={type:3,value:"ACCESSPOINT"},wt.BASEBANDUNIT={type:3,value:"BASEBANDUNIT"},wt.BASETRANSCEIVERSTATION={type:3,value:"BASETRANSCEIVERSTATION"},wt.E_UTRAN_NODE_B={type:3,value:"E_UTRAN_NODE_B"},wt.GATEWAY_GPRS_SUPPORT_NODE={type:3,value:"GATEWAY_GPRS_SUPPORT_NODE"},wt.MASTERUNIT={type:3,value:"MASTERUNIT"},wt.MOBILESWITCHINGCENTER={type:3,value:"MOBILESWITCHINGCENTER"},wt.MSCSERVER={type:3,value:"MSCSERVER"},wt.PACKETCONTROLUNIT={type:3,value:"PACKETCONTROLUNIT"},wt.REMOTERADIOUNIT={type:3,value:"REMOTERADIOUNIT"},wt.REMOTEUNIT={type:3,value:"REMOTEUNIT"},wt.SERVICE_GPRS_SUPPORT_NODE={type:3,value:"SERVICE_GPRS_SUPPORT_NODE"},wt.SUBSCRIBERSERVER={type:3,value:"SUBSCRIBERSERVER"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMobileTelecommunicationsApplianceTypeEnum=wt;class Bt{}Bt.BOLLARD={type:3,value:"BOLLARD"},Bt.LINETENSIONER={type:3,value:"LINETENSIONER"},Bt.MAGNETICDEVICE={type:3,value:"MAGNETICDEVICE"},Bt.MOORINGHOOKS={type:3,value:"MOORINGHOOKS"},Bt.VACUUMDEVICE={type:3,value:"VACUUMDEVICE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMooringDeviceTypeEnum=Bt;class Ft{}Ft.BELTDRIVE={type:3,value:"BELTDRIVE"},Ft.COUPLING={type:3,value:"COUPLING"},Ft.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Ft;class Mt{}Mt.BEACON={type:3,value:"BEACON"},Mt.BUOY={type:3,value:"BUOY"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcNavigationElementTypeEnum=Mt;class Lt{}Lt.ACTOR={type:3,value:"ACTOR"},Lt.CONTROL={type:3,value:"CONTROL"},Lt.GROUP={type:3,value:"GROUP"},Lt.PROCESS={type:3,value:"PROCESS"},Lt.PRODUCT={type:3,value:"PRODUCT"},Lt.PROJECT={type:3,value:"PROJECT"},Lt.RESOURCE={type:3,value:"RESOURCE"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=Lt;class Ut{}Ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ut.CODEWAIVER={type:3,value:"CODEWAIVER"},Ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ut.EXTERNAL={type:3,value:"EXTERNAL"},Ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},Ut.MODELVIEW={type:3,value:"MODELVIEW"},Ut.PARAMETER={type:3,value:"PARAMETER"},Ut.REQUIREMENT={type:3,value:"REQUIREMENT"},Ut.SPECIFICATION={type:3,value:"SPECIFICATION"},Ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ut;class Ht{}Ht.ASSIGNEE={type:3,value:"ASSIGNEE"},Ht.ASSIGNOR={type:3,value:"ASSIGNOR"},Ht.LESSEE={type:3,value:"LESSEE"},Ht.LESSOR={type:3,value:"LESSOR"},Ht.LETTINGAGENT={type:3,value:"LETTINGAGENT"},Ht.OWNER={type:3,value:"OWNER"},Ht.TENANT={type:3,value:"TENANT"},Ht.USERDEFINED={type:3,value:"USERDEFINED"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=Ht;class Gt{}Gt.OPENING={type:3,value:"OPENING"},Gt.RECESS={type:3,value:"RECESS"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=Gt;class kt{}kt.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},kt.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},kt.DATAOUTLET={type:3,value:"DATAOUTLET"},kt.POWEROUTLET={type:3,value:"POWEROUTLET"},kt.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=kt;class Vt{}Vt.FLEXIBLE={type:3,value:"FLEXIBLE"},Vt.RIGID={type:3,value:"RIGID"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPavementTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=jt;class Qt{}Qt.GRILL={type:3,value:"GRILL"},Qt.LOUVER={type:3,value:"LOUVER"},Qt.SCREEN={type:3,value:"SCREEN"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=Qt;class Wt{}Wt.ACCESS={type:3,value:"ACCESS"},Wt.BUILDING={type:3,value:"BUILDING"},Wt.WORK={type:3,value:"WORK"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=Wt;class zt{}zt.PHYSICAL={type:3,value:"PHYSICAL"},zt.VIRTUAL={type:3,value:"VIRTUAL"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=zt;class Kt{}Kt.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},Kt.COMPOSITE={type:3,value:"COMPOSITE"},Kt.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},Kt.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},Kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=Kt;class Yt{}Yt.BORED={type:3,value:"BORED"},Yt.COHESION={type:3,value:"COHESION"},Yt.DRIVEN={type:3,value:"DRIVEN"},Yt.FRICTION={type:3,value:"FRICTION"},Yt.JETGROUTING={type:3,value:"JETGROUTING"},Yt.SUPPORT={type:3,value:"SUPPORT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=Yt;class Xt{}Xt.BEND={type:3,value:"BEND"},Xt.CONNECTOR={type:3,value:"CONNECTOR"},Xt.ENTRY={type:3,value:"ENTRY"},Xt.EXIT={type:3,value:"EXIT"},Xt.JUNCTION={type:3,value:"JUNCTION"},Xt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Xt.TRANSITION={type:3,value:"TRANSITION"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Xt;class Zt{}Zt.CULVERT={type:3,value:"CULVERT"},Zt.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Zt.GUTTER={type:3,value:"GUTTER"},Zt.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Zt.SPOOL={type:3,value:"SPOOL"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Zt;class qt{}qt.BASE_PLATE={type:3,value:"BASE_PLATE"},qt.COVER_PLATE={type:3,value:"COVER_PLATE"},qt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},qt.FLANGE_PLATE={type:3,value:"FLANGE_PLATE"},qt.GUSSET_PLATE={type:3,value:"GUSSET_PLATE"},qt.SHEET={type:3,value:"SHEET"},qt.SPLICE_PLATE={type:3,value:"SPLICE_PLATE"},qt.STIFFENER_PLATE={type:3,value:"STIFFENER_PLATE"},qt.WEB_PLATE={type:3,value:"WEB_PLATE"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=qt;class Jt{}Jt.CURVE3D={type:3,value:"CURVE3D"},Jt.PCURVE_S1={type:3,value:"PCURVE_S1"},Jt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Jt;class $t{}$t.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},$t.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},$t.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},$t.CALIBRATION={type:3,value:"CALIBRATION"},$t.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},$t.SHUTDOWN={type:3,value:"SHUTDOWN"},$t.STARTUP={type:3,value:"STARTUP"},$t.USERDEFINED={type:3,value:"USERDEFINED"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=$t;class es{}es.AREA={type:3,value:"AREA"},es.CURVE={type:3,value:"CURVE"},e.IfcProfileTypeEnum=es;class ts{}ts.CHANGEORDER={type:3,value:"CHANGEORDER"},ts.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},ts.MOVEORDER={type:3,value:"MOVEORDER"},ts.PURCHASEORDER={type:3,value:"PURCHASEORDER"},ts.WORKORDER={type:3,value:"WORKORDER"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=ts;class ss{}ss.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},ss.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=ss;class is{}is.BLISTER={type:3,value:"BLISTER"},is.DEVIATOR={type:3,value:"DEVIATOR"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=is;class rs{}rs.PSET_MATERIALDRIVEN={type:3,value:"PSET_MATERIALDRIVEN"},rs.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},rs.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},rs.PSET_PROFILEDRIVEN={type:3,value:"PSET_PROFILEDRIVEN"},rs.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},rs.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},rs.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},rs.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},rs.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=rs;class os{}os.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},os.ELECTRONIC={type:3,value:"ELECTRONIC"},os.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},os.THERMAL={type:3,value:"THERMAL"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=os;class ns{}ns.ANTI_ARCING_DEVICE={type:3,value:"ANTI_ARCING_DEVICE"},ns.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},ns.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},ns.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},ns.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},ns.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},ns.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},ns.SPARKGAP={type:3,value:"SPARKGAP"},ns.VARISTOR={type:3,value:"VARISTOR"},ns.VOLTAGELIMITER={type:3,value:"VOLTAGELIMITER"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=ns;class as{}as.CIRCULATOR={type:3,value:"CIRCULATOR"},as.ENDSUCTION={type:3,value:"ENDSUCTION"},as.SPLITCASE={type:3,value:"SPLITCASE"},as.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},as.SUMPPUMP={type:3,value:"SUMPPUMP"},as.VERTICALINLINE={type:3,value:"VERTICALINLINE"},as.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=as;class ls{}ls.BLADE={type:3,value:"BLADE"},ls.CHECKRAIL={type:3,value:"CHECKRAIL"},ls.GUARDRAIL={type:3,value:"GUARDRAIL"},ls.RACKRAIL={type:3,value:"RACKRAIL"},ls.RAIL={type:3,value:"RAIL"},ls.STOCKRAIL={type:3,value:"STOCKRAIL"},ls.USERDEFINED={type:3,value:"USERDEFINED"},ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailTypeEnum=ls;class hs{}hs.BALUSTRADE={type:3,value:"BALUSTRADE"},hs.FENCE={type:3,value:"FENCE"},hs.GUARDRAIL={type:3,value:"GUARDRAIL"},hs.HANDRAIL={type:3,value:"HANDRAIL"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=hs;class cs{}cs.DILATATIONSUPERSTRUCTURE={type:3,value:"DILATATIONSUPERSTRUCTURE"},cs.LINESIDESTRUCTURE={type:3,value:"LINESIDESTRUCTURE"},cs.LINESIDESTRUCTUREPART={type:3,value:"LINESIDESTRUCTUREPART"},cs.PLAINTRACKSUPERSTRUCTURE={type:3,value:"PLAINTRACKSUPERSTRUCTURE"},cs.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},cs.TRACKSTRUCTURE={type:3,value:"TRACKSTRUCTURE"},cs.TRACKSTRUCTUREPART={type:3,value:"TRACKSTRUCTUREPART"},cs.TURNOUTSUPERSTRUCTURE={type:3,value:"TURNOUTSUPERSTRUCTURE"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayPartTypeEnum=cs;class As{}As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayTypeEnum=As;class us{}us.SPIRAL={type:3,value:"SPIRAL"},us.STRAIGHT={type:3,value:"STRAIGHT"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=us;class ps{}ps.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},ps.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},ps.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},ps.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},ps.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},ps.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=ps;class ds{}ds.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},ds.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},ds.DAILY={type:3,value:"DAILY"},ds.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},ds.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},ds.WEEKLY={type:3,value:"WEEKLY"},ds.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},ds.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=ds;class fs{}fs.BOUNDARY={type:3,value:"BOUNDARY"},fs.INTERSECTION={type:3,value:"INTERSECTION"},fs.KILOPOINT={type:3,value:"KILOPOINT"},fs.LANDMARK={type:3,value:"LANDMARK"},fs.MILEPOINT={type:3,value:"MILEPOINT"},fs.POSITION={type:3,value:"POSITION"},fs.REFERENCEMARKER={type:3,value:"REFERENCEMARKER"},fs.STATION={type:3,value:"STATION"},fs.USERDEFINED={type:3,value:"USERDEFINED"},fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReferentTypeEnum=fs;class Es{}Es.BLINN={type:3,value:"BLINN"},Es.FLAT={type:3,value:"FLAT"},Es.GLASS={type:3,value:"GLASS"},Es.MATT={type:3,value:"MATT"},Es.METAL={type:3,value:"METAL"},Es.MIRROR={type:3,value:"MIRROR"},Es.PHONG={type:3,value:"PHONG"},Es.PHYSICAL={type:3,value:"PHYSICAL"},Es.PLASTIC={type:3,value:"PLASTIC"},Es.STRAUSS={type:3,value:"STRAUSS"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Es;class ms{}ms.DYNAMICALLYCOMPACTED={type:3,value:"DYNAMICALLYCOMPACTED"},ms.GROUTED={type:3,value:"GROUTED"},ms.REPLACED={type:3,value:"REPLACED"},ms.ROLLERCOMPACTED={type:3,value:"ROLLERCOMPACTED"},ms.SURCHARGEPRELOADED={type:3,value:"SURCHARGEPRELOADED"},ms.VERTICALLYDRAINED={type:3,value:"VERTICALLYDRAINED"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcedSoilTypeEnum=ms;class ys{}ys.ANCHORING={type:3,value:"ANCHORING"},ys.EDGE={type:3,value:"EDGE"},ys.LIGATURE={type:3,value:"LIGATURE"},ys.MAIN={type:3,value:"MAIN"},ys.PUNCHING={type:3,value:"PUNCHING"},ys.RING={type:3,value:"RING"},ys.SHEAR={type:3,value:"SHEAR"},ys.STUD={type:3,value:"STUD"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=ys;class gs{}gs.PLAIN={type:3,value:"PLAIN"},gs.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=gs;class Is{}Is.ANCHORING={type:3,value:"ANCHORING"},Is.EDGE={type:3,value:"EDGE"},Is.LIGATURE={type:3,value:"LIGATURE"},Is.MAIN={type:3,value:"MAIN"},Is.PUNCHING={type:3,value:"PUNCHING"},Is.RING={type:3,value:"RING"},Is.SHEAR={type:3,value:"SHEAR"},Is.SPACEBAR={type:3,value:"SPACEBAR"},Is.STUD={type:3,value:"STUD"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Is;class vs{}vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=vs;class Ts{}Ts.BICYCLECROSSING={type:3,value:"BICYCLECROSSING"},Ts.BUS_STOP={type:3,value:"BUS_STOP"},Ts.CARRIAGEWAY={type:3,value:"CARRIAGEWAY"},Ts.CENTRALISLAND={type:3,value:"CENTRALISLAND"},Ts.CENTRALRESERVE={type:3,value:"CENTRALRESERVE"},Ts.HARDSHOULDER={type:3,value:"HARDSHOULDER"},Ts.INTERSECTION={type:3,value:"INTERSECTION"},Ts.LAYBY={type:3,value:"LAYBY"},Ts.PARKINGBAY={type:3,value:"PARKINGBAY"},Ts.PASSINGBAY={type:3,value:"PASSINGBAY"},Ts.PEDESTRIAN_CROSSING={type:3,value:"PEDESTRIAN_CROSSING"},Ts.RAILWAYCROSSING={type:3,value:"RAILWAYCROSSING"},Ts.REFUGEISLAND={type:3,value:"REFUGEISLAND"},Ts.ROADSEGMENT={type:3,value:"ROADSEGMENT"},Ts.ROADSIDE={type:3,value:"ROADSIDE"},Ts.ROADSIDEPART={type:3,value:"ROADSIDEPART"},Ts.ROADWAYPLATEAU={type:3,value:"ROADWAYPLATEAU"},Ts.ROUNDABOUT={type:3,value:"ROUNDABOUT"},Ts.SHOULDER={type:3,value:"SHOULDER"},Ts.SIDEWALK={type:3,value:"SIDEWALK"},Ts.SOFTSHOULDER={type:3,value:"SOFTSHOULDER"},Ts.TOLLPLAZA={type:3,value:"TOLLPLAZA"},Ts.TRAFFICISLAND={type:3,value:"TRAFFICISLAND"},Ts.TRAFFICLANE={type:3,value:"TRAFFICLANE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadPartTypeEnum=Ts;class _s{}_s.USERDEFINED={type:3,value:"USERDEFINED"},_s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadTypeEnum=_s;class Rs{}Rs.ARCHITECT={type:3,value:"ARCHITECT"},Rs.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Rs.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Rs.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Rs.CLIENT={type:3,value:"CLIENT"},Rs.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Rs.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Rs.CONSULTANT={type:3,value:"CONSULTANT"},Rs.CONTRACTOR={type:3,value:"CONTRACTOR"},Rs.COSTENGINEER={type:3,value:"COSTENGINEER"},Rs.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Rs.ENGINEER={type:3,value:"ENGINEER"},Rs.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Rs.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Rs.MANUFACTURER={type:3,value:"MANUFACTURER"},Rs.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Rs.OWNER={type:3,value:"OWNER"},Rs.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Rs.RESELLER={type:3,value:"RESELLER"},Rs.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Rs.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Rs.SUPPLIER={type:3,value:"SUPPLIER"},Rs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Rs;class Ps{}Ps.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Ps.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Ps.DOME_ROOF={type:3,value:"DOME_ROOF"},Ps.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Ps.FREEFORM={type:3,value:"FREEFORM"},Ps.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Ps.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Ps.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Ps.HIP_ROOF={type:3,value:"HIP_ROOF"},Ps.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Ps.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Ps.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Ps.SHED_ROOF={type:3,value:"SHED_ROOF"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Ps;class Ds{}Ds.ATTO={type:3,value:"ATTO"},Ds.CENTI={type:3,value:"CENTI"},Ds.DECA={type:3,value:"DECA"},Ds.DECI={type:3,value:"DECI"},Ds.EXA={type:3,value:"EXA"},Ds.FEMTO={type:3,value:"FEMTO"},Ds.GIGA={type:3,value:"GIGA"},Ds.HECTO={type:3,value:"HECTO"},Ds.KILO={type:3,value:"KILO"},Ds.MEGA={type:3,value:"MEGA"},Ds.MICRO={type:3,value:"MICRO"},Ds.MILLI={type:3,value:"MILLI"},Ds.NANO={type:3,value:"NANO"},Ds.PETA={type:3,value:"PETA"},Ds.PICO={type:3,value:"PICO"},Ds.TERA={type:3,value:"TERA"},e.IfcSIPrefix=Ds;class Ns{}Ns.AMPERE={type:3,value:"AMPERE"},Ns.BECQUEREL={type:3,value:"BECQUEREL"},Ns.CANDELA={type:3,value:"CANDELA"},Ns.COULOMB={type:3,value:"COULOMB"},Ns.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Ns.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Ns.FARAD={type:3,value:"FARAD"},Ns.GRAM={type:3,value:"GRAM"},Ns.GRAY={type:3,value:"GRAY"},Ns.HENRY={type:3,value:"HENRY"},Ns.HERTZ={type:3,value:"HERTZ"},Ns.JOULE={type:3,value:"JOULE"},Ns.KELVIN={type:3,value:"KELVIN"},Ns.LUMEN={type:3,value:"LUMEN"},Ns.LUX={type:3,value:"LUX"},Ns.METRE={type:3,value:"METRE"},Ns.MOLE={type:3,value:"MOLE"},Ns.NEWTON={type:3,value:"NEWTON"},Ns.OHM={type:3,value:"OHM"},Ns.PASCAL={type:3,value:"PASCAL"},Ns.RADIAN={type:3,value:"RADIAN"},Ns.SECOND={type:3,value:"SECOND"},Ns.SIEMENS={type:3,value:"SIEMENS"},Ns.SIEVERT={type:3,value:"SIEVERT"},Ns.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Ns.STERADIAN={type:3,value:"STERADIAN"},Ns.TESLA={type:3,value:"TESLA"},Ns.VOLT={type:3,value:"VOLT"},Ns.WATT={type:3,value:"WATT"},Ns.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Ns;class bs{}bs.BATH={type:3,value:"BATH"},bs.BIDET={type:3,value:"BIDET"},bs.CISTERN={type:3,value:"CISTERN"},bs.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},bs.SHOWER={type:3,value:"SHOWER"},bs.SINK={type:3,value:"SINK"},bs.TOILETPAN={type:3,value:"TOILETPAN"},bs.URINAL={type:3,value:"URINAL"},bs.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},bs.WCSEAT={type:3,value:"WCSEAT"},bs.USERDEFINED={type:3,value:"USERDEFINED"},bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=bs;class Cs{}Cs.TAPERED={type:3,value:"TAPERED"},Cs.UNIFORM={type:3,value:"UNIFORM"},e.IfcSectionTypeEnum=Cs;class Os{}Os.CO2SENSOR={type:3,value:"CO2SENSOR"},Os.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Os.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Os.COSENSOR={type:3,value:"COSENSOR"},Os.EARTHQUAKESENSOR={type:3,value:"EARTHQUAKESENSOR"},Os.FIRESENSOR={type:3,value:"FIRESENSOR"},Os.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Os.FOREIGNOBJECTDETECTIONSENSOR={type:3,value:"FOREIGNOBJECTDETECTIONSENSOR"},Os.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Os.GASSENSOR={type:3,value:"GASSENSOR"},Os.HEATSENSOR={type:3,value:"HEATSENSOR"},Os.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Os.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Os.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Os.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Os.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Os.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Os.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Os.OBSTACLESENSOR={type:3,value:"OBSTACLESENSOR"},Os.PHSENSOR={type:3,value:"PHSENSOR"},Os.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Os.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Os.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Os.RAINSENSOR={type:3,value:"RAINSENSOR"},Os.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Os.SNOWDEPTHSENSOR={type:3,value:"SNOWDEPTHSENSOR"},Os.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Os.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Os.TRAINSENSOR={type:3,value:"TRAINSENSOR"},Os.TURNOUTCLOSURESENSOR={type:3,value:"TURNOUTCLOSURESENSOR"},Os.WHEELSENSOR={type:3,value:"WHEELSENSOR"},Os.WINDSENSOR={type:3,value:"WINDSENSOR"},Os.USERDEFINED={type:3,value:"USERDEFINED"},Os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Os;class Ss{}Ss.FINISH_FINISH={type:3,value:"FINISH_FINISH"},Ss.FINISH_START={type:3,value:"FINISH_START"},Ss.START_FINISH={type:3,value:"START_FINISH"},Ss.START_START={type:3,value:"START_START"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=Ss;class xs{}xs.AWNING={type:3,value:"AWNING"},xs.JALOUSIE={type:3,value:"JALOUSIE"},xs.SHUTTER={type:3,value:"SHUTTER"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=xs;class ws{}ws.MARKER={type:3,value:"MARKER"},ws.MIRROR={type:3,value:"MIRROR"},ws.PICTORAL={type:3,value:"PICTORAL"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignTypeEnum=ws;class Bs{}Bs.AUDIO={type:3,value:"AUDIO"},Bs.MIXED={type:3,value:"MIXED"},Bs.VISUAL={type:3,value:"VISUAL"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignalTypeEnum=Bs;class Fs{}Fs.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},Fs.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},Fs.P_LISTVALUE={type:3,value:"P_LISTVALUE"},Fs.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},Fs.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},Fs.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},Fs.Q_AREA={type:3,value:"Q_AREA"},Fs.Q_COUNT={type:3,value:"Q_COUNT"},Fs.Q_LENGTH={type:3,value:"Q_LENGTH"},Fs.Q_NUMBER={type:3,value:"Q_NUMBER"},Fs.Q_TIME={type:3,value:"Q_TIME"},Fs.Q_VOLUME={type:3,value:"Q_VOLUME"},Fs.Q_WEIGHT={type:3,value:"Q_WEIGHT"},e.IfcSimplePropertyTemplateTypeEnum=Fs;class Ms{}Ms.APPROACH_SLAB={type:3,value:"APPROACH_SLAB"},Ms.BASESLAB={type:3,value:"BASESLAB"},Ms.FLOOR={type:3,value:"FLOOR"},Ms.LANDING={type:3,value:"LANDING"},Ms.PAVING={type:3,value:"PAVING"},Ms.ROOF={type:3,value:"ROOF"},Ms.SIDEWALK={type:3,value:"SIDEWALK"},Ms.TRACKSLAB={type:3,value:"TRACKSLAB"},Ms.WEARING={type:3,value:"WEARING"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Ms;class Ls{}Ls.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},Ls.SOLARPANEL={type:3,value:"SOLARPANEL"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=Ls;class Us{}Us.CONVECTOR={type:3,value:"CONVECTOR"},Us.RADIATOR={type:3,value:"RADIATOR"},Us.USERDEFINED={type:3,value:"USERDEFINED"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Us;class Hs{}Hs.BERTH={type:3,value:"BERTH"},Hs.EXTERNAL={type:3,value:"EXTERNAL"},Hs.GFA={type:3,value:"GFA"},Hs.INTERNAL={type:3,value:"INTERNAL"},Hs.PARKING={type:3,value:"PARKING"},Hs.SPACE={type:3,value:"SPACE"},Hs.USERDEFINED={type:3,value:"USERDEFINED"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Hs;class Gs{}Gs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Gs.FIRESAFETY={type:3,value:"FIRESAFETY"},Gs.INTERFERENCE={type:3,value:"INTERFERENCE"},Gs.LIGHTING={type:3,value:"LIGHTING"},Gs.OCCUPANCY={type:3,value:"OCCUPANCY"},Gs.RESERVATION={type:3,value:"RESERVATION"},Gs.SECURITY={type:3,value:"SECURITY"},Gs.THERMAL={type:3,value:"THERMAL"},Gs.TRANSPORT={type:3,value:"TRANSPORT"},Gs.VENTILATION={type:3,value:"VENTILATION"},Gs.USERDEFINED={type:3,value:"USERDEFINED"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=Gs;class ks{}ks.BIRDCAGE={type:3,value:"BIRDCAGE"},ks.COWL={type:3,value:"COWL"},ks.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=ks;class Vs{}Vs.CURVED={type:3,value:"CURVED"},Vs.FREEFORM={type:3,value:"FREEFORM"},Vs.SPIRAL={type:3,value:"SPIRAL"},Vs.STRAIGHT={type:3,value:"STRAIGHT"},Vs.WINDER={type:3,value:"WINDER"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Vs;class js{}js.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},js.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},js.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},js.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},js.LADDER={type:3,value:"LADDER"},js.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},js.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},js.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},js.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},js.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},js.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},js.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},js.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},js.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},js.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=js;class Qs{}Qs.LOCKED={type:3,value:"LOCKED"},Qs.READONLY={type:3,value:"READONLY"},Qs.READONLYLOCKED={type:3,value:"READONLYLOCKED"},Qs.READWRITE={type:3,value:"READWRITE"},Qs.READWRITELOCKED={type:3,value:"READWRITELOCKED"},e.IfcStateEnum=Qs;class Ws{}Ws.CONST={type:3,value:"CONST"},Ws.DISCRETE={type:3,value:"DISCRETE"},Ws.EQUIDISTANT={type:3,value:"EQUIDISTANT"},Ws.LINEAR={type:3,value:"LINEAR"},Ws.PARABOLA={type:3,value:"PARABOLA"},Ws.POLYGONAL={type:3,value:"POLYGONAL"},Ws.SINUS={type:3,value:"SINUS"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=Ws;class zs{}zs.CABLE={type:3,value:"CABLE"},zs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},zs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},zs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},zs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=zs;class Ks{}Ks.BILINEAR={type:3,value:"BILINEAR"},Ks.CONST={type:3,value:"CONST"},Ks.DISCRETE={type:3,value:"DISCRETE"},Ks.ISOCONTOUR={type:3,value:"ISOCONTOUR"},Ks.USERDEFINED={type:3,value:"USERDEFINED"},Ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=Ks;class Ys{}Ys.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},Ys.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},Ys.SHELL={type:3,value:"SHELL"},Ys.USERDEFINED={type:3,value:"USERDEFINED"},Ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=Ys;class Xs{}Xs.PURCHASE={type:3,value:"PURCHASE"},Xs.WORK={type:3,value:"WORK"},Xs.USERDEFINED={type:3,value:"USERDEFINED"},Xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=Xs;class Zs{}Zs.DEFECT={type:3,value:"DEFECT"},Zs.HATCHMARKING={type:3,value:"HATCHMARKING"},Zs.LINEMARKING={type:3,value:"LINEMARKING"},Zs.MARK={type:3,value:"MARK"},Zs.NONSKIDSURFACING={type:3,value:"NONSKIDSURFACING"},Zs.PAVEMENTSURFACEMARKING={type:3,value:"PAVEMENTSURFACEMARKING"},Zs.RUMBLESTRIP={type:3,value:"RUMBLESTRIP"},Zs.SYMBOLMARKING={type:3,value:"SYMBOLMARKING"},Zs.TAG={type:3,value:"TAG"},Zs.TRANSVERSERUMBLESTRIP={type:3,value:"TRANSVERSERUMBLESTRIP"},Zs.TREATMENT={type:3,value:"TREATMENT"},Zs.USERDEFINED={type:3,value:"USERDEFINED"},Zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=Zs;class qs{}qs.BOTH={type:3,value:"BOTH"},qs.NEGATIVE={type:3,value:"NEGATIVE"},qs.POSITIVE={type:3,value:"POSITIVE"},e.IfcSurfaceSide=qs;class Js{}Js.CONTACTOR={type:3,value:"CONTACTOR"},Js.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Js.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Js.KEYPAD={type:3,value:"KEYPAD"},Js.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Js.RELAY={type:3,value:"RELAY"},Js.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Js.STARTER={type:3,value:"STARTER"},Js.START_AND_STOP_EQUIPMENT={type:3,value:"START_AND_STOP_EQUIPMENT"},Js.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Js.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Js.USERDEFINED={type:3,value:"USERDEFINED"},Js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Js;class $s{}$s.PANEL={type:3,value:"PANEL"},$s.SUBRACK={type:3,value:"SUBRACK"},$s.WORKSURFACE={type:3,value:"WORKSURFACE"},$s.USERDEFINED={type:3,value:"USERDEFINED"},$s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=$s;class ei{}ei.BASIN={type:3,value:"BASIN"},ei.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ei.EXPANSION={type:3,value:"EXPANSION"},ei.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ei.OILRETENTIONTRAY={type:3,value:"OILRETENTIONTRAY"},ei.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ei.STORAGE={type:3,value:"STORAGE"},ei.VESSEL={type:3,value:"VESSEL"},ei.USERDEFINED={type:3,value:"USERDEFINED"},ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ei;class ti{}ti.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},ti.WORKTIME={type:3,value:"WORKTIME"},ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=ti;class si{}si.ADJUSTMENT={type:3,value:"ADJUSTMENT"},si.ATTENDANCE={type:3,value:"ATTENDANCE"},si.CALIBRATION={type:3,value:"CALIBRATION"},si.CONSTRUCTION={type:3,value:"CONSTRUCTION"},si.DEMOLITION={type:3,value:"DEMOLITION"},si.DISMANTLE={type:3,value:"DISMANTLE"},si.DISPOSAL={type:3,value:"DISPOSAL"},si.EMERGENCY={type:3,value:"EMERGENCY"},si.INSPECTION={type:3,value:"INSPECTION"},si.INSTALLATION={type:3,value:"INSTALLATION"},si.LOGISTIC={type:3,value:"LOGISTIC"},si.MAINTENANCE={type:3,value:"MAINTENANCE"},si.MOVE={type:3,value:"MOVE"},si.OPERATION={type:3,value:"OPERATION"},si.REMOVAL={type:3,value:"REMOVAL"},si.RENOVATION={type:3,value:"RENOVATION"},si.SAFETY={type:3,value:"SAFETY"},si.SHUTDOWN={type:3,value:"SHUTDOWN"},si.STARTUP={type:3,value:"STARTUP"},si.TESTING={type:3,value:"TESTING"},si.TROUBLESHOOTING={type:3,value:"TROUBLESHOOTING"},si.USERDEFINED={type:3,value:"USERDEFINED"},si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=si;class ii{}ii.COUPLER={type:3,value:"COUPLER"},ii.FIXED_END={type:3,value:"FIXED_END"},ii.TENSIONING_END={type:3,value:"TENSIONING_END"},ii.USERDEFINED={type:3,value:"USERDEFINED"},ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=ii;class ri{}ri.COUPLER={type:3,value:"COUPLER"},ri.DIABOLO={type:3,value:"DIABOLO"},ri.DUCT={type:3,value:"DUCT"},ri.GROUTING_DUCT={type:3,value:"GROUTING_DUCT"},ri.TRUMPET={type:3,value:"TRUMPET"},ri.USERDEFINED={type:3,value:"USERDEFINED"},ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonConduitTypeEnum=ri;class oi{}oi.BAR={type:3,value:"BAR"},oi.COATED={type:3,value:"COATED"},oi.STRAND={type:3,value:"STRAND"},oi.WIRE={type:3,value:"WIRE"},oi.USERDEFINED={type:3,value:"USERDEFINED"},oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=oi;class ni{}ni.DOWN={type:3,value:"DOWN"},ni.LEFT={type:3,value:"LEFT"},ni.RIGHT={type:3,value:"RIGHT"},ni.UP={type:3,value:"UP"},e.IfcTextPath=ni;class ai{}ai.CONTINUOUS={type:3,value:"CONTINUOUS"},ai.DISCRETE={type:3,value:"DISCRETE"},ai.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},ai.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},ai.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},ai.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=ai;class li{}li.BLOCKINGDEVICE={type:3,value:"BLOCKINGDEVICE"},li.DERAILER={type:3,value:"DERAILER"},li.FROG={type:3,value:"FROG"},li.HALF_SET_OF_BLADES={type:3,value:"HALF_SET_OF_BLADES"},li.SLEEPER={type:3,value:"SLEEPER"},li.SPEEDREGULATOR={type:3,value:"SPEEDREGULATOR"},li.TRACKENDOFALIGNMENT={type:3,value:"TRACKENDOFALIGNMENT"},li.VEHICLESTOP={type:3,value:"VEHICLESTOP"},li.USERDEFINED={type:3,value:"USERDEFINED"},li.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTrackElementTypeEnum=li;class hi{}hi.CHOPPER={type:3,value:"CHOPPER"},hi.COMBINED={type:3,value:"COMBINED"},hi.CURRENT={type:3,value:"CURRENT"},hi.FREQUENCY={type:3,value:"FREQUENCY"},hi.INVERTER={type:3,value:"INVERTER"},hi.RECTIFIER={type:3,value:"RECTIFIER"},hi.VOLTAGE={type:3,value:"VOLTAGE"},hi.USERDEFINED={type:3,value:"USERDEFINED"},hi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=hi;class ci{}ci.CONTINUOUS={type:3,value:"CONTINUOUS"},ci.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},ci.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},ci.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},e.IfcTransitionCode=ci;class Ai{}Ai.CRANEWAY={type:3,value:"CRANEWAY"},Ai.ELEVATOR={type:3,value:"ELEVATOR"},Ai.ESCALATOR={type:3,value:"ESCALATOR"},Ai.HAULINGGEAR={type:3,value:"HAULINGGEAR"},Ai.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ai.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ai.USERDEFINED={type:3,value:"USERDEFINED"},Ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ai;class ui{}ui.CARTESIAN={type:3,value:"CARTESIAN"},ui.PARAMETER={type:3,value:"PARAMETER"},ui.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=ui;class pi{}pi.FINNED={type:3,value:"FINNED"},pi.USERDEFINED={type:3,value:"USERDEFINED"},pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=pi;class di{}di.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},di.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},di.AREAUNIT={type:3,value:"AREAUNIT"},di.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},di.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},di.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},di.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},di.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},di.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},di.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},di.ENERGYUNIT={type:3,value:"ENERGYUNIT"},di.FORCEUNIT={type:3,value:"FORCEUNIT"},di.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},di.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},di.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},di.LENGTHUNIT={type:3,value:"LENGTHUNIT"},di.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},di.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},di.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},di.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},di.MASSUNIT={type:3,value:"MASSUNIT"},di.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},di.POWERUNIT={type:3,value:"POWERUNIT"},di.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},di.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},di.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},di.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},di.TIMEUNIT={type:3,value:"TIMEUNIT"},di.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},di.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=di;class fi{}fi.ALARMPANEL={type:3,value:"ALARMPANEL"},fi.BASESTATIONCONTROLLER={type:3,value:"BASESTATIONCONTROLLER"},fi.COMBINED={type:3,value:"COMBINED"},fi.CONTROLPANEL={type:3,value:"CONTROLPANEL"},fi.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},fi.HUMIDISTAT={type:3,value:"HUMIDISTAT"},fi.INDICATORPANEL={type:3,value:"INDICATORPANEL"},fi.MIMICPANEL={type:3,value:"MIMICPANEL"},fi.THERMOSTAT={type:3,value:"THERMOSTAT"},fi.WEATHERSTATION={type:3,value:"WEATHERSTATION"},fi.USERDEFINED={type:3,value:"USERDEFINED"},fi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=fi;class Ei{}Ei.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Ei.AIRHANDLER={type:3,value:"AIRHANDLER"},Ei.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},Ei.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Ei.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Ei.USERDEFINED={type:3,value:"USERDEFINED"},Ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Ei;class mi{}mi.AIRRELEASE={type:3,value:"AIRRELEASE"},mi.ANTIVACUUM={type:3,value:"ANTIVACUUM"},mi.CHANGEOVER={type:3,value:"CHANGEOVER"},mi.CHECK={type:3,value:"CHECK"},mi.COMMISSIONING={type:3,value:"COMMISSIONING"},mi.DIVERTING={type:3,value:"DIVERTING"},mi.DOUBLECHECK={type:3,value:"DOUBLECHECK"},mi.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},mi.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},mi.FAUCET={type:3,value:"FAUCET"},mi.FLUSHING={type:3,value:"FLUSHING"},mi.GASCOCK={type:3,value:"GASCOCK"},mi.GASTAP={type:3,value:"GASTAP"},mi.ISOLATING={type:3,value:"ISOLATING"},mi.MIXING={type:3,value:"MIXING"},mi.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},mi.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},mi.REGULATING={type:3,value:"REGULATING"},mi.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},mi.STEAMTRAP={type:3,value:"STEAMTRAP"},mi.STOPCOCK={type:3,value:"STOPCOCK"},mi.USERDEFINED={type:3,value:"USERDEFINED"},mi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=mi;class yi{}yi.CARGO={type:3,value:"CARGO"},yi.ROLLINGSTOCK={type:3,value:"ROLLINGSTOCK"},yi.VEHICLE={type:3,value:"VEHICLE"},yi.VEHICLEAIR={type:3,value:"VEHICLEAIR"},yi.VEHICLEMARINE={type:3,value:"VEHICLEMARINE"},yi.VEHICLETRACKED={type:3,value:"VEHICLETRACKED"},yi.VEHICLEWHEELED={type:3,value:"VEHICLEWHEELED"},yi.USERDEFINED={type:3,value:"USERDEFINED"},yi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVehicleTypeEnum=yi;class gi{}gi.AXIAL_YIELD={type:3,value:"AXIAL_YIELD"},gi.BENDING_YIELD={type:3,value:"BENDING_YIELD"},gi.FRICTION={type:3,value:"FRICTION"},gi.RUBBER={type:3,value:"RUBBER"},gi.SHEAR_YIELD={type:3,value:"SHEAR_YIELD"},gi.VISCOUS={type:3,value:"VISCOUS"},gi.USERDEFINED={type:3,value:"USERDEFINED"},gi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationDamperTypeEnum=gi;class Ii{}Ii.BASE={type:3,value:"BASE"},Ii.COMPRESSION={type:3,value:"COMPRESSION"},Ii.SPRING={type:3,value:"SPRING"},Ii.USERDEFINED={type:3,value:"USERDEFINED"},Ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Ii;class vi{}vi.BOUNDARY={type:3,value:"BOUNDARY"},vi.CLEARANCE={type:3,value:"CLEARANCE"},vi.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},vi.USERDEFINED={type:3,value:"USERDEFINED"},vi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVirtualElementTypeEnum=vi;class Ti{}Ti.CHAMFER={type:3,value:"CHAMFER"},Ti.CUTOUT={type:3,value:"CUTOUT"},Ti.EDGE={type:3,value:"EDGE"},Ti.HOLE={type:3,value:"HOLE"},Ti.MITER={type:3,value:"MITER"},Ti.NOTCH={type:3,value:"NOTCH"},Ti.USERDEFINED={type:3,value:"USERDEFINED"},Ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Ti;class _i{}_i.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},_i.MOVABLE={type:3,value:"MOVABLE"},_i.PARAPET={type:3,value:"PARAPET"},_i.PARTITIONING={type:3,value:"PARTITIONING"},_i.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},_i.POLYGONAL={type:3,value:"POLYGONAL"},_i.RETAININGWALL={type:3,value:"RETAININGWALL"},_i.SHEAR={type:3,value:"SHEAR"},_i.SOLIDWALL={type:3,value:"SOLIDWALL"},_i.STANDARD={type:3,value:"STANDARD"},_i.WAVEWALL={type:3,value:"WAVEWALL"},_i.USERDEFINED={type:3,value:"USERDEFINED"},_i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=_i;class Ri{}Ri.FLOORTRAP={type:3,value:"FLOORTRAP"},Ri.FLOORWASTE={type:3,value:"FLOORWASTE"},Ri.GULLYSUMP={type:3,value:"GULLYSUMP"},Ri.GULLYTRAP={type:3,value:"GULLYTRAP"},Ri.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ri.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ri.WASTETRAP={type:3,value:"WASTETRAP"},Ri.USERDEFINED={type:3,value:"USERDEFINED"},Ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ri;class Pi{}Pi.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Pi.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Pi.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Pi.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Pi.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Pi.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Pi.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Pi.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Pi.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Pi.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Pi.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Pi.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Pi.TOPHUNG={type:3,value:"TOPHUNG"},Pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Pi;class Di{}Di.BOTTOM={type:3,value:"BOTTOM"},Di.LEFT={type:3,value:"LEFT"},Di.MIDDLE={type:3,value:"MIDDLE"},Di.RIGHT={type:3,value:"RIGHT"},Di.TOP={type:3,value:"TOP"},Di.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Di;class Ni{}Ni.ALUMINIUM={type:3,value:"ALUMINIUM"},Ni.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ni.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ni.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Ni.PLASTIC={type:3,value:"PLASTIC"},Ni.STEEL={type:3,value:"STEEL"},Ni.WOOD={type:3,value:"WOOD"},Ni.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Ni;class bi{}bi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},bi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},bi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},bi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},bi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},bi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},bi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},bi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},bi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},bi.USERDEFINED={type:3,value:"USERDEFINED"},bi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=bi;class Ci{}Ci.LIGHTDOME={type:3,value:"LIGHTDOME"},Ci.SKYLIGHT={type:3,value:"SKYLIGHT"},Ci.WINDOW={type:3,value:"WINDOW"},Ci.USERDEFINED={type:3,value:"USERDEFINED"},Ci.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Ci;class Oi{}Oi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},Oi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},Oi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},Oi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},Oi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},Oi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},Oi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},Oi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},Oi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},Oi.USERDEFINED={type:3,value:"USERDEFINED"},Oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=Oi;class Si{}Si.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Si.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Si.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Si.USERDEFINED={type:3,value:"USERDEFINED"},Si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Si;class xi{}xi.ACTUAL={type:3,value:"ACTUAL"},xi.BASELINE={type:3,value:"BASELINE"},xi.PLANNED={type:3,value:"PLANNED"},xi.USERDEFINED={type:3,value:"USERDEFINED"},xi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=xi;class wi{}wi.ACTUAL={type:3,value:"ACTUAL"},wi.BASELINE={type:3,value:"BASELINE"},wi.PLANNED={type:3,value:"PLANNED"},wi.USERDEFINED={type:3,value:"USERDEFINED"},wi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=wi;e.IfcActorRole=class extends dg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Bi extends dg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Bi;class Fi extends dg{constructor(e,t,s){super(e),this.StartTag=t,this.EndTag=s,this.type=2879124712}}e.IfcAlignmentParameterSegment=Fi;e.IfcAlignmentVerticalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartHeight=o,this.StartGradient=n,this.EndGradient=a,this.RadiusOfCurvature=l,this.PredefinedType=h,this.type=3633395639}};e.IfcApplication=class extends dg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Mi extends dg{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Mi;e.IfcApproval=class extends dg{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Li extends dg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Li;e.IfcBoundaryEdgeCondition=class extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Li{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Ui extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Ui;e.IfcBoundaryNodeConditionWarping=class extends Ui{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class Hi extends dg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=Hi;class Gi extends Hi{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Gi;e.IfcConnectionSurfaceGeometry=class extends Hi{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends Hi{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class ki extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=ki;class Vi extends dg{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=Vi;class ji extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ji;e.IfcCostValue=class extends Mi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends dg{constructor(e,t,s,i,r){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.Name=r,this.type=1765591967}};e.IfcDerivedUnitElement=class extends dg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends dg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class Qi extends dg{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=Qi;class Wi extends dg{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=Wi;e.IfcExternallyDefinedHatchStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends dg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends dg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends Qi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends dg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends dg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends Vi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.ScaleY=h,this.ScaleZ=c,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends dg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class zi extends dg{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=zi;class Ki extends zi{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=Ki;e.IfcMaterialLayerSet=class extends zi{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends dg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class Yi extends zi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=Yi;e.IfcMaterialProfileSet=class extends zi{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends Yi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class Xi extends dg{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=Xi;e.IfcMeasureWithUnit=class extends dg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends dg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Zi extends dg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Zi;class qi extends dg{constructor(e,t){super(e),this.PlacementRelTo=t,this.type=3701648758}}e.IfcObjectPlacement=qi;e.IfcObjective=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends dg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class Ji extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=Ji;class $i extends Ji{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=$i;e.IfcPostalAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class er extends dg{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=er;class tr extends dg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=tr;e.IfcPresentationLayerWithStyle=class extends tr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class sr extends dg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=sr;class ir extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=ir;class rr extends dg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=rr;e.IfcProjectedCRS=class extends ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class or extends dg{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=or;e.IfcPropertyEnumeration=class extends or{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityNumber=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.NumberValue=r,this.Formula=o,this.type=2691318326}};e.IfcQuantityTime=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends dg{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class nr extends dg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=nr;class ar extends dg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=ar;class lr extends dg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=lr;e.IfcRepresentationMap=class extends dg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class hr extends dg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=hr;class cr extends dg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=cr;e.IfcSIUnit=class extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Prefix=i,this.Name=r,this.type=448429030}};class Ar extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=Ar;e.IfcShapeAspect=class extends dg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ur extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ur;e.IfcShapeRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class pr extends dg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=pr;class dr extends dg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=dr;e.IfcStructuralLoadConfiguration=class extends dr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class fr extends dr{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=fr;class Er extends fr{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Er;e.IfcStructuralLoadTemperature=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class mr extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=mr;e.IfcStyledItem=class extends lr{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends fr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends er{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends er{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class yr extends er{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=yr;e.IfcSurfaceStyleWithTextures=class extends er{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class gr extends er{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=gr;e.IfcTable=class extends dg{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends dg{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends dg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class Ir extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=Ir;e.IfcTaskTimeRecurring=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends er{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends er{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class vr extends er{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=vr;e.IfcTextureCoordinateGenerator=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};class Tr extends dg{constructor(e,t,s){super(e),this.TexCoordIndex=t,this.TexCoordsOf=s,this.type=222769930}}e.IfcTextureCoordinateIndices=Tr;e.IfcTextureCoordinateIndicesWithVoids=class extends Tr{constructor(e,t,s,i){super(e,t,s),this.TexCoordIndex=t,this.TexCoordsOf=s,this.InnerTexCoordIndices=i,this.type=1010789467}};e.IfcTextureMap=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends er{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends er{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends dg{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class _r extends dg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=_r;e.IfcTimeSeriesValue=class extends dg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Rr extends lr{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Rr;e.IfcTopologyRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends dg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Pr extends Rr{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Pr;e.IfcVertexPoint=class extends Pr{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends dg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends Ar{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.StartDate=o,this.FinishDate=n,this.type=1236880293}};e.IfcAlignmentCantSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartCantLeft=o,this.EndCantLeft=n,this.StartCantRight=a,this.EndCantRight=l,this.PredefinedType=h,this.type=3752311538}};e.IfcAlignmentHorizontalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartPoint=i,this.StartDirection=r,this.StartRadiusOfCurvature=o,this.EndRadiusOfCurvature=n,this.SegmentLength=a,this.GravityCenterLineHeight=l,this.PredefinedType=h,this.type=536804194}};e.IfcApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Dr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Dr;class Nr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Nr;e.IfcArbitraryProfileDefWithVoids=class extends Dr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends gr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Nr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends Qi{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Specification=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends er{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class br extends er{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=br;e.IfcCompositeProfileDef=class extends rr{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Cr extends Rr{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Cr;e.IfcConnectionCurveGeometry=class extends Hi{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Gi{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Zi{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class Or extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=Or;e.IfcConversionBasedUnitWithOffset=class extends Or{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends hr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends er{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends er{constructor(e,t,s,i){super(e),this.Name=t,this.CurveStyleFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends er{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Sr extends rr{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Sr;e.IfcDocumentInformation=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends Wi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class xr extends Rr{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=xr;e.IfcEdgeCurve=class extends xr{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends Ar{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class wr extends or{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=wr;e.IfcExternalReferenceRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Br extends Rr{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Br;class Fr extends Rr{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=Fr;e.IfcFaceOuterBound=class extends Fr{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Mr extends Br{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Mr;e.IfcFailureConnectionCondition=class extends pr{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelOrDraughting=i,this.type=738692330}};class Lr extends ar{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Lr;class Ur extends lr{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Ur;e.IfcGeometricRepresentationSubContext=class extends Lr{constructor(e,s,i,r,o,n,a,l){super(e,s,i,new t(0),null,r,null),this.ContextIdentifier=s,this.ContextType=i,this.WorldCoordinateSystem=r,this.ParentContext=o,this.TargetScale=n,this.TargetView=a,this.UserDefinedTargetView=l,this.type=4142052618}};class Hr extends Ur{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Hr;e.IfcGridPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.PlacementLocation=s,this.PlacementRefDirection=i,this.type=178086475}};class Gr extends Ur{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=Gr;e.IfcImageTexture=class extends gr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends er{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class kr extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=kr;e.IfcIndexedTriangleTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends Ar{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class Vr extends Ur{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=Vr;e.IfcLightSourceAmbient=class extends Vr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends Vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends Vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class jr extends Vr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=jr;e.IfcLightSourceSpot=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLinearPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.CartesianPosition=i,this.type=388784114}};e.IfcLocalPlacement=class extends qi{constructor(e,t,s){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class Qr extends Rr{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=Qr;e.IfcMappedItem=class extends lr{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends zi{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends ir{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class Wr extends Xi{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=Wr;e.IfcMaterialProfileSetUsageTapering=class extends Wr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends wr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.MaterialExpression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Sr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=2998442950}};class zr extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=zr;e.IfcOpenCrossProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.HorizontalWidths=i,this.Widths=r,this.Slopes=o,this.Tags=n,this.OffsetPoint=a,this.type=182550632}};e.IfcOpenShell=class extends Cr{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends xr{constructor(e,t,s,i){super(e,t,new pg(0)),this.EdgeStart=t,this.EdgeElement=s,this.Orientation=i,this.type=1029017970}};class Kr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=Kr;e.IfcPath=class extends Rr{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends Ji{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends gr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class Yr extends Ur{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Yr;class Xr extends Ur{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=Xr;class Zr extends Ur{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=Zr;e.IfcPointByDistanceExpression=class extends Zr{constructor(e,t,s,i,r,o){super(e),this.DistanceAlong=t,this.OffsetLateral=s,this.OffsetVertical=i,this.OffsetLongitudinal=r,this.BasisCurve=o,this.type=2165702409}};e.IfcPointOnCurve=class extends Zr{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends Zr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends Qr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends Gr{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class qr extends er{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=qr;class Jr extends or{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=Jr;class $r extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=$r;e.IfcProductDefinitionShape=class extends ir{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends wr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class eo extends or{constructor(e,t,s){super(e),this.Name=t,this.Specification=s,this.type=2598011224}}e.IfcProperty=eo;class to extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=to;e.IfcPropertyDependencyRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class so extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=so;class io extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=io;class ro extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=ro;class oo extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=oo;e.IfcRegularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class no extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=no;e.IfcResourceApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends Jr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Ur{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};class ao extends Ur{constructor(e,t){super(e),this.Transition=t,this.type=823603102}}e.IfcSegment=ao;e.IfcShellBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class lo extends eo{constructor(e,t,s){super(e,t,s),this.Name=t,this.Specification=s,this.type=3692461612}}e.IfcSimpleProperty=lo;e.IfcSlippageConnectionCondition=class extends pr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class ho extends Ur{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=ho;e.IfcStructuralLoadLinearForce=class extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class co extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=co;e.IfcStructuralLoadSingleDisplacementDistortion=class extends co{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ao extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ao;e.IfcStructuralLoadSingleForceWarping=class extends Ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends xr{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class uo extends Ur{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=uo;e.IfcSurfaceStyleRendering=class extends yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class po extends ho{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=po;class fo extends ho{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=fo;e.IfcSweptDiskSolidPolygonal=class extends fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Eo extends uo{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Eo;e.IfcTShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class mo extends Ur{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=mo;class yo extends Ur{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=yo;e.IfcTextLiteralWithExtent=class extends yo{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class go extends zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=go;class Io extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Io;class vo extends go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=vo;class To extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=To;e.IfcUShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Ur{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends Qr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcZShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Mr{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Ur{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};e.IfcAxis2PlacementLinear=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=3425423356}};class _o extends Ur{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=_o;class Ro extends uo{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=Ro;e.IfcBoundingBox=class extends Ur{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends Gr{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends Zr{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Po extends Ur{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Po;e.IfcCartesianPointList2D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=2059837836}};class Do extends Ur{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Do;class No extends Do{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=No;e.IfcCartesianTransformationOperator2DnonUniform=class extends No{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class bo extends Do{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=bo;e.IfcCartesianTransformationOperator3DnonUniform=class extends bo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Co extends Kr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Co;e.IfcClosedShell=class extends Cr{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends br{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends eo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Oo extends ao{constructor(e,t,s,i){super(e,t),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Oo;class So extends To{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=So;class xo extends zr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=xo;e.IfcCrewResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class wo extends Ur{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=wo;e.IfcCsgSolid=class extends ho{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Bo extends Ur{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Bo;e.IfcCurveBoundedPlane=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcCurveSegment=class extends ao{constructor(e,t,s,i,r,o){super(e,t),this.Transition=t,this.Placement=s,this.SegmentStart=i,this.SegmentLength=r,this.ParentCurve=o,this.type=4212018352}};e.IfcDirection=class extends Ur{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};class Fo extends po{constructor(e,t,s,i,r,o){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.type=593015953}}e.IfcDirectrixCurveSweptAreaSolid=Fo;e.IfcEdgeLoop=class extends Qr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends ro{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Mo extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Mo;class Lo extends uo{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Lo;e.IfcEllipseProfileDef=class extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class Uo extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=Uo;e.IfcExtrudedAreaSolidTapered=class extends Uo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Ur{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Ur{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};class Ho extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}}e.IfcFixedReferenceSweptAreaSolid=Ho;class Go extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Go;e.IfcFurnitureType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Hr{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class ko extends mo{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=ko;e.IfcIndexedPolygonalFaceWithVoids=class extends ko{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcIndexedPolygonalTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndices=r,this.type=3465909080}};e.IfcLShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends Bo{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Vo extends ho{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Vo;class jo extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=jo;class Qo extends Bo{constructor(e,t){super(e),this.BasisCurve=t,this.type=590820931}}e.IfcOffsetCurve=Qo;e.IfcOffsetCurve2D=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Qo{constructor(e,t,s,i,r){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcOffsetCurveByDistances=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.OffsetValues=s,this.Tag=i,this.type=2485787929}};e.IfcPcurve=class extends Bo{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends Xr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Lo{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};e.IfcPolynomialCurve=class extends Bo{constructor(e,t,s,i,r){super(e),this.Position=t,this.CoefficientsX=s,this.CoefficientsY=i,this.CoefficientsZ=r,this.type=3381221214}};class Wo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=Wo;class zo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=zo;class Ko extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=Ko;e.IfcProcedureType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class Yo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=Yo;class Xo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xo;e.IfcProject=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends lo{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Specification=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends so{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Specification=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class Zo extends io{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=Zo;e.IfcRectangleHollowProfileDef=class extends oo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends wo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends Ko{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class qo extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=qo;e.IfcRelAssignsToActor=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class Jo extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=Jo;e.IfcRelAssignsToGroupByFactor=class extends Jo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $o extends no{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$o;e.IfcRelAssociatesApproval=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $o{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileDef=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileDef=n,this.type=1033248425}};class en extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=en;class tn extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tn;e.IfcRelConnectsPathElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class sn extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sn;e.IfcRelConnectsWithEccentricity=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class rn extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=rn;class on extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=on;e.IfcRelDefinesByObject=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceSpace=l,this.InterferenceType=h,this.ImpliedOrder=c,this.type=427948657}};e.IfcRelNests=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelPositions=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPositioningElement=o,this.RelatedProducts=n,this.type=1441486842}};e.IfcRelProjectsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class nn extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=nn;class an extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=an;e.IfcRelSpaceBoundary2ndLevel=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Oo{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class ln extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=ln;class hn extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=hn;e.IfcRevolvedAreaSolidTapered=class extends hn{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends wo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends wo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class cn extends ho{constructor(e,t,s){super(e),this.Directrix=t,this.CrossSections=s,this.type=1862484736}}e.IfcSectionedSolid=cn;e.IfcSectionedSolidHorizontal=class extends cn{constructor(e,t,s,i){super(e,t,s),this.Directrix=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1290935644}};e.IfcSectionedSurface=class extends uo{constructor(e,t,s,i){super(e),this.Directrix=t,this.CrossSectionPositions=s,this.CrossSections=i,this.type=1356537516}};e.IfcSimplePropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class An extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=An;class un extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=un;class pn extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=pn;class dn extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=dn;e.IfcSpatialZone=class extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends un{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends wo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class fn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2735484536}}e.IfcSpiral=fn;class En extends Xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=En;class mn extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=yn;class gn extends En{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=gn;class In extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=In;e.IfcStructuralSurfaceMemberVarying=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class vn extends Bo{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=vn;e.IfcSurfaceCurveSweptAreaSolid=class extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Eo{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Eo{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Tn extends mo{constructor(e,t,s){super(e),this.Coordinates=t,this.Closed=s,this.type=2387106220}}e.IfcTessellatedFaceSet=Tn;e.IfcThirdOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o){super(e,t),this.Position=t,this.CubicTerm=s,this.QuadraticTerm=i,this.LinearTerm=r,this.ConstantTerm=o,this.type=782932809}};e.IfcToroidalSurface=class extends Lo{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};class _n extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3665877780}}e.IfcTransportationDeviceType=_n;class Rn extends Tn{constructor(e,t,s,i,r,o){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}}e.IfcTriangulatedFaceSet=Rn;e.IfcTriangulatedIrregularNetwork=class extends Rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.Flags=n,this.type=1229763772}};e.IfcVehicleType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3651464721}};e.IfcWindowLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class Pn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=Pn;class Dn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Dn;e.IfcAdvancedBrepWithVoids=class extends Dn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=1674181508}};class Nn extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Nn;class bn extends Nn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=bn;e.IfcBlock=class extends wo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends _o{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Cn extends Bo{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Cn;e.IfcBuildingStorey=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};class On extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1626504194}}e.IfcBuiltElementType=On;e.IfcChimneyType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Co{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcClothoid=class extends fn{constructor(e,t,s){super(e,t),this.Position=t,this.ClothoidConstant=s,this.type=3497074424}};e.IfcColumnType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class Sn extends Cn{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=Sn;class xn extends Sn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=xn;class wn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=wn;e.IfcConstructionEquipmentResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Bn extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Bn;class Fn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Fn;e.IfcCosineSpiral=class extends fn{constructor(e,t,s,i){super(e,t),this.Position=t,this.CosineTerm=s,this.ConstantTerm=i,this.type=2000195564}};e.IfcCostItem=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCourseType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4189326743}};e.IfcCoveringType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Mn extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1306400036}}e.IfcDeepFoundationType=Mn;e.IfcDirectrixDerivedReferenceSweptAreaSolid=class extends Ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=4234616927}};class Ln extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Ln;class Un extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Un;e.IfcDoorLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends Wo{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends zo{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Hn extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Hn;e.IfcElementAssembly=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class Gn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Gn;class kn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=kn;e.IfcEllipse=class extends wn{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Vn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Vn;e.IfcEngineType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class jn extends An{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=jn;class Qn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Qn;e.IfcFacetedBrepWithVoids=class extends Qn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Wn extends pn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=24185140}}e.IfcFacility=Wn;class zn extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.type=1310830890}}e.IfcFacilityPart=zn;e.IfcFacilityPartCommon=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=4228831410}};e.IfcFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class Kn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Kn;class Yn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Yn;class Xn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Xn;class Zn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Zn;class qn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=qn;e.IfcFlowMeterType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Jn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Jn;class $n extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=$n;class ea extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=ea;class ta extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=ta;class sa extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=sa;e.IfcFootingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class ia extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=ia;e.IfcFurniture=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};class ra extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4230923436}}e.IfcGeotechnicalElement=ra;e.IfcGeotechnicalStratum=class extends ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1594536857}};e.IfcGradientCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=2898700619}};class oa extends jo{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=oa;e.IfcHeatExchangerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcImpactProtectionDevice=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2568555532}};e.IfcImpactProtectionDeviceType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3948183225}};e.IfcIndexedPolyCurve=class extends Cn{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcKerbType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.Mountable=c,this.type=679976338}};e.IfcLaborResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};class na extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=2176059722}}e.IfcLinearElement=na;e.IfcLiquidTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1770583370}};e.IfcMarineFacility=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=525669439}};e.IfcMarinePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=976884017}};e.IfcMechanicalFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMobileTelecommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1950438474}};e.IfcMooringDeviceType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=710110818}};e.IfcMotorConnectionType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcNavigationElementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=506776471}};e.IfcOccupant=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}};e.IfcOutletType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPavementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=514975943}};e.IfcPerformanceHistory=class extends Fn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Tn{constructor(e,t,s,i,r){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends Cn{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class aa extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=aa;class la extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1946335990}}e.IfcPositioningElement=la;e.IfcProcedure=class extends Yo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1763565496}};e.IfcRailingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRailway=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=3992365140}};e.IfcRailwayPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=1891881377}};e.IfcRampFlightType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};e.IfcReferent=class extends la{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=4021432810}};class ha extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=ha;class ca extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ca;e.IfcReinforcingMesh=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAdheresToElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedSurfaceFeatures=n,this.type=3818125796}};e.IfcRelAggregates=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoad=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=146592293}};e.IfcRoadPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=550521510}};e.IfcRoofType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcSecondOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.QuadraticTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=3649235739}};e.IfcSegmentedReferenceCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=544395925}};e.IfcSeventhOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.Position=t,this.SepticTerm=s,this.SexticTerm=i,this.QuinticTerm=r,this.QuarticTerm=o,this.CubicTerm=n,this.QuadraticTerm=a,this.LinearTerm=l,this.ConstantTerm=h,this.type=1027922057}};e.IfcShadingDeviceType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSign=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=33720170}};e.IfcSignType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3599934289}};e.IfcSignalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1894708472}};e.IfcSineSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.SineTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=42703149}};e.IfcSite=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class Aa extends En{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=Aa;class ua extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=ua;class pa extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=pa;e.IfcStructuralCurveConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.AxisDirection=h,this.type=4243806635}};class da extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=da;e.IfcStructuralCurveMemberVarying=class extends da{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends pa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class fa extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=fa;e.IfcStructuralPointAction=class extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends oa{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class Ea extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=Ea;e.IfcStructuralSurfaceConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends Kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class ma extends oa{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=ma;e.IfcSystemFurnitureElement=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonConduit=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=3663046924}};e.IfcTendonConduitType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2281632017}};e.IfcTendonType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTrackElementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=618700268}};e.IfcTransformerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElementType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class ya extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1953115116}}e.IfcTransportationDevice=ya;e.IfcTrimmedCurve=class extends Cn{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVehicle=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=840318589}};e.IfcVibrationDamper=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1530820697}};e.IfcVibrationDamperType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3956297820}};e.IfcVibrationIsolator=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2769231204}};e.IfcVoidingFeature=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class ga extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=ga;e.IfcWorkPlan=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends ma{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAlignmentCant=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.RailHeadDistance=l,this.type=4266260250}};e.IfcAlignmentHorizontal=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1545765605}};e.IfcAlignmentSegment=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.DesignParameters=l,this.type=317615605}};e.IfcAlignmentVertical=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1662888072}};e.IfcAsset=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class Ia extends Cn{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Ia;class va extends Ia{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=va;e.IfcBeamType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBearingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3649138523}};e.IfcBoilerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Ta extends xn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=Ta;e.IfcBridge=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=644574406}};e.IfcBridgePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=963979645}};e.IfcBuilding=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};e.IfcBuildingElementPart=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxyType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};class _a extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1876633798}}e.IfcBuiltElement=_a;e.IfcBuiltSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=3862327254}};e.IfcBurnerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcCaissonFoundationType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3203706013}};e.IfcChillerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends wn{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}};e.IfcCommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcConveyorSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2940368186}};e.IfcCooledBeamType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCourse=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1502416096}};e.IfcCovering=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};class Ra extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3426335179}}e.IfcDeepFoundation=Ra;e.IfcDiscreteAccessory=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=479945903}};e.IfcDistributionChamberElementType=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Pa extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Pa;class Da extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=Da;class Na extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Na;e.IfcDistributionPort=class extends aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class ba extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=ba;e.IfcDoor=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}};e.IfcDuctFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcEarthworksCut=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3071239417}};class Ca extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1077100507}}e.IfcEarthworksElement=Ca;e.IfcEarthworksFill=class extends Ca{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3376911765}};e.IfcElectricApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricFlowTreatmentDeviceType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2142170206}};e.IfcElectricGeneratorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Oa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Oa;e.IfcEngine=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends jn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Sa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Sa;class xa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=xa;e.IfcFlowInstrumentType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class wa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=wa;class Ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Ba;class Fa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=Fa;class Ma extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=Ma;class La extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=La;e.IfcFooting=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};class Ua extends ra{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2713699986}}e.IfcGeotechnicalAssembly=Ua;e.IfcGrid=class extends la{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};e.IfcHeatExchanger=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcKerb=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.Mountable=h,this.type=2696325953}};e.IfcLamp=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};class Ha extends la{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1154579445}}e.IfcLinearPositioningElement=Ha;e.IfcLiquidTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1638804497}};e.IfcMedicalDevice=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};e.IfcMember=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}};e.IfcMobileTelecommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2078563270}};e.IfcMooringDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=234836483}};e.IfcMotorConnection=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcNavigationElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2182337498}};e.IfcOuterBoundaryCurve=class extends Ta{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPavement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1383356374}};e.IfcPile=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};e.IfcPlate=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}};e.IfcProtectiveDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRail=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3290496277}};e.IfcRailing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends va{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcedSoil=class extends Ca{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3798194928}};e.IfcReinforcingBar=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};e.IfcSignal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=991950508}};e.IfcSlab=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcSolarDevice=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends ma{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends fa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends Ea{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTrackElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3425753595}};e.IfcTransformer=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTransportElement=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTubeBundle=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Ga extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Ga;e.IfcWallStandardCase=class extends Ga{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};e.IfcWindow=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}};e.IfcActuatorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAlignment=class extends Ha{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=325726236}};e.IfcAudioVisualAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};e.IfcBeam=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}};e.IfcBearing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4196446775}};e.IfcBoiler=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBorehole=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3314249567}};e.IfcBuildingElementProxy=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBurner=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcCaissonFoundation=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3999819293}};e.IfcChiller=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcConveyorSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3460952963}};e.IfcCooledBeam=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3693000487}};e.IfcDistributionChamberElement=class extends Na{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends ba{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class ka extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=ka;e.IfcDuctFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricFlowTreatmentDevice=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=24726584}};e.IfcElectricGenerator=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcGeomodel=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2680139844}};e.IfcGeoslice=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1971632696}};e.IfcProtectiveDeviceTrippingUnit=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(ag||(ag={})),(hg=lg||(lg={}))[hg.LOG_LEVEL_DEBUG=0]="LOG_LEVEL_DEBUG",hg[hg.LOG_LEVEL_INFO=1]="LOG_LEVEL_INFO",hg[hg.LOG_LEVEL_WARN=2]="LOG_LEVEL_WARN",hg[hg.LOG_LEVEL_ERROR=3]="LOG_LEVEL_ERROR",hg[hg.LOG_LEVEL_OFF=4]="LOG_LEVEL_OFF","undefined"!=typeof self&&self.crossOriginIsolated)try{Ag()}catch(e){ug()}else ug();u.vec2(),u.vec3(),u.vec3(),u.vec3();class fg{constructor(e={}){this._dataDir=e.dataDir||""}getProjects(e,t){const s=this._dataDir+"/projects/index.json";m.loadJSON(s,e,t)}getProject(e,t,s){const i=this._dataDir+"/projects/"+e+"/index.json";m.loadJSON(i,t,s)}getMetadata(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/metadata.json";m.loadJSON(r,s,i)}getGeometry(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/geometry.xkt";m.loadArraybuffer(r,s,i)}getObjectInfo(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/props/"+s+".json";m.loadJSON(o,i,r)}getIssues(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/issues.json";m.loadJSON(r,s,i)}getSplitModelManifest(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadJSON(o,i,r)}getSplitModelMetadata(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadJSON(o,i,r)}getSplitModelGeometry(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadArraybuffer(o,i,r)}}class Eg{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class mg{constructor(e,t,s,i){this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:s,this.viewer=e?e.viewer:i,this._children=[],e&&e._children.push(this),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,t,s){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new Eg),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._subIdMap.addItem();i[r]={callback:t,scope:s||this},this._subIdEvents[r]=e;const o=this._events[e];return void 0!==o&&t.call(s||this,o),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}log(e){e="[LOG] "+e,window.console.log(e)}warn(e){e="[WARN] "+e,window.console.warn(e)}error(e){e="[ERROR] "+e,window.console.error(e)}_mutexActivation(e){const t=e.length;for(let s=0;s
Default text
',s.appendChild(this._modal),this._modalVisible=!1,this._modal.style.display="hidden"}show(e){this._modalVisible=!0,this._modal.querySelector(".xeokit-busy-modal-message").innerText=e,this._modal.style.display="block"}hide(){this._modalVisible=!1,this._modal.style.display="none"}destroy(){super.destroy(),this._modal&&(this._modal.parentNode.removeChild(this._modal),this._modal=null)}}const gg=u.vec3();class Ig extends mg{constructor(e,t={}){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.camera;this._modelMementos={},i.eye=[.577,.577,.577],i.look=[0,0,0],i.up=[-1,1,-1],this.bimViewer._modelsExplorer.on("modelLoaded",(e=>{this._saveModelMemento(e)})),this.bimViewer._modelsExplorer.on("modelUnloaded",(e=>{this._destroyModelMemento(e)})),this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.reset(),e.preventDefault()}))}_saveModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;const s=new Li;s.saveObjects(this.viewer.scene,t,{visible:!0,edges:!0,xrayed:!0,highlighted:!0,selected:!0,clippable:!0,pickable:!0,colorize:!1,opacity:!1}),this._modelMementos[e]=s}_restoreModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;this._modelMementos[e].restoreObjects(this.viewer.scene,t)}_destroyModelMemento(e){delete this._modelMementos[e]}reset(){const e=this.viewer.scene.modelIds;for(var t=0,s=e.length;t{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.fit(),e.preventDefault()}))}fit(){const e=this.viewer.scene,t=e.getAABB(e.visibleObjectIds);this.viewer.cameraFlight.flyTo({aabb:t}),this.viewer.cameraControl.pivotPos=u.getAABB3Center(t,vg)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class _g extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.cameraControl,r=t.cameraControlNavModeMediator;i.navMode="orbit",i.followPointer=!0,this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e?(i.followPointer=!0,i.pivoting=!1):i.pivoting=!0})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class Rg extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(s.classList.remove("active"),this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class Pg extends mg{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.selected=!e.entity.selected)}))):(s.classList.remove("active"),void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class Dg extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.scene.on("modelLoaded",(e=>{if(!this._active){const e=this.viewer.metaScene.getObjectIDsByType("IfcSpace");this.viewer.scene.setObjectsCulled(e,!0)}})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e){this._active!==e&&(this._active=e,e?(this._buttonElement.classList.add("active"),this._enterShowSpacesMode(),this.fire("active",this._active)):(this._buttonElement.classList.remove("active"),this._exitShowSpacesMode(),this.fire("active",this._active)))}_enterShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!1)}_exitShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!0)}}class Ng extends mg{constructor(e,t){super(e)}}const bg=u.AABB3(),Cg=u.vec3();class Og extends o{constructor(e={}){if(!e.sectionPlanesPlugin)throw"Missing config: sectionPlanesPlugin";super(m.apply({},e)),this._sectionPlanesPlugin=e.sectionPlanesPlugin,this._viewer=this._sectionPlanesPlugin.viewer,this._onSceneSectionPlaneCreated=this._viewer.scene.on("sectionPlaneCreated",(()=>{this._buildMenu()})),this._onSceneSectionPlaneDestroyed=this._viewer.scene.on("sectionPlaneDestroyed",(()=>{this._buildMenu()})),this._buildMenu()}_buildMenu(){const e=this._sectionPlanesPlugin,t=Object.values(e.sectionPlanes),s=[];for(let i=0,r=t.length;i`${e.viewer.localeService.translate("sectionToolContextMenu.slice")||"Slice"} #`+(i+1),doHoverEnter(t){e.hideControl(),e.showControl(r.id)},doHoverLeave(t){e.hideControl()},items:[[{getTitle:e=>r.active?e.viewer.localeService.translate("sectionToolContextMenu.deactivate")||"Disable":e.viewer.localeService.translate("sectionToolContextMenu.activate")||"Enable",doAction:e=>{r.active=!r.active}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.edit")||"Edit",getEnabled:()=>r.active,doAction:t=>{e.hideControl(),e.showControl(r.id);const s=r.pos;bg.set(this._viewer.scene.aabb),u.getAABB3Center(bg,Cg),bg[0]+=s[0]-Cg[0],bg[1]+=s[1]-Cg[1],bg[2]+=s[2]-Cg[2],bg[3]+=s[0]-Cg[0],bg[4]+=s[1]-Cg[1],bg[5]+=s[2]-Cg[2],this._viewer.cameraFlight.flyTo({aabb:bg,fitFOV:65})}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flip")||"Flip",getEnabled:()=>r.active,doAction:e=>{r.flipDir()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.delete")||"Delete",doAction:e=>{r.destroy()}}]]})}this.items=[[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flipSlices")||"Flip Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.flipSections()}}],[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.disableAllSlices")||"Disable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.disableSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.enableAllSlices")||"Enable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.enableSections()}}],s]}destroy(){super.destroy();const e=this._viewer.scene;e.off(this._onSceneSectionPlaneCreated),e.off(this._onSceneSectionPlaneDestroyed)}}class Sg extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";if(!t.menuButtonElement)throw"Missing config: menuButtonElement";this._buttonElement=t.buttonElement,this._counterElement=t.counterElement,this._menuButtonElement=t.menuButtonElement,this._menuButtonArrowElement=t.menuButtonArrowElement,this._sectionPlanesPlugin=new cy(this.viewer,{}),this._sectionToolContextMenu=new Og({sectionPlanesPlugin:this._sectionPlanesPlugin,hideOnMouseDown:!1,hideOnAction:!1}),this._sectionPlanesPlugin.setOverviewVisible(!1),this.on("enabled",(e=>{e?(this._buttonElement.classList.remove("disabled"),this._counterElement&&this._counterElement.classList.remove("disabled"),this._menuButtonElement.classList.remove("disabled"),this._menuButtonArrowElement.classList.remove("disabled")):(this._buttonElement.classList.add("disabled"),this._counterElement&&this._counterElement.classList.add("disabled"),this._menuButtonElement.classList.add("disabled"),this._menuButtonArrowElement.classList.add("disabled"))})),this.on("active",(e=>{e?(this._buttonElement.classList.add("active"),this._counterElement&&this._counterElement.classList.add("active"),this._menuButtonElement.classList.add("active"),this._menuButtonArrowElement.classList.add("active")):(this._buttonElement.classList.remove("active"),this._counterElement&&this._counterElement.classList.remove("active"),this._menuButtonElement.classList.remove("active"),this._menuButtonArrowElement.classList.remove("active"))})),this.on("active",(e=>{e||this._sectionPlanesPlugin.hideControl()})),this._buttonElement.addEventListener("click",(e=>{if(!this.getEnabled())return;if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)return;const t=this.getActive();this.setActive(!t),e.preventDefault()})),document.addEventListener("mousedown",(e=>{if(!e.target.classList.contains("xeokit-context-menu-item"))if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)if(e.preventDefault(),this._sectionToolContextMenu.shown)this._sectionToolContextMenu.hide();else{this._sectionToolContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,sectionTool:this};const e=this._menuButtonElement.getBoundingClientRect();this._sectionToolContextMenu.show(e.left,e.bottom+5)}else this._sectionToolContextMenu.hide()})),this._sectionToolContextMenu.on("shown",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-down"),this._menuButtonArrowElement.classList.add("xeokit-arrow-up")})),this._sectionToolContextMenu.on("hidden",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-up"),this._menuButtonArrowElement.classList.add("xeokit-arrow-down")})),this.bimViewer.on("reset",(()=>{this.clear(),this.setActive(!1)})),this.viewer.scene.on("sectionPlaneCreated",(()=>{this._updateSectionPlanesCount()})),this.viewer.scene.on("sectionPlaneDestroyed",(()=>{this._updateSectionPlanesCount()})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive()||!this.getEnabled())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:u.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id)}})),this._updateSectionPlanesCount()}_updateSectionPlanesCount(){this._counterElement&&(this._counterElement.innerText=""+this.getNumSections())}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear(),this._updateSectionPlanesCount()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}enableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!0}}disableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!1}}hideControl(){this._sectionPlanesPlugin.hideControl()}destroy(){this._sectionPlanesPlugin.destroy(),this._sectionToolContextMenu.destroy(),super.destroy()}}class xg extends mg{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw"Missing config: navCubeCanvasElement";const s=t.navCubeCanvasElement;this._navCube=new sy(this.viewer,{canvasElement:s,fitVisible:!0,color:"#CFCFCF"}),this._navCube.setVisible(this._active),this.on("active",(e=>{this._navCube.setVisible(e)}))}destroy(){this._navCube.destroy(),super.destroy()}}class wg extends o{constructor(e={}){const t=[[{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadModel")||"Load",getEnabled:e=>!e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.loadModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadModel")||"Unload",getEnabled:e=>e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.unloadModel(e.modelId)}}]];!!e.enableEditModels&&t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.editModel")||"Edit",getEnabled:e=>!0,doAction:e=>{e.bimViewer.editModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.deleteModel")||"Delete",getEnabled:e=>!0,doAction:e=>{e.bimViewer.deleteModel(e.modelId)}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadAllModels")||"Load All",getEnabled:e=>{const t=e.bimViewer,s=t.getModelIds();return t.getLoadedModelIds().length{e.bimViewer.loadAllModels()}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadAllModels")||"Unload All",getEnabled:e=>e.bimViewer.getLoadedModelIds().length>0,doAction:e=>{e.bimViewer.unloadAllModels()}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]),super({hideOnAction:e.hideOnAction,context:e.context,items:t})}}const Bg=u.vec3();class Fg{constructor(e){this._server=e}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,s){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,s)}getMetaModel(e,t,s){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,s)}getXKT(e,t,s){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,s)}}class Mg extends mg{constructor(e,t){if(super(e,t),!t.modelsTabElement)throw"Missing config: modelsTabElement";if(!t.unloadModelsButtonElement)throw"Missing config: unloadModelsButtonElement";if(!t.modelsElement)throw"Missing config: modelsElement";if(this._enableAddModels=!!t.enableEditModels,this._modelsTabElement=t.modelsTabElement,this._loadModelsButtonElement=t.loadModelsButtonElement,this._unloadModelsButtonElement=t.unloadModelsButtonElement,this._addModelButtonElement=t.addModelButtonElement,this._modelsElement=t.modelsElement,this._modelsTabButtonElement=this._modelsTabElement.querySelector(".xeokit-tab-btn"),!this._modelsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._dataSource=new Fg(this.server),this._xktLoader=new tg(this.viewer,{dataSource:this._dataSource}),this._modelsContextMenu=new wg({enableEditModels:t.enableEditModels,hideOnAction:!0}),this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0,this._projectId=null}setObjectColors(e){this._xktLoader.objectDefaults=e}loadProject(e,t,s){this.server.getProject(e,(s=>{this.unloadProject(),this._projectId=e,this._modelsInfo={},this._numModels=0,this._parseProject(s,t),this._numModelsLoaded0&&this._unloadModelsButtonElement.classList.remove("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.remove("disabled")}),(e=>{this.error(e),s&&s(e)}))}_parseProject(e,t){this._buildModelsMenu(e),this._parseViewerConfigs(e),this._parseViewerContent(e,(()=>{this._parseViewerState(e,(()=>{t()}))}))}_buildModelsMenu(e){var t="";const s=e.models||[];this._modelsInfo={},this._numModels=s.length;for(let e=0,i=s.length;e",t+=""+i.name+"",t+=""}this._modelsElement.innerHTML=t;for(let e=0,t=s.length;e{r.checked?this.loadModel(i):this.unloadModel(t.id)})),o.addEventListener("click",(()=>{!!this.viewer.scene.models[i]?this.unloadModel(t.id):this.loadModel(i)})),o.oncontextmenu=e=>{this._modelsContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,modelId:i},this._modelsContextMenu.show(e.pageX,e.pageY),e.preventDefault()}}}_parseViewerConfigs(e){const t=e.viewerConfigs;t&&this.bimViewer.setConfigs(t)}_parseViewerContent(e,t){const s=e.viewerContent;s?this._parseModelsLoaded(s,(()=>{t()})):t()}_parseModelsLoaded(e,t){const s=e.modelsLoaded;s&&0!==s.length?this._loadNextModel(s.slice(0),t):t()}_loadNextModel(e,t){if(0===e.length)return void t();const s=e.pop();this.loadModel(s,(()=>{this._loadNextModel(e,t)}),(()=>{this._loadNextModel(e,t)}))}_parseViewerState(e,t){const s=e.viewerState;s?this.bimViewer.setViewerState(s,t):t()}unloadProject(){if(!this._projectId)return;const e=this.viewer.scene.models;for(var t in e)if(e.hasOwnProperty(t)){e[t].destroy()}this._modelsElement.innerHTML="",this._numModelsLoaded=0,this._loadModelsButtonElement.classList.add("disabled"),this._unloadModelsButtonElement.classList.add("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.add("disabled");const s=this._projectId;this._projectId=null,this.fire("projectUnloaded",{projectId:s})}getLoadedProjectId(){return this._projectId}getModelIds(){return Object.keys(this._modelsInfo)}loadModel(e,t,s){if(!this._projectId){const e="No project currently loaded";return this.error(e),void(s&&s(e))}const i=this._modelsInfo[e];if(!i){const e="Model not in currently loaded project";return this.error(e),void(s&&s(e))}this.bimViewer._busyModal.show(`${this.viewer.localeService.translate("busyModal.loading")||"Loading"} ${i.name}`);this.bimViewer.getConfig("externalMetadata")&&!i.manifest?this.server.getMetadata(this._projectId,e,(r=>{this._loadGeometry(e,i,r,t,s)}),(e=>{this.bimViewer._busyModal.hide(),this.error(e),s&&s(e)})):this._loadGeometry(e,i,null,t,s)}_loadGeometry(e,t,s,i,r){const o=()=>{document.getElementById(""+e).checked=!0,this._numModelsLoaded++,this._unloadModelsButtonElement.classList.remove("disabled"),this._numModelsLoaded{this.bimViewer._busyModal.hide(),this.error(e),r&&r(e)};if(t.manifest){this._dataSource.setProjectId(this._projectId),this._dataSource.setModelId(e);const s=this._xktLoader.load({id:e,manifestSrc:t.manifest,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});s.on("loaded",o),s.on("error",n)}else this.server.getGeometry(this._projectId,e,(i=>{const r=this._xktLoader.load({id:e,metaModelData:s,xkt:i,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});r.on("loaded",o),r.on("error",n)}),n)}_jumpToInitialCamera(){const e=this.viewer,t=e.scene,s=t.getAABB(t.visibleObjectIds),i=u.getAABB3Diag(s),r=u.getAABB3Center(s,Bg),o=t.camera;o.perspective.fov;const n=Math.abs(i/Math.tan(45*u.DEGTORAD)),a=u.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=u.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=r,e.cameraControl.planView=!1,e.cameraFlight.jumpTo({look:r,eye:[r[0]-n*a[0],r[1]-n*a[1],r[2]-n*a[2]],up:l,orthoScale:1.1*i})}unloadModel(e){const t=this.viewer.scene.models[e];if(!t)return void this.error("Model not loaded: "+e);t.destroy();document.getElementById(""+e).checked=!1,document.getElementById("span-"+e),this._numModelsLoaded--,this._numModelsLoaded>0?this._unloadModelsButtonElement.classList.remove("disabled"):this._unloadModelsButtonElement.classList.add("disabled"),this._numModelsLoadede.viewer.localeService.translate("treeViewContextMenu.inspectProperties")||"Inspect Properties",getShown:e=>!!e.viewer.metaScene.metaObjects[e.treeViewNode.objectId],doAction:e=>{const t=e.treeViewNode.objectId;e.bimViewer.showObjectProperties(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFit")||"View Fit",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)})),s.setObjectsVisible(i,!0),s.setObjectsHighlighted(i,!0);const r=s.getAABB(i);t.cameraFlight.flyTo({aabb:r,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=u.getAABB3Center(r)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFitAll")||"View Fit All",doAction:function(e){const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.isolate")||"Isolate",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)}));const r=s.getAABB(i);t.cameraControl.pivotPos=u.getAABB3Center(r,Lg),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsVisible(s.visibleObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(i,!0),t.cameraFlight.flyTo({aabb:r},(()=>{}))}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hide")||"Hide",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideOthers")||"Hide Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.visibleObjectIds,!1),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideAll")||"Hide All",getEnabled:function(e){return e.viewer.scene.visibleObjectIds.length>0},doAction:function(e){e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.show")||"Show",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!0,s.xrayed&&(s.pickable=!0),s.xrayed=!1,s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showOthers")||"Shows Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showAll")||"Show All",getEnabled:function(e){const t=e.viewer.scene;return t.numVisibleObjects0},doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xray")||"X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1,s.xrayed=!0,s.visible=!0,s.pickable=e.bimViewer.getConfig("xrayPickable"))}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoXray")||"Undo X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayOthers")||"X-Ray Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayAll")||"X-Ray All",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayNone")||"X-Ray None",getEnabled:function(e){return e.viewer.scene.numXRayedObjects>0},doAction:function(e){const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.select")||"Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!0,s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoSelect")||"Undo Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.selectNone")||"Select None",getEnabled:function(e){return e.viewer.scene.numSelectedObjects>0},doAction:function(e){e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.clearSlices")||"Clear Slices",getEnabled:function(e){return e.bimViewer.getNumSections()>0},doAction:function(e){e.bimViewer.clearSections()}}]]}}class Hg extends mg{constructor(e,t={}){if(super(e),!t.objectsTabElement)throw"Missing config: objectsTabElement";if(!t.showAllObjectsButtonElement)throw"Missing config: showAllObjectsButtonElement";if(!t.hideAllObjectsButtonElement)throw"Missing config: hideAllObjectsButtonElement";if(!t.objectsElement)throw"Missing config: objectsElement";if(this._objectsTabElement=t.objectsTabElement,this._showAllObjectsButtonElement=t.showAllObjectsButtonElement,this._hideAllObjectsButtonElement=t.hideAllObjectsButtonElement,this._objectsTabButtonElement=this._objectsTabElement.querySelector(".xeokit-tab-btn"),!this._objectsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";const s=t.objectsElement;this._treeView=new uy(this.viewer,{containerElement:s,hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new Ug(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._objectsTabButtonElement.classList.remove("disabled"),this._showAllObjectsButtonElement.classList.remove("disabled"),this._hideAllObjectsButtonElement.classList.remove("disabled")):(this._objectsTabButtonElement.classList.add("disabled"),this._showAllObjectsButtonElement.classList.add("disabled"),this._hideAllObjectsButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}class Gg extends mg{constructor(e,t={}){if(super(e),!t.classesTabElement)throw"Missing config: classesTabElement";if(!t.showAllClassesButtonElement)throw"Missing config: showAllClassesButtonElement";if(!t.hideAllClassesButtonElement)throw"Missing config: hideAllClassesButtonElement";if(!t.classesElement)throw"Missing config: classesElement";if(this._classesTabElement=t.classesTabElement,this._showAllClassesButtonElement=t.showAllClassesButtonElement,this._hideAllClassesButtonElement=t.hideAllClassesButtonElement,this._classesTabButtonElement=this._classesTabElement.querySelector(".xeokit-tab-btn"),!this._classesTabButtonElement)throw"Missing DOM element: xeokit-tab-btn";const s=t.classesElement;this._treeView=new uy(this.viewer,{containerElement:s,hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new Ug(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._classesTabButtonElement.classList.remove("disabled"),this._showAllClassesButtonElement.classList.remove("disabled"),this._hideAllClassesButtonElement.classList.remove("disabled")):(this._classesTabButtonElement.classList.add("disabled"),this._showAllClassesButtonElement.classList.add("disabled"),this._hideAllClassesButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const kg=u.vec3();class Vg extends mg{constructor(e,t={}){if(super(e),!t.storeysTabElement)throw"Missing config: storeysTabElement";if(!t.showAllStoreysButtonElement)throw"Missing config: showAllStoreysButtonElement";if(!t.hideAllStoreysButtonElement)throw"Missing config: hideAllStoreysButtonElement";if(!t.storeysElement)throw"Missing config: storeysElement";if(this._storeysTabElement=t.storeysTabElement,this._showAllStoreysButtonElement=t.showAllStoreysButtonElement,this._hideAllStoreysButtonElement=t.hideAllStoreysButtonElement,this._storeysTabButtonElement=this._storeysTabElement.querySelector(".xeokit-tab-btn"),!this._storeysTabButtonElement)throw"Missing DOM element: .xeokit-tab-btn";const s=t.storeysElement;this._treeView=new uy(this.viewer,{containerElement:s,autoAddModels:!1,hierarchy:"storeys",autoExpandDepth:1}),this._treeViewContextMenu=new Ug(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode,pruneEmptyNodes:!0},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{const t=this.bimViewer._modelsExplorer.getModelInfo(e);t&&this._treeView.addModel(e,{rootName:t.name})})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse(),this._treeView.expandToDepth(1)}))}setEnabled(e){e?(this._storeysTabButtonElement.classList.remove("disabled"),this._showAllStoreysButtonElement.classList.remove("disabled"),this._hideAllStoreysButtonElement.classList.remove("disabled")):(this._storeysTabButtonElement.classList.add("disabled"),this._showAllStoreysButtonElement.classList.add("disabled"),this._hideAllStoreysButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];if(!s)return void this.error("selectStorey() - object is not found: '"+e+"'");if("IfcBuildingStorey"!==s.type)return void this.error("selectStorey() - object is not found: '"+e+"'");const i=s.getObjectIDsInSubtree();this._selectObjects(i,t)}_selectObjects(e,t){const s=this.viewer.scene,i=s.getAABB(e);this.viewer.cameraControl.pivotPos=u.getAABB3Center(i,kg),t?(s.setObjectsXRayed(s.objectIds,!0),s.setObjectsVisible(s.objectIds,!0),s.setObjectsPickable(s.objectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsXRayed(e,!1),s.setObjectsVisible(e,!0),s.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:i},(()=>{setTimeout((function(){s.setObjectsVisible(s.xrayedObjectIds,!1),s.setObjectsXRayed(s.xrayedObjectIds,!1)}),500),t()}))):(s.setObjectsVisible(s.objectIds,!1),s.setObjectsPickable(s.xrayedObjectIds,!0),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:i}))}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const jg=u.vec3();class Qg extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._saveOrthoActive=null,this._buttonElement=t.buttonElement,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&(this.bimViewer._sectionTool.hideControl(),this.setActive(!this.getActive(),(()=>{}))),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!0,(()=>{}))}))}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer._orthoMode.getActive()}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterThreeDMode((()=>{this.fire("active",this._active),t()})):(this._enterThreeDMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitThreeDMode((()=>{this.fire("active",this._active),t()})):(this._exitThreeDMode(),this.fire("active",this._active)))):t&&t()}_enterThreeDMode(e){const t=this.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds),r=u.getAABB3Diag(i),o=u.getAABB3Center(i,jg),n=Math.abs(r/Math.tan(32.5)),a=s.camera,l=a.yUp?[-1,-1,-1]:[1,1,1],h=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=o,this.bimViewer._navCubeMode.setActive(!0),this.bimViewer._firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer._sectionTool.setEnabled(!0),this.bimViewer._orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e){const t=this.viewer,s=t.scene,i=s.camera,r=s.getAABB(s.visibleObjectIds),o=u.getAABB3Center(r),n=u.getAABB3Diag(r),a=Math.abs(n/Math.tan(45*u.DEGTORAD)),l=1.3*n,h=jg;h[0]=o[0]+i.worldUp[0]*a,h[1]=o[1]+i.worldUp[1]*a,h[2]=o[2]+i.worldUp[2]*a;const c=u.mulVec3Scalar(i.worldForward,-1,[]);this.bimViewer._sectionTool.setActive(!1),this.bimViewer._firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer._orthoMode.getActive(),this.bimViewer._orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer._navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer._navCubeMode.setActive(!1))}}class Wg extends o{constructor(e,t={}){super(t),this._bimViewer=e,this._buildMenu()}_buildMenu(){const e=[],t=[];this._bimViewer._enablePropertiesInspector&&e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.inspectProperties")||"Inspect Properties",doAction:e=>{const t=e.entity.id;e.bimViewer.showObjectProperties(t)}}),e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showInTree")||"Show in Explorer",doAction:e=>{const t=e.entity.id;e.showObjectInExplorers(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFit")||"View Fit",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity;t.cameraFlight.flyTo({aabb:i.aabb,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=u.getAABB3Center(i.aabb)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hide")||"Hide",getEnabled:e=>e.entity.visible,doAction:e=>{e.entity.visible=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideOthers")||"Hide Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.visibleObjectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.visible=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xray")||"X-Ray",getEnabled:e=>!e.entity.xrayed,doAction:e=>{const t=e.entity;t.xrayed=!0,t.pickable=e.bimViewer.getConfig("xrayPickable")}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayOthers")||"X-Ray Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.objectIds,!0),s.setObjectsXRayed(s.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||s.setObjectsPickable(s.objectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.xrayed=!1,t.pickable=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.select")||"Select",getEnabled:e=>!e.entity.selected,doAction:e=>{e.entity.selected=!0}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.undoSelect")||"Undo Select",getEnabled:e=>e.entity.selected,doAction:e=>{e.entity.selected=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]}}class zg extends o{constructor(e={}){super({hideOnAction:e.hideOnAction,context:e.context,items:[[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene.xrayedObjectIds;e.viewer.scene.setObjectsPickable(t,!0),e.viewer.scene.setObjectsXRayed(t,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.resetView")||"Reset View",doAction:e=>{e.bimViewer.resetView()}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]})}}class Kg extends mg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e,this._active?this._buttonElement.classList.add("active"):this._buttonElement.classList.remove("active")})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active)))):t&&t()}_enterOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class Yg extends mg{constructor(e,t={}){if(super(e),!t.propertiesTabElement)throw"Missing config: propertiesTabElement";if(!t.propertiesElement)throw"Missing config: propertiesElement";if(this._metaObject=null,this._propertiesTabElement=t.propertiesTabElement,this._propertiesElement=t.propertiesElement,this._propertiesTabButtonElement=this._propertiesTabElement.querySelector(".xeokit-tab-btn"),!this._propertiesTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{if(this._metaObject){const t=this._metaObject.metaModels;for(let s=0,i=t.length;s{this.clear()})),document.addEventListener("click",this._clickListener=e=>{e.target.matches(".xeokit-accordion .xeokit-accordion-button")&&(e.target.parentElement.classList.contains("active")?e.target.parentElement.classList.remove("active"):e.target.parentElement.classList.add("active"))}),this.clear()}showObjectPropertySets(e){const t=this.viewer.metaScene.metaObjects[e];if(!t)return;const s=t.propertySets;s&&s.length>0?this._setPropertySets(t,s):this._setPropertySets(t),this._metaObject=t}clear(){const e=[],t=this.viewer.localeService.translate("propertiesInspector.noObjectSelectedWarning")||"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.";e.push('
'),e.push(`

${t}

`),e.push("
");const s=e.join("");this._propertiesElement.innerHTML=s}_setPropertySets(e,t){const s=[];if(s.push('
'),e){s.push(''),s.push(``),e.type&&s.push(``),s.push(``),s.push(``);const i=e.attributes;if(i)for(let e in i)s.push(``);if(s.push("
Name:${e.name}
Class:${e.type}
UUID:${e.originalSystemId}
Viewer ID:${e.id}
${Xg(e)}:${i[e]}
"),t&&0!==t.length){s.push("
"),s.push('
');for(let e=0,i=t.length;e0){s.push(`
\n

${i.name}

\n
\n `);for(let e=0,t=r.length;e`)}s.push("
${t.name||t.label}:${t.value}
\n
\n
")}}s.push("
")}else{const e=this.viewer.localeService.translate("propertiesInspector.noPropSetWarning")||"No properties sets found for this object";s.push(`

${e}

`),s.push("")}}else s.push('

No object selected

');this._propertiesElement.innerHTML=s.join("")}setEnabled(e){e?this._propertiesTabButtonElement.classList.remove("disabled"):this._propertiesTabButtonElement.classList.add("disabled")}destroy(){super.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),document.removeEventListener("click",this._clickListener)}}function Xg(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}const Zg=new Float32Array(3);class qg{constructor(e){if(!e)throw"Parameter expected: cfg";if(!e.viewer)throw"Parameter expected: cfg.viewer";this.viewer=e.viewer,this._maxTreeDepth=e.maxTreeDepth||15,this._root=null,this._needsRebuild=!0,this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const i=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&u.containsAABB3(e.left.aabb,i))return void this._insertEntity(e.left,t,s+1);if(e.right&&u.containsAABB3(e.right.aabb,i))return void this._insertEntity(e.right,t,s+1);const r=e.aabb;Zg[0]=r[3]-r[0],Zg[1]=r[4]-r[1],Zg[2]=r[5]-r[2];let o=0;if(Zg[1]>Zg[o]&&(o=1),Zg[2]>Zg[o]&&(o=2),!e.left){const n=r.slice();if(n[o+3]=(r[o]+r[o+3])/2,e.left={aabb:n},u.containsAABB3(n,i))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const n=r.slice();if(n[o]=(r[o]+r[o+3])/2,e.right={aabb:n},u.containsAABB3(n,i))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class Jg extends mg{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";this._objectsKdTree3=t.objectsKdTree3,this._marquee=u.AABB2(),this._marqueeFrustum=new Ot,this._marqueeFrustumProjMat=u.mat4(),this._marqueeDir=!1;const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._objectsKdTree3.root):s.classList.remove("active")})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}));const i=this.viewer.scene,r=i.canvas.canvas;this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement);const o=this._marqueeElement.style;let n,a,l,h,c,A,p,d;o.position="absolute",o["z-index"]="40000005",o.width="8px",o.height="8px",o.visibility="hidden",o.top="0px",o.left="0px",o["box-shadow"]="0 2px 5px 0 #182A3D;",o.opacity=1,o["pointer-events"]="none";let f=!1,E=!1;r.addEventListener("mousedown",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;const t=this.bimViewer.viewer.scene.input;t.keyDown[t.KEY_CTRL]||i.setObjectsSelected(i.selectedObjectIds,!1),n=e.pageX,a=e.pageY,o.visibility="visible",o.left=`${n}px`,o.top=`${a}px`,o.width="0px",o.height="0px",o.display="block",c=e.offsetX,A=e.offsetY,f=!0,this.viewer.cameraControl.pointerEnabled=!1})),r.addEventListener("mouseup",(e=>{if(!this.getActive()||!this.getEnabled())return;if(!f&&!E)return;if(0!==e.button)return;l=e.pageX,h=e.pageY;const t=Math.abs(l-n),s=Math.abs(h-a);o.width=`${t}px`,o.height=`${s}px`,o.visibility="hidden",f=!1,this.viewer.cameraControl.pointerEnabled=!0,E&&(E=!1),(t>3||s>3)&&this._marqueePick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&this.getEnabled()&&0===e.button&&f&&(o.visibility="hidden",f=!1,E=!0,this.viewer.cameraControl.pointerEnabled=!0)}),!0),r.addEventListener("mousemove",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;if(!f)return;const t=e.pageX,s=e.pageY,i=t-n,r=s-a;o.width=`${Math.abs(i)}px`,o.height=`${Math.abs(r)}px`,o.left=`${Math.min(n,t)}px`,o.top=`${Math.min(a,s)}px`,p=e.offsetX,d=e.offsetY;const l=c{if(i===Ot.INTERSECT&&(i=St(this._marqueeFrustum,s.aabb)),i!==Ot.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,i=t.length;s{e.preventDefault()},o.oncontextmenu=e=>{e.preventDefault()},n.oncontextmenu=e=>{e.preventDefault()};const l=new ME({localeService:t.localeService,canvasElement:s,keyboardEventsElement:t.keyboardEventsElement,transparent:!1,backgroundColor:[1,1,1],backgroundColorFromAmbientLight:!1,saoEnabled:!0,pbrEnabled:!1,colorTextureEnabled:!0});super(null,t,e,l),this._configs={},this._enableAddModels=!!t.enableEditModels,this._enablePropertiesInspector=!!t.inspectorElement,this.viewer=l,this._objectsKdTree3=new qg({viewer:l}),this._customizeViewer(),this._initCanvasContextMenus(),i.innerHTML=function(e){return'
\n
\n Models\n
\n
\n \n '+(e.enableEditModels?'':"")+'
\n
\n
\n
\n
\n Objects\n
\n
\n \n \n
\n
\n
\n
\n
\n Classes\n
\n
\n \n \n
\n
\n
\n
\n
\n Storeys\n
\n
\n \n \n
\n
\n
\n
\n
'}(t),o.innerHTML='
\n \x3c!-- Reset button --\x3e\n
\n \n
\n
\n \x3c!-- 3D Mode button --\x3e\n \n \x3c!-- Perspective/Ortho Mode button --\x3e\n \n \x3c!-- Fit button --\x3e\n \n \x3c!-- First Person mode button --\x3e\n \n \x3c!-- Show/hide IFCSpaces --\x3e\n \n
\n \x3c!-- Tools button group --\x3e\n
\n \x3c!-- Hide tool button --\x3e\n \n \x3c!-- Select tool button --\x3e\n \n \x3c!-- Marquee select tool button --\x3e\n \n \x3c!-- section tool button --\x3e\n \n
\n
',this._enablePropertiesInspector&&(r.innerHTML='
\n
\n Properties\n
\n
\n
\n
\n
'),this._explorerElement=i,this._inspectorElement=r,$g(i),this._enablePropertiesInspector&&$g(r),this._modelsExplorer=new Mg(this,{modelsTabElement:i.querySelector(".xeokit-modelsTab"),loadModelsButtonElement:i.querySelector(".xeokit-loadAllModels"),unloadModelsButtonElement:i.querySelector(".xeokit-unloadAllModels"),addModelButtonElement:i.querySelector(".xeokit-addModel"),modelsElement:i.querySelector(".xeokit-models"),enableEditModels:this._enableAddModels}),this._objectsExplorer=new Hg(this,{objectsTabElement:i.querySelector(".xeokit-objectsTab"),showAllObjectsButtonElement:i.querySelector(".xeokit-showAllObjects"),hideAllObjectsButtonElement:i.querySelector(".xeokit-hideAllObjects"),objectsElement:i.querySelector(".xeokit-objects")}),this._classesExplorer=new Gg(this,{classesTabElement:i.querySelector(".xeokit-classesTab"),showAllClassesButtonElement:i.querySelector(".xeokit-showAllClasses"),hideAllClassesButtonElement:i.querySelector(".xeokit-hideAllClasses"),classesElement:i.querySelector(".xeokit-classes")}),this._storeysExplorer=new Vg(this,{storeysTabElement:i.querySelector(".xeokit-storeysTab"),showAllStoreysButtonElement:i.querySelector(".xeokit-showAllStoreys"),hideAllStoreysButtonElement:i.querySelector(".xeokit-hideAllStoreys"),storeysElement:i.querySelector(".xeokit-storeys")}),this._enablePropertiesInspector&&(this._propertiesInspector=new Yg(this,{propertiesTabElement:r.querySelector(".xeokit-propertiesTab"),propertiesElement:r.querySelector(".xeokit-properties")})),this._resetAction=new Ig(this,{buttonElement:o.querySelector(".xeokit-reset"),active:!1}),this._fitAction=new Tg(this,{buttonElement:o.querySelector(".xeokit-fit"),active:!1});const h=new function(e){let t=!1;this.setThreeDModeActive=s=>{s?(e._firstPersonMode.setActive(!1),e._marqueeSelectionTool.setEnabled(!0),e.viewer.cameraControl.navMode="orbit"):(e._marqueeSelectionTool.setEnabled(!1),e._marqueeSelectionTool.setActive(!1),e._firstPersonMode.setActive(!1),e.viewer.cameraControl.navMode="planView"),t=s},this.setFirstPersonModeActive=s=>{e.viewer.cameraControl.navMode=s?"firstPerson":t?"orbit":"planView"}}(this);this._threeDMode=new Qg(this,{buttonElement:o.querySelector(".xeokit-threeD"),cameraControlNavModeMediator:h,active:!1}),this._orthoMode=new Kg(this,{buttonElement:o.querySelector(".xeokit-ortho"),active:!1}),this._firstPersonMode=new _g(this,{buttonElement:o.querySelector(".xeokit-firstPerson"),cameraControlNavModeMediator:h,active:!1}),this._hideTool=new Rg(this,{buttonElement:o.querySelector(".xeokit-hide"),active:!1}),this._selectionTool=new Pg(this,{buttonElement:o.querySelector(".xeokit-select"),active:!1}),this._marqueeSelectionTool=new Jg(this,{buttonElement:o.querySelector(".xeokit-marquee"),active:!1,objectsKdTree3:this._objectsKdTree3}),this._showSpacesMode=new Dg(this,{buttonElement:o.querySelector(".xeokit-showSpaces"),active:!1}),this._queryTool=new Ng(this,{active:!1}),this._sectionTool=new Sg(this,{buttonElement:o.querySelector(".xeokit-section"),counterElement:o.querySelector(".xeokit-section-counter"),menuButtonElement:o.querySelector(".xeokit-section-menu-button"),menuButtonArrowElement:o.querySelector(".xeokit-section-menu-button-arrow"),active:!1}),this._navCubeMode=new xg(this,{navCubeCanvasElement:n,active:!0}),this._busyModal=new yg(this,{busyModalBackdropElement:a}),this._threeDMode.setActive(!0),this._firstPersonMode.setActive(!1),this._navCubeMode.setActive(!0),this._modelsExplorer.on("modelLoaded",(e=>{this._modelsExplorer.getNumModelsLoaded()>0&&this.setControlsEnabled(!0),this.fire("modelLoaded",e)})),this._modelsExplorer.on("modelUnloaded",(e=>{0===this._modelsExplorer.getNumModelsLoaded()&&(this.setControlsEnabled(!1),this.openTab("models")),this.fire("modelUnloaded",e)})),this._resetAction.on("reset",(()=>{this.fire("reset",!0)})),this._mutexActivation([this._hideTool,this._selectionTool,this._marqueeSelectionTool,this._sectionTool]),i.querySelector(".xeokit-showAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-loadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this.loadAllModels(),e.preventDefault()})),i.querySelector(".xeokit-unloadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this._modelsExplorer.unloadAllModels(),e.preventDefault()})),this._enableAddModels&&i.querySelector(".xeokit-addModel").addEventListener("click",(e=>{this.fire("addModel",{}),e.preventDefault()})),this._bcfViewpointsPlugin=new vi(this.viewer,{}),this._fastNavPlugin=new LE(l,{hideEdges:!0,hideSAO:!0,hidePBR:!1,hideColorTexture:!1,hideTransparentObjects:!1,scaleCanvasResolution:!1,scaleCanvasResolutionFactor:.6}),this.viewer.scene.on("rendered",(()=>{const e=this._fastNavPlugin;e.hideEdges=5").firstChild;document.body.appendChild(t),this.viewer.cameraControl.pivotElement=t,e.camera.perspective.near=.01,e.camera.perspective.far=3e3,e.camera.ortho.near=.01,e.camera.ortho.far=2e3;const s=e.sao;s.enabled=!0,s.numSamples=50,s.kernelRadius=200}_initCanvasContextMenus(){this._canvasContextMenu=new zg(this,{hideOnAction:!0}),this._objectContextMenu=new Wg(this,{hideOnAction:!0}),this.viewer.cameraControl.on("rightClick",(e=>{e.event;const t=this.viewer.scene.pick({canvasPos:e.canvasPos});t&&t.entity.isObject?(this._canvasContextMenu.hide(),this._objectContextMenu.context={viewer:this.viewer,bimViewer:this,showObjectInExplorers:e=>{const t=this.getOpenTab();"objects"!==t&&"classes"!==t&&"storeys"!==t&&this.openTab("objects"),this.showObjectInExplorers(e)},entity:t.entity},this._objectContextMenu.show(e.pagePos[0],e.pagePos[1])):(this._objectContextMenu.hide(),this._canvasContextMenu.context={viewer:this.viewer,bimViewer:this},this._canvasContextMenu.show(e.pagePos[0],e.pagePos[1]))}))}_initConfigs(){this.setConfigs({cameraNear:"0.05",cameraFar:"3000.0",smartPivot:"true",saoEnabled:"true",pbrEnabled:"false",saoBias:"0.5",saoIntensity:"0.15",saoNumSamples:"40",saoKernelRadius:"100",edgesEnabled:!0,xrayContext:!0,xrayPickable:!1,selectedGlowThrough:!0,highlightGlowThrough:!0,backgroundColor:[1,1,1],externalMetadata:!1,dtxEnabled:!1})}setConfigs(e){for(let t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setConfig(t,s)}}setConfig(e,t){function s(e){return!0===e||"true"===e}try{switch(e){case"backgroundColor":const i=t;this.setBackgroundColor(i),this._configs[e]=i;break;case"cameraNear":const r=parseFloat(t);this.viewer.scene.camera.perspective.near=r,this.viewer.scene.camera.ortho.near=r,this._configs[e]=r;break;case"cameraFar":const o=parseFloat(t);this.viewer.scene.camera.perspective.far=o,this._configs[e]=o;break;case"smartPivot":this.viewer.cameraControl.smartPivot=this._configs[e]=s(t);break;case"saoEnabled":this._fastNavPlugin.saoEnabled=this._configs[e]=s(t);break;case"saoBias":this.viewer.scene.sao.bias=parseFloat(t);break;case"saoIntensity":this.viewer.scene.sao.intensity=parseFloat(t);break;case"saoKernelRadius":this.viewer.scene.sao.kernelRadius=this._configs[e]=parseFloat(t);break;case"saoNumSamples":this.viewer.scene.sao.numSamples=this._configs[e]=parseFloat(t);break;case"saoBlur":this.viewer.scene.sao.blur=this._configs[e]=s(t);break;case"edgesEnabled":this._fastNavPlugin.edgesEnabled=this._configs[e]=s(t);break;case"pbrEnabled":this._fastNavPlugin.pbrEnabled=this._configs[e]=s(t);break;case"viewFitFOV":this.viewer.cameraFlight.fitFOV=this._configs[e]=parseFloat(t);break;case"viewFitDuration":this.viewer.cameraFlight.duration=this._configs[e]=parseFloat(t);break;case"perspectiveFOV":this.viewer.camera.perspective.fov=this._configs[e]=parseFloat(t);break;case"excludeUnclassifiedObjects":case"xrayPickable":case"externalMetadata":this._configs[e]=s(t);break;case"xrayContext":this._configs[e]=t;break;case"selectedGlowThrough":const n=this._configs[e]=s(t),a=this.viewer.scene.selectedMaterial;a.glowThrough=n,a.fillAlpha=n?.5:1,a.edgeAlpha=n?.5:1;break;case"highlightGlowThrough":const l=this._configs[e]=s(t),h=this.viewer.scene.highlightMaterial;h.glowThrough=l,h.fillAlpha=l?.5:1,h.edgeAlpha=l?.5:1;break;case"showSpaces":this._configs[e]=s(t),this._showSpacesMode.setActive(t);break;case"dtxEnabled":this._configs[e]=s(t),this.viewer.scene.dtxEnabled=t;break;case"objectColors":this._configs[e]=t,this._modelsExplorer.setObjectColors(t);break;default:this.warn("setConfig() - unsupported configuration: '"+e+"'")}}catch(t){this.error("setConfig() - failed to configure '"+e+"': "+t)}}getConfig(e){return this._configs[e]}getProjectsInfo(e,t){e?this.server.getProjects(e,(e=>{this.error("getProjectsInfo() - "+e),t&&t(e)})):this.error("getProjectsInfo() - Argument expected: 'done'")}getProjectInfo(e,t,s){e?t?this.server.getProject(e,t,(e=>{this.error("getProjectInfo() - "+e),s&&s(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getProjectInfo() - Argument expected: projectId")}getObjectInfo(e,t,s,i,r){e?t?s?i?this.server.getObjectInfo(e,t,s,i,(e=>{r&&r(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getObjectInfo() - Argument expected: objectId"):this.error("getObjectInfo() - Argument expected: modelId"):this.error("getObjectInfo() - Argument expected: projectId")}loadProject(e,t,s){e?this._modelsExplorer.loadProject(e,(()=>{t&&t()}),(e=>{this.error("loadProject() - "+e),s&&s(e)})):this.error("loadProject() - Argument expected: objectId")}unloadProject(){this._modelsExplorer.unloadProject(),this.openTab("models"),this.setControlsEnabled(!1)}getLoadedProjectId(){return this._modelsExplorer.getLoadedProjectId()}getModelIds(){return this._modelsExplorer.getModelIds()}loadModel(e,t,s){e?this._modelsExplorer.loadModel(e,(()=>{t&&t()}),(e=>{this.error("loadModel() - "+e),s&&s(e)})):this.error("loadModel() - Argument expected: modelId")}loadAllModels(e=function(){}){const t=this._modelsExplorer.getModelIds(),s=(e,i)=>{if(e>=t.length)i();else{const r=t[e];this._modelsExplorer.isModelLoaded(r)?s(e+1,i):this._modelsExplorer.loadModel(r,(()=>{s(e+1,i)}),(t=>{this.error("loadAllModels() - "+t),s(e+1,i)}))}};s(0,e)}getLoadedModelIds(){return this._modelsExplorer._getLoadedModelIds()}isModelLoaded(e){if(e)return this._modelsExplorer.isModelLoaded(e);this.error("unloadModel() - Argument expected: modelId")}unloadModel(e){e?this._modelsExplorer.unloadModel(e):this.error("unloadModel() - Argument expected: modelId")}unloadAllModels(){this._modelsExplorer.unloadAllModels()}editModel(e){this.fire("editModel",{modelId:e})}deleteModel(e){this.fire("deleteModel",{modelId:e})}addModel(){this.fire("addModel",{})}setBackgroundColor(e){this.viewer.scene.canvas.backgroundColor=e}setObjectColorSource(e){console.log("BIMViewer.setObjectColorSource() is now deprecated and no longer functional. By default, BIMViewer.getObjectColorSource() will now always return the (formerly) default value of `model`.")}getObjectColorSource(){return"model"}setViewerState(e,t=(()=>{})){e.tabOpen&&this.openTab(e.tabOpen),e.expandObjectsTree&&this._objectsExplorer.expandTreeViewToDepth(e.expandObjectsTree),e.expandClassesTree&&this._classesExplorer.expandTreeViewToDepth(e.expandClassesTree),e.expandStoreysTree&&this._storeysExplorer.expandTreeViewToDepth(e.expandStoreysTree),e.setCamera&&this.setCamera(e.setCamera),this._parseSelectedStorey(e,(()=>{this._parseThreeDMode(e,(()=>{t()}))}))}_parseSelectedStorey(e,t){e.selectedStorey?(this.selectStorey(e.selectedStorey),t()):t()}_parseThreeDMode(e,t){const s=!1!==e.threeDActive;this.set3DEnabled(s,t)}showObjectInExplorers(e){e?(this._objectsExplorer.showNodeInTreeView(e),this._classesExplorer.showNodeInTreeView(e),this._storeysExplorer.showNodeInTreeView(e),this.fire("openExplorer",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}unShowObjectInExplorers(){this._objectsExplorer.unShowNodeInTreeView(),this._classesExplorer.unShowNodeInTreeView(),this._storeysExplorer.unShowNodeInTreeView()}showObjectProperties(e){e?(this._enablePropertiesInspector&&this._propertiesInspector.showObjectPropertySets(e),this.fire("openInspector",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}setObjectsVisible(e,t){this._withObjectsInSubtree(e,(e=>{e.visible=t}))}setAllObjectsVisible(e){e?this.viewer.scene.setObjectsVisible(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsVisible(this.viewer.scene.visibleObjectIds,!1)}setObjectsXRayed(e,t){this._withObjectsInSubtree(e,(e=>{e.xrayed=t}))}setAllObjectsXRayed(e){e?this.viewer.scene.setObjectsXRayed(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsXRayed(this.viewer.scene.xrayedObjectIds,!1)}setObjectsSelected(e,t){this._withObjectsInSubtree(e,(e=>{e.selected=t}))}setAllObjectsSelected(e){e?this.viewer.scene.setObjectsSelected(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsSelected(this.viewer.scene.selectedObjectIds,!1)}_withObjectsInSubtree(e,t){if(e)for(let s=0,i=e.length;s{const s=this.viewer.scene.objects[e.id];s&&t(s)}))}else this.error("Argument expected: objectIds")}flyToObject(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectId");const s=this.viewer,i=s.scene,r=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{i.objects[e.id]&&r.push(e.id)})),0===r.length)return this.error("Object not found in viewer: '"+e+"'"),void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const o=i.getAABB(r);s.cameraFlight.flyTo({aabb:o},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=u.getAABB3Center(o)}viewFitObjects(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectIds");const s=this.viewer,i=s.scene,r=[];for(var o=0,n=e.length;o{i.objects[e.id]&&r.push(e.id)}))}if(0===r.length)return void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const a=i.getAABB(r);s.cameraFlight.flyTo({aabb:a},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=u.getAABB3Center(a)}viewFitAll(e){const t=this.viewer,s=t.scene.getAABB();t.cameraFlight.flyTo({aabb:s},(()=>{e&&e()})),t.cameraControl.pivotPos=u.getAABB3Center(s)}jumpToObject(e){if(!e)return void this.error("jumpToObject() - Argument expected: objectId");const t=this.viewer,s=t.scene,i=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{s.objects[e.id]&&i.push(e.id)})),0===i.length)return void this.error("Object not found in viewer: '"+e+"'");s.setObjectsVisible(i,!0);const r=s.getAABB(i);t.cameraFlight.jumpTo({aabb:r}),t.cameraControl.pivotPos=u.getAABB3Center(r)}setCamera(e){const t=this.viewer.scene.camera;e.eye&&(t.eye=e.eye),e.look&&(t.look=e.look),e.up&&(t.up=e.up)}viewFitModels(e,t){if(!e)return void this.error("viewFitModels() - Argument expected: modelIds");const s=this.viewer,i=s.scene,r=u.AABB3();u.collapseAABB3(r);for(var o=0,n=e.length;o{t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})):(s.cameraFlight.jumpTo({aabb:r}),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)),s.cameraControl.pivotPos=u.getAABB3Center(r)}openTab(e){if(!e)return void this.error("openTab() - Argument expected: tabId");let t;switch(e){case"models":t="xeokit-modelsTab";break;case"objects":t="xeokit-objectsTab";break;case"classes":t="xeokit-classesTab";break;case"storeys":t="xeokit-storeysTab";break;case"properties":t="xeokit-propertiesTab";break;default:return void this.error("openTab() - tab not recognized: '"+e+"'")}this._openTab(this._explorerElement,t)}_openTab(e,t){const s="active";let i=e.querySelectorAll(".xeokit-tab"),r=e.querySelector("."+t);for(let e=0;e-1}const t="active";return e(this._explorerElement.querySelector(".xeokit-modelsTab"),t)?"models":e(this._explorerElement.querySelector(".xeokit-objectsTab"),t)?"objects":e(this._explorerElement.querySelector(".xeokit-classesTab"),t)?"classes":e(this._explorerElement.querySelector(".xeokit-storeysTab"),t)?"storeys":e(this._inspectorElement.querySelector(".xeokit-propertiesTab"),t)?"properties":"none"}set3DEnabled(e,t){this._threeDMode.setActive(e,t)}get3DEnabled(){return this._threeDMode.getActive()}setSpacesShown(e){this._showSpacesMode.setActive(e)}getSpacesShown(){return this._showSpacesMode.getActive()}setOrthoEnabled(e,t){this._orthoMode.setActive(e,t)}getOrthoEnabled(){return this._orthoMode.getActive()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];s?"IfcBuildingStorey"===s.type?this._storeysExplorer.selectStorey(e,t):this.error("selectStorey() - Object is not an IfcBuildingStorey: '"+e+"'"):this.error("selectStorey() - Object is not found: '"+e+"'")}saveBCFViewpoint(e){return this._bcfViewpointsPlugin.getViewpoint(e)}loadBCFViewpoint(e,t){e?(this._orthoMode.setActive("ortho"===this.viewer.camera.projection),this._bcfViewpointsPlugin.setViewpoint(e,t)):this.error("loadBCFViewpoint() - Argument expected: bcfViewpoint")}resetView(){this._resetAction.reset()}setControlsEnabled(e){this._objectsExplorer.setEnabled(e),this._classesExplorer.setEnabled(e),this._storeysExplorer.setEnabled(e),this._resetAction.setEnabled(e),this._fitAction.setEnabled(e),this._threeDMode.setEnabled(e),this._orthoMode.setEnabled(e),this._firstPersonMode.setEnabled(e),this._queryTool.setEnabled(e),this._hideTool.setEnabled(e),this._selectionTool.setEnabled(e),this._marqueeSelectionTool.setEnabled(e),this._showSpacesMode.setEnabled(e),this._sectionTool.setEnabled(e),this._enablePropertiesInspector&&this._propertiesInspector.setEnabled(e)}setKeyboardEnabled(e){this.viewer.scene.input.keyboardEnabled=e}getKeyboardEnabled(){return this.viewer.scene.input.keyboardEnabled}clearSections(){this._sectionTool.clear()}disableSections(){this._sectionTool.disableSections()}enableSections(){this._sectionTool.enableSections()}flipSections(){this._sectionTool.flipSections()}hideSectionEditControl(){this._sectionTool.hideControl()}getNumSections(){return this._sectionTool.getNumSections()}destroy(){this.viewer.destroy(),this._bcfViewpointsPlugin.destroy(),this._canvasContextMenu.destroy(),this._objectContextMenu.destroy()}}export{eI as BIMViewer,Di as LocaleService,fg as Server}; +***************************************************************************** */var Uh=function(e,t){return Uh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},Uh(e,t)};function Hh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}Uh(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var Gh=function(){return Gh=Object.assign||function(e){for(var t,s=1,i=arguments.length;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=55296&&r<=56319&&s>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zh=0;Zh=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ic="undefined"==typeof Uint8Array?[]:new Uint8Array(256),rc=0;rc>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i0;){var n=i[--o];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var a=s;a<=i.length;){var l;if((l=i[++a])===t)return!0;if(l!==oc)break}if(n!==oc)break}return!1},Hc=function(e,t){for(var s=e;s>=0;){var i=t[s];if(i!==oc)return i;s--}return 0},Gc=function(e,t,s,i,r){if(0===s[i])return"×";var o=i-1;if(Array.isArray(r)&&!0===r[o])return"×";var n=o-1,a=o+1,l=t[o],h=n>=0?t[n]:0,c=t[a];if(2===l&&3===c)return"×";if(-1!==wc.indexOf(l))return"!";if(-1!==wc.indexOf(c))return"×";if(-1!==xc.indexOf(c))return"×";if(8===Hc(o,t))return"÷";if(11===bc.get(e[o]))return"×";if((l===Ic||l===vc)&&11===bc.get(e[a]))return"×";if(7===l||7===c)return"×";if(9===l)return"×";if(-1===[oc,nc,ac].indexOf(l)&&9===c)return"×";if(-1!==[lc,hc,cc,dc,yc].indexOf(c))return"×";if(Hc(o,t)===pc)return"×";if(Uc(23,pc,o,t))return"×";if(Uc([lc,hc],uc,o,t))return"×";if(Uc(12,12,o,t))return"×";if(l===oc)return"÷";if(23===l||23===c)return"×";if(16===c||16===l)return"÷";if(-1!==[nc,ac,uc].indexOf(c)||14===l)return"×";if(36===h&&-1!==Lc.indexOf(l))return"×";if(l===yc&&36===c)return"×";if(c===Ac)return"×";if(-1!==Sc.indexOf(c)&&l===fc||-1!==Sc.indexOf(l)&&c===fc)return"×";if(l===mc&&-1!==[Rc,Ic,vc].indexOf(c)||-1!==[Rc,Ic,vc].indexOf(l)&&c===Ec)return"×";if(-1!==Sc.indexOf(l)&&-1!==Bc.indexOf(c)||-1!==Bc.indexOf(l)&&-1!==Sc.indexOf(c))return"×";if(-1!==[mc,Ec].indexOf(l)&&(c===fc||-1!==[pc,ac].indexOf(c)&&t[a+1]===fc)||-1!==[pc,ac].indexOf(l)&&c===fc||l===fc&&-1!==[fc,yc,dc].indexOf(c))return"×";if(-1!==[fc,yc,dc,lc,hc].indexOf(c))for(var A=o;A>=0;){if((u=t[A])===fc)return"×";if(-1===[yc,dc].indexOf(u))break;A--}if(-1!==[mc,Ec].indexOf(c))for(A=-1!==[lc,hc].indexOf(l)?n:o;A>=0;){var u;if((u=t[A])===fc)return"×";if(-1===[yc,dc].indexOf(u))break;A--}if(Pc===l&&-1!==[Pc,Dc,Tc,_c].indexOf(c)||-1!==[Dc,Tc].indexOf(l)&&-1!==[Dc,Nc].indexOf(c)||-1!==[Nc,_c].indexOf(l)&&c===Nc)return"×";if(-1!==Mc.indexOf(l)&&-1!==[Ac,Ec].indexOf(c)||-1!==Mc.indexOf(c)&&l===mc)return"×";if(-1!==Sc.indexOf(l)&&-1!==Sc.indexOf(c))return"×";if(l===dc&&-1!==Sc.indexOf(c))return"×";if(-1!==Sc.concat(fc).indexOf(l)&&c===pc&&-1===Oc.indexOf(e[a])||-1!==Sc.concat(fc).indexOf(c)&&l===hc)return"×";if(41===l&&41===c){for(var p=s[o],d=1;p>0&&41===t[--p];)d++;if(d%2!=0)return"×"}return l===Ic&&c===vc?"×":"÷"},kc=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var s=function(e,t){void 0===t&&(t="strict");var s=[],i=[],r=[];return e.forEach((function(e,o){var n=bc.get(e);if(n>50?(r.push(!0),n-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(o),s.push(16);if(4===n||11===n){if(0===o)return i.push(o),s.push(gc);var a=s[o-1];return-1===Fc.indexOf(a)?(i.push(i[o-1]),s.push(a)):(i.push(o),s.push(gc))}return i.push(o),31===n?s.push("strict"===t?uc:Rc):n===Cc||29===n?s.push(gc):43===n?e>=131072&&e<=196605||e>=196608&&e<=262141?s.push(Rc):s.push(gc):void s.push(n)})),[i,s,r]}(e,t.lineBreak),i=s[0],r=s[1],o=s[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map((function(e){return-1!==[fc,gc,Cc].indexOf(e)?Rc:e})));var n="keep-all"===t.wordBreak?o.map((function(t,s){return t&&e[s]>=19968&&e[s]<=40959})):void 0;return[i,r,n]},Vc=function(){function e(e,t,s,i){this.codePoints=e,this.required="!"===t,this.start=s,this.end=i}return e.prototype.slice=function(){return Kh.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),jc=function(e){return e>=48&&e<=57},Qc=function(e){return jc(e)||e>=65&&e<=70||e>=97&&e<=102},Wc=function(e){return 10===e||9===e||32===e},zc=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},Kc=function(e){return zc(e)||jc(e)||45===e},Yc=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Xc=function(e,t){return 92===e&&10!==t},Zc=function(e,t,s){return 45===e?zc(t)||Xc(t,s):!!zc(e)||!(92!==e||!Xc(e,t))},qc=function(e,t,s){return 43===e||45===e?!!jc(t)||46===t&&jc(s):jc(46===e?t:e)},Jc=function(e){var t=0,s=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(s=-1),t++);for(var i=[];jc(e[t]);)i.push(e[t++]);var r=i.length?parseInt(Kh.apply(void 0,i),10):0;46===e[t]&&t++;for(var o=[];jc(e[t]);)o.push(e[t++]);var n=o.length,a=n?parseInt(Kh.apply(void 0,o),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;43!==e[t]&&45!==e[t]||(45===e[t]&&(l=-1),t++);for(var h=[];jc(e[t]);)h.push(e[t++]);var c=h.length?parseInt(Kh.apply(void 0,h),10):0;return s*(r+a*Math.pow(10,-n))*Math.pow(10,l*c)},$c={type:2},eA={type:3},tA={type:4},sA={type:13},iA={type:8},rA={type:21},oA={type:9},nA={type:10},aA={type:11},lA={type:12},hA={type:14},cA={type:23},AA={type:1},uA={type:25},pA={type:24},dA={type:26},fA={type:27},EA={type:28},mA={type:29},yA={type:31},gA={type:32},IA=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(zh(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==gA;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),s=this.peekCodePoint(1),i=this.peekCodePoint(2);if(Kc(t)||Xc(s,i)){var r=Zc(t,s,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),sA;break;case 39:return this.consumeStringToken(39);case 40:return $c;case 41:return eA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),hA;break;case 43:if(qc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return tA;case 45:var o=e,n=this.peekCodePoint(0),a=this.peekCodePoint(1);if(qc(o,n,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Zc(o,n,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(45===n&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),pA;break;case 46:if(qc(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(-1===l)return this.consumeToken()}break;case 58:return dA;case 59:return fA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),uA;break;case 64:var h=this.peekCodePoint(0),c=this.peekCodePoint(1),A=this.peekCodePoint(2);if(Zc(h,c,A))return{type:7,value:this.consumeName()};break;case 91:return EA;case 92:if(Xc(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return mA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),iA;break;case 123:return aA;case 125:return lA;case 117:case 85:var u=this.peekCodePoint(0),p=this.peekCodePoint(1);return 43!==u||!Qc(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),oA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),rA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),nA;break;case-1:return gA}return Wc(e)?(this.consumeWhiteSpace(),yA):jc(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):zc(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Kh(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Qc(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var s=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),s=!0;if(s)return{type:30,start:parseInt(Kh.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(Kh.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var i=parseInt(Kh.apply(void 0,e),16);if(45===this.peekCodePoint(0)&&Qc(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var r=[];Qc(t)&&r.length<6;)r.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(Kh.apply(void 0,r),16)}}return{type:30,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var s=this.consumeStringToken(this.consumeCodePoint());return 0===s.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:s.value}):(this.consumeBadUrlRemnants(),cA)}for(;;){var i=this.consumeCodePoint();if(-1===i||41===i)return{type:22,value:Kh.apply(void 0,e)};if(Wc(i))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:Kh.apply(void 0,e)}):(this.consumeBadUrlRemnants(),cA);if(34===i||39===i||40===i||Yc(i))return this.consumeBadUrlRemnants(),cA;if(92===i){if(!Xc(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),cA;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;Wc(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||-1===e)return;Xc(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var s=Math.min(5e4,e);t+=Kh.apply(void 0,this._value.splice(0,s)),e-=s}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",s=0;;){var i=this._value[s];if(-1===i||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(s)};if(10===i)return this._value.splice(0,s),AA;if(92===i){var r=this._value[s+1];-1!==r&&void 0!==r&&(10===r?(t+=this.consumeStringSlice(s),s=-1,this._value.shift()):Xc(i,r)&&(t+=this.consumeStringSlice(s),t+=Kh(this.consumeEscapedCodePoint()),s=-1))}s++}},e.prototype.consumeNumber=function(){var e=[],t=4,s=this.peekCodePoint(0);for(43!==s&&45!==s||e.push(this.consumeCodePoint());jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(46===s&&jc(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0),i=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===s||101===s)&&((43===i||45===i)&&jc(r)||jc(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;jc(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Jc(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],s=e[1],i=this.peekCodePoint(0),r=this.peekCodePoint(1),o=this.peekCodePoint(2);return Zc(i,r,o)?{type:15,number:t,flags:s,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:t,flags:s}):{type:17,number:t,flags:s}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Qc(e)){for(var t=Kh(e);Qc(this.peekCodePoint(0))&&t.length<6;)t+=Kh(this.consumeCodePoint());Wc(this.peekCodePoint(0))&&this.consumeCodePoint();var s=parseInt(t,16);return 0===s||function(e){return e>=55296&&e<=57343}(s)||s>1114111?65533:s}return-1===e?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Kc(t))e+=Kh(t);else{if(!Xc(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=Kh(this.consumeEscapedCodePoint())}}},e}(),vA=function(){function e(e){this._tokens=e}return e.create=function(t){var s=new IA;return s.write(t),new e(s.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},s=this.consumeToken();;){if(32===s.type||bA(s,e))return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue()),s=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var s=this.consumeToken();if(32===s.type||3===s.type)return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?gA:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),TA=function(e){return 15===e.type},_A=function(e){return 17===e.type},RA=function(e){return 20===e.type},PA=function(e){return 0===e.type},DA=function(e,t){return RA(e)&&e.value===t},NA=function(e){return 31!==e.type},CA=function(e){return 31!==e.type&&4!==e.type},OA=function(e){var t=[],s=[];return e.forEach((function(e){if(4===e.type){if(0===s.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(s),void(s=[])}31!==e.type&&s.push(e)})),s.length&&t.push(s),t},bA=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},SA=function(e){return 17===e.type||15===e.type},wA=function(e){return 16===e.type||SA(e)},xA=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},BA={type:17,number:0,flags:4},FA={type:16,number:50,flags:4},MA={type:16,number:100,flags:4},LA=function(e,t,s){var i=e[0],r=e[1];return[UA(i,t),UA(void 0!==r?r:i,s)]},UA=function(e,t){if(16===e.type)return e.number/100*t;if(TA(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},HA=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case"grad":return Math.PI/200*t.number;case"rad":return t.number;case"turn":return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},GA=function(e){return 15===e.type&&("deg"===e.unit||"grad"===e.unit||"rad"===e.unit||"turn"===e.unit)},kA=function(e){switch(e.filter(RA).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[BA,BA];case"to top":case"bottom":return VA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[BA,MA];case"to right":case"left":return VA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[MA,MA];case"to bottom":case"top":return VA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[MA,BA];case"to left":case"right":return VA(270)}return 0},VA=function(e){return Math.PI*e/180},jA=function(e,t){if(18===t.type){var s=qA[t.name];if(void 0===s)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return s(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);return zA(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),1)}if(4===t.value.length){i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);var n=t.value.substring(3,4);return zA(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),parseInt(n+n,16)/255)}if(6===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6);return zA(parseInt(i,16),parseInt(r,16),parseInt(o,16),1)}if(8===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6),n=t.value.substring(6,8);return zA(parseInt(i,16),parseInt(r,16),parseInt(o,16),parseInt(n,16)/255)}}if(20===t.type){var a=$A[t.value.toUpperCase()];if(void 0!==a)return a}return $A.TRANSPARENT},QA=function(e){return 0==(255&e)},WA=function(e){var t=255&e,s=255&e>>8,i=255&e>>16,r=255&e>>24;return t<255?"rgba("+r+","+i+","+s+","+t/255+")":"rgb("+r+","+i+","+s+")"},zA=function(e,t,s,i){return(e<<24|t<<16|s<<8|Math.round(255*i)<<0)>>>0},KA=function(e,t){if(17===e.type)return e.number;if(16===e.type){var s=3===t?1:255;return 3===t?e.number/100*s:Math.round(e.number/100*s)}return 0},YA=function(e,t){var s=t.filter(CA);if(3===s.length){var i=s.map(KA),r=i[0],o=i[1],n=i[2];return zA(r,o,n,1)}if(4===s.length){var a=s.map(KA),l=(r=a[0],o=a[1],n=a[2],a[3]);return zA(r,o,n,l)}return 0};function XA(e,t,s){return s<0&&(s+=1),s>=1&&(s-=1),s<1/6?(t-e)*s*6+e:s<.5?t:s<2/3?6*(t-e)*(2/3-s)+e:e}var ZA=function(e,t){var s=t.filter(CA),i=s[0],r=s[1],o=s[2],n=s[3],a=(17===i.type?VA(i.number):HA(e,i))/(2*Math.PI),l=wA(r)?r.number/100:0,h=wA(o)?o.number/100:0,c=void 0!==n&&wA(n)?UA(n,1):1;if(0===l)return zA(255*h,255*h,255*h,1);var A=h<=.5?h*(l+1):h+l-h*l,u=2*h-A,p=XA(u,A,a+1/3),d=XA(u,A,a),f=XA(u,A,a-1/3);return zA(255*p,255*d,255*f,c)},qA={hsl:ZA,hsla:ZA,rgb:YA,rgba:YA},JA=function(e,t){return jA(e,vA.create(t).parseComponentValue())},$A={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},eu={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(RA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},tu={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},su=function(e,t){var s=jA(e,t[0]),i=t[1];return i&&wA(i)?{color:s,stop:i}:{color:s,stop:null}},iu=function(e,t){var s=e[0],i=e[e.length-1];null===s.stop&&(s.stop=BA),null===i.stop&&(i.stop=MA);for(var r=[],o=0,n=0;no?r.push(l):r.push(o),o=l}else r.push(null)}var h=null;for(n=0;ne.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},au=function(e,t){var s=VA(180),i=[];return OA(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(s=kA(t));if(GA(o))return void(s=(HA(e,o)+VA(270))%VA(360))}var n=su(e,t);i.push(n)})),{angle:s,stops:i,type:1}},lu=function(e,t){var s=0,i=3,r=[],o=[];return OA(t).forEach((function(t,n){var a=!0;if(0===n?a=t.reduce((function(e,t){if(RA(t))switch(t.value){case"center":return o.push(FA),!1;case"top":case"left":return o.push(BA),!1;case"right":case"bottom":return o.push(MA),!1}else if(wA(t)||SA(t))return o.push(t),!1;return e}),a):1===n&&(a=t.reduce((function(e,t){if(RA(t))switch(t.value){case"circle":return s=0,!1;case"ellipse":return s=1,!1;case"contain":case"closest-side":return i=0,!1;case"farthest-side":return i=1,!1;case"closest-corner":return i=2,!1;case"cover":case"farthest-corner":return i=3,!1}else if(SA(t)||wA(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)),a){var l=su(e,t);r.push(l)}})),{size:i,shape:s,stops:r,position:o,type:2}},hu=function(e,t){if(22===t.type){var s={url:t.value,type:0};return e.cache.addImage(t.value),s}if(18===t.type){var i=Au[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)};var cu,Au={"linear-gradient":function(e,t){var s=VA(180),i=[];return OA(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&"to"===o.value)return void(s=kA(t));if(GA(o))return void(s=HA(e,o))}var n=su(e,t);i.push(n)})),{angle:s,stops:i,type:1}},"-moz-linear-gradient":au,"-ms-linear-gradient":au,"-o-linear-gradient":au,"-webkit-linear-gradient":au,"radial-gradient":function(e,t){var s=0,i=3,r=[],o=[];return OA(t).forEach((function(t,n){var a=!0;if(0===n){var l=!1;a=t.reduce((function(e,t){if(l)if(RA(t))switch(t.value){case"center":return o.push(FA),e;case"top":case"left":return o.push(BA),e;case"right":case"bottom":return o.push(MA),e}else(wA(t)||SA(t))&&o.push(t);else if(RA(t))switch(t.value){case"circle":return s=0,!1;case"ellipse":return s=1,!1;case"at":return l=!0,!1;case"closest-side":return i=0,!1;case"cover":case"farthest-side":return i=1,!1;case"contain":case"closest-corner":return i=2,!1;case"farthest-corner":return i=3,!1}else if(SA(t)||wA(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)}if(a){var h=su(e,t);r.push(h)}})),{size:i,shape:s,stops:r,position:o,type:2}},"-moz-radial-gradient":lu,"-ms-radial-gradient":lu,"-o-radial-gradient":lu,"-webkit-radial-gradient":lu,"-webkit-gradient":function(e,t){var s=VA(180),i=[],r=1;return OA(t).forEach((function(t,s){var o=t[0];if(0===s){if(RA(o)&&"linear"===o.value)return void(r=1);if(RA(o)&&"radial"===o.value)return void(r=2)}if(18===o.type)if("from"===o.name){var n=jA(e,o.values[0]);i.push({stop:BA,color:n})}else if("to"===o.name){n=jA(e,o.values[0]);i.push({stop:MA,color:n})}else if("color-stop"===o.name){var a=o.values.filter(CA);if(2===a.length){n=jA(e,a[1]);var l=a[0];_A(l)&&i.push({stop:{type:16,number:100*l.number,flags:l.flags},color:n})}}})),1===r?{angle:(s+VA(180))%VA(360),stops:i,type:r}:{size:3,shape:0,stops:i,position:[],type:r}}},uu={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var s=t[0];return 20===s.type&&"none"===s.value?[]:t.filter((function(e){return CA(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Au[e.name])}(e)})).map((function(t){return hu(e,t)}))}},pu={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(RA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},du={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return OA(t).map((function(e){return e.filter(wA)})).map(xA)}},fu={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return OA(t).map((function(e){return e.filter(RA).map((function(e){return e.value})).join(" ")})).map(Eu)}},Eu=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(cu||(cu={}));var mu,yu={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return OA(t).map((function(e){return e.filter(gu)}))}},gu=function(e){return RA(e)||wA(e)},Iu=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},vu=Iu("top"),Tu=Iu("right"),_u=Iu("bottom"),Ru=Iu("left"),Pu=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return xA(t.filter(wA))}}},Du=Pu("top-left"),Nu=Pu("top-right"),Cu=Pu("bottom-right"),Ou=Pu("bottom-left"),bu=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Su=bu("top"),wu=bu("right"),xu=bu("bottom"),Bu=bu("left"),Fu=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return TA(t)?t.number:0}}},Mu=Fu("top"),Lu=Fu("right"),Uu=Fu("bottom"),Hu=Fu("left"),Gu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ku={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Vu={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(RA).reduce((function(e,t){return e|ju(t.value)}),0)}},ju=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Qu={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Wu={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(mu||(mu={}));var zu,Ku={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?mu.STRICT:mu.NORMAL}},Yu={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xu=function(e,t){return RA(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:wA(e)?UA(e,t):t},Zu={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:hu(e,t)}},qu={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Ju={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},$u=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},ep=$u("top"),tp=$u("right"),sp=$u("bottom"),ip=$u("left"),rp={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(RA).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},op={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},np=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},ap=np("top"),lp=np("right"),hp=np("bottom"),cp=np("left"),Ap={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},up={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},pp={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&DA(t[0],"none")?[]:OA(t).map((function(t){for(var s={color:$A.TRANSPARENT,offsetX:BA,offsetY:BA,blur:BA},i=0,r=0;r1?1:0],this.overflowWrap=zp(e,op,t.overflowWrap),this.paddingTop=zp(e,ap,t.paddingTop),this.paddingRight=zp(e,lp,t.paddingRight),this.paddingBottom=zp(e,hp,t.paddingBottom),this.paddingLeft=zp(e,cp,t.paddingLeft),this.paintOrder=zp(e,Gp,t.paintOrder),this.position=zp(e,up,t.position),this.textAlign=zp(e,Ap,t.textAlign),this.textDecorationColor=zp(e,Pp,null!==(s=t.textDecorationColor)&&void 0!==s?s:t.color),this.textDecorationLine=zp(e,Dp,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=zp(e,pp,t.textShadow),this.textTransform=zp(e,dp,t.textTransform),this.transform=zp(e,fp,t.transform),this.transformOrigin=zp(e,gp,t.transformOrigin),this.visibility=zp(e,Ip,t.visibility),this.webkitTextStrokeColor=zp(e,kp,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=zp(e,Vp,t.webkitTextStrokeWidth),this.wordBreak=zp(e,vp,t.wordBreak),this.zIndex=zp(e,Tp,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return QA(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return wp(this.display,4)||wp(this.display,33554432)||wp(this.display,268435456)||wp(this.display,536870912)||wp(this.display,67108864)||wp(this.display,134217728)},e}(),Qp=function(e,t){this.content=zp(e,xp,t.content),this.quotes=zp(e,Lp,t.quotes)},Wp=function(e,t){this.counterIncrement=zp(e,Bp,t.counterIncrement),this.counterReset=zp(e,Fp,t.counterReset)},zp=function(e,t,s){var i=new IA,r=null!=s?s.toString():t.initialValue;i.write(r);var o=new vA(i.read());switch(t.type){case 2:var n=o.parseComponentValue();return t.parse(e,RA(n)?n.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return HA(e,o.parseComponentValue());case"color":return jA(e,o.parseComponentValue());case"image":return hu(e,o.parseComponentValue());case"length":var a=o.parseComponentValue();return SA(a)?a:BA;case"length-percentage":var l=o.parseComponentValue();return wA(l)?l:BA;case"time":return _p(e,o.parseComponentValue())}}},Kp=function(e,t){var s=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===s||t===s},Yp=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Kp(t,3),this.styles=new jp(e,window.getComputedStyle(t,null)),Yd(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=Wh(this.context,t),Kp(t,4)&&(this.flags|=16)},Xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zp="undefined"==typeof Uint8Array?[]:new Uint8Array(256),qp=0;qp=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",td="undefined"==typeof Uint8Array?[]:new Uint8Array(256),sd=0;sd>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},hd=function(e,t){var s,i,r,o=function(e){var t,s,i,r,o,n=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),c=Array.isArray(h)?h:new Uint8Array(h);for(t=0;t>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i=55296&&r<=56319&&s=s)return{done:!0,value:null};for(var e="×";in.x||r.y>n.y;return n=r,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(Ed,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,s=e.createElement("canvas"),i=s.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,";try{i.drawImage(t,0,0),s.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(Ed,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),s=100;t.width=s,t.height=s;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,s,s);var r=new Image,o=t.toDataURL();r.src=o;var n=dd(s,s,0,0,r);return i.fillStyle="red",i.fillRect(0,0,s,s),fd(n).then((function(t){i.drawImage(t,0,0);var r=i.getImageData(0,0,s,s).data;i.fillStyle="red",i.fillRect(0,0,s,s);var n=e.createElement("div");return n.style.backgroundImage="url("+o+")",n.style.height="100px",pd(r)?fd(dd(s,s,0,0,n)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),pd(i.getImageData(0,0,s,s).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Ed,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Ed,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Ed,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ed,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Ed,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},md=function(e,t){this.text=e,this.bounds=t},yd=function(e,t){var s=t.ownerDocument;if(s){var i=s.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var r=t.parentNode;if(r){r.replaceChild(i,t);var o=Wh(e,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return Qh.EMPTY},gd=function(e,t,s){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(e,t),r.setEnd(e,t+s),r},Id=function(e){if(Ed.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,s=ud(e),i=[];!(t=s.next()).done;)t.value&&i.push(t.value.slice());return i}(e)},vd=function(e,t){return 0!==t.letterSpacing?Id(e):function(e,t){if(Ed.SUPPORT_NATIVE_TEXT_SEGMENTATION){var s=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(s.segment(e)).map((function(e){return e.segment}))}return _d(e,t)}(e,t)},Td=[32,160,4961,65792,65793,4153,4241],_d=function(e,t){for(var s,i=function(e,t){var s=zh(e),i=kc(s,t),r=i[0],o=i[1],n=i[2],a=s.length,l=0,h=0;return{next:function(){if(h>=a)return{done:!0,value:null};for(var e="×";h0)if(Ed.SUPPORT_RANGE_BOUNDS){var r=gd(i,n,t.length).getClientRects();if(r.length>1){var a=Id(t),l=0;a.forEach((function(t){o.push(new md(t,Qh.fromDOMRectList(e,gd(i,l+n,t.length).getClientRects()))),l+=t.length}))}else o.push(new md(t,Qh.fromDOMRectList(e,r)))}else{var h=i.splitText(t.length);o.push(new md(t,yd(e,i))),i=h}else Ed.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));n+=t.length})),o}(e,this.text,s,t)},Pd=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Dd,Nd);case 2:return e.toUpperCase();default:return e}},Dd=/(^|\s|:|-|\(|\))([a-z])/g,Nd=function(e,t,s){return e.length>0?t+s.toUpperCase():e},Cd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.src=s.currentSrc||s.src,i.intrinsicWidth=s.naturalWidth,i.intrinsicHeight=s.naturalHeight,i.context.cache.addImage(i.src),i}return Hh(t,e),t}(Yp),Od=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.canvas=s,i.intrinsicWidth=s.width,i.intrinsicHeight=s.height,i}return Hh(t,e),t}(Yp),bd=function(e){function t(t,s){var i=e.call(this,t,s)||this,r=new XMLSerializer,o=Wh(t,s);return s.setAttribute("width",o.width+"px"),s.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(s)),i.intrinsicWidth=s.width.baseVal.value,i.intrinsicHeight=s.height.baseVal.value,i.context.cache.addImage(i.svg),i}return Hh(t,e),t}(Yp),Sd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.value=s.value,i}return Hh(t,e),t}(Yp),wd=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.start=s.start,i.reversed="boolean"==typeof s.reversed&&!0===s.reversed,i}return Hh(t,e),t}(Yp),xd=[{type:15,flags:0,unit:"px",number:3}],Bd=[{type:16,flags:0,number:50}],Fd="password",Md=function(e){function t(t,s){var i,r,o,n=e.call(this,t,s)||this;switch(n.type=s.type.toLowerCase(),n.checked=s.checked,n.value=0===(r=(i=s).type===Fd?new Array(i.value.length+1).join("•"):i.value).length?i.placeholder||"":r,"checkbox"!==n.type&&"radio"!==n.type||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(o=n.bounds).width>o.height?new Qh(o.left+(o.width-o.height)/2,o.top,o.height,o.height):o.width0)s.textNodes.push(new Rd(e,r,s.styles));else if(Kd(r))if(hf(r)&&r.assignedNodes)r.assignedNodes().forEach((function(t){return kd(e,t,s,i)}));else{var n=Vd(e,r);n.styles.isVisible()&&(Qd(r,n,i)?n.flags|=4:Wd(n.styles)&&(n.flags|=2),-1!==Gd.indexOf(r.tagName)&&(n.flags|=8),s.elements.push(n),r.slot,r.shadowRoot?kd(e,r.shadowRoot,n,i):af(r)||$d(r)||lf(r)||kd(e,r,n,i))}},Vd=function(e,t){return rf(t)?new Cd(e,t):tf(t)?new Od(e,t):$d(t)?new bd(e,t):Zd(t)?new Sd(e,t):qd(t)?new wd(e,t):Jd(t)?new Md(e,t):lf(t)?new Ld(e,t):af(t)?new Ud(e,t):of(t)?new Hd(e,t):new Yp(e,t)},jd=function(e,t){var s=Vd(e,t);return s.flags|=4,kd(e,t,s,s),s},Qd=function(e,t,s){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||ef(e)&&s.styles.isTransparent()},Wd=function(e){return e.isPositioned()||e.isFloating()},zd=function(e){return e.nodeType===Node.TEXT_NODE},Kd=function(e){return e.nodeType===Node.ELEMENT_NODE},Yd=function(e){return Kd(e)&&void 0!==e.style&&!Xd(e)},Xd=function(e){return"object"==typeof e.className},Zd=function(e){return"LI"===e.tagName},qd=function(e){return"OL"===e.tagName},Jd=function(e){return"INPUT"===e.tagName},$d=function(e){return"svg"===e.tagName},ef=function(e){return"BODY"===e.tagName},tf=function(e){return"CANVAS"===e.tagName},sf=function(e){return"VIDEO"===e.tagName},rf=function(e){return"IMG"===e.tagName},of=function(e){return"IFRAME"===e.tagName},nf=function(e){return"STYLE"===e.tagName},af=function(e){return"TEXTAREA"===e.tagName},lf=function(e){return"SELECT"===e.tagName},hf=function(e){return"SLOT"===e.tagName},cf=function(e){return e.tagName.indexOf("-")>0},Af=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,s=e.counterIncrement,i=e.counterReset,r=!0;null!==s&&s.forEach((function(e){var s=t.counters[e.counter];s&&0!==e.increment&&(r=!1,s.length||s.push(1),s[Math.max(0,s.length-1)]+=e.increment)}));var o=[];return r&&i.forEach((function(e){var s=t.counters[e.counter];o.push(e.counter),s||(s=t.counters[e.counter]=[]),s.push(e.reset)})),o},e}(),uf={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},pf={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},df={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},ff={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ef=function(e,t,s,i,r,o){return es?vf(e,r,o.length>0):i.integers.reduce((function(t,s,r){for(;e>=s;)e-=s,t+=i.values[r];return t}),"")+o},mf=function(e,t,s,i){var r="";do{s||e--,r=i(e)+r,e/=t}while(e*t>=t);return r},yf=function(e,t,s,i,r){var o=s-t+1;return(e<0?"-":"")+(mf(Math.abs(e),o,i,(function(e){return Kh(Math.floor(e%o)+t)}))+r)},gf=function(e,t,s){void 0===s&&(s=". ");var i=t.length;return mf(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+s},If=function(e,t,s,i,r,o){if(e<-9999||e>9999)return vf(e,4,r.length>0);var n=Math.abs(e),a=r;if(0===n)return t[0]+a;for(var l=0;n>0&&l<=4;l++){var h=n%10;0===h&&wp(o,1)&&""!==a?a=t[h]+a:h>1||1===h&&0===l||1===h&&1===l&&wp(o,2)||1===h&&1===l&&wp(o,4)&&e>100||1===h&&l>1&&wp(o,8)?a=t[h]+(l>0?s[l-1]:"")+a:1===h&&l>0&&(a=s[l-1]+a),n=Math.floor(n/10)}return(e<0?i:"")+a},vf=function(e,t,s){var i=s?". ":"",r=s?"、":"",o=s?", ":"",n=s?" ":"";switch(t){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var a=yf(e,48,57,!0,i);return a.length<4?"0"+a:a;case 4:return gf(e,"〇一二三四五六七八九",r);case 6:return Ef(e,1,3999,uf,3,i).toLowerCase();case 7:return Ef(e,1,3999,uf,3,i);case 8:return yf(e,945,969,!1,i);case 9:return yf(e,97,122,!1,i);case 10:return yf(e,65,90,!1,i);case 11:return yf(e,1632,1641,!0,i);case 12:case 49:return Ef(e,1,9999,pf,3,i);case 35:return Ef(e,1,9999,pf,3,i).toLowerCase();case 13:return yf(e,2534,2543,!0,i);case 14:case 30:return yf(e,6112,6121,!0,i);case 15:return gf(e,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return gf(e,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return If(e,"零一二三四五六七八九","十百千萬","負",r,14);case 47:return If(e,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",r,15);case 42:return If(e,"零一二三四五六七八九","十百千萬","负",r,14);case 41:return If(e,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",r,15);case 26:return If(e,"〇一二三四五六七八九","十百千万","マイナス",r,0);case 25:return If(e,"零壱弐参四伍六七八九","拾百千万","マイナス",r,7);case 31:return If(e,"영일이삼사오육칠팔구","십백천만","마이너스",o,7);case 33:return If(e,"零一二三四五六七八九","十百千萬","마이너스",o,0);case 32:return If(e,"零壹貳參四五六七八九","拾百千","마이너스",o,7);case 18:return yf(e,2406,2415,!0,i);case 20:return Ef(e,1,19999,ff,3,i);case 21:return yf(e,2790,2799,!0,i);case 22:return yf(e,2662,2671,!0,i);case 22:return Ef(e,1,10999,df,3,i);case 23:return gf(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return gf(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return yf(e,3302,3311,!0,i);case 28:return gf(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return gf(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return yf(e,3792,3801,!0,i);case 37:return yf(e,6160,6169,!0,i);case 38:return yf(e,4160,4169,!0,i);case 39:return yf(e,2918,2927,!0,i);case 40:return yf(e,1776,1785,!0,i);case 43:return yf(e,3046,3055,!0,i);case 44:return yf(e,3174,3183,!0,i);case 45:return yf(e,3664,3673,!0,i);case 46:return yf(e,3872,3881,!0,i);default:return yf(e,48,57,!0,i)}},Tf=function(){function e(e,t,s){if(this.context=e,this.options=s,this.scrolledElements=[],this.referenceElement=t,this.counters=new Af,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var s=this,i=Rf(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,n=i.contentWindow,a=n.document,l=Nf(i).then((function(){return kh(s,void 0,void 0,(function(){var e,s;return Vh(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(wf),n&&(n.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===t.top&&n.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-t.left,n.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(s=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Df(a)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,s)})).then((function(){return i}))]:[2,i]}}))}))}));return a.open(),a.write(bf(document.doctype)+""),Sf(this.referenceElement.ownerDocument,r,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(Kp(e,2),tf(e))return this.createCanvasClone(e);if(sf(e))return this.createVideoClone(e);if(nf(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return rf(t)&&(rf(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),cf(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Of(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var s=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=s,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var s=e.ownerDocument.createElement("img");try{return s.src=e.toDataURL(),s}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var r=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&r)o.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var n=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(n){var a=n.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var s=t.getContext("2d");try{return s&&(s.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||s.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},e.prototype.appendChildNode=function(e,t,s){Kd(t)&&("SCRIPT"===t.tagName||t.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Kd(t)&&nf(t)||e.appendChild(this.cloneNode(t,s))},e.prototype.cloneChildNodes=function(e,t,s){for(var i=this,r=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;r;r=r.nextSibling)if(Kd(r)&&hf(r)&&"function"==typeof r.assignedNodes){var o=r.assignedNodes();o.length&&o.forEach((function(e){return i.appendChildNode(t,e,s)}))}else this.appendChildNode(t,r,s)},e.prototype.cloneNode=function(e,t){if(zd(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var s=e.ownerDocument.defaultView;if(s&&Kd(e)&&(Yd(e)||Xd(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var r=s.getComputedStyle(e),o=s.getComputedStyle(e,":before"),n=s.getComputedStyle(e,":after");this.referenceElement===e&&Yd(i)&&(this.clonedReferenceElement=i),ef(i)&&Ff(i);var a=this.counters.parse(new Wp(this.context,r)),l=this.resolvePseudoContent(e,i,o,id.BEFORE);cf(e)&&(t=!0),sf(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(e,i,n,id.AFTER);return h&&i.appendChild(h),this.counters.pop(a),(r&&(this.options.copyStyles||Xd(e))&&!of(e)||t)&&Of(r,i),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(af(e)||lf(e))&&(af(i)||lf(i))&&(i.value=e.value),i}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,s,i){var r=this;if(s){var o=s.content,n=t.ownerDocument;if(n&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==s.display){this.counters.parse(new Wp(this.context,s));var a=new Qp(this.context,s),l=n.createElement("html2canvaspseudoelement");Of(s,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(n.createTextNode(t.value));else if(22===t.type){var s=n.createElement("img");s.src=t.value,s.style.opacity="1",l.appendChild(s)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(RA);i.length&&l.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(CA),h=o[0],c=o[1];if(h&&RA(h)){var A=r.counters.getCounterValue(h.value),u=c&&RA(c)?Ju.parse(r.context,c.value):3;l.appendChild(n.createTextNode(vf(A,u,!1)))}}else if("counters"===t.name){var p=t.values.filter(CA),d=(h=p[0],p[1]);c=p[2];if(h&&RA(h)){var f=r.counters.getCounterValues(h.value),E=c&&RA(c)?Ju.parse(r.context,c.value):3,m=d&&0===d.type?d.value:"",y=f.map((function(e){return vf(e,E,!1)})).join(m);l.appendChild(n.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(n.createTextNode(Up(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":l.appendChild(n.createTextNode(Up(a.quotes,--r.quoteDepth,!1)));break;default:l.appendChild(n.createTextNode(t.value))}})),l.className=xf+" "+Bf;var h=i===id.BEFORE?" "+xf:" "+Bf;return Xd(t)?t.className.baseValue+=h:t.className+=h,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(id||(id={}));var _f,Rf=function(e,t){var s=e.createElement("iframe");return s.className="html2canvas-container",s.style.visibility="hidden",s.style.position="fixed",s.style.left="-10000px",s.style.top="0px",s.style.border="0",s.width=t.width.toString(),s.height=t.height.toString(),s.scrolling="no",s.setAttribute("data-html2canvas-ignore","true"),e.body.appendChild(s),s},Pf=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Df=function(e){return Promise.all([].slice.call(e.images,0).map(Pf))},Nf=function(e){return new Promise((function(t,s){var i=e.contentWindow;if(!i)return s("No window assigned for iframe");var r=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var s=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(s),t(e))}),50)}}))},Cf=["all","d","content"],Of=function(e,t){for(var s=e.length-1;s>=0;s--){var i=e.item(s);-1===Cf.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},bf=function(e){var t="";return e&&(t+=""),t},Sf=function(e,t,s){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||s!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,s)},wf=function(e){var t=e[0],s=e[1],i=e[2];t.scrollLeft=s,t.scrollTop=i},xf="___html2canvas___pseudoelement_before",Bf="___html2canvas___pseudoelement_after",Ff=function(e){Mf(e,"."+xf+':before{\n content: "" !important;\n display: none !important;\n}\n .'+Bf+':after{\n content: "" !important;\n display: none !important;\n}')},Mf=function(e,t){var s=e.ownerDocument;if(s){var i=s.createElement("style");i.textContent=t,e.appendChild(i)}},Lf=function(){function e(){}return e.getOrigin=function(t){var s=e._link;return s?(s.href=t,s.href=s.href,s.protocol+s.hostname+s.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Uf=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Wf(e)||Vf(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return kh(this,void 0,void 0,(function(){var t,s,i,r,o=this;return Vh(this,(function(n){switch(n.label){case 0:return t=Lf.isSameOrigin(e),s=!jf(e)&&!0===this._options.useCORS&&Ed.SUPPORT_CORS_IMAGES&&!t,i=!jf(e)&&!t&&!Wf(e)&&"string"==typeof this._options.proxy&&Ed.SUPPORT_CORS_XHR&&!s,t||!1!==this._options.allowTaint||jf(e)||Wf(e)||i||s?(r=e,i?[4,this.proxy(r)]:[3,2]):[2];case 1:r=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(Qf(r)||s)&&(i.crossOrigin="anonymous"),i.src=r,!0===i.complete&&setTimeout((function(){return e(i)}),500),o._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,s=this._options.proxy;if(!s)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(r,o){var n=Ed.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===n)r(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return r(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(a.response)}else o("Failed to proxy resource "+i+" with status code "+a.status)},a.onerror=o;var l=s.indexOf("?")>-1?"&":"?";if(a.open("GET",""+s+l+"url="+encodeURIComponent(e)+"&responseType="+n),"text"!==n&&a instanceof XMLHttpRequest&&(a.responseType=n),t._options.imageTimeout){var h=t._options.imageTimeout;a.timeout=h,a.ontimeout=function(){return o("Timed out ("+h+"ms) proxying "+i)}}a.send()}))},e}(),Hf=/^data:image\/svg\+xml/i,Gf=/^data:image\/.*;base64,/i,kf=/^data:image\/.*/i,Vf=function(e){return Ed.SUPPORT_SVG_DRAWING||!zf(e)},jf=function(e){return kf.test(e)},Qf=function(e){return Gf.test(e)},Wf=function(e){return"blob"===e.substr(0,4)},zf=function(e){return"svg"===e.substr(-3).toLowerCase()||Hf.test(e)},Kf=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,s){return new e(this.x+t,this.y+s)},e}(),Yf=function(e,t,s){return new Kf(e.x+(t.x-e.x)*s,e.y+(t.y-e.y)*s)},Xf=function(){function e(e,t,s,i){this.type=1,this.start=e,this.startControl=t,this.endControl=s,this.end=i}return e.prototype.subdivide=function(t,s){var i=Yf(this.start,this.startControl,t),r=Yf(this.startControl,this.endControl,t),o=Yf(this.endControl,this.end,t),n=Yf(i,r,t),a=Yf(r,o,t),l=Yf(n,a,t);return s?new e(this.start,i,n,l):new e(l,a,o,this.end)},e.prototype.add=function(t,s){return new e(this.start.add(t,s),this.startControl.add(t,s),this.endControl.add(t,s),this.end.add(t,s))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Zf=function(e){return 1===e.type},qf=function(e){var t=e.styles,s=e.bounds,i=LA(t.borderTopLeftRadius,s.width,s.height),r=i[0],o=i[1],n=LA(t.borderTopRightRadius,s.width,s.height),a=n[0],l=n[1],h=LA(t.borderBottomRightRadius,s.width,s.height),c=h[0],A=h[1],u=LA(t.borderBottomLeftRadius,s.width,s.height),p=u[0],d=u[1],f=[];f.push((r+a)/s.width),f.push((p+c)/s.width),f.push((o+d)/s.height),f.push((l+A)/s.height);var E=Math.max.apply(Math,f);E>1&&(r/=E,o/=E,a/=E,l/=E,c/=E,A/=E,p/=E,d/=E);var m=s.width-a,y=s.height-A,g=s.width-c,I=s.height-d,v=t.borderTopWidth,T=t.borderRightWidth,_=t.borderBottomWidth,R=t.borderLeftWidth,P=UA(t.paddingTop,e.bounds.width),D=UA(t.paddingRight,e.bounds.width),N=UA(t.paddingBottom,e.bounds.width),C=UA(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||o>0?Jf(s.left+R/3,s.top+v/3,r-R/3,o-v/3,_f.TOP_LEFT):new Kf(s.left+R/3,s.top+v/3),this.topRightBorderDoubleOuterBox=r>0||o>0?Jf(s.left+m,s.top+v/3,a-T/3,l-v/3,_f.TOP_RIGHT):new Kf(s.left+s.width-T/3,s.top+v/3),this.bottomRightBorderDoubleOuterBox=c>0||A>0?Jf(s.left+g,s.top+y,c-T/3,A-_/3,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T/3,s.top+s.height-_/3),this.bottomLeftBorderDoubleOuterBox=p>0||d>0?Jf(s.left+R/3,s.top+I,p-R/3,d-_/3,_f.BOTTOM_LEFT):new Kf(s.left+R/3,s.top+s.height-_/3),this.topLeftBorderDoubleInnerBox=r>0||o>0?Jf(s.left+2*R/3,s.top+2*v/3,r-2*R/3,o-2*v/3,_f.TOP_LEFT):new Kf(s.left+2*R/3,s.top+2*v/3),this.topRightBorderDoubleInnerBox=r>0||o>0?Jf(s.left+m,s.top+2*v/3,a-2*T/3,l-2*v/3,_f.TOP_RIGHT):new Kf(s.left+s.width-2*T/3,s.top+2*v/3),this.bottomRightBorderDoubleInnerBox=c>0||A>0?Jf(s.left+g,s.top+y,c-2*T/3,A-2*_/3,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-2*T/3,s.top+s.height-2*_/3),this.bottomLeftBorderDoubleInnerBox=p>0||d>0?Jf(s.left+2*R/3,s.top+I,p-2*R/3,d-2*_/3,_f.BOTTOM_LEFT):new Kf(s.left+2*R/3,s.top+s.height-2*_/3),this.topLeftBorderStroke=r>0||o>0?Jf(s.left+R/2,s.top+v/2,r-R/2,o-v/2,_f.TOP_LEFT):new Kf(s.left+R/2,s.top+v/2),this.topRightBorderStroke=r>0||o>0?Jf(s.left+m,s.top+v/2,a-T/2,l-v/2,_f.TOP_RIGHT):new Kf(s.left+s.width-T/2,s.top+v/2),this.bottomRightBorderStroke=c>0||A>0?Jf(s.left+g,s.top+y,c-T/2,A-_/2,_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T/2,s.top+s.height-_/2),this.bottomLeftBorderStroke=p>0||d>0?Jf(s.left+R/2,s.top+I,p-R/2,d-_/2,_f.BOTTOM_LEFT):new Kf(s.left+R/2,s.top+s.height-_/2),this.topLeftBorderBox=r>0||o>0?Jf(s.left,s.top,r,o,_f.TOP_LEFT):new Kf(s.left,s.top),this.topRightBorderBox=a>0||l>0?Jf(s.left+m,s.top,a,l,_f.TOP_RIGHT):new Kf(s.left+s.width,s.top),this.bottomRightBorderBox=c>0||A>0?Jf(s.left+g,s.top+y,c,A,_f.BOTTOM_RIGHT):new Kf(s.left+s.width,s.top+s.height),this.bottomLeftBorderBox=p>0||d>0?Jf(s.left,s.top+I,p,d,_f.BOTTOM_LEFT):new Kf(s.left,s.top+s.height),this.topLeftPaddingBox=r>0||o>0?Jf(s.left+R,s.top+v,Math.max(0,r-R),Math.max(0,o-v),_f.TOP_LEFT):new Kf(s.left+R,s.top+v),this.topRightPaddingBox=a>0||l>0?Jf(s.left+Math.min(m,s.width-T),s.top+v,m>s.width+T?0:Math.max(0,a-T),Math.max(0,l-v),_f.TOP_RIGHT):new Kf(s.left+s.width-T,s.top+v),this.bottomRightPaddingBox=c>0||A>0?Jf(s.left+Math.min(g,s.width-R),s.top+Math.min(y,s.height-_),Math.max(0,c-T),Math.max(0,A-_),_f.BOTTOM_RIGHT):new Kf(s.left+s.width-T,s.top+s.height-_),this.bottomLeftPaddingBox=p>0||d>0?Jf(s.left+R,s.top+Math.min(I,s.height-_),Math.max(0,p-R),Math.max(0,d-_),_f.BOTTOM_LEFT):new Kf(s.left+R,s.top+s.height-_),this.topLeftContentBox=r>0||o>0?Jf(s.left+R+C,s.top+v+P,Math.max(0,r-(R+C)),Math.max(0,o-(v+P)),_f.TOP_LEFT):new Kf(s.left+R+C,s.top+v+P),this.topRightContentBox=a>0||l>0?Jf(s.left+Math.min(m,s.width+R+C),s.top+v+P,m>s.width+R+C?0:a-R+C,l-(v+P),_f.TOP_RIGHT):new Kf(s.left+s.width-(T+D),s.top+v+P),this.bottomRightContentBox=c>0||A>0?Jf(s.left+Math.min(g,s.width-(R+C)),s.top+Math.min(y,s.height+v+P),Math.max(0,c-(T+D)),A-(_+N),_f.BOTTOM_RIGHT):new Kf(s.left+s.width-(T+D),s.top+s.height-(_+N)),this.bottomLeftContentBox=p>0||d>0?Jf(s.left+R+C,s.top+I,Math.max(0,p-(R+C)),d-(_+N),_f.BOTTOM_LEFT):new Kf(s.left+R+C,s.top+s.height-(_+N))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(_f||(_f={}));var Jf=function(e,t,s,i,r){var o=(Math.sqrt(2)-1)/3*4,n=s*o,a=i*o,l=e+s,h=t+i;switch(r){case _f.TOP_LEFT:return new Xf(new Kf(e,h),new Kf(e,h-a),new Kf(l-n,t),new Kf(l,t));case _f.TOP_RIGHT:return new Xf(new Kf(e,t),new Kf(e+n,t),new Kf(l,h-a),new Kf(l,h));case _f.BOTTOM_RIGHT:return new Xf(new Kf(l,t),new Kf(l,t+a),new Kf(e+n,h),new Kf(e,h));case _f.BOTTOM_LEFT:default:return new Xf(new Kf(l,h),new Kf(l-n,h),new Kf(e,t+a),new Kf(e,t))}},$f=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},eE=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},tE=function(e,t,s){this.offsetX=e,this.offsetY=t,this.matrix=s,this.type=0,this.target=6},sE=function(e,t){this.path=e,this.target=t,this.type=1},iE=function(e){this.opacity=e,this.type=2,this.target=6},rE=function(e){return 1===e.type},oE=function(e,t){return e.length===t.length&&e.some((function(e,s){return e===t[s]}))},nE=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},aE=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new qf(this.container),this.container.styles.opacity<1&&this.effects.push(new iE(this.container.styles.opacity)),null!==this.container.styles.transform){var s=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new tE(s,i,r))}if(0!==this.container.styles.overflowX){var o=$f(this.curves),n=eE(this.curves);oE(o,n)?this.effects.push(new sE(o,6)):(this.effects.push(new sE(o,2)),this.effects.push(new sE(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),s=this.parent,i=this.effects.slice(0);s;){var r=s.effects.filter((function(e){return!rE(e)}));if(t||0!==s.container.styles.position||!s.parent){if(i.unshift.apply(i,r),t=-1===[2,3].indexOf(s.container.styles.position),0!==s.container.styles.overflowX){var o=$f(s.curves),n=eE(s.curves);oE(o,n)||i.unshift(new sE(n,6))}}else i.unshift.apply(i,r);s=s.parent}return i.filter((function(t){return wp(t.target,e)}))},e}(),lE=function(e,t,s,i){e.container.elements.forEach((function(r){var o=wp(r.flags,4),n=wp(r.flags,2),a=new aE(r,e);wp(r.styles.display,2048)&&i.push(a);var l=wp(r.flags,8)?[]:i;if(o||n){var h=o||r.styles.isPositioned()?s:t,c=new nE(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var A=r.styles.zIndex.order;if(A<0){var u=0;h.negativeZIndex.some((function(e,t){return A>e.element.container.styles.zIndex.order?(u=t,!1):u>0})),h.negativeZIndex.splice(u,0,c)}else if(A>0){var p=0;h.positiveZIndex.some((function(e,t){return A>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0})),h.positiveZIndex.splice(p,0,c)}else h.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?h.nonPositionedFloats.push(c):h.nonPositionedInlineLevel.push(c);lE(a,c,o?c:s,l)}else r.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),lE(a,t,s,l);wp(r.flags,8)&&hE(r,l)}))},hE=function(e,t){for(var s=e instanceof wd?e.start:1,i=e instanceof wd&&e.reversed,r=0;r0&&e.intrinsicHeight>0){var i=dE(e),r=eE(t);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return kh(this,void 0,void 0,(function(){var s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g;return Vh(this,(function(I){switch(I.label){case 0:this.applyEffects(e.getEffects(4)),s=e.container,i=e.curves,r=s.styles,o=0,n=s.textNodes,I.label=1;case 1:return o0&&_>0&&(m=i.ctx.createPattern(d,"repeat"),i.renderRepeat(g,m,P,D))):function(e){return 2===e.type}(s)&&(y=fE(e,t,[null,null,null]),g=y[0],I=y[1],v=y[2],T=y[3],_=y[4],R=0===s.position.length?[FA]:s.position,P=UA(R[0],T),D=UA(R[R.length-1],_),N=function(e,t,s,i,r){var o=0,n=0;switch(e.size){case 0:0===e.shape?o=n=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-i)),n=Math.min(Math.abs(s),Math.abs(s-r)));break;case 2:if(0===e.shape)o=n=Math.min(ou(t,s),ou(t,s-r),ou(t-i,s),ou(t-i,s-r));else if(1===e.shape){var a=Math.min(Math.abs(s),Math.abs(s-r))/Math.min(Math.abs(t),Math.abs(t-i)),l=nu(i,r,t,s,!0),h=l[0],c=l[1];n=a*(o=ou(h-t,(c-s)/a))}break;case 1:0===e.shape?o=n=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-i)),n=Math.max(Math.abs(s),Math.abs(s-r)));break;case 3:if(0===e.shape)o=n=Math.max(ou(t,s),ou(t,s-r),ou(t-i,s),ou(t-i,s-r));else if(1===e.shape){a=Math.max(Math.abs(s),Math.abs(s-r))/Math.max(Math.abs(t),Math.abs(t-i));var A=nu(i,r,t,s,!1);h=A[0],c=A[1],n=a*(o=ou(h-t,(c-s)/a))}}return Array.isArray(e.size)&&(o=UA(e.size[0],i),n=2===e.size.length?UA(e.size[1],r):o),[o,n]}(s,P,D,T,_),C=N[0],O=N[1],C>0&&O>0&&(b=i.ctx.createRadialGradient(I+P,v+D,0,I+P,v+D,C),iu(s.stops,2*C).forEach((function(e){return b.addColorStop(e.stop,WA(e.color))})),i.path(g),i.ctx.fillStyle=b,C!==O?(S=e.bounds.left+.5*e.bounds.width,w=e.bounds.top+.5*e.bounds.height,B=1/(x=O/C),i.ctx.save(),i.ctx.translate(S,w),i.ctx.transform(1,0,0,x,0,0),i.ctx.translate(-S,-w),i.ctx.fillRect(I,B*(v-w)+w,T,_*B),i.ctx.restore()):i.ctx.fill())),F.label=6;case 6:return t--,[2]}}))},i=this,r=0,o=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return r0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return n++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,s,i,r){return kh(this,void 0,void 0,(function(){var o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I;return Vh(this,(function(v){return this.ctx.save(),o=function(e,t){switch(t){case 0:return AE(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return AE(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return AE(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return AE(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(i,s),n=cE(i,s),2===r&&(this.path(n),this.ctx.clip()),Zf(n[0])?(a=n[0].start.x,l=n[0].start.y):(a=n[0].x,l=n[0].y),Zf(n[1])?(h=n[1].end.x,c=n[1].end.y):(h=n[1].x,c=n[1].y),A=0===s||2===s?Math.abs(a-h):Math.abs(l-c),this.ctx.beginPath(),3===r?this.formatPath(o):this.formatPath(n.slice(0,2)),u=t<3?3*t:2*t,p=t<3?2*t:t,3===r&&(u=t,p=t),d=!0,A<=2*u?d=!1:A<=2*u+p?(u*=f=A/(2*u+p),p*=f):(E=Math.floor((A+p)/(u+p)),m=(A-E*u)/(E-1),p=(y=(A-(E+1)*u)/E)<=0||Math.abs(p-m){})),VE(this,"_reject",(()=>{})),this.name=e,this.workerThread=t,this.result=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){UE(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){UE(this.isRunning),this.isRunning=!1,this._reject(e)}}class QE{}const WE=new Map;function zE(e){UE(e.source&&!e.url||!e.source&&e.url);let t=WE.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return KE((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),WE.set(e.url,t)),e.source&&(t=KE(e.source),WE.set(e.source,t))),UE(t),t}function KE(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function YE(e,t=!0,s){const i=s||new Set;if(e){if(XE(e))i.add(e);else if(XE(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(const s in e)YE(e[s],t,i)}else;return void 0===s?Array.from(i):[]}function XE(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const ZE=()=>{};class qE{static isSupported(){return"undefined"!=typeof Worker&&HE||void 0!==typeof QE}constructor(e){VE(this,"name",void 0),VE(this,"source",void 0),VE(this,"url",void 0),VE(this,"terminated",!1),VE(this,"worker",void 0),VE(this,"onMessage",void 0),VE(this,"onError",void 0),VE(this,"_loadableURL","");const{name:t,source:s,url:i}=e;UE(s||i),this.name=t,this.source=s,this.url=i,this.onMessage=ZE,this.onError=e=>console.log(e),this.worker=HE?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=ZE,this.onError=ZE,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||YE(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=zE({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new QE(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new QE(this.source,{eval:!0})}return e.on("message",(e=>{this.onMessage(e)})),e.on("error",(e=>{this.onError(e)})),e.on("exit",(e=>{})),e}}class JE{static isSupported(){return qE.isSupported()}constructor(e){VE(this,"name","unnamed"),VE(this,"source",void 0),VE(this,"url",void 0),VE(this,"maxConcurrency",1),VE(this,"maxMobileConcurrency",1),VE(this,"onDebug",(()=>{})),VE(this,"reuseWorkers",!0),VE(this,"props",{}),VE(this,"jobQueue",[]),VE(this,"idleQueue",[]),VE(this,"count",0),VE(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach((e=>e.destroy())),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,s)=>e.done(s)),s=((e,t)=>e.error(t))){const i=new Promise((i=>(this.jobQueue.push({name:e,onMessage:t,onError:s,onStart:i}),this)));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const s=new jE(t.name,e);e.onMessage=e=>t.onMessage(s,e.type,e.payload),e.onError=e=>t.onError(s,e),t.onStart(s);try{await s.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class em{static isSupported(){return qE.isSupported()}static getWorkerFarm(e={}){return em._workerFarm=em._workerFarm||new em({}),em._workerFarm.setProps(e),em._workerFarm}constructor(e){VE(this,"props",void 0),VE(this,"workerPools",new Map),this.props={...$E},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:s,url:i}=e;let r=this.workerPools.get(t);return r||(r=new JE({name:t,source:s,url:i}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}VE(em,"_workerFarm",void 0);const tm={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},sm=tm.window||tm.self||tm.global,im=tm.process||{},rm="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",om=!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}();class nm{constructor(e,t,s="sessionStorage"){this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function am(e,t,s,i=600){const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const lm={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function hm(e){return"string"==typeof e?lm[e.toUpperCase()]||lm.WHITE:e}function cm(e,t){if(!e)throw new Error(t||"Assertion failed")}function Am(){let e;if(om&&sm.performance)e=sm.performance.now();else if(im.hrtime){const t=im.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const um={debug:om&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},pm={enabled:!0,level:0};function dm(){}const fm={},Em={once:!0};function mm(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}class ym{constructor({id:e}={id:""}){this.id=e,this.VERSION=rm,this._startTs=Am(),this._deltaTs=Am(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new nm("__probe-".concat(this.id,"__"),pm),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Am()-this._startTs).toPrecision(10))}getDelta(){return Number((Am()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){cm(e,t)}warn(e){return this._getLogFunction(0,e,um.warn,arguments,Em)}error(e){return this._getLogFunction(0,e,um.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,um.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,um.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,um.debug||um.info,arguments,Em)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||dm,s&&[s],{tag:mm(t)}):dm}image({logLevel:e,priority:t,image:s,message:i="",scale:r=1}){return this._shouldLog(e||t)?om?function({image:e,message:t="",scale:s=1}){if("string"==typeof e){const i=new Image;return i.onload=()=>{const e=am(i,t,s);console.log(...e)},i.src=e,dm}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...am(e,t,s)),dm;if("canvas"===i.toLowerCase()){const i=new Image;return i.onload=()=>console.log(...am(i,t,s)),i.src=e.toDataURL(),dm}return dm}({image:s,message:i,scale:r}):function({image:e,message:t="",scale:s=1}){let i=null;try{i=module.require("asciify-image")}catch(e){}if(i)return()=>i(e,{fit:"box",width:"".concat(Math.round(80*s),"%")}).then((e=>console.log(e)));return dm}({image:s,message:i,scale:r}):dm}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||dm)}group(e,t,s={collapsed:!1}){s=Im({logLevel:e,message:t,opts:s});const{collapsed:i}=s;return s.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(s)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||dm)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=gm(e)}_getLogFunction(e,t,s,i=[],r){if(this._shouldLog(e)){r=Im({logLevel:e,message:t,args:i,opts:r}),cm(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=Am();const o=r.tag||r.message;if(r.once){if(fm[o])return dm;fm[o]=Am()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e,t=8){const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return om||"string"!=typeof e||(t&&(t=hm(t),e="[".concat(t,"m").concat(e,"")),s&&(t=hm(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return dm}}function gm(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return cm(Number.isFinite(t)&&t>=0),t}function Im(e){const{logLevel:t,message:s}=e;e.logLevel=gm(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(e.args=i,typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return cm("string"===r||"object"===r),Object.assign(e,e.opts)}ym.VERSION=rm,new ym({id:"loaders.gl"});function vm(){return!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}()}new class{constructor(){VE(this,"console",void 0),this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const Tm={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},_m=Tm.window||Tm.self||Tm.global,Rm=Tm.process||{},Pm="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";vm();class Dm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";VE(this,"storage",void 0),VE(this,"id",void 0),VE(this,"config",{}),this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function Nm(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}let Cm;function Om(e){return"string"==typeof e?Cm[e.toUpperCase()]||Cm.WHITE:e}function bm(e,t){if(!e)throw new Error(t||"Assertion failed")}function Sm(){let e;var t,s;if(vm&&"performance"in _m)e=null==_m||null===(t=_m.performance)||void 0===t||null===(s=t.now)||void 0===s?void 0:s.call(t);else if("hrtime"in Rm){var i;const t=null==Rm||null===(i=Rm.hrtime)||void 0===i?void 0:i.call(Rm);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(Cm||(Cm={}));const wm={debug:vm&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},xm={enabled:!0,level:0};function Bm(){}const Fm={},Mm={once:!0};class Lm{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};VE(this,"id",void 0),VE(this,"VERSION",Pm),VE(this,"_startTs",Sm()),VE(this,"_deltaTs",Sm()),VE(this,"_storage",void 0),VE(this,"userData",{}),VE(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new Dm("__probe-".concat(this.id,"__"),xm),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Sm()-this._startTs).toPrecision(10))}getDelta(){return Number((Sm()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){bm(e,t)}warn(e){return this._getLogFunction(0,e,wm.warn,arguments,Mm)}error(e){return this._getLogFunction(0,e,wm.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,wm.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,wm.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),r=2;r{const t=Nm(e,s,i);console.log(...t)},e.src=t,Bm}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...Nm(t,s,i)),Bm;if("canvas"===r.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...Nm(e,s,i)),e.src=t.toDataURL(),Bm}return Bm}({image:i,message:r,scale:o}):function(e){let{image:t,message:s="",scale:i=1}=e,r=null;try{r=module.require("asciify-image")}catch(e){}if(r)return()=>r(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return Bm}({image:i,message:r,scale:o}):Bm}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Bm)}group(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const i=Hm({logLevel:e,message:t,opts:s}),{collapsed:r}=s;return i.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Bm)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Um(e)}_getLogFunction(e,t,s,i,r){if(this._shouldLog(e)){r=Hm({logLevel:e,message:t,args:i,opts:r}),bm(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=Sm();const o=r.tag||r.message;if(r.once){if(Fm[o])return Bm;Fm[o]=Sm()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return vm||"string"!=typeof e||(t&&(t=Om(t),e="[".concat(t,"m").concat(e,"")),s&&(t=Om(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return Bm}}function Um(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return bm(Number.isFinite(t)&&t>=0),t}function Hm(e){const{logLevel:t,message:s}=e;e.logLevel=Um(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return bm("string"===r||"object"===r),Object.assign(e,{args:i},e.opts)}function Gm(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}var km,Vm,jm,Qm,Wm,zm,Km,Ym,Xm;let Zm;VE(Lm,"VERSION",Pm),new Lm({id:"loaders.gl"}),(Xm=km||(km={}))[Xm.NONE=0]="NONE",Xm[Xm.BASISLZ=1]="BASISLZ",Xm[Xm.ZSTD=2]="ZSTD",Xm[Xm.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(Vm||(Vm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(jm||(jm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Qm||(Qm={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Wm||(Wm={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(zm||(zm={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(Km||(Km={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Ym||(Ym={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(Zm||(Zm={}));const qm={DEFAULT:{}};function Jm(e,t,s={}){const i="lightgrey",r=s.hoverColor||"rgba(0,0,0,0.4)",o=500,n=o+o/3,a=n/24,l=[{boundary:[6,6,6,6],color:s.frontColor||s.color||"#55FF55"},{boundary:[18,6,6,6],color:s.backColor||s.color||"#55FF55"},{boundary:[12,6,6,6],color:s.leftColor||s.color||"#FF5555"},{boundary:[0,6,6,6],color:s.rightColor||s.color||"#FF5555"},{boundary:[6,0,6,6],color:s.topColor||s.color||"#7777FF"},{boundary:[6,12,6,6],color:s.bottomColor||s.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];s.frontColor||s.color,s.backColor||s.color,s.leftColor||s.color,s.rightColor||s.color,s.topColor||s.color,s.bottomColor||s.color;const c=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let e=0,t=h.length;e=r[0]*a&&t<=(r[0]+r[2])*a&&s>=r[1]*a&&s<=(r[1]+r[3])*a)return i}}return-1},this.setAreaHighlighted=function(e,t){var s=A[e];if(!s)throw"Area not found: "+e;s.highlighted=!!t,f()},this.getAreaDir=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const $m=u.vec3(),ey=u.vec3();u.mat4();class ty extends n{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new jt(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(e){return void this.error(e)}const s=this._navCubeScene;s.clearLights(),new Ze(s,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ze(s,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ze(s,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=s.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,s.edgeMaterial.edgeColor=[.2,.2,.2],s.edgeMaterial.edgeAlpha=.6,this._zUp=Boolean(e.camera.zUp);var i=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=function(){const e=u.mat4();return function(t,s,r){return u.identityMat4(e),u.rotationMat4v(t*i._projectNorthOffsetAngle*u.DEGTORAD,[0,1,0],e),u.transformVec3(e,s,r)}}();this._synchCamera=function(){var t=u.rotationMat4c(-90*u.DEGTORAD,1,0,0),s=u.vec3(),o=u.vec3(),n=u.vec3();return function(){var a=e.camera.eye,l=e.camera.look,h=e.camera.up;s=u.mulVec3Scalar(u.normalizeVec3(u.subVec3(a,l,s)),5),i._isProjectNorth&&i._projectNorthOffsetAngle&&(s=r(-1,s,$m),h=r(-1,h,ey)),i._zUp?(u.transformVec3(t,s,o),u.transformVec3(t,h,n),i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=u.transformVec3(t,s,o),i._navCubeCamera.up=u.transformPoint3(t,h,n)):(i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=s,i._navCubeCamera.up=h)}}(),this._cubeTextureCanvas=new Jm(e,s,t),this._cubeSampler=new ii(s,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:1001,wrapT:1001}),this._cubeMesh=new Bs(s,{geometry:new ht(s,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new dt(s,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=!1===t.shadowVisible?null:new Bs(s,{geometry:new ht(s,Ms({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new dt(s,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",(()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())})),this._onCameraFOV=e.camera.perspective.on("fov",(e=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=e)})),this._onCameraProjection=e.camera.on("projection",(e=>{this._synchProjection&&(this._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var o=-1;function n(e){var t=[0,0];if(e){for(var s=e.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var a,l,h=null,c=null,A=!1,p=!1,d=.5;i._navCubeCanvas.addEventListener("mouseenter",i._onMouseEnter=function(e){p=!0}),i._navCubeCanvas.addEventListener("mouseleave",i._onMouseLeave=function(e){p=!1}),i._navCubeCanvas.addEventListener("mousedown",i._onMouseDown=function(e){if(1===e.which){h=e.x,c=e.y,a=e.clientX,l=e.clientY;var t=n(e),i=s.pick({canvasPos:t});A=!!i}}),document.addEventListener("mouseup",i._onMouseUp=function(e){if(1===e.which&&(A=!1,null!==h)){var t=n(e),a=s.pick({canvasPos:t,pickSurface:!0});if(a&&a.uv){var l=i._cubeTextureCanvas.getArea(a.uv);if(l>=0&&(document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0)){if(i._cubeTextureCanvas.setAreaHighlighted(l,!0),o=l,i._repaint(),e.xh+3||e.yc+3)return;var u=i._cubeTextureCanvas.getAreaDir(l);if(u){var p=i._cubeTextureCanvas.getAreaUp(l);i._isProjectNorth&&i._projectNorthOffsetAngle&&(u=r(1,u,$m),p=r(1,p,ey)),f(u,p,(function(){o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0&&(i._cubeTextureCanvas.setAreaHighlighted(l,!1),o=-1,i._repaint())}))}}}}}),document.addEventListener("mousemove",i._onMouseMove=function(t){if(o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),1!==t.buttons||A){if(A){var r=t.clientX,h=t.clientY;return document.body.style.cursor="move",void function(t,s){var i=(t-a)*-d,r=(s-l)*-d;e.camera.orbitYaw(i),e.camera.orbitPitch(-r),a=t,l=s}(r,h)}if(p){var c=n(t),u=s.pick({canvasPos:c,pickSurface:!0});if(u){if(u.uv){document.body.style.cursor="pointer";var f=i._cubeTextureCanvas.getArea(u.uv);if(f===o)return;o>=0&&i._cubeTextureCanvas.setAreaHighlighted(o,!1),f>=0&&(i._cubeTextureCanvas.setAreaHighlighted(f,!0),i._repaint(),o=f)}}else document.body.style.cursor="default",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1)}}});var f=function(){var t=u.vec3();return function(s,r,o){var n=i._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,a=u.getAABB3Diag(n);u.getAABB3Center(n,t);var l=Math.abs(a/Math.tan(i._cameraFitFOV*u.DEGTORAD));e.cameraControl.pivotPos=t,i._cameraFly?e.cameraFlight.flyTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV,duration:i._cameraFlyDuration},o):e.cameraFlight.jumpTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV},o)}}();this._onUpdated=e.localeService.on("updated",(()=>{this._cubeTextureCanvas.clear(),this._repaint()})),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return!!this._navCubeCanvas&&this._cubeMesh.visible}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}u.vec3();const sy=new Float64Array([0,0,1]),iy=new Float64Array(4);class ry{constructor(e){this.id=null,this._viewer=e.viewer,this._visible=!1,this._pos=u.vec3(),this._origin=u.vec3(),this._rtcPos=u.vec3(),this._baseDir=u.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}_setSectionPlane(e){this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(()=>{this._setPos(this._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(()=>{this._ignoreNextSectionPlaneDirUpdate?this._ignoreNextSectionPlaneDirUpdate=!1:this._setDir(this._sectionPlane.dir)})))}get sectionPlane(){return this._sectionPlane}_setPos(e){this._pos.set(e),S(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}_setDir(e){this._baseDir.set(e),this._rootNode.quaternion=u.vec3PairToQuaternion(sy,e,iy)}_setSectionPlaneDir(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}setVisible(e=!0){if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}getVisible(){return this._visible}setCulled(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}_createNodes(){const e=!1,t=this._viewer.scene,s=.01;this._rootNode=new Ys(t,{position:[0,0,0],scale:[5,5,5]});const i=this._rootNode,r={arrowHead:new ht(i,Ms({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new ht(i,Ms({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new ht(i,Ms({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new ht(i,hi({radius:.8,tube:s,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new ht(i,hi({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new ht(i,hi({radius:.8,tube:s,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new ht(i,Ms({radiusTop:s,radiusBottom:s,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new ht(i,Ms({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},o={pickable:new dt(i,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new dt(i,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new Et(i,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new dt(i,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new Et(i,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new dt(i,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new Et(i,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new dt(i,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Et(i,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Et(i,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:i.addChild(new Bs(i,{geometry:new ht(i,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new dt(i,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Et(i,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1]}),e),planeFrame:i.addChild(new Bs(i,{geometry:new ht(i,hi({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new dt(i,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Et(i,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45]}),e),xCurve:i.addChild(new Bs(i,{geometry:r.curve,material:o.red,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveHandle:i.addChild(new Bs(i,{geometry:r.curveHandle,material:o.pickable,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveArrow1:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,-.07,-.8,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(0*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xCurveArrow2:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,-.8,-.07,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurve:i.addChild(new Bs(i,{geometry:r.curve,material:o.green,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveHandle:i.addChild(new Bs(i,{geometry:r.curveHandle,material:o.pickable,rotation:[-90,0,0],pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveArrow1:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(.07,0,-.8,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurveArrow2:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(.8,0,-.07,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurve:i.addChild(new Bs(i,{geometry:r.curve,material:o.blue,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zCurveHandle:i.addChild(new Bs(i,{geometry:r.curveHandle,material:o.pickable,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveCurveArrow1:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(.8,-.07,0,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4());return u.mulMat4(e,t,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveArrow2:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(.05,-.8,0,u.identityMat4()),t=u.scaleMat4v([.6,.6,.6],u.identityMat4()),s=u.rotationMat4v(90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(u.mulMat4(e,t,u.identityMat4()),s,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),center:i.addChild(new Bs(i,{geometry:new ht(i,Ls({radius:.05})),material:o.center,pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrowHandle:i.addChild(new Bs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xAxis:i.addChild(new Bs(i,{geometry:r.axis,material:o.red,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisHandle:i.addChild(new Bs(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrowHandle:i.addChild(new Bs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1,opacity:.2}),e),yShaft:i.addChild(new Bs(i,{geometry:r.axis,material:o.green,position:[0,-.5,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yShaftHandle:i.addChild(new Bs(i,{geometry:r.axisHandle,material:o.pickable,position:[0,-.5,0],pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrowHandle:i.addChild(new Bs(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zShaft:i.addChild(new Bs(i,{geometry:r.axis,material:o.blue,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),clippable:!1,pickable:!1,collidable:!0,visible:!1}),e),zAxisHandle:i.addChild(new Bs(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=u.translateMat4c(0,.5,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),clippable:!1,pickable:!0,collidable:!0,visible:!1}),e)},this._affordanceMeshes={planeFrame:i.addChild(new Bs(i,{geometry:new ht(i,hi({center:[0,0,0],radius:2,tube:s,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new dt(i,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new Et(i,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45]}),e),xHoop:i.addChild(new Bs(i,{geometry:r.hoop,material:o.red,highlighted:!0,highlightMaterial:o.highlightRed,matrix:function(){const e=u.rotationMat4v(90*u.DEGTORAD,[0,1,0],u.identityMat4()),t=u.rotationMat4v(270*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yHoop:i.addChild(new Bs(i,{geometry:r.hoop,material:o.green,highlighted:!0,highlightMaterial:o.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zHoop:i.addChild(new Bs(i,{geometry:r.hoop,material:o.blue,highlighted:!0,highlightMaterial:o.highlightBlue,matrix:u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4()),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHeadBig,material:o.red,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[0,0,1],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHeadBig,material:o.green,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(180*u.DEGTORAD,[1,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Bs(i,{geometry:r.arrowHeadBig,material:o.blue,matrix:function(){const e=u.translateMat4c(0,1.1,0,u.identityMat4()),t=u.rotationMat4v(-90*u.DEGTORAD,[.8,0,0],u.identityMat4());return u.mulMat4(t,e,u.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e)}}_bindEvents(){const e=this;var t=!1;const s=-1,i=0,r=1,o=2,n=3,a=4,l=5,h=this._rootNode;var c=null,A=null;const p=u.vec2(),d=u.vec3([1,0,0]),f=u.vec3([0,1,0]),E=u.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,y=this._viewer.camera,g=this._viewer.scene;{const e=u.vec3([0,0,0]);let t=-1;this._onCameraViewMatrix=g.camera.on("viewMatrix",(()=>{})),this._onCameraProjMatrix=g.camera.on("projMatrix",(()=>{})),this._onSceneTick=g.on("tick",(()=>{const s=Math.abs(u.lenVec3(u.subVec3(g.camera.eye,this._pos,e)));if(s!==t&&"perspective"===y.projection){const e=.07*(Math.tan(y.perspective.fov*u.DEGTORAD)*s);h.scale=[e,e,e],t=s}if("ortho"===y.projection){const e=y.ortho.scale/10;h.scale=[e,e,e],t=s}}))}const I=function(){const e=new Float64Array(2);return function(t){if(t){for(var s=t.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;e[0]=t.pageX-i,e[1]=t.pageY-r}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),v=function(){const t=u.mat4();return function(s,i){return u.quaternionToMat4(e._rootNode.quaternion,t),u.transformVec3(t,s,i),u.normalizeVec3(i),i}}();var T=function(){const e=u.vec3();return function(t){const s=Math.abs(t[0]);return s>Math.abs(t[1])&&s>Math.abs(t[2])?u.cross3Vec3(t,[0,1,0],e):u.cross3Vec3(t,[1,0,0],e),u.cross3Vec3(e,t,e),u.normalizeVec3(e),e}}();const _=function(){const t=u.vec3(),s=u.vec3(),i=u.vec4();return function(r,o,n){v(r,i);const a=T(i,o,n);P(o,a,t),P(n,a,s),u.subVec3(s,t);const l=u.dotVec3(s,i);e._pos[0]+=i[0]*l,e._pos[1]+=i[1]*l,e._pos[2]+=i[2]*l,e._rootNode.position=e._pos,e._sectionPlane&&(e._sectionPlane.pos=e._pos)}}();var R=function(){const t=u.vec4(),s=u.vec4(),i=u.vec4(),r=u.vec4();return function(o,n,a){v(o,r);if(!(P(n,r,t)&&P(a,r,s))){const e=T(r,n,a);P(n,e,t,1),P(a,e,s,1);var l=u.dotVec3(t,r);t[0]-=l*r[0],t[1]-=l*r[1],t[2]-=l*r[2],l=u.dotVec3(s,r),s[0]-=l*r[0],s[1]-=l*r[1],s[2]-=l*r[2]}u.normalizeVec3(t),u.normalizeVec3(s),l=u.dotVec3(t,s),l=u.clamp(l,-1,1);var h=Math.acos(l)*u.RADTODEG;u.cross3Vec3(t,s,i),u.dotVec3(i,r)<0&&(h=-h),e._rootNode.rotate(o,h),D()}}(),P=function(){const t=u.vec4([0,0,0,1]),s=u.mat4();return function(i,r,o,n){n=n||0,t[0]=i[0]/m.width*2-1,t[1]=-(i[1]/m.height*2-1),t[2]=0,t[3]=1,u.mulMat4(y.projMatrix,y.viewMatrix,s),u.inverseMat4(s),u.transformVec4(s,t,t),u.mulVec4Scalar(t,1/t[3]);var a=y.eye;u.subVec4(t,a,t);const l=e._sectionPlane.pos;var h=-u.dotVec3(l,r)-n,c=u.dotVec3(r,t);if(Math.abs(c)>.005){var A=-(u.dotVec3(r,a)+h)/c;return u.mulVec3Scalar(t,A,o),u.addVec3(o,a),u.subVec3(o,l,o),!0}return!1}}();const D=function(){const t=u.vec3(),s=u.mat4();return function(){e.sectionPlane&&(u.quaternionToMat4(h.quaternion,s),u.transformVec3(s,[0,0,1],t),e._setSectionPlaneDir(t))}}();var N,C=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(e=>{if(!this._visible)return;if(C)return;var h;t=!1,N&&(N.visible=!1);switch(e.entity.id){case this._displayMeshes.xAxisArrowHandle.id:case this._displayMeshes.xAxisHandle.id:h=this._affordanceMeshes.xAxisArrow,c=i;break;case this._displayMeshes.yAxisArrowHandle.id:case this._displayMeshes.yShaftHandle.id:h=this._affordanceMeshes.yAxisArrow,c=r;break;case this._displayMeshes.zAxisArrowHandle.id:case this._displayMeshes.zAxisHandle.id:h=this._affordanceMeshes.zAxisArrow,c=o;break;case this._displayMeshes.xCurveHandle.id:h=this._affordanceMeshes.xHoop,c=n;break;case this._displayMeshes.yCurveHandle.id:h=this._affordanceMeshes.yHoop,c=a;break;case this._displayMeshes.zCurveHandle.id:h=this._affordanceMeshes.zHoop,c=l;break;default:return void(c=s)}h&&(h.visible=!0),N=h,t=!0})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOutEntity",(e=>{this._visible&&(N&&(N.visible=!1),N=null,c=s)})),m.addEventListener("mousedown",this._canvasMouseDownListener=e=>{if(e.preventDefault(),this._visible&&t&&(this._viewer.cameraControl.pointerEnabled=!1,1===e.which)){C=!0;var s=I(e);A=c,p[0]=s[0],p[1]=s[1]}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=e=>{if(!this._visible)return;if(!C)return;var t=I(e);const s=t[0],h=t[1];switch(A){case i:_(d,p,t);break;case r:_(f,p,t);break;case o:_(E,p,t);break;case n:R(d,p,t);break;case a:R(f,p,t);break;case l:R(E,p,t)}p[0]=s,p[1]=h}),m.addEventListener("mouseup",this._canvasMouseUpListener=e=>{this._visible&&(this._viewer.cameraControl.pointerEnabled=!0,C&&(e.which,C=!1,t=!1))}),m.addEventListener("wheel",this._canvasWheelListener=e=>{if(this._visible)Math.max(-1,Math.min(1,40*-e.deltaY))})}_destroy(){this._unbindEvents(),this._destroyNodes()}_unbindEvents(){const e=this._viewer,t=e.scene,s=t.canvas.canvas,i=e.camera,r=e.cameraControl;t.off(this._onSceneTick),s.removeEventListener("mousedown",this._canvasMouseDownListener),s.removeEventListener("mousemove",this._canvasMouseMoveListener),s.removeEventListener("mouseup",this._canvasMouseUpListener),s.removeEventListener("wheel",this._canvasWheelListener),i.off(this._onCameraViewMatrix),i.off(this._onCameraProjMatrix),r.off(this._onCameraControlHover),r.off(this._onCameraControlHoverLeave)}_destroyNodes(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}class oy{constructor(e,t,s){this.id=s.id,this._sectionPlane=s,this._mesh=new Bs(t,{id:s.id,geometry:new ht(t,ct({xSize:.5,ySize:.5,zSize:.001})),material:new dt(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new yt(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Et(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Et(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const e=u.vec3([0,0,0]),t=u.vec3(),s=u.vec3([0,0,1]),i=u.vec4(4),r=u.vec3(),o=()=>{const o=this._sectionPlane.scene.center,n=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];u.subVec3(o,this._sectionPlane.pos,e);const a=-u.dotVec3(n,e);u.normalizeVec3(n),u.mulVec3Scalar(n,a,t);const l=u.vec3PairToQuaternion(s,this._sectionPlane.dir,i);r[0]=.1*t[0],r[1]=.1*t[1],r[2]=.1*t[2],this._mesh.quaternion=l,this._mesh.position=r};this._onSectionPlanePos=this._sectionPlane.on("pos",o),this._onSectionPlaneDir=this._sectionPlane.on("dir",o)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}class ny{constructor(e,t){if(!(t.onHoverEnterPlane&&t.onHoverLeavePlane&&t.onClickedNothing&&t.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new jt(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new Ze(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new Ze(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new Ze(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const e=this._scene.camera,t=u.rotationMat4c(-90*u.DEGTORAD,1,0,0),s=u.vec3(),i=u.vec3(),r=u.vec3();this._synchCamera=()=>{const o=this._viewer.camera.eye,n=this._viewer.camera.look,a=this._viewer.camera.up;u.mulVec3Scalar(u.normalizeVec3(u.subVec3(o,n,s)),7),this._zUp?(u.transformVec3(t,s,i),u.transformVec3(t,a,r),e.look=[0,0,0],e.eye=u.transformVec3(t,s,i),e.up=u.transformPoint3(t,a,r)):(e.look=[0,0,0],e.eye=s,e.up=a)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(e=>{this._scene.camera.perspective.fov=e}));var s=null;this._onInputMouseMove=this._scene.input.on("mousemove",(e=>{const t=this._scene.pick({canvasPos:e});if(t){if(!s||t.entity.id!==s.id){if(s){this._planes[s.id]&&this._onHoverLeavePlane(s.id)}s=t.entity;this._planes[s.id]&&this._onHoverEnterPlane(s.id)}}else s&&(this._onHoverLeavePlane(s.id),s=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{if(s){this._planes[s.id]&&this._onClickedPlane(s.id)}else this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{s&&(this._onHoverLeavePlane(s.id),s=null)}),this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new oy(this,this._scene,e)}setPlaneHighlighted(e,t){const s=this._planes[e];s&&s.setHighlighted(t)}setPlaneSelected(e,t){const s=this._planes[e];s&&s.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const ay=u.AABB3(),ly=u.vec3();class hy extends n{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,null!==t.overviewCanvasId&&void 0!==t.overviewCanvasId){const e=document.getElementById(t.overviewCanvasId);e?this._overview=new ny(this,{overviewCanvas:e,visible:t.overviewVisible,onHoverEnterPlane:e=>{this._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:e=>{this._overview.setPlaneHighlighted(e,!1)},onClickedPlane:e=>{if(this.getShownControl()===e)return void this.hideControl();this.showControl(e);const t=this.sectionPlanes[e].pos;ay.set(this.viewer.scene.aabb),u.getAABB3Center(ay,ly),ay[0]+=t[0]-ly[0],ay[1]+=t[1]-ly[1],ay[2]+=t[2]-ly[2],ay[3]+=t[0]-ly[0],ay[4]+=t[1]-ly[1],ay[5]+=t[2]-ly[2],this.viewer.cameraFlight.flyTo({aabb:ay,fitFOV:65})},onClickedNothing:()=>{this.hideControl()}}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",(e=>{this._sectionPlaneCreated(e)}))}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id);return new Us(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():new ry(this);t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(()=>{this._sectionPlaneDestroyed(e)}))}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].flipDir()}}showControl(e){const t=this._controls[e];t?(this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e):this.error("Control not found: "+e)}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)):this.error("SectionPlane not found: "+e)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,s=e.length;t{e.preventDefault()},this._onObjectVisibility=this._viewer.scene.on("objectVisibility",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;const i=e.visible;if(!(i!==s.checked))return;this._muteTreeEvents=!0,s.checked=i,i?s.numVisibleEntities++:s.numVisibleEntities--;const r=document.getElementById(`checkbox-${s.nodeId}`);r&&(r.checked=i);let o=s.parent;for(;o;){o.checked=i,i?o.numVisibleEntities++:o.numVisibleEntities--;const e=document.getElementById(`checkbox-${o.nodeId}`);if(e){const t=o.numVisibleEntities>0;t!==e.checked&&(e.checked=t)}o=o.parent}this._muteTreeEvents=!1})),this._onObjectXrayed=this._viewer.scene.on("objectXRayed",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;this._muteTreeEvents=!0;const i=e.xrayed;if(!(i!==s.xrayed))return;s.xrayed=i;const r=s.nodeId,o=document.getElementById(r);null!==o&&(i?o.classList.add("xrayed-node"):o.classList.remove("xrayed-node")),this._muteTreeEvents=!1})),this._switchExpandHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._expandSwitchElement(t)},this._switchCollapseHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._collapseSwitchElement(t)},this._checkboxChangeHandler=e=>{if(this._muteTreeEvents)return;this._muteSceneEvents=!0;const t=e.target,s=t.checked,i=t.id.replace("checkbox-",""),r=this._nodeNodes[i],o=this._viewer.scene.objects;let n=0;this._withNodeTree(r,(e=>{const t=e.objectId,i=`checkbox-${e.nodeId}`,r=o[t],a=0===e.children.length;e.numVisibleEntities=s?e.numEntities:0,a&&s!==e.checked&&n++,e.checked=s;const l=document.getElementById(i);l&&(l.checked=s),r&&(r.visible=s)}));let a=r.parent;for(;a;){a.checked=s;const e=document.getElementById(`checkbox-${a.nodeId}`);s?a.numVisibleEntities+=n:a.numVisibleEntities-=n;const t=a.numVisibleEntities>0;t!==e.checked&&(e.checked=t),a=a.parent}this._muteSceneEvents=!1},this._hierarchy=t.hierarchy||"containment",this._autoExpandDepth=t.autoExpandDepth||0,this._autoAddModels){const e=Object.keys(this.viewer.metaScene.metaModels);for(let t=0,s=e.length;t{this.viewer.metaScene.metaModels[e]&&this.addModel(e)}))}this.hierarchy=t.hierarchy}else this.error("Config expected: containerElement")}set hierarchy(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}get hierarchy(){return this._hierarchy}addModel(e,t={}){if(!this._containerElement)return;const s=this.viewer.scene.models[e];if(!s)throw"Model not found: "+e;const i=this.viewer.metaScene.metaModels[e];i?this._metaModels[e]?this.warn("Model already added: "+e):(this._metaModels[e]=i,s.on("destroyed",(()=>{this.removeModel(s.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}removeModel(e){if(!this._containerElement)return;this._metaModels[e]&&(delete this._metaModels[e],this._createNodes())}showNode(e){this._showListItemElementId&&this.unShowNode();const t=this._objectNodes[e];if(!t)return;const s=t.nodeId,i="switch-"+s,r=document.getElementById(i);if(r)return this._expandSwitchElement(r),void r.scrollIntoView();const o=[];o.unshift(t);let n=t.parent;for(;n;)o.unshift(n),n=n.parent;for(let e=0,t=o.length;e{if(i===e)return;const r="switch-"+s.nodeId,o=document.getElementById(r);if(o){this._expandSwitchElement(o);const e=s.children;for(var n=0,a=e.length;n0;return this.valid}_validateMetaModelForStoreysHierarchy(e=0,t,s){return!0}_createEnabledNodes(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this._createTrees(),this.expandToDepth(this._autoExpandDepth)}_createDisabledNodes(){const e=document.createElement("ul");this._rootElement=e,this._containerElement.appendChild(e);const t=this._viewer.metaScene.rootMetaObjects;for(let s in t){const i=t[s],r=i.type,o=i.name,n=o&&""!==o&&"Undefined"!==o&&"Default"!==o?o:r,a=document.createElement("li");e.appendChild(a);const l=document.createElement("a");l.href="#",l.textContent="!",l.classList.add("warn"),l.classList.add("warning"),a.appendChild(l);const h=document.createElement("span");h.textContent=n,a.appendChild(h)}}_findEmptyNodes(){const e=this._viewer.metaScene.rootMetaObjects;for(let t in e)this._findEmptyNodes2(e[t])}_findEmptyNodes2(e,t=0){const s=this.viewer.scene,i=e.children,r=e.id,o=s.objects[r];if(e._countEntities=0,o&&e._countEntities++,i)for(let t=0,s=i.length;t{e.aabb&&r.aabb||(e.aabb||(e.aabb=t.getAABB(i.getObjectIDsInSubtree(e.objectId))),r.aabb||(r.aabb=t.getAABB(i.getObjectIDsInSubtree(r.objectId))));let o=0;return o=s.xUp?0:s.yUp?1:2,e.aabb[o]>r.aabb[o]?-1:e.aabb[o]i?1:0}_synchNodesToEntities(){const e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,s=this._viewer.scene.objects;for(let i=0,r=e.length;ithis._createNodeElement(e))),t=document.createElement("ul");e.forEach((e=>{t.appendChild(e)})),this._containerElement.appendChild(t),this._rootElement=t}_createNodeElement(e){const t=document.createElement("li"),s=e.nodeId;if(e.xrayed&&t.classList.add("xrayed-node"),t.id=s,e.children.length>0){const e="switch-"+s,i=document.createElement("a");i.href="#",i.id=e,i.textContent="+",i.classList.add("plus"),i.addEventListener("click",this._switchExpandHandler),t.appendChild(i)}const i=document.createElement("input");i.id=`checkbox-${s}`,i.type="checkbox",i.checked=e.checked,i.style["pointer-events"]="all",i.addEventListener("change",this._checkboxChangeHandler),t.appendChild(i);const r=document.createElement("span");return r.textContent=e.title,t.appendChild(r),r.oncontextmenu=t=>{this.fire("contextmenu",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},r.onclick=t=>{this.fire("nodeTitleClicked",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},t}_expandSwitchElement(e){const t=e.parentElement;if(t.getElementsByTagName("li")[0])return;const s=t.id,i=this._nodeNodes[s].children.map((e=>this._createNodeElement(e))),r=document.createElement("ul");i.forEach((e=>{r.appendChild(e)})),t.appendChild(r),e.classList.remove("plus"),e.classList.add("minus"),e.textContent="-",e.removeEventListener("click",this._switchExpandHandler),e.addEventListener("click",this._switchCollapseHandler)}_collapseNode(e){const t="switch-"+e,s=document.getElementById(t);this._collapseSwitchElement(s)}_collapseSwitchElement(e){if(!e)return;const t=e.parentElement;if(!t)return;const s=t.querySelector("ul");s&&(t.removeChild(s),e.classList.remove("minus"),e.classList.add("plus"),e.textContent="+",e.removeEventListener("click",this._switchCollapseHandler),e.addEventListener("click",this._switchExpandHandler))}}class uy{constructor(){}getManifest(e,t,s){m.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getMetaModel(e,t,s){m.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getXKT(e,t,s){var i=()=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=0;)e[t]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);t(n);const a=new Array(60);t(a);const l=new Array(512);t(l);const h=new Array(256);t(h);const c=new Array(29);t(c);const A=new Array(30);function u(e,t,s,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}let p,d,f;function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(A);const m=e=>e<256?l[e]:l[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},g=(e,t,s)=>{e.bi_valid>16-s?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=s-16):(e.bi_buf|=t<{g(e,s[2*t],s[2*t+1])},v=(e,t)=>{let s=0;do{s|=1&e,e>>>=1,s<<=1}while(--t>0);return s>>>1},T=(e,t,s)=>{const i=new Array(16);let r,o,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=v(i[t]++,t))}},_=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},R=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},P=(e,t,s,i)=>{const r=2*t,o=2*s;return e[r]{const i=e.heap[s];let r=s<<1;for(;r<=e.heap_len&&(r{let o,n,a,l,u=0;if(0!==e.sym_next)do{o=255&e.pending_buf[e.sym_buf+u++],o+=(255&e.pending_buf[e.sym_buf+u++])<<8,n=e.pending_buf[e.sym_buf+u++],0===o?I(e,n,t):(a=h[n],I(e,a+256+1,t),l=s[a],0!==l&&(n-=c[a],g(e,n,l)),o--,a=m(o),I(e,a,r),l=i[a],0!==l&&(o-=A[a],g(e,o,l)))}while(u{const s=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems;let n,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,n=0;n>1;n>=1;n--)D(e,s,n);l=o;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,s,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,s[2*l]=s[2*n]+s[2*a],e.depth[l]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,s[2*n+1]=s[2*a+1]=l,e.heap[1]=l++,D(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const s=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,n=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,A,u,p,d,f=0;for(u=0;u<=15;u++)e.bl_count[u]=0;for(s[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],u=s[2*s[2*c+1]+1]+1,u>l&&(u=l,f++),s[2*c+1]=u,c>i||(e.bl_count[u]++,p=0,c>=a&&(p=n[c-a]),d=s[2*c],e.opt_len+=d*(u+p),o&&(e.static_len+=d*(r[2*c+1]+p)));if(0!==f){do{for(u=l-1;0===e.bl_count[u];)u--;e.bl_count[u]--,e.bl_count[u+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(u=l;0!==u;u--)for(c=e.bl_count[u];0!==c;)A=e.heap[--h],A>i||(s[2*A+1]!==u&&(e.opt_len+=(u-s[2*A+1])*s[2*A],s[2*A+1]=u),c--)}})(e,t),T(s,h,e.bl_count)},O=(e,t,s)=>{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),t[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=t[2*(i+1)+1],++a{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),i=0;i<=s;i++)if(r=n,n=t[2*(i+1)+1],!(++a{g(e,0+(i?1:0),3),R(e),y(e,s),y(e,~s),s&&e.pending_buf.set(e.window.subarray(t,t+s),e.pending),e.pending+=s};var x={_tr_init:e=>{S||((()=>{let e,t,o,E,m;const y=new Array(16);for(o=0,E=0;E<28;E++)for(c[E]=o,e=0;e<1<>=7;E<30;E++)for(A[E]=m<<7,e=0;e<1<{let r,l,h=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,s=4093624447;for(t=0;t<=31;t++,s>>>=1)if(1&s&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),C(e,e.l_desc),C(e,e.d_desc),h=(e=>{let t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*o[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,l=e.static_len+3+7>>>3,l<=r&&(r=l)):r=l=s+5,s+4<=r&&-1!==t?w(e,t,s,i):4===e.strategy||l===r?(g(e,2+(i?1:0),3),N(e,n,a)):(g(e,4+(i?1:0),3),((e,t,s,i)=>{let r;for(g(e,t-257,5),g(e,s-1,5),g(e,i-4,4),r=0;r(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=s,0===t?e.dyn_ltree[2*s]++:(e.matches++,t--,e.dyn_ltree[2*(h[s]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{g(e,2,3),I(e,256,n),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},B=(e,t,s,i)=>{let r=65535&e|0,o=e>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+t[i++]|0,o=o+r|0}while(--n);r%=65521,o%=65521}return r|o<<16|0};const F=new Uint32Array((()=>{let e,t=[];for(var s=0;s<256;s++){e=s;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[s]=e}return t})());var M=(e,t,s,i)=>{const r=F,o=i+s;e^=-1;for(let s=i;s>>8^r[255&(e^t[s])];return-1^e},L={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},U={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:G,_tr_flush_block:k,_tr_tally:V,_tr_align:j}=x,{Z_NO_FLUSH:Q,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:z,Z_FINISH:K,Z_BLOCK:Y,Z_OK:X,Z_STREAM_END:Z,Z_STREAM_ERROR:q,Z_DATA_ERROR:J,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:te,Z_HUFFMAN_ONLY:se,Z_RLE:ie,Z_FIXED:re,Z_DEFAULT_STRATEGY:oe,Z_UNKNOWN:ne,Z_DEFLATED:ae}=U,le=258,he=262,ce=42,Ae=113,ue=666,pe=(e,t)=>(e.msg=L[t],t),de=e=>2*e-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ee=e=>{let t,s,i,r=e.w_size;t=e.hash_size,i=t;do{s=e.head[--i],e.head[i]=s>=r?s-r:0}while(--t);t=r,i=t;do{s=e.prev[--i],e.prev[i]=s>=r?s-r:0}while(--t)};let me=(e,t,s)=>(t<{const t=e.state;let s=t.pending;s>e.avail_out&&(s=e.avail_out),0!==s&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+s),e.next_out),e.next_out+=s,t.pending_out+=s,e.total_out+=s,e.avail_out-=s,t.pending-=s,0===t.pending&&(t.pending_out=0))},ge=(e,t)=>{k(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ye(e.strm)},Ie=(e,t)=>{e.pending_buf[e.pending++]=t},ve=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Te=(e,t,s,i)=>{let r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),s),1===e.state.wrap?e.adler=B(e.adler,t,r,s):2===e.state.wrap&&(e.adler=M(e.adler,t,r,s)),e.next_in+=r,e.total_in+=r,r)},_e=(e,t)=>{let s,i,r=e.max_chain_length,o=e.strstart,n=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-he?e.strstart-(e.w_size-he):0,h=e.window,c=e.w_mask,A=e.prev,u=e.strstart+le;let p=h[o+n-1],d=h[o+n];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(s=t,h[s+n]===d&&h[s+n-1]===p&&h[s]===h[o]&&h[++s]===h[o+1]){o+=2,s++;do{}while(h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&on){if(e.match_start=t,n=i,i>=a)break;p=h[o+n-1],d=h[o+n]}}}while((t=A[t&c])>l&&0!=--r);return n<=e.lookahead?n:e.lookahead},Re=e=>{const t=e.w_size;let s,i,r;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-he)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ee(e),i+=t),0===e.strm.avail_in)break;if(s=Te(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=s,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=me(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=me(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let s,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n=0,a=e.strm.avail_in;do{if(s=65535,r=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(s=i+e.strm.avail_in),s>r&&(s=r),s>8,e.pending_buf[e.pending-2]=~s,e.pending_buf[e.pending-1]=~s>>8,ye(e.strm),i&&(i>s&&(i=s),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,s-=i),s&&(Te(e.strm,e.strm.output,e.strm.next_out,s),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s)}while(0===n);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waterr&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(Te(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,o=r>e.w_size?e.w_size:r,i=e.strstart-e.block_start,(i>=o||(i||t===K)&&t!==Q&&0===e.strm.avail_in&&i<=r)&&(s=i>r?r:i,n=t===K&&0===e.strm.avail_in&&s===i?1:0,G(e,e.block_start,s,n),e.block_start+=s,ye(e.strm)),n?3:1)},De=(e,t)=>{let s,i;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==s&&e.strstart-s<=e.w_size-he&&(e.match_length=_e(e,s)),e.match_length>=3)if(i=V(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=me(e,e.ins_h,e.window[e.strstart+1]);else i=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2},Ne=(e,t)=>{let s,i,r;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==s&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=V(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(ge(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=V(e,0,e.window[e.strstart-1]),i&&ge(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=V(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2};function Ce(e,t,s,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=s,this.max_chain=i,this.func=r}const Oe=[new Ce(0,0,0,0,Pe),new Ce(4,4,8,4,De),new Ce(4,5,16,8,De),new Ce(4,6,32,32,De),new Ce(4,4,16,16,Ne),new Ce(8,16,32,32,Ne),new Ce(8,16,128,128,Ne),new Ce(8,32,128,256,Ne),new Ce(32,128,258,1024,Ne),new Ce(32,258,258,4096,Ne)];function be(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ae,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Se=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ce&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ae&&t.status!==ue?1:0},we=e=>{if(Se(e))return pe(e,q);e.total_in=e.total_out=0,e.data_type=ne;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ce:Ae,e.adler=2===t.wrap?0:1,t.last_flush=-2,H(t),X},xe=e=>{const t=we(e);var s;return t===X&&((s=e.state).window_size=2*s.w_size,fe(s.head),s.max_lazy_match=Oe[s.level].max_lazy,s.good_match=Oe[s.level].good_length,s.nice_match=Oe[s.level].nice_length,s.max_chain_length=Oe[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),t},Be=(e,t,s,i,r,o)=>{if(!e)return q;let n=1;if(t===ee&&(t=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==ae||i<8||i>15||t<0||t>9||o<0||o>re||8===i&&1!==n)return pe(e,q);8===i&&(i=9);const a=new be;return e.state=a,a.strm=e,a.status=ce,a.wrap=n,a.gzhead=null,a.w_bits=i,a.w_size=1<Se(e)||2!==e.state.wrap?q:(e.state.gzhead=t,X),Le=(e,t)=>{if(Se(e)||t>Y||t<0)return e?pe(e,q):q;const s=e.state;if(!e.output||0!==e.avail_in&&!e.input||s.status===ue&&t!==K)return pe(e,0===e.avail_out?$:q);const i=s.last_flush;if(s.last_flush=t,0!==s.pending){if(ye(e),0===e.avail_out)return s.last_flush=-1,X}else if(0===e.avail_in&&de(t)<=de(i)&&t!==K)return pe(e,$);if(s.status===ue&&0!==e.avail_in)return pe(e,$);if(s.status===ce&&0===s.wrap&&(s.status=Ae),s.status===ce){let t=ae+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=se||s.level<2?0:s.level<6?1:6===s.level?2:3,t|=i<<6,0!==s.strstart&&(t|=32),t+=31-t%31,ve(s,t),0!==s.strstart&&(ve(s,e.adler>>>16),ve(s,65535&e.adler)),e.adler=1,s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(57===s.status)if(e.adler=0,Ie(s,31),Ie(s,139),Ie(s,8),s.gzhead)Ie(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),Ie(s,255&s.gzhead.time),Ie(s,s.gzhead.time>>8&255),Ie(s,s.gzhead.time>>16&255),Ie(s,s.gzhead.time>>24&255),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(Ie(s,255&s.gzhead.extra.length),Ie(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=M(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,3),s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X;if(69===s.status){if(s.gzhead.extra){let t=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex+=r,ye(e),0!==s.pending)return s.last_flush=-1,X;t=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(ye(e),0!==s.pending))return s.last_flush=-1,X;Ie(s,255&e.adler),Ie(s,e.adler>>8&255),e.adler=0}if(s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(0!==e.avail_in||0!==s.lookahead||t!==Q&&s.status!==ue){let i=0===s.level?Pe(s,t):s.strategy===se?((e,t)=>{let s;for(;;){if(0===e.lookahead&&(Re(e),0===e.lookahead)){if(t===Q)return 1;break}if(e.match_length=0,s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):s.strategy===ie?((e,t)=>{let s,i,r,o;const n=e.window;for(;;){if(e.lookahead<=le){if(Re(e),e.lookahead<=le&&t===Q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,i=n[r],i===n[++r]&&i===n[++r]&&i===n[++r])){o=e.strstart+le;do{}while(i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(s=V(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):Oe[s.level].func(s,t);if(3!==i&&4!==i||(s.status=ue),1===i||3===i)return 0===e.avail_out&&(s.last_flush=-1),X;if(2===i&&(t===W?j(s):t!==Y&&(G(s,0,0,!1),t===z&&(fe(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),ye(e),0===e.avail_out))return s.last_flush=-1,X}return t!==K?X:s.wrap<=0?Z:(2===s.wrap?(Ie(s,255&e.adler),Ie(s,e.adler>>8&255),Ie(s,e.adler>>16&255),Ie(s,e.adler>>24&255),Ie(s,255&e.total_in),Ie(s,e.total_in>>8&255),Ie(s,e.total_in>>16&255),Ie(s,e.total_in>>24&255)):(ve(s,e.adler>>>16),ve(s,65535&e.adler)),ye(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?X:Z)},Ue=e=>{if(Se(e))return q;const t=e.state.status;return e.state=null,t===Ae?pe(e,J):X},He=(e,t)=>{let s=t.length;if(Se(e))return q;const i=e.state,r=i.wrap;if(2===r||1===r&&i.status!==ce||i.lookahead)return q;if(1===r&&(e.adler=B(e.adler,t,s,0)),i.wrap=0,s>=i.w_size){0===r&&(fe(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(s-i.w_size,s),0),t=e,s=i.w_size}const o=e.avail_in,n=e.next_in,a=e.input;for(e.avail_in=s,e.next_in=0,e.input=t,Re(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=me(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Re(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=n,e.input=a,e.avail_in=o,i.wrap=r,X};const Ge=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ke=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const s=t.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(const t in s)Ge(s,t)&&(e[t]=s[t])}}return e},Ve=e=>{let t=0;for(let s=0,i=e.length;s=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qe[254]=Qe[254]=1;var We=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,s,i,r,o,n=e.length,a=0;for(r=0;r>>6,t[o++]=128|63&s):s<65536?(t[o++]=224|s>>>12,t[o++]=128|s>>>6&63,t[o++]=128|63&s):(t[o++]=240|s>>>18,t[o++]=128|s>>>12&63,t[o++]=128|s>>>6&63,t[o++]=128|63&s);return t},ze=(e,t)=>{const s=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,r;const o=new Array(2*s);for(r=0,i=0;i4)o[r++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&je)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let s="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let s=t-1;for(;s>=0&&128==(192&e[s]);)s--;return s<0||0===s?t:s+Qe[e[s]]>t?s:t},Ye=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Xe=Object.prototype.toString,{Z_NO_FLUSH:Ze,Z_SYNC_FLUSH:qe,Z_FULL_FLUSH:Je,Z_FINISH:$e,Z_OK:et,Z_STREAM_END:tt,Z_DEFAULT_COMPRESSION:st,Z_DEFAULT_STRATEGY:it,Z_DEFLATED:rt}=U;function ot(e){this.options=ke({level:st,method:rt,chunkSize:16384,windowBits:15,memLevel:8,strategy:it},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Fe(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(s!==et)throw new Error(L[s]);if(t.header&&Me(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?We(t.dictionary):"[object ArrayBuffer]"===Xe.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,s=He(this.strm,e),s!==et)throw new Error(L[s]);this._dict_set=!0}}function nt(e,t){const s=new ot(t);if(s.push(e,!0),s.err)throw s.msg||L[s.err];return s.result}ot.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize;let r,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?$e:Ze,"string"==typeof e?s.input=We(e):"[object ArrayBuffer]"===Xe.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),(o===qe||o===Je)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(r=Le(s,o),r===tt)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),r=Ue(this.strm),this.onEnd(r),this.ended=!0,r===et;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},ot.prototype.onData=function(e){this.chunks.push(e)},ot.prototype.onEnd=function(e){e===et&&(this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var at={Deflate:ot,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:U};const lt=16209;var ht=function(e,t){let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P;const D=e.state;s=e.next_in,R=e.input,i=s+(e.avail_in-5),r=e.next_out,P=e.output,o=r-(t-e.avail_out),n=r+(e.avail_out-257),a=D.dmax,l=D.wsize,h=D.whave,c=D.wnext,A=D.window,u=D.hold,p=D.bits,d=D.lencode,f=D.distcode,E=(1<>>24,u>>>=g,p-=g,g=y>>>16&255,0===g)P[r++]=65535&y;else{if(!(16&g)){if(0==(64&g)){y=d[(65535&y)+(u&(1<>>=g,p-=g),p<15&&(u+=R[s++]<>>24,u>>>=g,p-=g,g=y>>>16&255,!(16&g)){if(0==(64&g)){y=f[(65535&y)+(u&(1<a){e.msg="invalid distance too far back",D.mode=lt;break e}if(u>>>=g,p-=g,g=r-o,v>g){if(g=v-g,g>h&&D.sane){e.msg="invalid distance too far back",D.mode=lt;break e}if(T=0,_=A,0===c){if(T+=l-g,g2;)P[r++]=_[T++],P[r++]=_[T++],P[r++]=_[T++],I-=3;I&&(P[r++]=_[T++],I>1&&(P[r++]=_[T++]))}else{T=r-v;do{P[r++]=P[T++],P[r++]=P[T++],P[r++]=P[T++],I-=3}while(I>2);I&&(P[r++]=P[T++],I>1&&(P[r++]=P[T++]))}break}}break}}while(s>3,s-=I,p-=I<<3,u&=(1<{const l=a.bits;let h,c,A,u,p,d,f=0,E=0,m=0,y=0,g=0,I=0,v=0,T=0,_=0,R=0,P=null;const D=new Uint16Array(16),N=new Uint16Array(16);let C,O,b,S=null;for(f=0;f<=15;f++)D[f]=0;for(E=0;E=1&&0===D[y];y--);if(g>y&&(g=y),0===y)return r[o++]=20971520,r[o++]=20971520,a.bits=1,0;for(m=1;m0&&(0===e||1!==y))return-1;for(N[1]=0,f=1;f<15;f++)N[f+1]=N[f]+D[f];for(E=0;E852||2===e&&_>592)return 1;for(;;){C=f-v,n[E]+1=d?(O=S[n[E]-d],b=P[n[E]-d]):(O=96,b=0),h=1<>v)+c]=C<<24|O<<16|b|0}while(0!==c);for(h=1<>=1;if(0!==h?(R&=h-1,R+=h):R=0,E++,0==--D[f]){if(f===y)break;f=t[s+n[E]]}if(f>g&&(R&u)!==A){for(0===v&&(v=g),p+=m,I=f-v,T=1<852||2===e&&_>592)return 1;A=R&u,r[A]=g<<24|I<<16|p-o|0}}return 0!==R&&(r[p+R]=f-v<<24|64<<16|0),a.bits=g,0};const{Z_FINISH:ft,Z_BLOCK:Et,Z_TREES:mt,Z_OK:yt,Z_STREAM_END:gt,Z_NEED_DICT:It,Z_STREAM_ERROR:vt,Z_DATA_ERROR:Tt,Z_MEM_ERROR:_t,Z_BUF_ERROR:Rt,Z_DEFLATED:Pt}=U,Dt=16180,Nt=16190,Ct=16191,Ot=16192,bt=16194,St=16199,wt=16200,xt=16206,Bt=16209,Ft=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Mt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Lt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Ut=e=>{if(Lt(e))return vt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,yt},Ht=e=>{if(Lt(e))return vt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Ut(e)},Gt=(e,t)=>{let s;if(Lt(e))return vt;const i=e.state;return t<0?(s=0,t=-t):(s=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?vt:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=s,i.wbits=t,Ht(e))},kt=(e,t)=>{if(!e)return vt;const s=new Mt;e.state=s,s.strm=e,s.window=null,s.mode=Dt;const i=Gt(e,t);return i!==yt&&(e.state=null),i};let Vt,jt,Qt=!0;const Wt=e=>{if(Qt){Vt=new Int32Array(512),jt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dt(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dt(2,e.lens,0,32,jt,0,e.work,{bits:5}),Qt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=jt,e.distbits=5},zt=(e,t,s,i)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(s-o.wsize,s),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),o.window.set(t.subarray(s-i,s-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(s-i,s),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave{let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R=0;const P=new Uint8Array(4);let D,N;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Lt(e)||!e.output||!e.input&&0!==e.avail_in)return vt;s=e.state,s.mode===Ct&&(s.mode=Ot),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,A=a,u=l,_=yt;e:for(;;)switch(s.mode){case Dt:if(0===s.wrap){s.mode=Ot;break}for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0),h=0,c=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",s.mode=Bt;break}if((15&h)!==Pt){e.msg="unknown compression method",s.mode=Bt;break}if(h>>>=4,c-=4,T=8+(15&h),0===s.wbits&&(s.wbits=T),T>15||T>s.wbits){e.msg="invalid window size",s.mode=Bt;break}s.dmax=1<>8&1),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>8&255,P[2]=h>>>16&255,P[3]=h>>>24&255,s.check=M(s.check,P,4,0)),h=0,c=0,s.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>8),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16184;case 16184:if(1024&s.flags){for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(p=s.length,p>a&&(p=a),p&&(s.head&&(T=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(i.subarray(o,o+p),T)),512&s.flags&&4&s.wrap&&(s.check=M(s.check,i,p,o)),a-=p,o+=p,s.length-=p),s.length))break e;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===a)break e;p=0;do{T=i[o+p++],s.head&&T&&s.length<65536&&(s.head.name+=String.fromCharCode(T))}while(T&&p>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=Ct;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>=7&c,c-=7&c,s.mode=xt;break}for(;c<3;){if(0===a)break e;a--,h+=i[o++]<>>=1,c-=1,3&h){case 0:s.mode=16193;break;case 1:if(Wt(s),s.mode=St,t===mt){h>>>=2,c-=2;break e}break;case 2:s.mode=16196;break;case 3:e.msg="invalid block type",s.mode=Bt}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",s.mode=Bt;break}if(s.length=65535&h,h=0,c=0,s.mode=bt,t===mt)break e;case bt:s.mode=16195;case 16195:if(p=s.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;r.set(i.subarray(o,o+p),n),a-=p,o+=p,l-=p,n+=p,s.length-=p;break}s.mode=Ct;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=i[o++]<>>=5,c-=5,s.ndist=1+(31&h),h>>>=5,c-=5,s.ncode=4+(15&h),h>>>=4,c-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=Bt;break}s.have=0,s.mode=16197;case 16197:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[C[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,D={bits:s.lenbits},_=dt(0,s.lens,0,19,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid code lengths set",s.mode=Bt;break}s.have=0,s.mode=16198;case 16198:for(;s.have>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=E,c-=E,s.lens[s.have++]=y;else{if(16===y){for(N=E+2;c>>=E,c-=E,0===s.have){e.msg="invalid bit length repeat",s.mode=Bt;break}T=s.lens[s.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===y){for(N=E+3;c>>=E,c-=E,T=0,p=3+(7&h),h>>>=3,c-=3}else{for(N=E+7;c>>=E,c-=E,T=0,p=11+(127&h),h>>>=7,c-=7}if(s.have+p>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=Bt;break}for(;p--;)s.lens[s.have++]=T}}if(s.mode===Bt)break;if(0===s.lens[256]){e.msg="invalid code -- missing end-of-block",s.mode=Bt;break}if(s.lenbits=9,D={bits:s.lenbits},_=dt(1,s.lens,0,s.nlen,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid literal/lengths set",s.mode=Bt;break}if(s.distbits=6,s.distcode=s.distdyn,D={bits:s.distbits},_=dt(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,D),s.distbits=D.bits,_){e.msg="invalid distances set",s.mode=Bt;break}if(s.mode=St,t===mt)break e;case St:s.mode=wt;case wt:if(a>=6&&l>=258){e.next_out=n,e.avail_out=l,e.next_in=o,e.avail_in=a,s.hold=h,s.bits=c,ht(e,u),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,s.mode===Ct&&(s.back=-1);break}for(s.back=0;R=s.lencode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,s.length=y,0===m){s.mode=16205;break}if(32&m){s.back=-1,s.mode=Ct;break}if(64&m){e.msg="invalid literal/length code",s.mode=Bt;break}s.extra=15&m,s.mode=16201;case 16201:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;R=s.distcode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,64&m){e.msg="invalid distance code",s.mode=Bt;break}s.offset=y,s.extra=15&m,s.mode=16203;case 16203:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=Bt;break}s.mode=16204;case 16204:if(0===l)break e;if(p=u-l,s.offset>p){if(p=s.offset-p,p>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=Bt;break}p>s.wnext?(p-=s.wnext,d=s.wsize-p):d=s.wnext-p,p>s.length&&(p=s.length),f=s.window}else f=r,d=n-s.offset,p=s.length;p>l&&(p=l),l-=p,s.length-=p;do{r[n++]=f[d++]}while(--p);0===s.length&&(s.mode=wt);break;case 16205:if(0===l)break e;r[n++]=s.length,l--,s.mode=wt;break;case xt:if(s.wrap){for(;c<32;){if(0===a)break e;a--,h|=i[o++]<{if(Lt(e))return vt;let t=e.state;return t.window&&(t.window=null),e.state=null,yt},qt=(e,t)=>{if(Lt(e))return vt;const s=e.state;return 0==(2&s.wrap)?vt:(s.head=t,t.done=!1,yt)},Jt=(e,t)=>{const s=t.length;let i,r,o;return Lt(e)?vt:(i=e.state,0!==i.wrap&&i.mode!==Nt?vt:i.mode===Nt&&(r=1,r=B(r,t,s,0),r!==i.check)?Tt:(o=zt(e,t,s,s),o?(i.mode=16210,_t):(i.havedict=1,yt)))},$t=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const es=Object.prototype.toString,{Z_NO_FLUSH:ts,Z_FINISH:ss,Z_OK:is,Z_STREAM_END:rs,Z_NEED_DICT:os,Z_STREAM_ERROR:ns,Z_DATA_ERROR:as,Z_MEM_ERROR:ls}=U;function hs(e){this.options=ke({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Yt(this.strm,t.windowBits);if(s!==is)throw new Error(L[s]);if(this.header=new $t,qt(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=We(t.dictionary):"[object ArrayBuffer]"===es.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(s=Jt(this.strm,t.dictionary),s!==is)))throw new Error(L[s])}function cs(e,t){const s=new hs(t);if(s.push(e),s.err)throw s.msg||L[s.err];return s.result}hs.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let o,n,a;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:ts,"[object ArrayBuffer]"===es.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),o=Xt(s,n),o===os&&r&&(o=Jt(s,r),o===is?o=Xt(s,n):o===as&&(o=os));s.avail_in>0&&o===rs&&s.state.wrap>0&&0!==e[s.next_in];)Kt(s),o=Xt(s,n);switch(o){case ns:case as:case os:case ls:return this.onEnd(o),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||o===rs))if("string"===this.options.to){let e=Ke(s.output,s.next_out),t=s.next_out-e,r=ze(s.output,e);s.next_out=t,s.avail_out=i-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==is||0!==a){if(o===rs)return o=Zt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},hs.prototype.onData=function(e){this.chunks.push(e)},hs.prototype.onEnd=function(e){e===is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:hs,inflate:cs,inflateRaw:function(e,t){return(t=t||{}).raw=!0,cs(e,t)},ungzip:cs,constants:U};const{Deflate:us,deflate:ps,deflateRaw:ds,gzip:fs}=at,{Inflate:Es,inflate:ms,inflateRaw:ys,ungzip:gs}=As;var Is=us,vs=ps,Ts=ds,_s=fs,Rs=Es,Ps=ms,Ds=ys,Ns=gs,Cs=U,Os={Deflate:Is,deflate:vs,deflateRaw:Ts,gzip:_s,Inflate:Rs,inflate:Ps,inflateRaw:Ds,ungzip:Ns,constants:Cs};e.Deflate=Is,e.Inflate=Rs,e.constants=Cs,e.default=Os,e.deflate=vs,e.deflateRaw=Ts,e.gzip=_s,e.inflate=Ps,e.inflateRaw=Ds,e.ungzip=Ns,Object.defineProperty(e,"__esModule",{value:!0})}));var py=Object.freeze({__proto__:null});let dy=window.pako||py;dy.inflate||(dy=dy.default);const fy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Ey={version:1,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],meshPositions:e[4],meshIndices:e[5],meshEdgesIndices:e[6],meshColors:e[7],entityIDs:e[8],entityMeshes:e[9],entityIsObjects:e[10],positionsDecodeMatrix:e[11]}}(s),a=function(e){return{positions:new Uint16Array(dy.inflate(e.positions).buffer),normals:new Int8Array(dy.inflate(e.normals).buffer),indices:new Uint32Array(dy.inflate(e.indices).buffer),edgeIndices:new Uint32Array(dy.inflate(e.edgeIndices).buffer),meshPositions:new Uint32Array(dy.inflate(e.meshPositions).buffer),meshIndices:new Uint32Array(dy.inflate(e.meshIndices).buffer),meshEdgesIndices:new Uint32Array(dy.inflate(e.meshEdgesIndices).buffer),meshColors:new Uint8Array(dy.inflate(e.meshColors).buffer),entityIDs:dy.inflate(e.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(dy.inflate(e.entityMeshes).buffer),entityIsObjects:new Uint8Array(dy.inflate(e.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(dy.inflate(e.positionsDecodeMatrix).buffer)}}(n);!function(e,t,s,i,r,o){o.getNextId(),i.positionsCompression="precompressed",i.normalsCompression="precompressed";const n=s.positions,a=s.normals,l=s.indices,h=s.edgeIndices,c=s.meshPositions,A=s.meshIndices,p=s.meshEdgesIndices,d=s.meshColors,f=JSON.parse(s.entityIDs),E=s.entityMeshes,y=s.entityIsObjects,g=c.length,I=E.length;for(let r=0;rE[e]E[t]?1:0));for(let e=0;e1||(C[s]=e)}}for(let e=0;e<_;e++){const t=D[e],s=t===_-1,r=P[t]>1,o=Ry(y.subarray(4*t,4*t+3)),u=y[4*t+3]/255,g=a.subarray(p[t],s?a.length:p[t+1]),v=l.subarray(p[t],s?l.length:p[t+1]),T=h.subarray(d[t],s?h.length:d[t+1]),R=c.subarray(f[t],s?c.length:f[t+1]),N=A.subarray(E[t],E[t]+16);if(r){const e=`${n}-geometry.${t}`;i.createGeometry({id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N})}else{const e=`${n}-${t}`;I[C[t]];const s={};i.createMesh(m.apply(s,{id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N,color:o,opacity:u}))}}let O=0;for(let e=0;e1){const t={},r=`${n}-instance.${O++}`,o=`${n}-geometry.${s}`,a=16*T[e],h=u.subarray(a,a+16);i.createMesh(m.apply(t,{id:r,geometryId:o,matrix:h})),l.push(r)}else l.push(s)}if(l.length>0){const e={};i.createEntity(m.apply(e,{id:r,isObject:!0,meshIds:l}))}}}(0,0,a,i,0,o)}};let Dy=window.pako||py;Dy.inflate||(Dy=Dy.default);const Ny=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Cy={version:5,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],eachPrimitivePositionsAndNormalsPortion:e[5],eachPrimitiveIndicesPortion:e[6],eachPrimitiveEdgeIndicesPortion:e[7],eachPrimitiveColor:e[8],primitiveInstances:e[9],eachEntityId:e[10],eachEntityPrimitiveInstancesPortion:e[11],eachEntityMatricesPortion:e[12]}}(s),a=function(e){return{positions:new Float32Array(Dy.inflate(e.positions).buffer),normals:new Int8Array(Dy.inflate(e.normals).buffer),indices:new Uint32Array(Dy.inflate(e.indices).buffer),edgeIndices:new Uint32Array(Dy.inflate(e.edgeIndices).buffer),matrices:new Float32Array(Dy.inflate(e.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Dy.inflate(e.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Dy.inflate(e.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Dy.inflate(e.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Dy.inflate(e.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Dy.inflate(e.primitiveInstances).buffer),eachEntityId:Dy.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Dy.inflate(e.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Dy.inflate(e.eachEntityMatricesPortion).buffer)}}(n);!function(e,t,s,i,r,o){const n=o.getNextId();i.positionsCompression="disabled",i.normalsCompression="precompressed";const a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.eachPrimitivePositionsAndNormalsPortion,p=s.eachPrimitiveIndicesPortion,d=s.eachPrimitiveEdgeIndicesPortion,f=s.eachPrimitiveColor,E=s.primitiveInstances,y=JSON.parse(s.eachEntityId),g=s.eachEntityPrimitiveInstancesPortion,I=s.eachEntityMatricesPortion,v=u.length,T=E.length,_=new Uint8Array(v),R=y.length;for(let e=0;e1||(P[s]=e)}}for(let e=0;e1,r=Ny(f.subarray(4*e,4*e+3)),o=f[4*e+3]/255,A=a.subarray(u[e],t?a.length:u[e+1]),E=l.subarray(u[e],t?l.length:u[e+1]),g=h.subarray(p[e],t?h.length:p[e+1]),I=c.subarray(d[e],t?c.length:d[e+1]);if(s){const t=`${n}-geometry.${e}`;i.createGeometry({id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I})}else{const t=e;y[P[e]];const s={};i.createMesh(m.apply(s,{id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I,color:r,opacity:o}))}}let D=0;for(let e=0;e1){const t={},r="instance."+D++,o="geometry"+s,n=16*I[e],l=A.subarray(n,n+16);i.createMesh(m.apply(t,{id:r,geometryId:o,matrix:l})),a.push(r)}else a.push(s)}if(a.length>0){const e={};i.createEntity(m.apply(e,{id:r,isObject:!0,meshIds:a}))}}}(0,0,a,i,0,o)}};let Oy=window.pako||py;Oy.inflate||(Oy=Oy.default);const by=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Sy={version:6,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],reusedPrimitivesDecodeMatrix:e[5],eachPrimitivePositionsAndNormalsPortion:e[6],eachPrimitiveIndicesPortion:e[7],eachPrimitiveEdgeIndicesPortion:e[8],eachPrimitiveColorAndOpacity:e[9],primitiveInstances:e[10],eachEntityId:e[11],eachEntityPrimitiveInstancesPortion:e[12],eachEntityMatricesPortion:e[13],eachTileAABB:e[14],eachTileEntitiesPortion:e[15]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Oy.inflate(e,t).buffer}return{positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(t(e.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(t(e.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(t(e.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(t(e.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(t(e.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(t(e.primitiveInstances)),eachEntityId:Oy.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(t(e.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(t(e.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,p=s.reusedPrimitivesDecodeMatrix,d=s.eachPrimitivePositionsAndNormalsPortion,f=s.eachPrimitiveIndicesPortion,E=s.eachPrimitiveEdgeIndicesPortion,y=s.eachPrimitiveColorAndOpacity,g=s.primitiveInstances,I=JSON.parse(s.eachEntityId),v=s.eachEntityPrimitiveInstancesPortion,T=s.eachEntityMatricesPortion,_=s.eachTileAABB,R=s.eachTileEntitiesPortion,P=d.length,D=g.length,N=I.length,C=R.length,O=new Uint32Array(P);for(let e=0;e1,A=t===P-1,u=a.subarray(d[t],A?a.length:d[t+1]),I=l.subarray(d[t],A?l.length:d[t+1]),v=h.subarray(f[t],A?h.length:f[t+1]),T=c.subarray(E[t],A?c.length:E[t+1]),_=by(y.subarray(4*t,4*t+3)),R=y[4*t+3]/255,D=o.getNextId();if(r){const e=`${n}-geometry.${s}.${t}`;M[e]||(i.createGeometry({id:e,primitive:"triangles",positionsCompressed:u,indices:v,edgeIndices:T,positionsDecodeMatrix:p}),M[e]=!0),i.createMesh(m.apply(H,{id:D,geometryId:e,origin:b,matrix:C,color:_,opacity:R})),B.push(D)}else i.createMesh(m.apply(H,{id:D,origin:b,primitive:"triangles",positionsCompressed:u,normalsCompressed:I,indices:v,edgeIndices:T,positionsDecodeMatrix:F,color:_,opacity:R})),B.push(D)}B.length>0&&i.createEntity(m.apply(U,{id:R,isObject:!0,meshIds:B}))}}}(e,t,a,i,0,o)}};let wy=window.pako||py;wy.inflate||(wy=wy.default);const xy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function By(e){const t=[];for(let s=0,i=e.length;s1,u=t===O-1,P=xy(R.subarray(6*e,6*e+3)),D=R[6*e+3]/255,N=R[6*e+4]/255,C=R[6*e+5]/255,b=o.getNextId();if(r){const r=_[e],o=p.slice(r,r+16),T=`${n}-geometry.${s}.${t}`;if(!G[T]){let e,s,r,o,n,p;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],u?a.length:E[t+1]),o=By(h.subarray(g[t],u?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],u?a.length:E[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]);break;default:continue}i.createGeometry({id:T,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:p,positionsDecodeMatrix:d}),G[T]=!0}i.createMesh(m.apply(k,{id:b,geometryId:T,origin:B,matrix:o,color:P,metallic:N,roughness:C,opacity:D})),M.push(b)}else{let e,s,r,o,n,p;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],u?a.length:E[t+1]),r=l.subarray(y[t],u?l.length:y[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]),p=A.subarray(v[t],u?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],u?a.length:E[t+1]),o=By(h.subarray(g[t],u?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],u?a.length:E[t+1]),n=c.subarray(I[t],u?c.length:I[t+1]);break;default:continue}i.createMesh(m.apply(k,{id:b,origin:B,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:p,positionsDecodeMatrix:H,color:P,metallic:N,roughness:C,opacity:D})),M.push(b)}}M.length>0&&i.createEntity(m.apply(U,{id:C,isObject:!0,meshIds:M}))}}}(e,t,a,i,0,o)}};let My=window.pako||py;My.inflate||(My=My.default);const Ly=u.vec4(),Uy=u.vec4();const Hy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Gy(e){const t=[];for(let s=0,i=e.length;s1,l=r===F-1,h=Hy(O.subarray(6*e,6*e+3)),c=O[6*e+3]/255,A=O[6*e+4]/255,b=O[6*e+5]/255,S=o.getNextId();if(a){const o=C[e],a=g.slice(o,o+16),N=`${n}-geometry.${s}.${r}`;let O=V[N];if(!O){O={batchThisMesh:!t.reuseGeometries};let e=!1;switch(v[r]){case 0:O.primitiveName="solid",O.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),O.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),O.geometryEdgeIndices=y.subarray(D[r],l?y.length:D[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 1:O.primitiveName="surface",O.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),O.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),O.geometryEdgeIndices=y.subarray(D[r],l?y.length:D[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 2:O.primitiveName="points",O.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),O.geometryColors=Gy(f.subarray(R[r],l?f.length:R[r+1])),e=O.geometryPositions.length>0;break;case 3:O.primitiveName="lines",O.geometryPositions=p.subarray(T[r],l?p.length:T[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;default:continue}if(e||(O=null),O&&(O.geometryPositions.length,O.batchThisMesh)){O.decompressedPositions=new Float32Array(O.geometryPositions.length);const e=O.geometryPositions,t=O.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=p.subarray(T[r],l?p.length:T[r+1]),s=d.subarray(_[r],l?d.length:_[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),a=y.subarray(D[r],l?y.length:D[r+1]),u=t.length>0&&n.length>0;break;case 2:e="points",t=p.subarray(T[r],l?p.length:T[r+1]),o=Gy(f.subarray(R[r],l?f.length:R[r+1])),u=t.length>0;break;case 3:e="lines",t=p.subarray(T[r],l?p.length:T[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),u=t.length>0&&n.length>0;break;default:continue}u&&(i.createMesh(m.apply(Q,{id:S,origin:G,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:B,color:h,metallic:A,roughness:b,opacity:c})),x.push(S))}}x.length>0&&i.createEntity(m.apply(j,{id:h,isObject:!0,meshIds:x}))}}}(e,t,a,i,r,o)}};let Vy=window.pako||py;Vy.inflate||(Vy=Vy.default);const jy=u.vec4(),Qy=u.vec4();const Wy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const zy={version:9,parse:function(e,t,s,i,r,o){const n=function(e){return{metadata:e[0],positions:e[1],normals:e[2],colors:e[3],indices:e[4],edgeIndices:e[5],matrices:e[6],reusedGeometriesDecodeMatrix:e[7],eachGeometryPrimitiveType:e[8],eachGeometryPositionsPortion:e[9],eachGeometryNormalsPortion:e[10],eachGeometryColorsPortion:e[11],eachGeometryIndicesPortion:e[12],eachGeometryEdgeIndicesPortion:e[13],eachMeshGeometriesPortion:e[14],eachMeshMatricesPortion:e[15],eachMeshMaterial:e[16],eachEntityId:e[17],eachEntityMeshesPortion:e[18],eachTileAABB:e[19],eachTileEntitiesPortion:e[20]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Vy.inflate(e,t).buffer}return{metadata:JSON.parse(Vy.inflate(e.metadata,{to:"string"})),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(t(e.eachMeshMaterial)),eachEntityId:JSON.parse(Vy.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.metadata,l=s.positions,h=s.normals,c=s.colors,A=s.indices,p=s.edgeIndices,d=s.matrices,f=s.reusedGeometriesDecodeMatrix,E=s.eachGeometryPrimitiveType,y=s.eachGeometryPositionsPortion,g=s.eachGeometryNormalsPortion,I=s.eachGeometryColorsPortion,v=s.eachGeometryIndicesPortion,T=s.eachGeometryEdgeIndicesPortion,_=s.eachMeshGeometriesPortion,R=s.eachMeshMatricesPortion,P=s.eachMeshMaterial,D=s.eachEntityId,N=s.eachEntityMeshesPortion,C=s.eachTileAABB,O=s.eachTileEntitiesPortion,b=y.length,S=_.length,w=N.length,x=O.length;r&&r.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});const B=new Uint32Array(b);for(let e=0;e1,D=r===b-1,N=Wy(P.subarray(6*e,6*e+3)),C=P[6*e+3]/255,O=P[6*e+4]/255,S=P[6*e+5]/255,w=o.getNextId();if(a){const o=R[e],a=d.slice(o,o+16),_=`${n}-geometry.${s}.${r}`;let P=L[_];if(!P){P={batchThisMesh:!t.reuseGeometries};let e=!1;switch(E[r]){case 0:P.primitiveName="solid",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=p.subarray(T[r],D?p.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 1:P.primitiveName="surface",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=p.subarray(T[r],D?p.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 2:P.primitiveName="points",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryColors=c.subarray(I[r],D?c.length:I[r+1]),e=P.geometryPositions.length>0;break;case 3:P.primitiveName="lines",P.geometryPositions=l.subarray(y[r],D?l.length:y[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;default:continue}if(e||(P=null),P&&(P.geometryPositions.length,P.batchThisMesh)){P.decompressedPositions=new Float32Array(P.geometryPositions.length),P.transformedAndRecompressedPositions=new Uint16Array(P.geometryPositions.length);const e=P.geometryPositions,t=P.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=l.subarray(y[r],D?l.length:y[r+1]),s=h.subarray(g[r],D?h.length:g[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),a=p.subarray(T[r],D?p.length:T[r+1]),u=t.length>0&&n.length>0;break;case 2:e="points",t=l.subarray(y[r],D?l.length:y[r+1]),o=c.subarray(I[r],D?c.length:I[r+1]),u=t.length>0;break;case 3:e="lines",t=l.subarray(y[r],D?l.length:y[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),u=t.length>0&&n.length>0;break;default:continue}u&&(i.createMesh(m.apply(j,{id:w,origin:F,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:G,color:N,metallic:O,roughness:S,opacity:C})),U.push(w))}}U.length>0&&i.createEntity(m.apply(V,{id:C,isObject:!0,meshIds:U}))}}}(e,t,a,i,r,o)}};let Ky=window.pako||py;Ky.inflate||(Ky=Ky.default);const Yy=u.vec4(),Xy=u.vec4();const Zy=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function qy(e,t){const s=[];if(t.length>1)for(let e=0,i=t.length-1;e1)for(let t=0,i=e.length/3-1;t0,a=9*e,A=1===c[a+0],u=c[a+1];c[a+2],c[a+3];const p=c[a+4],d=c[a+5],f=c[a+6],E=c[a+7],m=c[a+8];if(o){const t=new Uint8Array(l.subarray(s,r)).buffer,o=`${n}-texture-${e}`;if(A)i.createTexture({id:o,buffers:[t],minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m});else{const e=new Blob([t],{type:10001===u?"image/jpeg":10002===u?"image/png":"image/gif"}),s=(window.URL||window.webkitURL).createObjectURL(e),r=document.createElement("img");r.src=s,i.createTexture({id:o,image:r,minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m})}}}for(let e=0;e=0?`${n}-texture-${r}`:null,normalsTextureId:a>=0?`${n}-texture-${a}`:null,metallicRoughnessTextureId:o>=0?`${n}-texture-${o}`:null,emissiveTextureId:l>=0?`${n}-texture-${l}`:null,occlusionTextureId:h>=0?`${n}-texture-${h}`:null})}const j=new Uint32Array(H);for(let e=0;e1,l=r===H-1,h=S[e],c=h>=0?`${n}-textureSet-${h}`:null,x=Zy(w.subarray(6*e,6*e+3)),B=w[6*e+3]/255,F=w[6*e+4]/255,U=w[6*e+5]/255,G=o.getNextId();if(a){const o=b[e],a=I.slice(o,o+16),h=`${n}-geometry.${s}.${r}`;let O=z[h];if(!O){O={batchThisMesh:!t.reuseGeometries};let e=!1;switch(T[r]){case 0:O.primitiveName="solid",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryNormals=p.subarray(R[r],l?p.length:R[r+1]),O.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),O.geometryEdgeIndices=y.subarray(C[r],l?y.length:C[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 1:O.primitiveName="surface",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryNormals=p.subarray(R[r],l?p.length:R[r+1]),O.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),O.geometryEdgeIndices=y.subarray(C[r],l?y.length:C[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 2:O.primitiveName="points",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryColors=d.subarray(P[r],l?d.length:P[r+1]),e=O.geometryPositions.length>0;break;case 3:O.primitiveName="lines",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 4:O.primitiveName="lines",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryIndices=qy(O.geometryPositions,E.subarray(N[r],l?E.length:N[r+1])),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;default:continue}if(e||(O=null),O&&(O.geometryPositions.length,O.batchThisMesh)){O.decompressedPositions=new Float32Array(O.geometryPositions.length),O.transformedAndRecompressedPositions=new Uint16Array(O.geometryPositions.length);const e=O.geometryPositions,t=O.decompressedPositions;for(let s=0,i=e.length;s0&&a.length>0;break;case 1:e="surface",t=A.subarray(_[r],l?A.length:_[r+1]),s=p.subarray(R[r],l?p.length:R[r+1]),o=f.subarray(D[r],l?f.length:D[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),h=y.subarray(C[r],l?y.length:C[r+1]),u=t.length>0&&a.length>0;break;case 2:e="points",t=A.subarray(_[r],l?A.length:_[r+1]),n=d.subarray(P[r],l?d.length:P[r+1]),u=t.length>0;break;case 3:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),u=t.length>0&&a.length>0;break;case 4:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=qy(t,E.subarray(N[r],l?E.length:N[r+1])),u=t.length>0&&a.length>0;break;default:continue}u&&(i.createMesh(m.apply(V,{id:G,textureSetId:c,origin:Q,primitive:e,positionsCompressed:t,normalsCompressed:s,uv:o&&o.length>0?o:null,colorsCompressed:n,indices:a,edgeIndices:h,positionsDecodeMatrix:g,color:x,metallic:F,roughness:U,opacity:B})),M.push(G))}}M.length>0&&i.createEntity(m.apply(G,{id:l,isObject:!0,meshIds:M}))}}}(e,t,a,i,r,o)}},$y={};$y[Ey.version]=Ey,$y[gy.version]=gy,$y[Ty.version]=Ty,$y[Py.version]=Py,$y[Cy.version]=Cy,$y[Sy.version]=Sy,$y[Fy.version]=Fy,$y[ky.version]=ky,$y[zy.version]=zy,$y[Jy.version]=Jy;class eg extends n{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys($y)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new uy}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||qm}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=!1!==e}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc)return this.error("load() param expected: src, xkt or manifestSrc"),o;const t={},s=e.includeTypes||this._includeTypes,i=e.excludeTypes||this._excludeTypes,r=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=null!==e.reuseGeometries&&void 0!==e.reuseGeometries?e.reuseGeometries:!1!==this._reuseGeometries,s){t.includeTypesMap={};for(let e=0,i=s.length;e{o.finalize(),a.finalize(),this.viewer.scene.canvas.spinner.processes--,o.once("destroyed",(()=>{this.viewer.metaScene.destroyMetaModel(a.id)})),o.scene.once("tick",(()=>{o.destroyed||(o.scene.fire("modelLoaded",o.id),o.fire("loaded",!0,!1))}))},h=e=>{this.viewer.scene.canvas.spinner.processes--,this.error(e),o.fire("error",e)};let c=0;const A={getNextId:()=>`${n}.${c++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const r=e.metaModelSrc;this._dataSource.getMetaModel(r,(r=>{o.destroyed||(a.loadData(r,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()))}),(e=>{h(`load(): Failed to load model metadata for model '${n} from '${r}' - ${e}`)}))}else e.metaModelData&&(a.loadData(e.metaModelData,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()));else if(e.src)this._loadModel(e.src,e,t,o,a,A,l,h);else if(e.xkt)this._parseModel(e.xkt,e,t,o,a,A),l();else if(e.manifestSrc){const r=function(e){const t=e.split("/");return t.pop(),t.join("/")+"/"}(e.manifestSrc),n=(e,o,n)=>{let l=0;const h=()=>{l>=e.length?o():this._dataSource.getMetaModel(`${r}${e[l]}`,(e=>{a.loadData(e,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),l++,h()}),n)};h()},c=(s,i,n)=>{let l=0;const h=()=>{l>=s.length?i():this._dataSource.getXKT(`${r}${s[l]}`,(s=>{this._parseModel(s,e,t,o,a,A),l++,h()}),n)};h()};this._dataSource.getManifest(e.manifestSrc,(e=>{if(o.destroyed)return;const t=e.xktFiles;if(!t||0===t.length)return void h("load(): Failed to load model manifest - manifest not valid");const s=e.metaModelFiles;s?n(s,(()=>{c(t,l,h)}),h):c(t,l,h)}),h)}return o}_loadModel(e,t,s,i,r,o,n,a){this._dataSource.getXKT(t.src,(e=>{this._parseModel(e,t,s,i,r,o),n()}),a)}_parseModel(e,t,s,i,r,o){if(i.destroyed)return;const n=new DataView(e),a=new Uint8Array(e),l=n.getUint32(0,!0),h=$y[l];if(!h)return void this.error("Unsupported .XKT file version: "+l+" - this XKTLoaderPlugin supports versions "+Object.keys($y));this.log("Loading .xkt V"+l);const c=n.getUint32(4,!0),A=[];let u=4*(c+2);for(let e=0;ee.size)throw new RangeError("offset:"+t+", length:"+s+", size:"+e.size);return e.slice?e.slice(t,t+s):e.webkitSlice?e.webkitSlice(t,t+s):e.mozSlice?e.mozSlice(t,t+s):e.msSlice?e.msSlice(t,t+s):void 0}(e,t,s))}catch(e){r(e)}}}function d(){}function f(e){var s,i=this;i.init=function(e){s=new Blob([],{type:n}),e()},i.writeUint8Array=function(e,i){s=new Blob([s,t?e:e.buffer],{type:n}),i()},i.getData=function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=i,r.readAsText(s,e)}}function E(t){var s=this,i="",r="";s.init=function(e){i+="data:"+(t||"")+";base64,",e()},s.writeUint8Array=function(t,s){var o,n=r.length,a=r;for(r="",o=0;o<3*Math.floor((n+t.length)/3)-n;o++)a+=String.fromCharCode(t[o]);for(;o2?i+=e.btoa(a):r=a,s()},s.getData=function(t){t(i+e.btoa(r))}}function m(e){var s,i=this;i.init=function(t){s=new Blob([],{type:e}),t()},i.writeUint8Array=function(i,r){s=new Blob([s,t?i:i.buffer],{type:e}),r()},i.getData=function(e){e(s)}}function y(e,t,s,i,r,n,a,l,h,c){var A,u,p,d=0,f=t.sn;function E(){e.removeEventListener("message",m,!1),l(u,p)}function m(t){var s=t.data,r=s.data,o=s.error;if(o)return o.toString=function(){return"Error: "+this.message},void h(o);if(s.sn===f)switch("number"==typeof s.codecTime&&(e.codecTime+=s.codecTime),"number"==typeof s.crcTime&&(e.crcTime+=s.crcTime),s.type){case"append":r?(u+=r.length,i.writeUint8Array(r,(function(){y()}),c)):y();break;case"flush":p=s.crc,r?(u+=r.length,i.writeUint8Array(r,(function(){E()}),c)):E();break;case"progress":a&&a(A+s.loaded,n);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",s)}}function y(){(A=d*o)<=n?s.readUint8Array(r+A,Math.min(o,n-A),(function(s){a&&a(A,n);var i=0===A?t:{sn:f};i.type="append",i.data=s;try{e.postMessage(i,[s.buffer])}catch(t){e.postMessage(i)}d++}),h):e.postMessage({sn:f,type:"flush"})}u=0,e.addEventListener("message",m,!1),y()}function g(e,t,s,i,r,n,l,h,c,A){var u,p=0,d=0,f="input"===n,E="output"===n,m=new a;!function n(){var a;if((u=p*o)127?r[s-128]:String.fromCharCode(s);return i}function T(e){return decodeURIComponent(escape(e))}function _(e){var t,s="";for(t=0;t>16,s=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&s)>>11,(2016&s)>>5,2*(31&s),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((i||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(s+10,!0),e.compressedSize=t.view.getUint32(s+14,!0),e.uncompressedSize=t.view.getUint32(s+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(s+22,!0),e.extraFieldLength=t.view.getUint16(s+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function P(t,o,n){var a=0;function l(){}l.prototype.getData=function(i,o,l,c){var A=this;function u(e,t){c&&!function(e){var t=h(4);return t.view.setUint32(0,e),A.crc32==t.view.getUint32(0)}(t)?n("CRC failed."):i.getData((function(e){o(e)}))}function p(e){n(e||r)}function d(e){n(e||"Error while writing file data.")}t.readUint8Array(A.offset,30,(function(r){var o,f=h(r.length,r);1347093252==f.view.getUint32(0)?(R(A,f,4,!1,n),o=A.offset+30+A.filenameLength+A.extraFieldLength,i.init((function(){0===A.compressionMethod?I(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d):function(t,s,i,r,o,n,a,l,h,c,A){var u=a?"output":"none";e.zip.useWebWorkers?y(t,{sn:s,codecClass:"Inflater",crcType:u},i,r,o,n,h,l,c,A):g(new e.zip.Inflater,i,r,o,n,u,h,l,c,A)}(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d)}),d)):n(s)}),p)};var c={getEntries:function(e){var r=this._worker;!function(e){t.size<22?n(s):r(22,(function(){r(Math.min(65558,t.size),(function(){n(s)}))}));function r(s,r){t.readUint8Array(t.size-s,s,(function(t){for(var s=t.length-22;s>=0;s--)if(80===t[s]&&75===t[s+1]&&5===t[s+2]&&6===t[s+3])return void e(new DataView(t.buffer,s,22));r()}),(function(){n(i)}))}}((function(o){var a,c;a=o.getUint32(16,!0),c=o.getUint16(8,!0),a<0||a>=t.size?n(s):t.readUint8Array(a,t.size-a,(function(t){var i,o,a,A,u=0,p=[],d=h(t.length,t);for(i=0;i>>8^s[255&(t^e[i])];this.crc=t},a.prototype.get=function(){return~this.crc},a.prototype.table=function(){var e,t,s,i=[];for(e=0;e<256;e++){for(s=e,t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;i[e]=s}return i}(),l.prototype.append=function(e,t){return e},l.prototype.flush=function(){},A.prototype=new c,A.prototype.constructor=A,u.prototype=new c,u.prototype.constructor=u,p.prototype=new c,p.prototype.constructor=p,d.prototype.getData=function(e){e(this.data)},f.prototype=new d,f.prototype.constructor=f,E.prototype=new d,E.prototype.constructor=E,m.prototype=new d,m.prototype.constructor=m;var O={deflater:["z-worker.js","deflate.js"],inflater:["z-worker.js","inflate.js"]};function b(t,s,i){if(null===e.zip.workerScripts||null===e.zip.workerScriptsPath){var r;if(e.zip.workerScripts){if(r=e.zip.workerScripts[t],!Array.isArray(r))return void i(new Error("zip.workerScripts."+t+" is not an array!"));r=function(e){var t=document.createElement("a");return e.map((function(e){return t.href=e,t.href}))}(r)}else(r=O[t].slice(0))[0]=(e.zip.workerScriptsPath||"")+r[0];var o=new Worker(r[0]);o.codecTime=o.crcTime=0,o.postMessage({type:"importScripts",scripts:r.slice(1)}),o.addEventListener("message",(function e(t){var r=t.data;if(r.error)return o.terminate(),void i(r.error);"importScripts"===r.type&&(o.removeEventListener("message",e),o.removeEventListener("error",n),s(o))})),o.addEventListener("error",n)}else i(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));function n(e){o.terminate(),i(e)}}function S(e){console.error(e)}e.zip={Reader:c,Writer:d,BlobReader:p,Data64URIReader:u,TextReader:A,BlobWriter:m,Data64URIWriter:E,TextWriter:f,createReader:function(e,t,s){s=s||S,e.init((function(){P(e,t,s)}),s)},createWriter:function(e,t,s,i){s=s||S,i=!!i,e.init((function(){C(e,t,s,i)}),s)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null}}(tg);!function(e){var t,s,i=e.Reader,r=e.Writer;try{s=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(e){}function o(e){var t=this;function s(s,i){var r;t.data?s():((r=new XMLHttpRequest).addEventListener("load",(function(){t.size||(t.size=Number(r.getResponseHeader("Content-Length"))||Number(r.response.byteLength)),t.data=new Uint8Array(r.response),s()}),!1),r.addEventListener("error",i,!1),r.open("GET",e),r.responseType="arraybuffer",r.send())}t.size=0,t.init=function(i,r){if(function(e){var t=document.createElement("a");return t.href=e,"http:"===t.protocol||"https:"===t.protocol}(e)){var o=new XMLHttpRequest;o.addEventListener("load",(function(){t.size=Number(o.getResponseHeader("Content-Length")),t.size?i():s(i,r)}),!1),o.addEventListener("error",r,!1),o.open("HEAD",e),o.send()}else s(i,r)},t.readUint8Array=function(e,i,r,o){s((function(){r(new Uint8Array(t.data.subarray(e,e+i)))}),o)}}function n(e){var t=this;t.size=0,t.init=function(s,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(){t.size=Number(r.getResponseHeader("Content-Length")),"bytes"==r.getResponseHeader("Accept-Ranges")?s():i("HTTP Range not supported.")}),!1),r.addEventListener("error",i,!1),r.open("HEAD",e),r.send()},t.readUint8Array=function(t,s,i,r){!function(t,s,i,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="arraybuffer",o.setRequestHeader("Range","bytes="+t+"-"+(t+s-1)),o.addEventListener("load",(function(){i(o.response)}),!1),o.addEventListener("error",r,!1),o.send()}(t,s,(function(e){i(new Uint8Array(e))}),r)}}function a(e){var t=this;t.size=0,t.init=function(s,i){t.size=e.byteLength,s()},t.readUint8Array=function(t,s,i,r){i(new Uint8Array(e.slice(t,t+s)))}}function l(){var e,t=this;t.init=function(t,s){e=new Uint8Array,t()},t.writeUint8Array=function(t,s,i){var r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length),e=r,s()},t.getData=function(t){t(e.buffer)}}function h(e,t){var i,r=this;r.init=function(t,s){e.createWriter((function(e){i=e,t()}),s)},r.writeUint8Array=function(e,r,o){var n=new Blob([s?e:e.buffer],{type:t});i.onwrite=function(){i.onwrite=null,r()},i.onerror=o,i.write(n)},r.getData=function(t){e.file(t)}}o.prototype=new i,o.prototype.constructor=o,n.prototype=new i,n.prototype.constructor=n,a.prototype=new i,a.prototype.constructor=a,l.prototype=new r,l.prototype.constructor=l,h.prototype=new r,h.prototype.constructor=h,e.FileWriter=h,e.HttpReader=o,e.HttpRangeReader=n,e.ArrayBufferReader=a,e.ArrayBufferWriter=l,e.fs&&((t=e.fs.ZipDirectoryEntry).prototype.addHttpContent=function(s,i,r){return function(s,i,r,o){if(s.directory)return o?new t(s.fs,i,r,s):new e.fs.ZipFileEntry(s.fs,i,r,s);throw"Parent entry is not a directory."}(this,s,{data:i,Reader:r?n:o})},t.prototype.importHttpContent=function(e,t,s,i){this.importZip(t?new n(e):new o(e),s,i)},e.fs.FS.prototype.importHttpContent=function(e,s,i,r){this.entries=[],this.root=new t(this),this.root.importHttpContent(e,s,i,r)})}(tg.zip);var sg,ig,rg,og,ng,ag,lg,hg=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},cg=hg({"dist/web-ifc-mt.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return N.buffer!=x.buffer&&z(),x}function i(){return N.buffer!=x.buffer&&z(),B}function r(){return N.buffer!=x.buffer&&z(),F}function o(){return N.buffer!=x.buffer&&z(),M}function n(){return N.buffer!=x.buffer&&z(),L}function a(){return N.buffer!=x.buffer&&z(),U}function l(){return N.buffer!=x.buffer&&z(),G}var h,c,A=void 0!==e?e:{};A.ready=new Promise((function(e,t){h=e,c=t}));var u,p,d,f=Object.assign({},A),E="./this.program",m=(e,t)=>{throw t},y="object"==typeof window,g="function"==typeof importScripts,I="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=A.ENVIRONMENT_IS_PTHREAD||!1,T="";function _(e){return A.locateFile?A.locateFile(e,T):T+e}(y||g)&&(g?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),s&&(T=s),T=0!==T.indexOf("blob:")?T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g&&(d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)});var R,P=A.print||console.log.bind(console),D=A.printErr||console.warn.bind(console);Object.assign(A,f),f=null,A.arguments,A.thisProgram&&(E=A.thisProgram),A.quit&&(m=A.quit),A.wasmBinary&&(R=A.wasmBinary);var N,C,O=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&ae("no native wasm support detected");var b,S=!1;function w(e,t){e||ae(t)}var x,B,F,M,L,U,H,G,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function V(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&k)return k.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,r):e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function j(e,t){return(e>>>=0)?V(i(),e,t):""}function Q(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function W(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function z(){var e=N.buffer;A.HEAP8=x=new Int8Array(e),A.HEAP16=F=new Int16Array(e),A.HEAP32=L=new Int32Array(e),A.HEAPU8=B=new Uint8Array(e),A.HEAPU16=M=new Uint16Array(e),A.HEAPU32=U=new Uint32Array(e),A.HEAPF32=H=new Float32Array(e),A.HEAPF64=G=new Float64Array(e)}var K,Y=A.INITIAL_MEMORY||16777216;if(w(Y>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Y+"! (STACK_SIZE=5242880)"),v)N=A.wasmMemory;else if(A.wasmMemory)N=A.wasmMemory;else if(!((N=new WebAssembly.Memory({initial:Y/65536,maximum:65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw D("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),I&&D("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");z(),Y=N.buffer.byteLength;var X=[],Z=[],q=[];function J(){return O}function $(){v||(A.noFSInit||ye.init.initialized||ye.init(),ye.ignorePermissions=!1,_e(Z))}var ee,te,se,ie=0,re=null;function oe(e){ie++,A.monitorRunDependencies&&A.monitorRunDependencies(ie)}function ne(e){if(ie--,A.monitorRunDependencies&&A.monitorRunDependencies(ie),0==ie&&re){var t=re;re=null,t()}}function ae(e){A.onAbort&&A.onAbort(e),D(e="Aborted("+e+")"),S=!0,b=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw c(t),t}function le(e){return e.startsWith("data:application/octet-stream;base64,")}function he(e){try{if(e==ee&&R)return new Uint8Array(R);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){ae(e)}}function ce(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ae(e){var t=Te.pthreads[e];w(t),Te.returnWorkerToPool(t)}le(ee="web-ifc-mt.wasm")||(ee=_(ee));var ue={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=ue.isAbs(e),s="/"===e.substr(-1);return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ue.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ue.normalize(e.join("/"))},join2:(e,t)=>ue.normalize(e+"/"+t)},pe={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:ye.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=ue.isAbs(i)}return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=pe.resolve(e).substr(1),t=pe.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:W(e)+1,r=new Array(i),o=Q(e,r,0,r.length);return t&&(r.length=o),r}var fe={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){fe.ttys[e]={input:[],output:[],ops:t},ye.registerDevice(e,fe.stream_ops)},stream_ops:{open:function(e){var t=fe.ttys[e.node.rdev];if(!t)throw new ye.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new ye.ErrnoError(60);for(var o=0,n=0;n0&&(P(V(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(D(V(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(D(V(e.output,0)),e.output=[])}}};function Ee(e){ae()}var me={ops_table:null,mount:function(e){return me.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(ye.isBlkdev(s)||ye.isFIFO(s))throw new ye.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:ye.chrdev_stream_ops}});var r=ye.createNode(e,t,s,i);return ye.isDir(r.mode)?(r.node_ops=me.ops_table.dir.node,r.stream_ops=me.ops_table.dir.stream,r.contents={}):ye.isFile(r.mode)?(r.node_ops=me.ops_table.file.node,r.stream_ops=me.ops_table.file.stream,r.usedBytes=0,r.contents=null):ye.isLink(r.mode)?(r.node_ops=me.ops_table.link.node,r.stream_ops=me.ops_table.link.stream):ye.isChrdev(r.mode)&&(r.node_ops=me.ops_table.chrdev.node,r.stream_ops=me.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=ye.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,ye.isDir(e.mode)?t.size=4096:ye.isFile(e.mode)?t.size=e.usedBytes:ye.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup:function(e,t){throw ye.genericErrors[44]},mknod:function(e,t,s,i){return me.createNode(e,t,s,i)},rename:function(e,t,s){if(ye.isDir(e.mode)){var i;try{i=ye.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new ye.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=ye.lookupNode(e,t);for(var i in s.contents)throw new ye.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=me.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!ye.isLink(e.mode))throw new ye.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||i+s>>=0,t().set(l,n>>>0)}else a=!1,n=l.byteOffset;return{ptr:n,allocated:a}},msync:function(e,t,s,i,r){return me.stream_ops.write(e,t,0,i,s,!1),0}}},ye={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=pe.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new ye.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=ye.root,r="/",o=0;o40)throw new ye.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(ye.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%ye.nameTable.length},hashAddNode:e=>{var t=ye.hashName(e.parent.id,e.name);e.name_next=ye.nameTable[t],ye.nameTable[t]=e},hashRemoveNode:e=>{var t=ye.hashName(e.parent.id,e.name);if(ye.nameTable[t]===e)ye.nameTable[t]=e.name_next;else for(var s=ye.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=ye.mayLookup(e);if(s)throw new ye.ErrnoError(s,e);for(var i=ye.hashName(e.id,t),r=ye.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return ye.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new ye.FSNode(e,t,s,i);return ye.hashAddNode(r),r},destroyNode:e=>{ye.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=ye.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>ye.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=ye.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return ye.lookupNode(e,t),20}catch(e){}return ye.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=ye.lookupNode(e,t)}catch(e){return e.errno}var r=ye.nodePermissions(e,"wx");if(r)return r;if(s){if(!ye.isDir(i.mode))return 54;if(ye.isRoot(i)||ye.getPath(i)===ye.cwd())return 10}else if(ye.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?ye.isLink(e.mode)?32:ye.isDir(e.mode)&&("r"!==ye.flagsToPermissionString(t)||512&t)?31:ye.nodePermissions(e,ye.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=ye.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!ye.streams[s])return s;throw new ye.ErrnoError(33)},getStream:e=>ye.streams[e],createStream:(e,t,s)=>{ye.FSStream||(ye.FSStream=function(){this.shared={}},ye.FSStream.prototype={},Object.defineProperties(ye.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new ye.FSStream,e);var i=ye.nextfd(t,s);return e.fd=i,ye.streams[i]=e,e},closeStream:e=>{ye.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=ye.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new ye.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{ye.devices[e]={stream_ops:t}},getDevice:e=>ye.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),ye.syncFSRequests++,ye.syncFSRequests>1&&D("warning: "+ye.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=ye.getMounts(ye.root.mount),i=0;function r(e){return ye.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&ye.root)throw new ye.ErrnoError(10);if(!r&&!o){var n=ye.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,ye.isMountpoint(i))throw new ye.ErrnoError(10);if(!ye.isDir(i.mode))throw new ye.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?ye.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=ye.lookupPath(e,{follow_mount:!1});if(!ye.isMountpoint(t.node))throw new ye.ErrnoError(28);var s=t.node,i=s.mounted,r=ye.getMounts(i);Object.keys(ye.nameTable).forEach((e=>{for(var t=ye.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&ye.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=ye.lookupPath(e,{parent:!0}).node,r=ue.basename(e);if(!r||"."===r||".."===r)throw new ye.ErrnoError(28);var o=ye.mayCreate(i,r);if(o)throw new ye.ErrnoError(o);if(!i.node_ops.mknod)throw new ye.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,ye.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,ye.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,ye.mknod(e,t,s)),symlink:(e,t)=>{if(!pe.resolve(e))throw new ye.ErrnoError(44);var s=ye.lookupPath(t,{parent:!0}).node;if(!s)throw new ye.ErrnoError(44);var i=ue.basename(t),r=ye.mayCreate(s,i);if(r)throw new ye.ErrnoError(r);if(!s.node_ops.symlink)throw new ye.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=ue.dirname(e),o=ue.dirname(t),n=ue.basename(e),a=ue.basename(t);if(s=ye.lookupPath(e,{parent:!0}).node,i=ye.lookupPath(t,{parent:!0}).node,!s||!i)throw new ye.ErrnoError(44);if(s.mount!==i.mount)throw new ye.ErrnoError(75);var l,h=ye.lookupNode(s,n),c=pe.relative(e,o);if("."!==c.charAt(0))throw new ye.ErrnoError(28);if("."!==(c=pe.relative(t,r)).charAt(0))throw new ye.ErrnoError(55);try{l=ye.lookupNode(i,a)}catch(e){}if(h!==l){var A=ye.isDir(h.mode),u=ye.mayDelete(s,n,A);if(u)throw new ye.ErrnoError(u);if(u=l?ye.mayDelete(i,a,A):ye.mayCreate(i,a))throw new ye.ErrnoError(u);if(!s.node_ops.rename)throw new ye.ErrnoError(63);if(ye.isMountpoint(h)||l&&ye.isMountpoint(l))throw new ye.ErrnoError(10);if(i!==s&&(u=ye.nodePermissions(s,"w")))throw new ye.ErrnoError(u);ye.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{ye.hashAddNode(h)}}},rmdir:e=>{var t=ye.lookupPath(e,{parent:!0}).node,s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!0);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.rmdir)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.rmdir(t,s),ye.destroyNode(i)},readdir:e=>{var t=ye.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new ye.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=ye.lookupPath(e,{parent:!0}).node;if(!t)throw new ye.ErrnoError(44);var s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!1);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.unlink)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.unlink(t,s),ye.destroyNode(i)},readlink:e=>{var t=ye.lookupPath(e).node;if(!t)throw new ye.ErrnoError(44);if(!t.node_ops.readlink)throw new ye.ErrnoError(28);return pe.resolve(ye.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=ye.lookupPath(e,{follow:!t}).node;if(!s)throw new ye.ErrnoError(44);if(!s.node_ops.getattr)throw new ye.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>ye.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?ye.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{ye.chmod(e,t,!0)},fchmod:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);ye.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?ye.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{ye.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=ye.getStream(e);if(!i)throw new ye.ErrnoError(8);ye.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new ye.ErrnoError(28);var s;if(!(s="string"==typeof e?ye.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);if(ye.isDir(s.mode))throw new ye.ErrnoError(31);if(!ye.isFile(s.mode))throw new ye.ErrnoError(28);var i=ye.nodePermissions(s,"w");if(i)throw new ye.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);if(0==(2097155&s.flags))throw new ye.ErrnoError(28);ye.truncate(s.node,t)},utime:(e,t,s)=>{var i=ye.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new ye.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?ye.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=ue.normalize(e);try{i=ye.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var r=!1;if(64&t)if(i){if(128&t)throw new ye.ErrnoError(20)}else i=ye.mknod(e,s,0),r=!0;if(!i)throw new ye.ErrnoError(44);if(ye.isChrdev(i.mode)&&(t&=-513),65536&t&&!ye.isDir(i.mode))throw new ye.ErrnoError(54);if(!r){var o=ye.mayOpen(i,t);if(o)throw new ye.ErrnoError(o)}512&t&&!r&&ye.truncate(i,0),t&=-131713;var n=ye.createStream({node:i,path:ye.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return n.stream_ops.open&&n.stream_ops.open(n),!A.logReadFiles||1&t||(ye.readFiles||(ye.readFiles={}),e in ye.readFiles||(ye.readFiles[e]=1)),n},close:e=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ye.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ye.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new ye.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(1==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.read)throw new ye.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.write)throw new ye.ErrnoError(28);e.seekable&&1024&e.flags&&ye.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(t<0||s<=0)throw new ye.ErrnoError(28);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(!ye.isFile(e.node.mode)&&!ye.isDir(e.node.mode))throw new ye.ErrnoError(43);if(!e.stream_ops.allocate)throw new ye.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new ye.ErrnoError(2);if(1==(2097155&e.flags))throw new ye.ErrnoError(2);if(!e.stream_ops.mmap)throw new ye.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new ye.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=ye.open(e,t.flags),r=ye.stat(e).size,o=new Uint8Array(r);return ye.read(i,o,0,r,0),"utf8"===t.encoding?s=V(o,0):"binary"===t.encoding&&(s=o),ye.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=ye.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(W(t)+1),o=Q(t,r,0,r.length);ye.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");ye.write(i,t,0,t.byteLength,void 0,s.canOwn)}ye.close(i)},cwd:()=>ye.currentPath,chdir:e=>{var t=ye.lookupPath(e,{follow:!0});if(null===t.node)throw new ye.ErrnoError(44);if(!ye.isDir(t.node.mode))throw new ye.ErrnoError(54);var s=ye.nodePermissions(t.node,"x");if(s)throw new ye.ErrnoError(s);ye.currentPath=t.path},createDefaultDirectories:()=>{ye.mkdir("/tmp"),ye.mkdir("/home"),ye.mkdir("/home/web_user")},createDefaultDevices:()=>{ye.mkdir("/dev"),ye.registerDevice(ye.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),ye.mkdev("/dev/null",ye.makedev(1,3)),fe.register(ye.makedev(5,0),fe.default_tty_ops),fe.register(ye.makedev(6,0),fe.default_tty1_ops),ye.mkdev("/dev/tty",ye.makedev(5,0)),ye.mkdev("/dev/tty1",ye.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>ae("randomDevice")}();ye.createDevice("/dev","random",e),ye.createDevice("/dev","urandom",e),ye.mkdir("/dev/shm"),ye.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ye.mkdir("/proc");var e=ye.mkdir("/proc/self");ye.mkdir("/proc/self/fd"),ye.mount({mount:()=>{var t=ye.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=ye.getStream(s);if(!i)throw new ye.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{A.stdin?ye.createDevice("/dev","stdin",A.stdin):ye.symlink("/dev/tty","/dev/stdin"),A.stdout?ye.createDevice("/dev","stdout",null,A.stdout):ye.symlink("/dev/tty","/dev/stdout"),A.stderr?ye.createDevice("/dev","stderr",null,A.stderr):ye.symlink("/dev/tty1","/dev/stderr"),ye.open("/dev/stdin",0),ye.open("/dev/stdout",1),ye.open("/dev/stderr",1)},ensureErrnoError:()=>{ye.ErrnoError||(ye.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ye.ErrnoError.prototype=new Error,ye.ErrnoError.prototype.constructor=ye.ErrnoError,[44].forEach((e=>{ye.genericErrors[e]=new ye.ErrnoError(e),ye.genericErrors[e].stack=""})))},staticInit:()=>{ye.ensureErrnoError(),ye.nameTable=new Array(4096),ye.mount(me,{},"/"),ye.createDefaultDirectories(),ye.createDefaultDevices(),ye.createSpecialDirectories(),ye.filesystems={MEMFS:me}},init:(e,t,s)=>{ye.init.initialized=!0,ye.ensureErrnoError(),A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=s||A.stderr,ye.createStandardStreams()},quit:()=>{ye.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=ye.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=ye.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=ye.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=ue.basename(e),i=ye.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:ye.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=ue.join2(e,o);try{ye.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=ue.join2("string"==typeof e?e:ye.getPath(e),t),n=ye.getMode(i,r);return ye.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:ye.getPath(e),n=t?ue.join2(e,t):e);var a=ye.getMode(i,r),l=ye.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=ue.join2("string"==typeof e?e:ye.getPath(e),t),o=ye.getMode(!!s,!!i);ye.createDevice.major||(ye.createDevice.major=64);var n=ye.makedev(ye.createDevice.major++,0);return ye.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=de(u(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ye.ErrnoError(29)}},createLazyFile:(e,s,i,r,o)=>{function n(){this.lengthKnown=!1,this.chunks=[]}if(n.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,s=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=s);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,s-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>s-1)throw new Error("only "+s+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),s!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):de(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&s||(n=s=1,s=this.getter(0).length,n=s,P("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=s,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!g)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:a}}else l={isDevice:!1,url:i};var h=ye.createFile(e,s,l,r,o);l.contents?h.contents=l.contents:l.url&&(h.contents=null,h.url=l.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var c={};function A(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=h.stream_ops[e];c[e]=function(){return ye.forceLoadFile(h),t.apply(null,arguments)}})),c.read=(e,t,s,i,r)=>(ye.forceLoadFile(h),A(e,t,s,i,r)),c.mmap=(e,s,i,r,o)=>{ye.forceLoadFile(h);var n=Ee();if(!n)throw new ye.ErrnoError(48);return A(e,t(),n,s,i),{ptr:n,allocated:!0}},h.stream_ops=c,h},createPreloadedFile:(e,t,s,i,r,o,n,a,l,h)=>{var c=t?pe.resolve(ue.join2(e,t)):e;function A(s){function A(s){h&&h(),a||ye.createDataFile(e,t,s,i,r,l),o&&o(),ne()}Browser.handledByPreloadPlugin(s,c,A,(()=>{n&&n(),ne()}))||A(s)}oe(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;p(e,(s=>{w(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&ne()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&oe()}(s,(e=>A(e)),n):A(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{P("creating db"),r.result.createObjectStore(ye.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([ye.DB_STORE_NAME],"readwrite"),o=i.objectStore(ye.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(ye.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([ye.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(ye.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{ye.analyzePath(e).exists&&ye.unlink(e),ye.createDataFile(ue.dirname(e),ue.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},ge={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(ue.isAbs(t))return t;var i;if(i=-100===e?ye.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!s)throw new ye.ErrnoError(44);return i}return ue.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&ue.normalize(t)!==ue.normalize(ye.getPath(e.node)))return-54;throw e}n()[s>>>2]=i.dev,n()[s+8>>>2]=i.ino,n()[s+12>>>2]=i.mode,a()[s+16>>>2]=i.nlink,n()[s+20>>>2]=i.uid,n()[s+24>>>2]=i.gid,n()[s+28>>>2]=i.rdev,se=[i.size>>>0,(te=i.size,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+40>>>2]=se[0],n()[s+44>>>2]=se[1],n()[s+48>>>2]=4096,n()[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),l=i.ctime.getTime();return se=[Math.floor(r/1e3)>>>0,(te=Math.floor(r/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+56>>>2]=se[0],n()[s+60>>>2]=se[1],a()[s+64>>>2]=r%1e3*1e3,se=[Math.floor(o/1e3)>>>0,(te=Math.floor(o/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+72>>>2]=se[0],n()[s+76>>>2]=se[1],a()[s+80>>>2]=o%1e3*1e3,se=[Math.floor(l/1e3)>>>0,(te=Math.floor(l/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+88>>>2]=se[0],n()[s+92>>>2]=se[1],a()[s+96>>>2]=l%1e3*1e3,se=[i.ino>>>0,(te=i.ino,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+104>>>2]=se[0],n()[s+108>>>2]=se[1],0},doMsync:function(e,t,s,r,o){if(!ye.isFile(t.node.mode))throw new ye.ErrnoError(43);if(2&r)return 0;e>>>=0;var n=i().slice(e,e+s);ye.msync(t,n,o,s,r)},varargs:void 0,get:function(){return ge.varargs+=4,n()[ge.varargs-4>>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=ye.getStream(e);if(!t)throw new ye.ErrnoError(8);return t}};function Ie(e){if(v)return ls(1,1,e);b=e,J()||(Te.terminateAllThreads(),A.onExit&&A.onExit(e),S=!0),m(e,new ce(e))}var ve=function(e,t){if(b=e,!t&&v)throw Re(e),"unwind";Ie(e)},Te={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){v?Te.initWorker():Te.initMainThread()},initMainThread:function(){for(var e=navigator.hardwareConcurrency;e--;)Te.allocateUnusedWorker()},initWorker:function(){O=!1},setExitStatus:function(e){b=e},terminateAllThreads:function(){for(var e of Object.values(Te.pthreads))Te.returnWorkerToPool(e);for(var e of Te.unusedWorkers)e.terminate();Te.unusedWorkers=[]},returnWorkerToPool:function(e){var t=e.pthread_ptr;delete Te.pthreads[t],Te.unusedWorkers.push(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Fs(t)},receiveObjectTransfer:function(e){},threadInitTLS:function(){Te.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=s=>{var i,r=s.data,o=r.cmd;if(e.pthread_ptr&&(Te.currentProxiedOperationCallerThread=e.pthread_ptr),r.targetThread&&r.targetThread!=Os()){var n=Te.pthreads[r.targetThread];return n?n.postMessage(r,r.transferList):D('Internal error! Worker sent a message "'+o+'" to target pthread '+r.targetThread+", but that thread no longer exists!"),void(Te.currentProxiedOperationCallerThread=void 0)}"processProxyingQueue"===o?ts(r.queue):"spawnThread"===o?function(e){var t=Te.getNewWorker();if(!t)return 6;Te.runningWorkers.push(t),Te.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var s={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};t.postMessage(s,e.transferList)}(r):"cleanupThread"===o?Ae(r.thread):"killThread"===o?function(e){var t=Te.pthreads[e];delete Te.pthreads[e],t.terminate(),Fs(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(t),1),t.pthread_ptr=0}(r.thread):"cancelThread"===o?(i=r.thread,Te.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"print"===o?P("Thread "+r.threadId+": "+r.text):"printErr"===o?D("Thread "+r.threadId+": "+r.text):"alert"===o?alert("Thread "+r.threadId+": "+r.text):"setimmediate"===r.target?e.postMessage(r):"callHandler"===o?A[r.handler](...r.args):o&&D("worker sent an unknown command "+o),Te.currentProxiedOperationCallerThread=void 0},e.onerror=e=>{throw D("worker sent an error! "+e.filename+":"+e.lineno+": "+e.message),e};var i=[];for(var r of["onExit","onAbort","print","printErr"])A.hasOwnProperty(r)&&i.push(r);e.postMessage({cmd:"load",handlers:i,urlOrBlob:A.mainScriptUrlOrBlob||s,wasmMemory:N,wasmModule:C})})),loadWasmModuleToAllWorkers:function(e){if(v)return e();Promise.all(Te.unusedWorkers.map(Te.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker:function(){var e,t=_("web-ifc-mt.worker.js");e=new Worker(t),Te.unusedWorkers.push(e)},getNewWorker:function(){return 0==Te.unusedWorkers.length&&(Te.allocateUnusedWorker(),Te.loadWasmModuleToWorker(Te.unusedWorkers[0])),Te.unusedWorkers.pop()}};function _e(e){for(;e.length>0;)e.shift()(A)}function Re(e){if(v)return ls(2,0,e);try{ve(e)}catch(e){!function(e){if(e instanceof ce||"unwind"==e)return b;m(1,e)}(e)}}A.PThread=Te,A.establishStackSpace=function(){var e=Os(),t=n()[e+52>>>2],s=n()[e+56>>>2];Us(t,t-s),Gs(t)};var Pe=[];function De(e){var t=Pe[e];return t||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=t=K.get(e)),t}function Ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){a()[this.ptr+4>>>2]=e},this.get_type=function(){return a()[this.ptr+4>>>2]},this.set_destructor=function(e){a()[this.ptr+8>>>2]=e},this.get_destructor=function(){return a()[this.ptr+8>>>2]},this.set_refcount=function(e){n()[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){Atomics.add(n(),this.ptr+0>>2,1)},this.release_ref=function(){return 1===Atomics.sub(n(),this.ptr+0>>2,1)},this.set_adjusted_ptr=function(e){a()[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return a()[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Vs(this.get_type()))return a()[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}A.invokeEntryPoint=function(e,t){var s=De(e)(t);J()?Te.setExitStatus(s):Ms(s)};var Ce="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",Oe={};function be(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Se(e){return this.fromWireType(n()[e>>>2])}var we={},xe={},Be={};function Fe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function Me(e,t){return e=Fe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Le(e,t){var s=Me(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var Ue=void 0;function He(e){throw new Ue(e)}function Ge(e,t,s){function i(t){var i=s(t);i.length!==e.length&&He("Mismatched type converter count");for(var r=0;r{xe.hasOwnProperty(e)?r[t]=xe[e]:(o.push(e),we.hasOwnProperty(e)||(we[e]=[]),we[e].push((()=>{r[t]=xe[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var ke={};function Ve(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var je=void 0;function Qe(e){for(var t="",s=e;i()[s>>>0];)t+=je[i()[s++>>>0]];return t}var We=void 0;function ze(e){throw new We(e)}function Ke(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ze('type "'+i+'" must have a positive integer typeid pointer'),xe.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ze("Cannot register type '"+i+"' twice")}if(xe[e]=t,delete Be[e],we.hasOwnProperty(e)){var r=we[e];delete we[e],r.forEach((e=>e()))}}function Ye(e){if(!(this instanceof mt))return!1;if(!(e instanceof mt))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function Xe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ze(e){ze(e.$$.ptrType.registeredClass.name+" instance already deleted")}var qe=!1;function Je(e){}function $e(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function et(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=et(e,t,s.baseClass);return null===i?null:s.downcast(i)}var tt={};function st(){return Object.keys(lt).length}function it(){var e=[];for(var t in lt)lt.hasOwnProperty(t)&&e.push(lt[t]);return e}var rt=[];function ot(){for(;rt.length;){var e=rt.pop();e.$$.deleteScheduled=!1,e.delete()}}var nt=void 0;function at(e){nt=e,rt.length&&nt&&nt(ot)}var lt={};function ht(e,t){return t=function(e,t){for(void 0===t&&ze("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),lt[t]}function ct(e,t){return t.ptrType&&t.ptr||He("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&He("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ut(Object.create(e,{$$:{value:t}}))}function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=ht(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?ct(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ct(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=tt[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=et(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function ut(e){return"undefined"==typeof FinalizationRegistry?(ut=e=>e,e):(qe=new FinalizationRegistry((e=>{$e(e.$$)})),Je=e=>qe.unregister(e),(ut=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};qe.register(e,s,e)}return e})(e))}function pt(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ut(Object.create(Object.getPrototypeOf(this),{$$:{value:Xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function dt(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),Je(this),$e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ft(){return!this.$$.ptr}function Et(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),rt.push(this),1===rt.length&&nt&&nt(ot),this.$$.deleteScheduled=!0,this}function mt(){}function yt(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ze("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function gt(e,t,s){A.hasOwnProperty(e)?((void 0===s||void 0!==A[e].overloadTable&&void 0!==A[e].overloadTable[s])&&ze("Cannot register public name '"+e+"' twice"),yt(A,e,e),A.hasOwnProperty(s)&&ze("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),A[e].overloadTable[s]=t):(A[e]=t,void 0!==s&&(A[e].numArguments=s))}function It(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function vt(e,t,s){for(;t!==s;)t.upcast||ze("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Tt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function _t(e,t){var s;if(null===t)return this.isReference&&ze("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=vt(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ze("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,Vt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ze("Unsupporting sharing policy")}return s}function Rt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function Pt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Dt(e){this.rawDestructor&&this.rawDestructor(e)}function Nt(e){null!==e&&e.delete()}function Ct(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=_t:i?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=Rt,this.destructorFunction=null)}function Ot(e,t,s){A.hasOwnProperty(e)||He("Replacing nonexistant public symbol"),void 0!==A[e].overloadTable&&void 0!==s?A[e].overloadTable[s]=t:(A[e]=t,A[e].argCount=s)}function bt(e,t,s){return e.includes("j")?function(e,t,s){var i=A["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):De(t).apply(null,s)}function St(e,t){var s,i,r,o=(e=Qe(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),bt(s,i,r)}):De(t);return"function"!=typeof o&&ze("unknown function pointer with signature "+e+": "+t),o}var wt=void 0;function xt(e){var t=bs(e),s=Qe(t);return Ls(t),s}function Bt(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||xe[t]||(Be[t]?Be[t].forEach(e):(s.push(t),i[t]=!0))})),new wt(e+": "+s.map(xt).join([", "]))}function Ft(e,t){for(var s=[],i=0;i>>2]);return s}function Mt(e,t,s,i,r){var o=t.length;o<2&&ze("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--Ut[e].refcount&&(Ut[e]=void 0,Lt.push(e))}function Gt(){for(var e=0,t=5;t(e||ze("Cannot use deleted val. handle = "+e),Ut[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Lt.length?Lt.pop():Ut.length;return Ut[t]={refcount:1,value:e},t}}};function jt(e,s,l){switch(s){case 0:return function(e){var s=l?t():i();return this.fromWireType(s[e>>>0])};case 1:return function(e){var t=l?r():o();return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=l?n():a();return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Qt(e,t){var s=xe[e];return void 0===s&&ze(t+" has unknown type "+xt(e)),s}function Wt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function zt(e,t){switch(t){case 2:return function(e){return this.fromWireType((N.buffer!=x.buffer&&z(),H)[e>>>2])};case 3:return function(e){return this.fromWireType(l()[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Kt(e,s,l){switch(s){case 0:return l?function(e){return t()[e>>>0]}:function(e){return i()[e>>>0]};case 1:return l?function(e){return r()[e>>>1]}:function(e){return o()[e>>>1]};case 2:return l?function(e){return n()[e>>>2]}:function(e){return a()[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Yt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Xt(e,t){for(var s=e,n=s>>1,a=n+t/2;!(n>=a)&&o()[n>>>0];)++n;if((s=n<<1)-e>32&&Yt)return Yt.decode(i().slice(e,s));for(var l="",h=0;!(h>=t/2);++h){var c=r()[e+2*h>>>1];if(0==c)break;l+=String.fromCharCode(c)}return l}function Zt(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,o=(s-=2)<2*e.length?s/2:e.length,n=0;n>>1]=a,t+=2}return r()[t>>>1]=0,t-i}function qt(e){return 2*e.length}function Jt(e,t){for(var s=0,i="";!(s>=t/4);){var r=n()[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function $t(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),n()[t>>>2]=a,(t+=4)+4>r)break}return n()[t>>>2]=0,t-i}function es(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}function ts(e){Atomics.store(n(),e>>2,1),Os()&&Bs(e),Atomics.compareExchange(n(),e>>2,1,0)}A.executeNotifiedProxyingQueue=ts;var ss,is={};function rs(e){var t=is[e];return void 0===t?Qe(e):t}function os(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ns(e){ns.shown||(ns.shown={}),ns.shown[e]||(ns.shown[e]=1,D(e))}function as(e){var t=Hs(),s=e();return Gs(t),s}function ls(e,t){var s=arguments.length-2,i=arguments;return as((()=>{for(var r=s,o=ks(8*r),n=o>>3,a=0;a>>0]=h}return xs(e,r,o,t)}))}ss=()=>performance.timeOrigin+performance.now();var hs=[];function cs(e){var t=N.buffer;try{return N.grow(e-t.byteLength+65535>>>16),z(),1}catch(e){}}var As={};function us(){if(!us.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:E||"./this.program"};for(var t in As)void 0===As[t]?delete e[t]:e[t]=As[t];var s=[];for(var t in e)s.push(t+"="+e[t]);us.strings=s}return us.strings}function ps(e,s){if(v)return ls(3,1,e,s);var i=0;return us().forEach((function(r,o){var n=s+i;a()[e+4*o>>>2]=n,function(e,s,i){for(var r=0;r>>0]=e.charCodeAt(r);i||(t()[s>>>0]=0)}(r,n),i+=r.length+1})),0}function ds(e,t){if(v)return ls(4,1,e,t);var s=us();a()[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),a()[t>>>2]=i,0}function fs(e){if(v)return ls(5,1,e);try{var t=ge.getStreamFromFD(e);return ye.close(t),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function Es(e,s,i,r){if(v)return ls(6,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.read(e,t(),l,h,r);if(c<0)return-1;if(o+=c,c>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function ms(e,t,s,i,r){if(v)return ls(7,1,e,t,s,i,r);try{var o=(h=s)+2097152>>>0<4194305-!!(l=t)?(l>>>0)+4294967296*h:NaN;if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return ye.llseek(a,o,i),se=[a.position>>>0,(te=a.position,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[r>>>2]=se[0],n()[r+4>>>2]=se[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}var l,h}function ys(e,s,i,r){if(v)return ls(8,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.write(e,t(),l,h,r);if(c<0)return-1;o+=c,void 0!==r&&(r+=c)}return o}(ge.getStreamFromFD(e),s,i);return a()[r>>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function gs(e){return e%4==0&&(e%100!=0||e%400==0)}var Is=[31,29,31,30,31,30,31,31,30,31,30,31],vs=[31,28,31,30,31,30,31,31,30,31,30,31];function Ts(e,s,i,r){var o=n()[r+40>>>2],a={tm_sec:n()[r>>>2],tm_min:n()[r+4>>>2],tm_hour:n()[r+8>>>2],tm_mday:n()[r+12>>>2],tm_mon:n()[r+16>>>2],tm_year:n()[r+20>>>2],tm_wday:n()[r+24>>>2],tm_yday:n()[r+28>>>2],tm_isdst:n()[r+32>>>2],tm_gmtoff:n()[r+36>>>2],tm_zone:o?j(o):""},l=j(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in h)l=l.replace(new RegExp(c,"g"),h[c]);var A=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function E(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=gs(s.getFullYear()),r=s.getMonth(),o=(i?Is:vs)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=E(s),o=E(i);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(e){return A[e.tm_wday].substring(0,3)},"%A":function(e){return A[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return p(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(gs(e.tm_year+1900)?Is:vs,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&gs(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&gs(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in l=l.replace(/%%/g,"\0\0"),y)l.includes(c)&&(l=l.replace(new RegExp(c,"g"),y[c](a)));var g,I,v=de(l=l.replace(/\0\0/g,"%"),!1);return v.length>s?0:(g=v,I=e,t().set(g,I>>>0),v.length-1)}Te.init();var _s=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ye.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Rs=365,Ps=146;Object.defineProperties(_s.prototype,{read:{get:function(){return(this.mode&Rs)===Rs},set:function(e){e?this.mode|=Rs:this.mode&=-366}},write:{get:function(){return(this.mode&Ps)===Ps},set:function(e){e?this.mode|=Ps:this.mode&=-147}},isFolder:{get:function(){return ye.isDir(this.mode)}},isDevice:{get:function(){return ye.isChrdev(this.mode)}}}),ye.FSNode=_s,ye.staticInit(),Ue=A.InternalError=Le(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);je=e}(),We=A.BindingError=Le(Error,"BindingError"),mt.prototype.isAliasOf=Ye,mt.prototype.clone=pt,mt.prototype.delete=dt,mt.prototype.isDeleted=ft,mt.prototype.deleteLater=Et,A.getInheritedInstanceCount=st,A.getLiveInheritedInstances=it,A.flushPendingDeletes=ot,A.setDelayFunction=at,Ct.prototype.getPointee=Pt,Ct.prototype.destructor=Dt,Ct.prototype.argPackAdvance=8,Ct.prototype.readValueFromPointer=Se,Ct.prototype.deleteObject=Nt,Ct.prototype.fromWireType=At,wt=A.UnboundTypeError=Le(Error,"UnboundTypeError"),A.count_emval_handles=Gt,A.get_first_emval=kt;var Ds=[null,Ie,Re,ps,ds,fs,Es,ms,ys],Ns={g:function(e,t,s){throw new Ne(e).init(t,s),e},T:function(e){Ss(e,!g,1,!y),Te.threadInitTLS()},J:function(e){v?postMessage({cmd:"cleanupThread",thread:e}):Ae(e)},X:function(e){},_:function(e){ae(Ce)},Z:function(e,t){ae(Ce)},da:function(e){var t=Oe[e];delete Oe[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;Ge([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),be(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>l])},destructorFunction:null})},p:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=Qe(c),o=St(r,o),a&&(a=St(n,a)),h&&(h=St(l,h)),u=St(A,u);var p=Fe(c);gt(p,(function(){Bt("Cannot construct "+c+" due to unbound types",[i])})),Ge([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:mt.prototype;var n=Me(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new We("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new We(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new It(c,n,l,u,s,o,a,h),d=new Ct(c,A,!0,!1,!1),f=new Ct(c+"*",A,!1,!1,!1),E=new Ct(c+" const*",A,!1,!0,!1);return tt[e]={pointerType:f,constPointerType:E},Ot(p,n),[d,f,E]}))},o:function(e,t,s,i,r,o){w(t>0);var n=Ft(t,s);r=St(i,r),Ge([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Bt("Cannot construct "+e.name+" due to unbound types",n)},Ge([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Mt(s,i,null,r,o),[]})),[]}))},c:function(e,t,s,i,r,o,n,a){var l=Ft(s,i);t=Qe(t),o=St(r,o),Ge([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){Bt("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(yt(h,t,i),h[t].overloadTable[s-2]=r),Ge([],l,(function(r){var a=Mt(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},aa:function(e,t){Ke(e,{name:t=Qe(t),fromWireType:function(e){var t=Vt.toValue(e);return Ht(e),t},toWireType:function(e,t){return Vt.toHandle(t)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},D:function(e,t,s,i){var r=Ve(s);function o(){}t=Qe(t),o.values={},Ke(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:jt(t,r,i),destructorFunction:null}),gt(t,o)},t:function(e,t,s){var i=Qt(e,"enum");t=Qe(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:Me(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},B:function(e,t,s){var i=Ve(s);Ke(e,{name:t=Qe(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,i),destructorFunction:null})},d:function(e,t,s,i,r,o){var n=Ft(t,s);e=Qe(e),r=St(i,r),gt(e,(function(){Bt("Cannot call "+e+" due to unbound types",n)}),t-1),Ge([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ot(e,Mt(e,i,null,r,o),t-1),[]}))},s:function(e,t,s,i,r){t=Qe(t);var o=Ve(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ke(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Kt(t,o,0!==i),destructorFunction:null})},i:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){e>>=2;var t=a(),s=t[e>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ke(e,{name:s=Qe(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},C:function(e,t){var s="std::string"===(t=Qe(t));Ke(e,{name:t,fromWireType:function(e){var t,r=a()[e>>>2],o=e+4;if(s)for(var n=o,l=0;l<=r;++l){var h=o+l;if(l==r||0==i()[h>>>0]){var c=j(n,h-n);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),n=h+1}}else{var A=new Array(r);for(l=0;l>>0]);t=A.join("")}return Ls(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ze("Cannot pass non-string to std::string"),r=s&&o?W(t):t.length;var n,l,h=Cs(4+r+1),c=h+4;if(c>>>=0,a()[h>>>2]=r,s&&o)n=c,l=r+1,Q(t,i(),n,l);else if(o)for(var A=0;A255&&(Ls(c),ze("String has UTF-16 code units that do not fit in 8 bits")),i()[c+A>>>0]=u}else for(A=0;A>>0]=t[A];return null!==e&&e.push(Ls,h),h},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},x:function(e,t,s){var i,r,n,l,h;s=Qe(s),2===t?(i=Xt,r=Zt,l=qt,n=()=>o(),h=1):4===t&&(i=Jt,r=$t,l=es,n=()=>a(),h=2),Ke(e,{name:s,fromWireType:function(e){for(var s,r=a()[e>>>2],o=n(),l=e+4,c=0;c<=r;++c){var A=e+4+c*t;if(c==r||0==o[A>>>h]){var u=i(l,A-l);void 0===s?s=u:(s+=String.fromCharCode(0),s+=u),l=A+t}}return Ls(e),s},toWireType:function(e,i){"string"!=typeof i&&ze("Cannot pass non-string to C++ string type "+s);var o=l(i),n=Cs(4+o+t);return n>>>=0,a()[n>>>2]=o>>h,r(i,n+4,o+t),null!==e&&e.push(Ls,n),n},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},ea:function(e,t,s,i,r,o){Oe[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),elements:[]}},j:function(e,t,s,i,r,o,n,a,l){Oe[e].elements.push({getterReturnType:t,getter:St(s,i),getterContext:r,setterArgumentType:o,setter:St(n,a),setterContext:l})},r:function(e,t,s,i,r,o){ke[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),fields:[]}},f:function(e,t,s,i,r,o,n,a,l,h){ke[e].fields.push({fieldName:Qe(t),getterReturnType:s,getter:St(i,r),getterContext:o,setterArgumentType:n,setter:St(a,l),setterContext:h})},ca:function(e,t){Ke(e,{isVoid:!0,name:t=Qe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},Y:function(e){D(j(e))},V:function(e,t,s,i){if(e==t)setTimeout((()=>ts(i)));else if(v)postMessage({targetThread:e,cmd:"processProxyingQueue",queue:i});else{var r=Te.pthreads[e];if(!r)return;r.postMessage({cmd:"processProxyingQueue",queue:i})}return 1},S:function(e,t,s){return-1},n:function(e,t,s){e=Vt.toValue(e),t=Qt(t,"emval::as");var i=[],r=Vt.toHandle(i);return a()[s>>>2]=r,t.toWireType(i,e)},z:function(e,t,s,i){e=Vt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(Ut[e].refcount+=1)},ga:function(e,t){return(e=Vt.toValue(e))instanceof(t=Vt.toValue(t))},y:function(e){return"number"==typeof(e=Vt.toValue(e))},E:function(e){return"string"==typeof(e=Vt.toValue(e))},fa:function(){return Vt.toHandle([])},h:function(e){return Vt.toHandle(rs(e))},w:function(){return Vt.toHandle({})},m:function(e){be(Vt.toValue(e)),Ht(e)},k:function(e,t,s){e=Vt.toValue(e),t=Vt.toValue(t),s=Vt.toValue(s),e[t]=s},e:function(e,t){var s=(e=Qt(e,"_emval_take_value")).readValueFromPointer(t);return Vt.toHandle(s)},A:function(){ae("")},U:function(){g||ns("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},v:ss,W:function(e,t,s){i().copyWithin(e>>>0,t>>>0,t+s>>>0)},R:function(e,t,s){hs.length=t;for(var i=s>>3,r=0;r>>0];return Ds[e].apply(null,hs)},P:function(e){var t=i().length;if((e>>>=0)<=t)return!1;var s,r,o=4294901760;if(e>o)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);if(a=Math.min(a,e+100663296),cs(Math.min(o,(s=Math.max(e,a))+((r=65536)-s%r)%r)))return!0}return!1},$:function(){throw"unwind"},L:ps,M:ds,I:ve,N:fs,O:Es,G:ms,Q:ys,a:N||A.wasmMemory,K:function(e,t,s,i,r){return Ts(e,t,s,i)}};!function(){var e={a:Ns};function t(e,t){var s,i,r=e.exports;A.asm=r,s=A.asm.ka,Te.tlsInitFunctions.push(s),K=A.asm.ia,i=A.asm.ha,Z.unshift(i),C=t,Te.loadWasmModuleToAllWorkers((()=>ne()))}function s(e){t(e.instance,e.module)}function i(t){return(R||!y&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return he(ee)})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return he(ee)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){D("failed to asynchronously prepare wasm: "+e),ae(e)}))}if(oe(),A.instantiateWasm)try{return A.instantiateWasm(e,t)}catch(e){D("Module.instantiateWasm callback failed with error: "+e),c(e)}(R||"function"!=typeof WebAssembly.instantiateStreaming||le(ee)||"function"!=typeof fetch?i(s):fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return D("wasm streaming compile failed: "+e),D("falling back to ArrayBuffer instantiation"),i(s)}))}))).catch(c)}();var Cs=function(){return(Cs=A.asm.ja).apply(null,arguments)};A.__emscripten_tls_init=function(){return(A.__emscripten_tls_init=A.asm.ka).apply(null,arguments)};var Os=A._pthread_self=function(){return(Os=A._pthread_self=A.asm.la).apply(null,arguments)},bs=A.___getTypeName=function(){return(bs=A.___getTypeName=A.asm.ma).apply(null,arguments)};A.__embind_initialize_bindings=function(){return(A.__embind_initialize_bindings=A.asm.na).apply(null,arguments)};var Ss=A.__emscripten_thread_init=function(){return(Ss=A.__emscripten_thread_init=A.asm.oa).apply(null,arguments)};A.__emscripten_thread_crashed=function(){return(A.__emscripten_thread_crashed=A.asm.pa).apply(null,arguments)};var ws,xs=function(){return(xs=A.asm.qa).apply(null,arguments)},Bs=A.__emscripten_proxy_execute_task_queue=function(){return(Bs=A.__emscripten_proxy_execute_task_queue=A.asm.ra).apply(null,arguments)},Fs=function(){return(Fs=A.asm.sa).apply(null,arguments)},Ms=A.__emscripten_thread_exit=function(){return(Ms=A.__emscripten_thread_exit=A.asm.ta).apply(null,arguments)},Ls=function(){return(Ls=A.asm.ua).apply(null,arguments)},Us=function(){return(Us=A.asm.va).apply(null,arguments)},Hs=function(){return(Hs=A.asm.wa).apply(null,arguments)},Gs=function(){return(Gs=A.asm.xa).apply(null,arguments)},ks=function(){return(ks=A.asm.ya).apply(null,arguments)},Vs=function(){return(Vs=A.asm.za).apply(null,arguments)};function js(){if(!(ie>0)){if(v)return h(A),$(),void startWorker(A);!function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)e=A.preRun.shift(),X.unshift(e);var e;_e(X)}(),ie>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e())}function e(){ws||(ws=!0,A.calledRun=!0,S||($(),h(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(!v){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)e=A.postRun.shift(),q.unshift(e);var e;_e(q)}}()))}}if(A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.Aa).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.Ba).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.Ca).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.Da).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.Ea).apply(null,arguments)},A.keepRuntimeAlive=J,A.wasmMemory=N,A.ExitStatus=ce,A.PThread=Te,re=function e(){ws||js(),ws||(re=e)},A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return js(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),Ag=hg({"dist/web-ifc.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,i,r=void 0!==e?e:{};r.ready=new Promise((function(e,s){t=e,i=s}));var o,n,a=Object.assign({},r),l="./this.program",h="";"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),s&&(h=s),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},n=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)};var c,A,u=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments,r.thisProgram&&(l=r.thisProgram),r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var d=!1;function f(e,t){e||V(t)}var E,m,y,g,I,v,T,_,R,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&P)return P.decode(e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function N(e,t){return(e>>>=0)?D(m,e,t):""}function C(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function O(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function b(){var e=A.buffer;r.HEAP8=E=new Int8Array(e),r.HEAP16=y=new Int16Array(e),r.HEAP32=I=new Int32Array(e),r.HEAPU8=m=new Uint8Array(e),r.HEAPU16=g=new Uint16Array(e),r.HEAPU32=v=new Uint32Array(e),r.HEAPF32=T=new Float32Array(e),r.HEAPF64=_=new Float64Array(e)}var S,w,x,B,F=[],M=[],L=[],U=0,H=null;function G(e){U++,r.monitorRunDependencies&&r.monitorRunDependencies(U)}function k(e){if(U--,r.monitorRunDependencies&&r.monitorRunDependencies(U),0==U&&H){var t=H;H=null,t()}}function V(e){r.onAbort&&r.onAbort(e),p(e="Aborted("+e+")"),d=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}function j(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){try{if(e==S&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function W(e){for(;e.length>0;)e.shift()(r)}function z(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){v[this.ptr+4>>>2]=e},this.get_type=function(){return v[this.ptr+4>>>2]},this.set_destructor=function(e){v[this.ptr+8>>>2]=e},this.get_destructor=function(){return v[this.ptr+8>>>2]},this.set_refcount=function(e){I[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=I[this.ptr>>>2];I[this.ptr>>>2]=e+1},this.release_ref=function(){var e=I[this.ptr>>>2];return I[this.ptr>>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){v[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return v[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Kt(this.get_type()))return v[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}j(S="web-ifc.wasm")||(w=S,S=r.locateFile?r.locateFile(w,h):h+w);var K={};function Y(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function X(e){return this.fromWireType(I[e>>>2])}var Z={},q={},J={};function $(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function ee(e,t){return e=$(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function te(e,t){var s=ee(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var se=void 0;function ie(e){throw new se(e)}function re(e,t,s){function i(t){var i=s(t);i.length!==e.length&&ie("Mismatched type converter count");for(var r=0;r{q.hasOwnProperty(e)?r[t]=q[e]:(o.push(e),Z.hasOwnProperty(e)||(Z[e]=[]),Z[e].push((()=>{r[t]=q[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var oe={};function ne(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ae=void 0;function le(e){for(var t="",s=e;m[s>>>0];)t+=ae[m[s++>>>0]];return t}var he=void 0;function ce(e){throw new he(e)}function Ae(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ce('type "'+i+'" must have a positive integer typeid pointer'),q.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ce("Cannot register type '"+i+"' twice")}if(q[e]=t,delete J[e],Z.hasOwnProperty(e)){var r=Z[e];delete Z[e],r.forEach((e=>e()))}}function ue(e){if(!(this instanceof Fe))return!1;if(!(e instanceof Fe))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function pe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function de(e){ce(e.$$.ptrType.registeredClass.name+" instance already deleted")}var fe=!1;function Ee(e){}function me(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function ye(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=ye(e,t,s.baseClass);return null===i?null:s.downcast(i)}var ge={};function Ie(){return Object.keys(De).length}function ve(){var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e}var Te=[];function _e(){for(;Te.length;){var e=Te.pop();e.$$.deleteScheduled=!1,e.delete()}}var Re=void 0;function Pe(e){Re=e,Te.length&&Re&&Re(_e)}var De={};function Ne(e,t){return t=function(e,t){for(void 0===t&&ce("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),De[t]}function Ce(e,t){return t.ptrType&&t.ptr||ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},be(Object.create(e,{$$:{value:t}}))}function Oe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=Ne(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?Ce(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ce(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=ge[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=ye(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?Ce(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):Ce(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function be(e){return"undefined"==typeof FinalizationRegistry?(be=e=>e,e):(fe=new FinalizationRegistry((e=>{me(e.$$)})),Ee=e=>fe.unregister(e),(be=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};fe.register(e,s,e)}return e})(e))}function Se(){if(this.$$.ptr||de(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=be(Object.create(Object.getPrototypeOf(this),{$$:{value:pe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function we(){this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Ee(this),me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xe(){return!this.$$.ptr}function Be(){return this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Te.push(this),1===Te.length&&Re&&Re(_e),this.$$.deleteScheduled=!0,this}function Fe(){}function Me(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ce("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function Le(e,t,s){r.hasOwnProperty(e)?((void 0===s||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[s])&&ce("Cannot register public name '"+e+"' twice"),Me(r,e,e),r.hasOwnProperty(s)&&ce("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),r[e].overloadTable[s]=t):(r[e]=t,void 0!==s&&(r[e].numArguments=s))}function Ue(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function He(e,t,s){for(;t!==s;)t.upcast||ce("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Ge(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function ke(e,t){var s;if(null===t)return this.isReference&&ce("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=He(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,lt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ce("Unsupporting sharing policy")}return s}function Ve(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function je(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Qe(e){this.rawDestructor&&this.rawDestructor(e)}function We(e){null!==e&&e.delete()}function ze(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=ke:i?(this.toWireType=Ge,this.destructorFunction=null):(this.toWireType=Ve,this.destructorFunction=null)}function Ke(e,t,s){r.hasOwnProperty(e)||ie("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==s?r[e].overloadTable[s]=t:(r[e]=t,r[e].argCount=s)}var Ye=[];function Xe(e){var t=Ye[e];return t||(e>=Ye.length&&(Ye.length=e+1),Ye[e]=t=R.get(e)),t}function Ze(e,t,s){return e.includes("j")?function(e,t,s){var i=r["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):Xe(t).apply(null,s)}function qe(e,t){var s,i,r,o=(e=le(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ze(s,i,r)}):Xe(t);return"function"!=typeof o&&ce("unknown function pointer with signature "+e+": "+t),o}var Je=void 0;function $e(e){var t=Qt(e),s=le(t);return zt(t),s}function et(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||q[t]||(J[t]?J[t].forEach(e):(s.push(t),i[t]=!0))})),new Je(e+": "+s.map($e).join([", "]))}function tt(e,t){for(var s=[],i=0;i>>2]);return s}function st(e,t,s,i,r){var o=t.length;o<2&&ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--rt[e].refcount&&(rt[e]=void 0,it.push(e))}function nt(){for(var e=0,t=5;t(e||ce("Cannot use deleted val. handle = "+e),rt[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=it.length?it.pop():rt.length;return rt[t]={refcount:1,value:e},t}}};function ht(e,t,s){switch(t){case 0:return function(e){var t=s?E:m;return this.fromWireType(t[e>>>0])};case 1:return function(e){var t=s?y:g;return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=s?I:v;return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e,t){var s=q[e];return void 0===s&&ce(t+" has unknown type "+$e(e)),s}function At(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function ut(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>>2])};case 3:return function(e){return this.fromWireType(_[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function pt(e,t,s){switch(t){case 0:return s?function(e){return E[e>>>0]}:function(e){return m[e>>>0]};case 1:return s?function(e){return y[e>>>1]}:function(e){return g[e>>>1]};case 2:return s?function(e){return I[e>>>2]}:function(e){return v[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var dt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ft(e,t){for(var s=e,i=s>>1,r=i+t/2;!(i>=r)&&g[i>>>0];)++i;if((s=i<<1)-e>32&&dt)return dt.decode(m.subarray(e>>>0,s>>>0));for(var o="",n=0;!(n>=t/2);++n){var a=y[e+2*n>>>1];if(0==a)break;o+=String.fromCharCode(a)}return o}function Et(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,r=(s-=2)<2*e.length?s/2:e.length,o=0;o>>1]=n,t+=2}return y[t>>>1]=0,t-i}function mt(e){return 2*e.length}function yt(e,t){for(var s=0,i="";!(s>=t/4);){var r=I[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function gt(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++o)),I[t>>>2]=n,(t+=4)+4>r)break}return I[t>>>2]=0,t-i}function It(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}var vt={};function Tt(e){var t=vt[e];return void 0===t?le(e):t}function _t(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Rt(e){var t=A.buffer;try{return A.grow(e-t.byteLength+65535>>>16),b(),1}catch(e){}}var Pt={};function Dt(){if(!Dt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in Pt)void 0===Pt[t]?delete e[t]:e[t]=Pt[t];var s=[];for(var t in e)s.push(t+"="+e[t]);Dt.strings=s}return Dt.strings}var Nt={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=Nt.isAbs(e),s="/"===e.substr(-1);return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Nt.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Nt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Nt.normalize(e.join("/"))},join2:(e,t)=>Nt.normalize(e+"/"+t)},Ct={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:xt.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=Nt.isAbs(i)}return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=Ct.resolve(e).substr(1),t=Ct.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:O(e)+1,r=new Array(i),o=C(e,r,0,r.length);return t&&(r.length=o),r}var bt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){bt.ttys[e]={input:[],output:[],ops:t},xt.registerDevice(e,bt.stream_ops)},stream_ops:{open:function(e){var t=bt.ttys[e.node.rdev];if(!t)throw new xt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new xt.ErrnoError(60);for(var o=0,n=0;n0&&(u(D(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(D(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(p(D(e.output,0)),e.output=[])}}};function St(e){V()}var wt={ops_table:null,mount:function(e){return wt.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(xt.isBlkdev(s)||xt.isFIFO(s))throw new xt.ErrnoError(63);wt.ops_table||(wt.ops_table={dir:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr,lookup:wt.node_ops.lookup,mknod:wt.node_ops.mknod,rename:wt.node_ops.rename,unlink:wt.node_ops.unlink,rmdir:wt.node_ops.rmdir,readdir:wt.node_ops.readdir,symlink:wt.node_ops.symlink},stream:{llseek:wt.stream_ops.llseek}},file:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr},stream:{llseek:wt.stream_ops.llseek,read:wt.stream_ops.read,write:wt.stream_ops.write,allocate:wt.stream_ops.allocate,mmap:wt.stream_ops.mmap,msync:wt.stream_ops.msync}},link:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr,readlink:wt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr},stream:xt.chrdev_stream_ops}});var r=xt.createNode(e,t,s,i);return xt.isDir(r.mode)?(r.node_ops=wt.ops_table.dir.node,r.stream_ops=wt.ops_table.dir.stream,r.contents={}):xt.isFile(r.mode)?(r.node_ops=wt.ops_table.file.node,r.stream_ops=wt.ops_table.file.stream,r.usedBytes=0,r.contents=null):xt.isLink(r.mode)?(r.node_ops=wt.ops_table.link.node,r.stream_ops=wt.ops_table.link.stream):xt.isChrdev(r.mode)&&(r.node_ops=wt.ops_table.chrdev.node,r.stream_ops=wt.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=xt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xt.isDir(e.mode)?t.size=4096:xt.isFile(e.mode)?t.size=e.usedBytes:xt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&wt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw xt.genericErrors[44]},mknod:function(e,t,s,i){return wt.createNode(e,t,s,i)},rename:function(e,t,s){if(xt.isDir(e.mode)){var i;try{i=xt.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new xt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=xt.lookupNode(e,t);for(var i in s.contents)throw new xt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=wt.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!xt.isLink(e.mode))throw new xt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||s+t>>=0,E.set(a,o>>>0)}else n=!1,o=a.byteOffset;return{ptr:o,allocated:n}},msync:function(e,t,s,i,r){return wt.stream_ops.write(e,t,0,i,s,!1),0}}},xt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=Ct.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new xt.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=xt.root,r="/",o=0;o40)throw new xt.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(xt.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%xt.nameTable.length},hashAddNode:e=>{var t=xt.hashName(e.parent.id,e.name);e.name_next=xt.nameTable[t],xt.nameTable[t]=e},hashRemoveNode:e=>{var t=xt.hashName(e.parent.id,e.name);if(xt.nameTable[t]===e)xt.nameTable[t]=e.name_next;else for(var s=xt.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=xt.mayLookup(e);if(s)throw new xt.ErrnoError(s,e);for(var i=xt.hashName(e.id,t),r=xt.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return xt.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new xt.FSNode(e,t,s,i);return xt.hashAddNode(r),r},destroyNode:e=>{xt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=xt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=xt.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return xt.lookupNode(e,t),20}catch(e){}return xt.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=xt.lookupNode(e,t)}catch(e){return e.errno}var r=xt.nodePermissions(e,"wx");if(r)return r;if(s){if(!xt.isDir(i.mode))return 54;if(xt.isRoot(i)||xt.getPath(i)===xt.cwd())return 10}else if(xt.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?xt.isLink(e.mode)?32:xt.isDir(e.mode)&&("r"!==xt.flagsToPermissionString(t)||512&t)?31:xt.nodePermissions(e,xt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=xt.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!xt.streams[s])return s;throw new xt.ErrnoError(33)},getStream:e=>xt.streams[e],createStream:(e,t,s)=>{xt.FSStream||(xt.FSStream=function(){this.shared={}},xt.FSStream.prototype={},Object.defineProperties(xt.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new xt.FSStream,e);var i=xt.nextfd(t,s);return e.fd=i,xt.streams[i]=e,e},closeStream:e=>{xt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=xt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new xt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{xt.devices[e]={stream_ops:t}},getDevice:e=>xt.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),xt.syncFSRequests++,xt.syncFSRequests>1&&p("warning: "+xt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=xt.getMounts(xt.root.mount),i=0;function r(e){return xt.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&xt.root)throw new xt.ErrnoError(10);if(!r&&!o){var n=xt.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,xt.isMountpoint(i))throw new xt.ErrnoError(10);if(!xt.isDir(i.mode))throw new xt.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?xt.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=xt.lookupPath(e,{follow_mount:!1});if(!xt.isMountpoint(t.node))throw new xt.ErrnoError(28);var s=t.node,i=s.mounted,r=xt.getMounts(i);Object.keys(xt.nameTable).forEach((e=>{for(var t=xt.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&xt.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=xt.lookupPath(e,{parent:!0}).node,r=Nt.basename(e);if(!r||"."===r||".."===r)throw new xt.ErrnoError(28);var o=xt.mayCreate(i,r);if(o)throw new xt.ErrnoError(o);if(!i.node_ops.mknod)throw new xt.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,xt.mknod(e,t,s)),symlink:(e,t)=>{if(!Ct.resolve(e))throw new xt.ErrnoError(44);var s=xt.lookupPath(t,{parent:!0}).node;if(!s)throw new xt.ErrnoError(44);var i=Nt.basename(t),r=xt.mayCreate(s,i);if(r)throw new xt.ErrnoError(r);if(!s.node_ops.symlink)throw new xt.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=Nt.dirname(e),o=Nt.dirname(t),n=Nt.basename(e),a=Nt.basename(t);if(s=xt.lookupPath(e,{parent:!0}).node,i=xt.lookupPath(t,{parent:!0}).node,!s||!i)throw new xt.ErrnoError(44);if(s.mount!==i.mount)throw new xt.ErrnoError(75);var l,h=xt.lookupNode(s,n),c=Ct.relative(e,o);if("."!==c.charAt(0))throw new xt.ErrnoError(28);if("."!==(c=Ct.relative(t,r)).charAt(0))throw new xt.ErrnoError(55);try{l=xt.lookupNode(i,a)}catch(e){}if(h!==l){var A=xt.isDir(h.mode),u=xt.mayDelete(s,n,A);if(u)throw new xt.ErrnoError(u);if(u=l?xt.mayDelete(i,a,A):xt.mayCreate(i,a))throw new xt.ErrnoError(u);if(!s.node_ops.rename)throw new xt.ErrnoError(63);if(xt.isMountpoint(h)||l&&xt.isMountpoint(l))throw new xt.ErrnoError(10);if(i!==s&&(u=xt.nodePermissions(s,"w")))throw new xt.ErrnoError(u);xt.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{xt.hashAddNode(h)}}},rmdir:e=>{var t=xt.lookupPath(e,{parent:!0}).node,s=Nt.basename(e),i=xt.lookupNode(t,s),r=xt.mayDelete(t,s,!0);if(r)throw new xt.ErrnoError(r);if(!t.node_ops.rmdir)throw new xt.ErrnoError(63);if(xt.isMountpoint(i))throw new xt.ErrnoError(10);t.node_ops.rmdir(t,s),xt.destroyNode(i)},readdir:e=>{var t=xt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=xt.lookupPath(e,{parent:!0}).node;if(!t)throw new xt.ErrnoError(44);var s=Nt.basename(e),i=xt.lookupNode(t,s),r=xt.mayDelete(t,s,!1);if(r)throw new xt.ErrnoError(r);if(!t.node_ops.unlink)throw new xt.ErrnoError(63);if(xt.isMountpoint(i))throw new xt.ErrnoError(10);t.node_ops.unlink(t,s),xt.destroyNode(i)},readlink:e=>{var t=xt.lookupPath(e).node;if(!t)throw new xt.ErrnoError(44);if(!t.node_ops.readlink)throw new xt.ErrnoError(28);return Ct.resolve(xt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=xt.lookupPath(e,{follow:!t}).node;if(!s)throw new xt.ErrnoError(44);if(!s.node_ops.getattr)throw new xt.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>xt.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?xt.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{xt.chmod(e,t,!0)},fchmod:(e,t)=>{var s=xt.getStream(e);if(!s)throw new xt.ErrnoError(8);xt.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?xt.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{xt.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=xt.getStream(e);if(!i)throw new xt.ErrnoError(8);xt.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new xt.ErrnoError(28);var s;if(!(s="string"==typeof e?xt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);if(xt.isDir(s.mode))throw new xt.ErrnoError(31);if(!xt.isFile(s.mode))throw new xt.ErrnoError(28);var i=xt.nodePermissions(s,"w");if(i)throw new xt.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=xt.getStream(e);if(!s)throw new xt.ErrnoError(8);if(0==(2097155&s.flags))throw new xt.ErrnoError(28);xt.truncate(s.node,t)},utime:(e,t,s)=>{var i=xt.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new xt.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?xt.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=Nt.normalize(e);try{i=xt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new xt.ErrnoError(20)}else i=xt.mknod(e,s,0),o=!0;if(!i)throw new xt.ErrnoError(44);if(xt.isChrdev(i.mode)&&(t&=-513),65536&t&&!xt.isDir(i.mode))throw new xt.ErrnoError(54);if(!o){var n=xt.mayOpen(i,t);if(n)throw new xt.ErrnoError(n)}512&t&&!o&&xt.truncate(i,0),t&=-131713;var a=xt.createStream({node:i,path:xt.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!r.logReadFiles||1&t||(xt.readFiles||(xt.readFiles={}),e in xt.readFiles||(xt.readFiles[e]=1)),a},close:e=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xt.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new xt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new xt.ErrnoError(28);if(xt.isClosed(e))throw new xt.ErrnoError(8);if(1==(2097155&e.flags))throw new xt.ErrnoError(8);if(xt.isDir(e.node.mode))throw new xt.ErrnoError(31);if(!e.stream_ops.read)throw new xt.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new xt.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new xt.ErrnoError(28);if(xt.isClosed(e))throw new xt.ErrnoError(8);if(0==(2097155&e.flags))throw new xt.ErrnoError(8);if(xt.isDir(e.node.mode))throw new xt.ErrnoError(31);if(!e.stream_ops.write)throw new xt.ErrnoError(28);e.seekable&&1024&e.flags&&xt.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new xt.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);if(t<0||s<=0)throw new xt.ErrnoError(28);if(0==(2097155&e.flags))throw new xt.ErrnoError(8);if(!xt.isFile(e.node.mode)&&!xt.isDir(e.node.mode))throw new xt.ErrnoError(43);if(!e.stream_ops.allocate)throw new xt.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new xt.ErrnoError(2);if(1==(2097155&e.flags))throw new xt.ErrnoError(2);if(!e.stream_ops.mmap)throw new xt.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new xt.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=xt.open(e,t.flags),r=xt.stat(e).size,o=new Uint8Array(r);return xt.read(i,o,0,r,0),"utf8"===t.encoding?s=D(o,0):"binary"===t.encoding&&(s=o),xt.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=xt.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(O(t)+1),o=C(t,r,0,r.length);xt.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xt.write(i,t,0,t.byteLength,void 0,s.canOwn)}xt.close(i)},cwd:()=>xt.currentPath,chdir:e=>{var t=xt.lookupPath(e,{follow:!0});if(null===t.node)throw new xt.ErrnoError(44);if(!xt.isDir(t.node.mode))throw new xt.ErrnoError(54);var s=xt.nodePermissions(t.node,"x");if(s)throw new xt.ErrnoError(s);xt.currentPath=t.path},createDefaultDirectories:()=>{xt.mkdir("/tmp"),xt.mkdir("/home"),xt.mkdir("/home/web_user")},createDefaultDevices:()=>{xt.mkdir("/dev"),xt.registerDevice(xt.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),xt.mkdev("/dev/null",xt.makedev(1,3)),bt.register(xt.makedev(5,0),bt.default_tty_ops),bt.register(xt.makedev(6,0),bt.default_tty1_ops),xt.mkdev("/dev/tty",xt.makedev(5,0)),xt.mkdev("/dev/tty1",xt.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>V("randomDevice")}();xt.createDevice("/dev","random",e),xt.createDevice("/dev","urandom",e),xt.mkdir("/dev/shm"),xt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{xt.mkdir("/proc");var e=xt.mkdir("/proc/self");xt.mkdir("/proc/self/fd"),xt.mount({mount:()=>{var t=xt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=xt.getStream(s);if(!i)throw new xt.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?xt.createDevice("/dev","stdin",r.stdin):xt.symlink("/dev/tty","/dev/stdin"),r.stdout?xt.createDevice("/dev","stdout",null,r.stdout):xt.symlink("/dev/tty","/dev/stdout"),r.stderr?xt.createDevice("/dev","stderr",null,r.stderr):xt.symlink("/dev/tty1","/dev/stderr"),xt.open("/dev/stdin",0),xt.open("/dev/stdout",1),xt.open("/dev/stderr",1)},ensureErrnoError:()=>{xt.ErrnoError||(xt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xt.ErrnoError.prototype=new Error,xt.ErrnoError.prototype.constructor=xt.ErrnoError,[44].forEach((e=>{xt.genericErrors[e]=new xt.ErrnoError(e),xt.genericErrors[e].stack=""})))},staticInit:()=>{xt.ensureErrnoError(),xt.nameTable=new Array(4096),xt.mount(wt,{},"/"),xt.createDefaultDirectories(),xt.createDefaultDevices(),xt.createSpecialDirectories(),xt.filesystems={MEMFS:wt}},init:(e,t,s)=>{xt.init.initialized=!0,xt.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=s||r.stderr,xt.createStandardStreams()},quit:()=>{xt.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=xt.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=xt.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=xt.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=Nt.basename(e),i=xt.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:xt.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=Nt.join2(e,o);try{xt.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=Nt.join2("string"==typeof e?e:xt.getPath(e),t),n=xt.getMode(i,r);return xt.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:xt.getPath(e),n=t?Nt.join2(e,t):e);var a=xt.getMode(i,r),l=xt.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=Nt.join2("string"==typeof e?e:xt.getPath(e),t),o=xt.getMode(!!s,!!i);xt.createDevice.major||(xt.createDevice.major=64);var n=xt.makedev(xt.createDevice.major++,0);return xt.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ot(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new xt.ErrnoError(29)}},createLazyFile:(e,t,s,i,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",s,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+s+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=i);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",s,!1),i!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+s+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Ot(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&i||(n=i=1,i=this.getter(0).length,n=i,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n={isDevice:!1,url:s},a=xt.createFile(e,t,n,i,r);n.contents?a.contents=n.contents:n.url&&(a.contents=null,a.url=n.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function h(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=a.stream_ops[e];l[e]=function(){return xt.forceLoadFile(a),t.apply(null,arguments)}})),l.read=(e,t,s,i,r)=>(xt.forceLoadFile(a),h(e,t,s,i,r)),l.mmap=(e,t,s,i,r)=>{xt.forceLoadFile(a);var o=St();if(!o)throw new xt.ErrnoError(48);return h(e,E,o,t,s),{ptr:o,allocated:!0}},a.stream_ops=l,a},createPreloadedFile:(e,t,s,i,r,o,a,l,h,c)=>{var A=t?Ct.resolve(Nt.join2(e,t)):e;function u(s){function n(s){c&&c(),l||xt.createDataFile(e,t,s,i,r,h),o&&o(),k()}Browser.handledByPreloadPlugin(s,A,n,(()=>{a&&a(),k()}))||n(s)}G(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;n(e,(s=>{f(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&k()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&G()}(s,(e=>u(e)),a):u(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=xt.indexedDB();try{var r=i.open(xt.DB_NAME(),xt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{u("creating db"),r.result.createObjectStore(xt.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([xt.DB_STORE_NAME],"readwrite"),o=i.objectStore(xt.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(xt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=xt.indexedDB();try{var r=i.open(xt.DB_NAME(),xt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([xt.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(xt.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{xt.analyzePath(e).exists&&xt.unlink(e),xt.createDataFile(Nt.dirname(e),Nt.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},Bt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(Nt.isAbs(t))return t;var i;if(i=-100===e?xt.cwd():Bt.getStreamFromFD(e).path,0==t.length){if(!s)throw new xt.ErrnoError(44);return i}return Nt.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&Nt.normalize(t)!==Nt.normalize(xt.getPath(e.node)))return-54;throw e}I[s>>>2]=i.dev,I[s+8>>>2]=i.ino,I[s+12>>>2]=i.mode,v[s+16>>>2]=i.nlink,I[s+20>>>2]=i.uid,I[s+24>>>2]=i.gid,I[s+28>>>2]=i.rdev,B=[i.size>>>0,(x=i.size,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+40>>>2]=B[0],I[s+44>>>2]=B[1],I[s+48>>>2]=4096,I[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),n=i.ctime.getTime();return B=[Math.floor(r/1e3)>>>0,(x=Math.floor(r/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+56>>>2]=B[0],I[s+60>>>2]=B[1],v[s+64>>>2]=r%1e3*1e3,B=[Math.floor(o/1e3)>>>0,(x=Math.floor(o/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+72>>>2]=B[0],I[s+76>>>2]=B[1],v[s+80>>>2]=o%1e3*1e3,B=[Math.floor(n/1e3)>>>0,(x=Math.floor(n/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+88>>>2]=B[0],I[s+92>>>2]=B[1],v[s+96>>>2]=n%1e3*1e3,B=[i.ino>>>0,(x=i.ino,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+104>>>2]=B[0],I[s+108>>>2]=B[1],0},doMsync:function(e,t,s,i,r){if(!xt.isFile(t.node.mode))throw new xt.ErrnoError(43);if(2&i)return 0;e>>>=0;var o=m.slice(e,e+s);xt.msync(t,o,r,s,i)},varargs:void 0,get:function(){return Bt.varargs+=4,I[Bt.varargs-4>>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=xt.getStream(e);if(!t)throw new xt.ErrnoError(8);return t}};function Ft(e){return e%4==0&&(e%100!=0||e%400==0)}var Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Lt=[31,28,31,30,31,30,31,31,30,31,30,31];function Ut(e,t,s,i){var r=I[i+40>>>2],o={tm_sec:I[i>>>2],tm_min:I[i+4>>>2],tm_hour:I[i+8>>>2],tm_mday:I[i+12>>>2],tm_mon:I[i+16>>>2],tm_year:I[i+20>>>2],tm_wday:I[i+24>>>2],tm_yday:I[i+28>>>2],tm_isdst:I[i+32>>>2],tm_gmtoff:I[i+36>>>2],tm_zone:r?N(r):""},n=N(s),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in a)n=n.replace(new RegExp(l,"g"),a[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function A(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function f(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=Ft(s.getFullYear()),r=s.getMonth(),o=(i?Mt:Lt)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=d(s),o=d(i);return p(r,t)<=0?p(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return h[e.tm_wday].substring(0,3)},"%A":function(e){return h[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return u((e.tm_year+1900)/100|0,2)},"%d":function(e){return u(e.tm_mday,2)},"%e":function(e){return A(e.tm_mday,2," ")},"%g":function(e){return f(e).toString().substring(2)},"%G":function(e){return f(e)},"%H":function(e){return u(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),u(t,2)},"%j":function(e){return u(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(Ft(e.tm_year+1900)?Mt:Lt,e.tm_mon-1),3)},"%m":function(e){return u(e.tm_mon+1,2)},"%M":function(e){return u(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return u(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return u(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&Ft(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Ft(e.tm_year%400-1))&&t++}return u(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return u(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in n=n.replace(/%%/g,"\0\0"),m)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),m[l](o)));var y,g,v=Ot(n=n.replace(/\0\0/g,"%"),!1);return v.length>t?0:(y=v,g=e,E.set(y,g>>>0),v.length-1)}se=r.InternalError=te(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ae=e}(),he=r.BindingError=te(Error,"BindingError"),Fe.prototype.isAliasOf=ue,Fe.prototype.clone=Se,Fe.prototype.delete=we,Fe.prototype.isDeleted=xe,Fe.prototype.deleteLater=Be,r.getInheritedInstanceCount=Ie,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=_e,r.setDelayFunction=Pe,ze.prototype.getPointee=je,ze.prototype.destructor=Qe,ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=X,ze.prototype.deleteObject=We,ze.prototype.fromWireType=Oe,Je=r.UnboundTypeError=te(Error,"UnboundTypeError"),r.count_emval_handles=nt,r.get_first_emval=at;var Ht=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xt.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Gt=365,kt=146;Object.defineProperties(Ht.prototype,{read:{get:function(){return(this.mode&Gt)===Gt},set:function(e){e?this.mode|=Gt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(e){e?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return xt.isDir(this.mode)}},isDevice:{get:function(){return xt.isChrdev(this.mode)}}}),xt.FSNode=Ht,xt.staticInit();var Vt={f:function(e,t,s){throw new z(e).init(t,s),e},R:function(e){var t=K[e];delete K[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;re([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Y(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>o])},destructorFunction:null})},o:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=le(c),o=qe(r,o),a&&(a=qe(n,a)),h&&(h=qe(l,h)),u=qe(A,u);var p=$(c);Le(p,(function(){et("Cannot construct "+c+" due to unbound types",[i])})),re([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:Fe.prototype;var n=ee(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new he("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new he(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new he("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new Ue(c,n,l,u,s,o,a,h),d=new ze(c,A,!0,!1,!1),f=new ze(c+"*",A,!1,!1,!1),E=new ze(c+" const*",A,!1,!0,!1);return ge[e]={pointerType:f,constPointerType:E},Ke(p,n),[d,f,E]}))},n:function(e,t,s,i,r,o){f(t>0);var n=tt(t,s);r=qe(i,r),re([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new he("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{et("Cannot construct "+e.name+" due to unbound types",n)},re([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=st(s,i,null,r,o),[]})),[]}))},b:function(e,t,s,i,r,o,n,a){var l=tt(s,i);t=le(t),o=qe(r,o),re([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){et("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(Me(h,t,i),h[t].overloadTable[s-2]=r),re([],l,(function(r){var a=st(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},O:function(e,t){Ae(e,{name:t=le(t),fromWireType:function(e){var t=lt.toValue(e);return ot(e),t},toWireType:function(e,t){return lt.toHandle(t)},argPackAdvance:8,readValueFromPointer:X,destructorFunction:null})},B:function(e,t,s,i){var r=ne(s);function o(){}t=le(t),o.values={},Ae(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ht(t,r,i),destructorFunction:null}),Le(t,o)},s:function(e,t,s){var i=ct(e,"enum");t=le(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:ee(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},z:function(e,t,s){var i=ne(s);Ae(e,{name:t=le(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:ut(t,i),destructorFunction:null})},c:function(e,t,s,i,r,o){var n=tt(t,s);e=le(e),r=qe(i,r),Le(e,(function(){et("Cannot call "+e+" due to unbound types",n)}),t-1),re([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ke(e,st(e,i,null,r,o),t-1),[]}))},r:function(e,t,s,i,r){t=le(t);var o=ne(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ae(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:pt(t,o,0!==i),destructorFunction:null})},h:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=v,s=t[(e>>=2)>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ae(e,{name:s=le(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},A:function(e,t){var s="std::string"===(t=le(t));Ae(e,{name:t,fromWireType:function(e){var t,i=v[e>>>2],r=e+4;if(s)for(var o=r,n=0;n<=i;++n){var a=r+n;if(n==i||0==m[a>>>0]){var l=N(o,a-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=a+1}}else{var h=new Array(i);for(n=0;n>>0]);t=h.join("")}return zt(e),t},toWireType:function(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ce("Cannot pass non-string to std::string"),i=s&&r?O(t):t.length;var o=jt(4+i+1),n=o+4;if(n>>>=0,v[o>>>2]=i,s&&r)C(t,m,n,i+1);else if(r)for(var a=0;a255&&(zt(n),ce("String has UTF-16 code units that do not fit in 8 bits")),m[n+a>>>0]=l}else for(a=0;a>>0]=t[a];return null!==e&&e.push(zt,o),o},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},v:function(e,t,s){var i,r,o,n,a;s=le(s),2===t?(i=ft,r=Et,n=mt,o=()=>g,a=1):4===t&&(i=yt,r=gt,n=It,o=()=>v,a=2),Ae(e,{name:s,fromWireType:function(e){for(var s,r=v[e>>>2],n=o(),l=e+4,h=0;h<=r;++h){var c=e+4+h*t;if(h==r||0==n[c>>>a]){var A=i(l,c-l);void 0===s?s=A:(s+=String.fromCharCode(0),s+=A),l=c+t}}return zt(e),s},toWireType:function(e,i){"string"!=typeof i&&ce("Cannot pass non-string to C++ string type "+s);var o=n(i),l=jt(4+o+t);return v[(l>>>=0)>>>2]=o>>a,r(i,l+4,o+t),null!==e&&e.push(zt,l),l},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},S:function(e,t,s,i,r,o){K[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),elements:[]}},i:function(e,t,s,i,r,o,n,a,l){K[e].elements.push({getterReturnType:t,getter:qe(s,i),getterContext:r,setterArgumentType:o,setter:qe(n,a),setterContext:l})},q:function(e,t,s,i,r,o){oe[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),fields:[]}},e:function(e,t,s,i,r,o,n,a,l,h){oe[e].fields.push({fieldName:le(t),getterReturnType:s,getter:qe(i,r),getterContext:o,setterArgumentType:n,setter:qe(a,l),setterContext:h})},Q:function(e,t){Ae(e,{isVoid:!0,name:t=le(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,s){e=lt.toValue(e),t=ct(t,"emval::as");var i=[],r=lt.toHandle(i);return v[s>>>2]=r,t.toWireType(i,e)},x:function(e,t,s,i){e=lt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(rt[e].refcount+=1)},U:function(e,t){return(e=lt.toValue(e))instanceof(t=lt.toValue(t))},w:function(e){return"number"==typeof(e=lt.toValue(e))},C:function(e){return"string"==typeof(e=lt.toValue(e))},T:function(){return lt.toHandle([])},g:function(e){return lt.toHandle(Tt(e))},u:function(){return lt.toHandle({})},l:function(e){Y(lt.toValue(e)),ot(e)},j:function(e,t,s){e=lt.toValue(e),t=lt.toValue(t),s=lt.toValue(s),e[t]=s},d:function(e,t){var s=(e=ct(e,"_emval_take_value")).readValueFromPointer(t);return lt.toHandle(s)},y:function(){V("")},N:function(e,t,s){m.copyWithin(e>>>0,t>>>0,t+s>>>0)},L:function(e){var t,s,i=m.length,r=4294901760;if((e>>>=0)>r)return!1;for(var o=1;o<=4;o*=2){var n=i*(1+.2/o);if(n=Math.min(n,e+100663296),Rt(Math.min(r,(t=Math.max(e,n))+((s=65536)-t%s)%s)))return!0}return!1},H:function(e,t){var s=0;return Dt().forEach((function(i,r){var o=t+s;v[e+4*r>>>2]=o,function(e,t,s){for(var i=0;i>>0]=e.charCodeAt(i);s||(E[t>>>0]=0)}(i,o),s+=i.length+1})),0},I:function(e,t){var s=Dt();v[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),v[t>>>2]=i,0},J:function(e){try{var t=Bt.getStreamFromFD(e);return xt.close(t),0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},K:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=xt.read(e,E,n,a,i);if(l<0)return-1;if(r+=l,l>>2]=r,0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},E:function(e,t,s,i,r){try{var o=(l=s)+2097152>>>0<4194305-!!(a=t)?(a>>>0)+4294967296*l:NaN;if(isNaN(o))return 61;var n=Bt.getStreamFromFD(e);return xt.llseek(n,o,i),B=[n.position>>>0,(x=n.position,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[r>>>2]=B[0],I[r+4>>>2]=B[1],n.getdents&&0===o&&0===i&&(n.getdents=null),0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}var a,l},M:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=xt.write(e,E,n,a,i);if(l<0)return-1;r+=l,void 0!==i&&(i+=l)}return r}(Bt.getStreamFromFD(e),t,s);return v[i>>>2]=r,0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},G:function(e,t,s,i,r){return Ut(e,t,s,i)}};!function(){var e={a:Vt};function t(e,t){var s,i=e.exports;r.asm=i,A=r.asm.V,b(),R=r.asm.X,s=r.asm.W,M.unshift(s),k()}function s(e){t(e.instance)}function o(t){return(c||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(S)})):fetch(S,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()})).catch((function(){return Q(S)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),V(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){p("Module.instantiateWasm callback failed with error: "+e),i(e)}(c||"function"!=typeof WebAssembly.instantiateStreaming||j(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(i)}();var jt=function(){return(jt=r.asm.Y).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.Z).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm._).apply(null,arguments)};var Wt,zt=function(){return(zt=r.asm.$).apply(null,arguments)},Kt=function(){return(Kt=r.asm.aa).apply(null,arguments)};function Yt(){function e(){Wt||(Wt=!0,r.calledRun=!0,d||(r.noFSInit||xt.init.initialized||xt.init(),xt.ignorePermissions=!1,W(M),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),L.unshift(e);var e;W(L)}()))}U>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),F.unshift(e);var e;W(F)}(),U>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}if(r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.ba).apply(null,arguments)},r.dynCall_viijii=function(){return(r.dynCall_viijii=r.asm.ca).apply(null,arguments)},r.dynCall_iiiiij=function(){return(r.dynCall_iiiiij=r.asm.da).apply(null,arguments)},r.dynCall_iiiiijj=function(){return(r.dynCall_iiiiijj=r.asm.ea).apply(null,arguments)},r.dynCall_iiiiiijj=function(){return(r.dynCall_iiiiiijj=r.asm.fa).apply(null,arguments)},H=function e(){Wt||Yt(),Wt||(H=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Yt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),ug=class{constructor(e){this.value=e,this.type=5}},pg=class{constructor(e){this.expressID=e,this.type=0}};if((ig=sg||(sg={})).IFC2X3="IFC2X3",ig.IFC4="IFC4",ig.IFC4X3="IFC4X3",function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDaylightSavingHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHourInDay=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMinuteInHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSecondInMinute=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},s.COMPLETION_G1={type:3,value:"COMPLETION_G1"},s.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},s.SNOW_S={type:3,value:"SNOW_S"},s.WIND_W={type:3,value:"WIND_W"},s.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},s.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},s.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},s.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},s.FIRE={type:3,value:"FIRE"},s.IMPULSE={type:3,value:"IMPULSE"},s.IMPACT={type:3,value:"IMPACT"},s.TRANSPORT={type:3,value:"TRANSPORT"},s.ERECTION={type:3,value:"ERECTION"},s.PROPPING={type:3,value:"PROPPING"},s.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},s.SHRINKAGE={type:3,value:"SHRINKAGE"},s.CREEP={type:3,value:"CREEP"},s.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},s.BUOYANCY={type:3,value:"BUOYANCY"},s.ICE={type:3,value:"ICE"},s.CURRENT={type:3,value:"CURRENT"},s.WAVE={type:3,value:"WAVE"},s.RAIN={type:3,value:"RAIN"},s.BRAKES={type:3,value:"BRAKES"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=s;class i{}i.PERMANENT_G={type:3,value:"PERMANENT_G"},i.VARIABLE_Q={type:3,value:"VARIABLE_Q"},i.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=i;class r{}r.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},r.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},r.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},r.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},r.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=r;class o{}o.OFFICE={type:3,value:"OFFICE"},o.SITE={type:3,value:"SITE"},o.HOME={type:3,value:"HOME"},o.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},o.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=o;class n{}n.AHEAD={type:3,value:"AHEAD"},n.BEHIND={type:3,value:"BEHIND"},e.IfcAheadOrBehind=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.GRILLE={type:3,value:"GRILLE"},l.REGISTER={type:3,value:"REGISTER"},l.DIFFUSER={type:3,value:"DIFFUSER"},l.EYEBALL={type:3,value:"EYEBALL"},l.IRIS={type:3,value:"IRIS"},l.LINEARGRILLE={type:3,value:"LINEARGRILLE"},l.LINEARDIFFUSER={type:3,value:"LINEARDIFFUSER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},f.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},f.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},f.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},f.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},f.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=f;class E{}E.BEAM={type:3,value:"BEAM"},E.JOIST={type:3,value:"JOIST"},E.LINTEL={type:3,value:"LINTEL"},E.T_BEAM={type:3,value:"T_BEAM"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=E;class m{}m.GREATERTHAN={type:3,value:"GREATERTHAN"},m.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},m.LESSTHAN={type:3,value:"LESSTHAN"},m.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},m.EQUALTO={type:3,value:"EQUALTO"},m.NOTEQUALTO={type:3,value:"NOTEQUALTO"},e.IfcBenchmarkEnum=m;class y{}y.WATER={type:3,value:"WATER"},y.STEAM={type:3,value:"STEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=y;class g{}g.UNION={type:3,value:"UNION"},g.INTERSECTION={type:3,value:"INTERSECTION"},g.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=g;class I{}I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=I;class v{}v.BEND={type:3,value:"BEND"},v.CROSS={type:3,value:"CROSS"},v.REDUCER={type:3,value:"REDUCER"},v.TEE={type:3,value:"TEE"},v.USERDEFINED={type:3,value:"USERDEFINED"},v.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=v;class T{}T.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},T.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},T.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},T.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=T;class _{}_.CABLESEGMENT={type:3,value:"CABLESEGMENT"},_.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=_;class R{}R.NOCHANGE={type:3,value:"NOCHANGE"},R.MODIFIED={type:3,value:"MODIFIED"},R.ADDED={type:3,value:"ADDED"},R.DELETED={type:3,value:"DELETED"},R.MODIFIEDADDED={type:3,value:"MODIFIEDADDED"},R.MODIFIEDDELETED={type:3,value:"MODIFIEDDELETED"},e.IfcChangeActionEnum=R;class P{}P.AIRCOOLED={type:3,value:"AIRCOOLED"},P.WATERCOOLED={type:3,value:"WATERCOOLED"},P.HEATRECOVERY={type:3,value:"HEATRECOVERY"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=P;class D{}D.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},D.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},D.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},D.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},D.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},D.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=D;class N{}N.COLUMN={type:3,value:"COLUMN"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=N;class C{}C.DYNAMIC={type:3,value:"DYNAMIC"},C.RECIPROCATING={type:3,value:"RECIPROCATING"},C.ROTARY={type:3,value:"ROTARY"},C.SCROLL={type:3,value:"SCROLL"},C.TROCHOIDAL={type:3,value:"TROCHOIDAL"},C.SINGLESTAGE={type:3,value:"SINGLESTAGE"},C.BOOSTER={type:3,value:"BOOSTER"},C.OPENTYPE={type:3,value:"OPENTYPE"},C.HERMETIC={type:3,value:"HERMETIC"},C.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},C.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},C.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},C.ROTARYVANE={type:3,value:"ROTARYVANE"},C.SINGLESCREW={type:3,value:"SINGLESCREW"},C.TWINSCREW={type:3,value:"TWINSCREW"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=C;class O{}O.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},O.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},O.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},O.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},O.AIRCOOLED={type:3,value:"AIRCOOLED"},O.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=O;class b{}b.ATPATH={type:3,value:"ATPATH"},b.ATSTART={type:3,value:"ATSTART"},b.ATEND={type:3,value:"ATEND"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=b;class S{}S.HARD={type:3,value:"HARD"},S.SOFT={type:3,value:"SOFT"},S.ADVISORY={type:3,value:"ADVISORY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=S;class w{}w.FLOATING={type:3,value:"FLOATING"},w.PROPORTIONAL={type:3,value:"PROPORTIONAL"},w.PROPORTIONALINTEGRAL={type:3,value:"PROPORTIONALINTEGRAL"},w.PROPORTIONALINTEGRALDERIVATIVE={type:3,value:"PROPORTIONALINTEGRALDERIVATIVE"},w.TIMEDTWOPOSITION={type:3,value:"TIMEDTWOPOSITION"},w.TWOPOSITION={type:3,value:"TWOPOSITION"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=w;class x{}x.ACTIVE={type:3,value:"ACTIVE"},x.PASSIVE={type:3,value:"PASSIVE"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=x;class B{}B.NATURALDRAFT={type:3,value:"NATURALDRAFT"},B.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},B.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=B;class F{}F.BUDGET={type:3,value:"BUDGET"},F.COSTPLAN={type:3,value:"COSTPLAN"},F.ESTIMATE={type:3,value:"ESTIMATE"},F.TENDER={type:3,value:"TENDER"},F.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},F.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},F.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=F;class M{}M.CEILING={type:3,value:"CEILING"},M.FLOORING={type:3,value:"FLOORING"},M.CLADDING={type:3,value:"CLADDING"},M.ROOFING={type:3,value:"ROOFING"},M.INSULATION={type:3,value:"INSULATION"},M.MEMBRANE={type:3,value:"MEMBRANE"},M.SLEEVING={type:3,value:"SLEEVING"},M.WRAPPING={type:3,value:"WRAPPING"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=M;class L{}L.AED={type:3,value:"AED"},L.AES={type:3,value:"AES"},L.ATS={type:3,value:"ATS"},L.AUD={type:3,value:"AUD"},L.BBD={type:3,value:"BBD"},L.BEG={type:3,value:"BEG"},L.BGL={type:3,value:"BGL"},L.BHD={type:3,value:"BHD"},L.BMD={type:3,value:"BMD"},L.BND={type:3,value:"BND"},L.BRL={type:3,value:"BRL"},L.BSD={type:3,value:"BSD"},L.BWP={type:3,value:"BWP"},L.BZD={type:3,value:"BZD"},L.CAD={type:3,value:"CAD"},L.CBD={type:3,value:"CBD"},L.CHF={type:3,value:"CHF"},L.CLP={type:3,value:"CLP"},L.CNY={type:3,value:"CNY"},L.CYS={type:3,value:"CYS"},L.CZK={type:3,value:"CZK"},L.DDP={type:3,value:"DDP"},L.DEM={type:3,value:"DEM"},L.DKK={type:3,value:"DKK"},L.EGL={type:3,value:"EGL"},L.EST={type:3,value:"EST"},L.EUR={type:3,value:"EUR"},L.FAK={type:3,value:"FAK"},L.FIM={type:3,value:"FIM"},L.FJD={type:3,value:"FJD"},L.FKP={type:3,value:"FKP"},L.FRF={type:3,value:"FRF"},L.GBP={type:3,value:"GBP"},L.GIP={type:3,value:"GIP"},L.GMD={type:3,value:"GMD"},L.GRX={type:3,value:"GRX"},L.HKD={type:3,value:"HKD"},L.HUF={type:3,value:"HUF"},L.ICK={type:3,value:"ICK"},L.IDR={type:3,value:"IDR"},L.ILS={type:3,value:"ILS"},L.INR={type:3,value:"INR"},L.IRP={type:3,value:"IRP"},L.ITL={type:3,value:"ITL"},L.JMD={type:3,value:"JMD"},L.JOD={type:3,value:"JOD"},L.JPY={type:3,value:"JPY"},L.KES={type:3,value:"KES"},L.KRW={type:3,value:"KRW"},L.KWD={type:3,value:"KWD"},L.KYD={type:3,value:"KYD"},L.LKR={type:3,value:"LKR"},L.LUF={type:3,value:"LUF"},L.MTL={type:3,value:"MTL"},L.MUR={type:3,value:"MUR"},L.MXN={type:3,value:"MXN"},L.MYR={type:3,value:"MYR"},L.NLG={type:3,value:"NLG"},L.NZD={type:3,value:"NZD"},L.OMR={type:3,value:"OMR"},L.PGK={type:3,value:"PGK"},L.PHP={type:3,value:"PHP"},L.PKR={type:3,value:"PKR"},L.PLN={type:3,value:"PLN"},L.PTN={type:3,value:"PTN"},L.QAR={type:3,value:"QAR"},L.RUR={type:3,value:"RUR"},L.SAR={type:3,value:"SAR"},L.SCR={type:3,value:"SCR"},L.SEK={type:3,value:"SEK"},L.SGD={type:3,value:"SGD"},L.SKP={type:3,value:"SKP"},L.THB={type:3,value:"THB"},L.TRL={type:3,value:"TRL"},L.TTD={type:3,value:"TTD"},L.TWD={type:3,value:"TWD"},L.USD={type:3,value:"USD"},L.VEB={type:3,value:"VEB"},L.VND={type:3,value:"VND"},L.XEU={type:3,value:"XEU"},L.ZAR={type:3,value:"ZAR"},L.ZWD={type:3,value:"ZWD"},L.NOK={type:3,value:"NOK"},e.IfcCurrencyEnum=L;class U{}U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=U;class H{}H.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},H.FIREDAMPER={type:3,value:"FIREDAMPER"},H.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},H.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},H.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},H.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},H.BLASTDAMPER={type:3,value:"BLASTDAMPER"},H.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},H.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},H.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},H.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=H;class G{}G.MEASURED={type:3,value:"MEASURED"},G.PREDICTED={type:3,value:"PREDICTED"},G.SIMULATED={type:3,value:"SIMULATED"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=G;class k{}k.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},k.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},k.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},k.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},k.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},k.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},k.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},k.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},k.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},k.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},k.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},k.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},k.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},k.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},k.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},k.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},k.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},k.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},k.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},k.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},k.TORQUEUNIT={type:3,value:"TORQUEUNIT"},k.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},k.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},k.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},k.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},k.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},k.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},k.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},k.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},k.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},k.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},k.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},k.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},k.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},k.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},k.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},k.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},k.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},k.PHUNIT={type:3,value:"PHUNIT"},k.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},k.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},k.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},k.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},k.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},k.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},k.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},k.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},k.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},k.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=k;class V{}V.ORIGIN={type:3,value:"ORIGIN"},V.TARGET={type:3,value:"TARGET"},e.IfcDimensionExtentUsage=V;class j{}j.POSITIVE={type:3,value:"POSITIVE"},j.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=j;class Q{}Q.FORMEDDUCT={type:3,value:"FORMEDDUCT"},Q.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},Q.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},Q.MANHOLE={type:3,value:"MANHOLE"},Q.METERCHAMBER={type:3,value:"METERCHAMBER"},Q.SUMP={type:3,value:"SUMP"},Q.TRENCH={type:3,value:"TRENCH"},Q.VALVECHAMBER={type:3,value:"VALVECHAMBER"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=Q;class W{}W.PUBLIC={type:3,value:"PUBLIC"},W.RESTRICTED={type:3,value:"RESTRICTED"},W.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},W.PERSONAL={type:3,value:"PERSONAL"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=W;class z{}z.DRAFT={type:3,value:"DRAFT"},z.FINALDRAFT={type:3,value:"FINALDRAFT"},z.FINAL={type:3,value:"FINAL"},z.REVISION={type:3,value:"REVISION"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=z;class K{}K.SWINGING={type:3,value:"SWINGING"},K.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},K.SLIDING={type:3,value:"SLIDING"},K.FOLDING={type:3,value:"FOLDING"},K.REVOLVING={type:3,value:"REVOLVING"},K.ROLLINGUP={type:3,value:"ROLLINGUP"},K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=K;class Y{}Y.LEFT={type:3,value:"LEFT"},Y.MIDDLE={type:3,value:"MIDDLE"},Y.RIGHT={type:3,value:"RIGHT"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Y;class X{}X.ALUMINIUM={type:3,value:"ALUMINIUM"},X.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},X.STEEL={type:3,value:"STEEL"},X.WOOD={type:3,value:"WOOD"},X.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},X.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},X.PLASTIC={type:3,value:"PLASTIC"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=X;class Z{}Z.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Z.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Z.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},Z.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Z.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Z.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},Z.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Z.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Z.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},Z.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Z.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Z.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},Z.REVOLVING={type:3,value:"REVOLVING"},Z.ROLLINGUP={type:3,value:"ROLLINGUP"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=Z;class q{}q.BEND={type:3,value:"BEND"},q.CONNECTOR={type:3,value:"CONNECTOR"},q.ENTRY={type:3,value:"ENTRY"},q.EXIT={type:3,value:"EXIT"},q.JUNCTION={type:3,value:"JUNCTION"},q.OBSTRUCTION={type:3,value:"OBSTRUCTION"},q.TRANSITION={type:3,value:"TRANSITION"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=q;class J{}J.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},J.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=J;class ${}$.FLATOVAL={type:3,value:"FLATOVAL"},$.RECTANGULAR={type:3,value:"RECTANGULAR"},$.ROUND={type:3,value:"ROUND"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=$;class ee{}ee.COMPUTER={type:3,value:"COMPUTER"},ee.DIRECTWATERHEATER={type:3,value:"DIRECTWATERHEATER"},ee.DISHWASHER={type:3,value:"DISHWASHER"},ee.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ee.ELECTRICHEATER={type:3,value:"ELECTRICHEATER"},ee.FACSIMILE={type:3,value:"FACSIMILE"},ee.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ee.FREEZER={type:3,value:"FREEZER"},ee.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ee.HANDDRYER={type:3,value:"HANDDRYER"},ee.INDIRECTWATERHEATER={type:3,value:"INDIRECTWATERHEATER"},ee.MICROWAVE={type:3,value:"MICROWAVE"},ee.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ee.PRINTER={type:3,value:"PRINTER"},ee.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ee.RADIANTHEATER={type:3,value:"RADIANTHEATER"},ee.SCANNER={type:3,value:"SCANNER"},ee.TELEPHONE={type:3,value:"TELEPHONE"},ee.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ee.TV={type:3,value:"TV"},ee.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ee.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ee.WATERHEATER={type:3,value:"WATERHEATER"},ee.WATERCOOLER={type:3,value:"WATERCOOLER"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ee;class te{}te.ALTERNATING={type:3,value:"ALTERNATING"},te.DIRECT={type:3,value:"DIRECT"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricCurrentEnum=te;class se{}se.ALARMPANEL={type:3,value:"ALARMPANEL"},se.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},se.CONTROLPANEL={type:3,value:"CONTROLPANEL"},se.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},se.GASDETECTORPANEL={type:3,value:"GASDETECTORPANEL"},se.INDICATORPANEL={type:3,value:"INDICATORPANEL"},se.MIMICPANEL={type:3,value:"MIMICPANEL"},se.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},se.SWITCHBOARD={type:3,value:"SWITCHBOARD"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionPointFunctionEnum=se;class ie{}ie.BATTERY={type:3,value:"BATTERY"},ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},ie.UPS={type:3,value:"UPS"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=ie;class re{}re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=re;class oe{}oe.ELECTRICPOINTHEATER={type:3,value:"ELECTRICPOINTHEATER"},oe.ELECTRICCABLEHEATER={type:3,value:"ELECTRICCABLEHEATER"},oe.ELECTRICMATHEATER={type:3,value:"ELECTRICMATHEATER"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricHeaterTypeEnum=oe;class ne{}ne.DC={type:3,value:"DC"},ne.INDUCTION={type:3,value:"INDUCTION"},ne.POLYPHASE={type:3,value:"POLYPHASE"},ne.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},ne.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=ne;class ae{}ae.TIMECLOCK={type:3,value:"TIMECLOCK"},ae.TIMEDELAY={type:3,value:"TIMEDELAY"},ae.RELAY={type:3,value:"RELAY"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=ae;class le{}le.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},le.ARCH={type:3,value:"ARCH"},le.BEAM_GRID={type:3,value:"BEAM_GRID"},le.BRACED_FRAME={type:3,value:"BRACED_FRAME"},le.GIRDER={type:3,value:"GIRDER"},le.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},le.RIGID_FRAME={type:3,value:"RIGID_FRAME"},le.SLAB_FIELD={type:3,value:"SLAB_FIELD"},le.TRUSS={type:3,value:"TRUSS"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=le;class he{}he.COMPLEX={type:3,value:"COMPLEX"},he.ELEMENT={type:3,value:"ELEMENT"},he.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=he;class ce{}ce.PRIMARY={type:3,value:"PRIMARY"},ce.SECONDARY={type:3,value:"SECONDARY"},ce.TERTIARY={type:3,value:"TERTIARY"},ce.AUXILIARY={type:3,value:"AUXILIARY"},ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnergySequenceEnum=ce;class Ae{}Ae.COMBINEDVALUE={type:3,value:"COMBINEDVALUE"},Ae.DISPOSAL={type:3,value:"DISPOSAL"},Ae.EXTRACTION={type:3,value:"EXTRACTION"},Ae.INSTALLATION={type:3,value:"INSTALLATION"},Ae.MANUFACTURE={type:3,value:"MANUFACTURE"},Ae.TRANSPORTATION={type:3,value:"TRANSPORTATION"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnvironmentalImpactCategoryEnum=Ae;class ue{}ue.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},ue.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},ue.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},ue.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},ue.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},ue.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},ue.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=ue;class pe{}pe.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},pe.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},pe.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},pe.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},pe.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=pe;class de{}de.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},de.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},de.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},de.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},de.TUBEAXIAL={type:3,value:"TUBEAXIAL"},de.VANEAXIAL={type:3,value:"VANEAXIAL"},de.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=de;class fe{}fe.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},fe.ODORFILTER={type:3,value:"ODORFILTER"},fe.OILFILTER={type:3,value:"OILFILTER"},fe.STRAINER={type:3,value:"STRAINER"},fe.WATERFILTER={type:3,value:"WATERFILTER"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=fe;class Ee{}Ee.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Ee.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Ee.HOSEREEL={type:3,value:"HOSEREEL"},Ee.SPRINKLER={type:3,value:"SPRINKLER"},Ee.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Ee;class me{}me.SOURCE={type:3,value:"SOURCE"},me.SINK={type:3,value:"SINK"},me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=me;class ye{}ye.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},ye.THERMOMETER={type:3,value:"THERMOMETER"},ye.AMMETER={type:3,value:"AMMETER"},ye.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},ye.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},ye.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},ye.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},ye.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=ye;class ge{}ge.ELECTRICMETER={type:3,value:"ELECTRICMETER"},ge.ENERGYMETER={type:3,value:"ENERGYMETER"},ge.FLOWMETER={type:3,value:"FLOWMETER"},ge.GASMETER={type:3,value:"GASMETER"},ge.OILMETER={type:3,value:"OILMETER"},ge.WATERMETER={type:3,value:"WATERMETER"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=ge;class Ie{}Ie.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},Ie.PAD_FOOTING={type:3,value:"PAD_FOOTING"},Ie.PILE_CAP={type:3,value:"PILE_CAP"},Ie.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=Ie;class ve{}ve.GASAPPLIANCE={type:3,value:"GASAPPLIANCE"},ve.GASBOOSTER={type:3,value:"GASBOOSTER"},ve.GASBURNER={type:3,value:"GASBURNER"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGasTerminalTypeEnum=ve;class Te{}Te.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Te.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Te.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Te.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Te.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Te.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Te.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Te;class _e{}_e.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},_e.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=_e;class Re{}Re.PLATE={type:3,value:"PLATE"},Re.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=Re;class Pe{}Pe.STEAMINJECTION={type:3,value:"STEAMINJECTION"},Pe.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},Pe.ADIABATICPAN={type:3,value:"ADIABATICPAN"},Pe.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},Pe.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},Pe.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},Pe.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},Pe.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},Pe.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},Pe.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},Pe.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},Pe.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},Pe.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=Pe;class De{}De.INTERNAL={type:3,value:"INTERNAL"},De.EXTERNAL={type:3,value:"EXTERNAL"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=De;class Ne{}Ne.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Ne.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Ne.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Ne;class Ce{}Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ce;class Oe{}Oe.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},Oe.FLUORESCENT={type:3,value:"FLUORESCENT"},Oe.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},Oe.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},Oe.METALHALIDE={type:3,value:"METALHALIDE"},Oe.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=Oe;class be{}be.AXIS1={type:3,value:"AXIS1"},be.AXIS2={type:3,value:"AXIS2"},be.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=be;class Se{}Se.TYPE_A={type:3,value:"TYPE_A"},Se.TYPE_B={type:3,value:"TYPE_B"},Se.TYPE_C={type:3,value:"TYPE_C"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Se;class we{}we.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},we.FLUORESCENT={type:3,value:"FLUORESCENT"},we.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},we.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},we.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},we.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},we.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},we.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},we.METALHALIDE={type:3,value:"METALHALIDE"},we.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=we;class xe{}xe.POINTSOURCE={type:3,value:"POINTSOURCE"},xe.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=xe;class Be{}Be.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Be.LOAD_CASE={type:3,value:"LOAD_CASE"},Be.LOAD_COMBINATION_GROUP={type:3,value:"LOAD_COMBINATION_GROUP"},Be.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Be;class Fe{}Fe.LOGICALAND={type:3,value:"LOGICALAND"},Fe.LOGICALOR={type:3,value:"LOGICALOR"},e.IfcLogicalOperatorEnum=Fe;class Me{}Me.BRACE={type:3,value:"BRACE"},Me.CHORD={type:3,value:"CHORD"},Me.COLLAR={type:3,value:"COLLAR"},Me.MEMBER={type:3,value:"MEMBER"},Me.MULLION={type:3,value:"MULLION"},Me.PLATE={type:3,value:"PLATE"},Me.POST={type:3,value:"POST"},Me.PURLIN={type:3,value:"PURLIN"},Me.RAFTER={type:3,value:"RAFTER"},Me.STRINGER={type:3,value:"STRINGER"},Me.STRUT={type:3,value:"STRUT"},Me.STUD={type:3,value:"STUD"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=Me;class Le{}Le.BELTDRIVE={type:3,value:"BELTDRIVE"},Le.COUPLING={type:3,value:"COUPLING"},Le.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Le;class Ue{}Ue.NULL={type:3,value:"NULL"},e.IfcNullStyle=Ue;class He{}He.PRODUCT={type:3,value:"PRODUCT"},He.PROCESS={type:3,value:"PROCESS"},He.CONTROL={type:3,value:"CONTROL"},He.RESOURCE={type:3,value:"RESOURCE"},He.ACTOR={type:3,value:"ACTOR"},He.GROUP={type:3,value:"GROUP"},He.PROJECT={type:3,value:"PROJECT"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=He;class Ge{}Ge.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ge.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ge.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ge.REQUIREMENT={type:3,value:"REQUIREMENT"},Ge.SPECIFICATION={type:3,value:"SPECIFICATION"},Ge.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ge;class ke{}ke.ASSIGNEE={type:3,value:"ASSIGNEE"},ke.ASSIGNOR={type:3,value:"ASSIGNOR"},ke.LESSEE={type:3,value:"LESSEE"},ke.LESSOR={type:3,value:"LESSOR"},ke.LETTINGAGENT={type:3,value:"LETTINGAGENT"},ke.OWNER={type:3,value:"OWNER"},ke.TENANT={type:3,value:"TENANT"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=ke;class Ve{}Ve.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},Ve.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},Ve.POWEROUTLET={type:3,value:"POWEROUTLET"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=Ve;class je{}je.GRILL={type:3,value:"GRILL"},je.LOUVER={type:3,value:"LOUVER"},je.SCREEN={type:3,value:"SCREEN"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=je;class Qe{}Qe.PHYSICAL={type:3,value:"PHYSICAL"},Qe.VIRTUAL={type:3,value:"VIRTUAL"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=Qe;class We{}We.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},We.COMPOSITE={type:3,value:"COMPOSITE"},We.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},We.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=We;class ze{}ze.COHESION={type:3,value:"COHESION"},ze.FRICTION={type:3,value:"FRICTION"},ze.SUPPORT={type:3,value:"SUPPORT"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=ze;class Ke{}Ke.BEND={type:3,value:"BEND"},Ke.CONNECTOR={type:3,value:"CONNECTOR"},Ke.ENTRY={type:3,value:"ENTRY"},Ke.EXIT={type:3,value:"EXIT"},Ke.JUNCTION={type:3,value:"JUNCTION"},Ke.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ke.TRANSITION={type:3,value:"TRANSITION"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Ke;class Ye{}Ye.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ye.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ye.GUTTER={type:3,value:"GUTTER"},Ye.SPOOL={type:3,value:"SPOOL"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Ye;class Xe{}Xe.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Xe.SHEET={type:3,value:"SHEET"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Xe;class Ze{}Ze.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Ze.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Ze.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Ze.CALIBRATION={type:3,value:"CALIBRATION"},Ze.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Ze.SHUTDOWN={type:3,value:"SHUTDOWN"},Ze.STARTUP={type:3,value:"STARTUP"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Ze;class qe{}qe.CURVE={type:3,value:"CURVE"},qe.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=qe;class Je{}Je.CHANGE={type:3,value:"CHANGE"},Je.MAINTENANCE={type:3,value:"MAINTENANCE"},Je.MOVE={type:3,value:"MOVE"},Je.PURCHASE={type:3,value:"PURCHASE"},Je.WORK={type:3,value:"WORK"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderRecordTypeEnum=Je;class $e{}$e.CHANGEORDER={type:3,value:"CHANGEORDER"},$e.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},$e.MOVEORDER={type:3,value:"MOVEORDER"},$e.PURCHASEORDER={type:3,value:"PURCHASEORDER"},$e.WORKORDER={type:3,value:"WORKORDER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=$e;class et{}et.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},et.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=et;class tt{}tt.DESIGN={type:3,value:"DESIGN"},tt.DESIGNMAXIMUM={type:3,value:"DESIGNMAXIMUM"},tt.DESIGNMINIMUM={type:3,value:"DESIGNMINIMUM"},tt.SIMULATED={type:3,value:"SIMULATED"},tt.ASBUILT={type:3,value:"ASBUILT"},tt.COMMISSIONING={type:3,value:"COMMISSIONING"},tt.MEASURED={type:3,value:"MEASURED"},tt.USERDEFINED={type:3,value:"USERDEFINED"},tt.NOTKNOWN={type:3,value:"NOTKNOWN"},e.IfcPropertySourceEnum=tt;class st{}st.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},st.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},st.EARTHFAILUREDEVICE={type:3,value:"EARTHFAILUREDEVICE"},st.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},st.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},st.VARISTOR={type:3,value:"VARISTOR"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=st;class it{}it.CIRCULATOR={type:3,value:"CIRCULATOR"},it.ENDSUCTION={type:3,value:"ENDSUCTION"},it.SPLITCASE={type:3,value:"SPLITCASE"},it.VERTICALINLINE={type:3,value:"VERTICALINLINE"},it.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=it;class rt{}rt.HANDRAIL={type:3,value:"HANDRAIL"},rt.GUARDRAIL={type:3,value:"GUARDRAIL"},rt.BALUSTRADE={type:3,value:"BALUSTRADE"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=rt;class ot{}ot.STRAIGHT={type:3,value:"STRAIGHT"},ot.SPIRAL={type:3,value:"SPIRAL"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=ot;class nt{}nt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},nt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},nt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},nt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},nt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},nt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=nt;class at{}at.BLINN={type:3,value:"BLINN"},at.FLAT={type:3,value:"FLAT"},at.GLASS={type:3,value:"GLASS"},at.MATT={type:3,value:"MATT"},at.METAL={type:3,value:"METAL"},at.MIRROR={type:3,value:"MIRROR"},at.PHONG={type:3,value:"PHONG"},at.PLASTIC={type:3,value:"PLASTIC"},at.STRAUSS={type:3,value:"STRAUSS"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=at;class lt{}lt.MAIN={type:3,value:"MAIN"},lt.SHEAR={type:3,value:"SHEAR"},lt.LIGATURE={type:3,value:"LIGATURE"},lt.STUD={type:3,value:"STUD"},lt.PUNCHING={type:3,value:"PUNCHING"},lt.EDGE={type:3,value:"EDGE"},lt.RING={type:3,value:"RING"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=lt;class ht{}ht.PLAIN={type:3,value:"PLAIN"},ht.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=ht;class ct{}ct.CONSUMED={type:3,value:"CONSUMED"},ct.PARTIALLYCONSUMED={type:3,value:"PARTIALLYCONSUMED"},ct.NOTCONSUMED={type:3,value:"NOTCONSUMED"},ct.OCCUPIED={type:3,value:"OCCUPIED"},ct.PARTIALLYOCCUPIED={type:3,value:"PARTIALLYOCCUPIED"},ct.NOTOCCUPIED={type:3,value:"NOTOCCUPIED"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcResourceConsumptionEnum=ct;class At{}At.DIRECTION_X={type:3,value:"DIRECTION_X"},At.DIRECTION_Y={type:3,value:"DIRECTION_Y"},e.IfcRibPlateDirectionEnum=At;class ut{}ut.SUPPLIER={type:3,value:"SUPPLIER"},ut.MANUFACTURER={type:3,value:"MANUFACTURER"},ut.CONTRACTOR={type:3,value:"CONTRACTOR"},ut.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},ut.ARCHITECT={type:3,value:"ARCHITECT"},ut.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},ut.COSTENGINEER={type:3,value:"COSTENGINEER"},ut.CLIENT={type:3,value:"CLIENT"},ut.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},ut.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},ut.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},ut.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},ut.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},ut.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},ut.CIVILENGINEER={type:3,value:"CIVILENGINEER"},ut.COMISSIONINGENGINEER={type:3,value:"COMISSIONINGENGINEER"},ut.ENGINEER={type:3,value:"ENGINEER"},ut.OWNER={type:3,value:"OWNER"},ut.CONSULTANT={type:3,value:"CONSULTANT"},ut.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},ut.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},ut.RESELLER={type:3,value:"RESELLER"},ut.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=ut;class pt{}pt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},pt.SHED_ROOF={type:3,value:"SHED_ROOF"},pt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},pt.HIP_ROOF={type:3,value:"HIP_ROOF"},pt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},pt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},pt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},pt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},pt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},pt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},pt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},pt.DOME_ROOF={type:3,value:"DOME_ROOF"},pt.FREEFORM={type:3,value:"FREEFORM"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=pt;class dt{}dt.EXA={type:3,value:"EXA"},dt.PETA={type:3,value:"PETA"},dt.TERA={type:3,value:"TERA"},dt.GIGA={type:3,value:"GIGA"},dt.MEGA={type:3,value:"MEGA"},dt.KILO={type:3,value:"KILO"},dt.HECTO={type:3,value:"HECTO"},dt.DECA={type:3,value:"DECA"},dt.DECI={type:3,value:"DECI"},dt.CENTI={type:3,value:"CENTI"},dt.MILLI={type:3,value:"MILLI"},dt.MICRO={type:3,value:"MICRO"},dt.NANO={type:3,value:"NANO"},dt.PICO={type:3,value:"PICO"},dt.FEMTO={type:3,value:"FEMTO"},dt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=dt;class ft{}ft.AMPERE={type:3,value:"AMPERE"},ft.BECQUEREL={type:3,value:"BECQUEREL"},ft.CANDELA={type:3,value:"CANDELA"},ft.COULOMB={type:3,value:"COULOMB"},ft.CUBIC_METRE={type:3,value:"CUBIC_METRE"},ft.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},ft.FARAD={type:3,value:"FARAD"},ft.GRAM={type:3,value:"GRAM"},ft.GRAY={type:3,value:"GRAY"},ft.HENRY={type:3,value:"HENRY"},ft.HERTZ={type:3,value:"HERTZ"},ft.JOULE={type:3,value:"JOULE"},ft.KELVIN={type:3,value:"KELVIN"},ft.LUMEN={type:3,value:"LUMEN"},ft.LUX={type:3,value:"LUX"},ft.METRE={type:3,value:"METRE"},ft.MOLE={type:3,value:"MOLE"},ft.NEWTON={type:3,value:"NEWTON"},ft.OHM={type:3,value:"OHM"},ft.PASCAL={type:3,value:"PASCAL"},ft.RADIAN={type:3,value:"RADIAN"},ft.SECOND={type:3,value:"SECOND"},ft.SIEMENS={type:3,value:"SIEMENS"},ft.SIEVERT={type:3,value:"SIEVERT"},ft.SQUARE_METRE={type:3,value:"SQUARE_METRE"},ft.STERADIAN={type:3,value:"STERADIAN"},ft.TESLA={type:3,value:"TESLA"},ft.VOLT={type:3,value:"VOLT"},ft.WATT={type:3,value:"WATT"},ft.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=ft;class Et{}Et.BATH={type:3,value:"BATH"},Et.BIDET={type:3,value:"BIDET"},Et.CISTERN={type:3,value:"CISTERN"},Et.SHOWER={type:3,value:"SHOWER"},Et.SINK={type:3,value:"SINK"},Et.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Et.TOILETPAN={type:3,value:"TOILETPAN"},Et.URINAL={type:3,value:"URINAL"},Et.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Et.WCSEAT={type:3,value:"WCSEAT"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Et;class mt{}mt.UNIFORM={type:3,value:"UNIFORM"},mt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=mt;class yt{}yt.CO2SENSOR={type:3,value:"CO2SENSOR"},yt.FIRESENSOR={type:3,value:"FIRESENSOR"},yt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},yt.GASSENSOR={type:3,value:"GASSENSOR"},yt.HEATSENSOR={type:3,value:"HEATSENSOR"},yt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},yt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},yt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},yt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},yt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},yt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},yt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},yt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=yt;class gt{}gt.START_START={type:3,value:"START_START"},gt.START_FINISH={type:3,value:"START_FINISH"},gt.FINISH_START={type:3,value:"FINISH_START"},gt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=gt;class It{}It.A_QUALITYOFCOMPONENTS={type:3,value:"A_QUALITYOFCOMPONENTS"},It.B_DESIGNLEVEL={type:3,value:"B_DESIGNLEVEL"},It.C_WORKEXECUTIONLEVEL={type:3,value:"C_WORKEXECUTIONLEVEL"},It.D_INDOORENVIRONMENT={type:3,value:"D_INDOORENVIRONMENT"},It.E_OUTDOORENVIRONMENT={type:3,value:"E_OUTDOORENVIRONMENT"},It.F_INUSECONDITIONS={type:3,value:"F_INUSECONDITIONS"},It.G_MAINTENANCELEVEL={type:3,value:"G_MAINTENANCELEVEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcServiceLifeFactorTypeEnum=It;class vt{}vt.ACTUALSERVICELIFE={type:3,value:"ACTUALSERVICELIFE"},vt.EXPECTEDSERVICELIFE={type:3,value:"EXPECTEDSERVICELIFE"},vt.OPTIMISTICREFERENCESERVICELIFE={type:3,value:"OPTIMISTICREFERENCESERVICELIFE"},vt.PESSIMISTICREFERENCESERVICELIFE={type:3,value:"PESSIMISTICREFERENCESERVICELIFE"},vt.REFERENCESERVICELIFE={type:3,value:"REFERENCESERVICELIFE"},e.IfcServiceLifeTypeEnum=vt;class Tt{}Tt.FLOOR={type:3,value:"FLOOR"},Tt.ROOF={type:3,value:"ROOF"},Tt.LANDING={type:3,value:"LANDING"},Tt.BASESLAB={type:3,value:"BASESLAB"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Tt;class _t{}_t.DBA={type:3,value:"DBA"},_t.DBB={type:3,value:"DBB"},_t.DBC={type:3,value:"DBC"},_t.NC={type:3,value:"NC"},_t.NR={type:3,value:"NR"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSoundScaleEnum=_t;class Rt{}Rt.SECTIONALRADIATOR={type:3,value:"SECTIONALRADIATOR"},Rt.PANELRADIATOR={type:3,value:"PANELRADIATOR"},Rt.TUBULARRADIATOR={type:3,value:"TUBULARRADIATOR"},Rt.CONVECTOR={type:3,value:"CONVECTOR"},Rt.BASEBOARDHEATER={type:3,value:"BASEBOARDHEATER"},Rt.FINNEDTUBEUNIT={type:3,value:"FINNEDTUBEUNIT"},Rt.UNITHEATER={type:3,value:"UNITHEATER"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Rt;class Pt{}Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Pt;class Dt{}Dt.BIRDCAGE={type:3,value:"BIRDCAGE"},Dt.COWL={type:3,value:"COWL"},Dt.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=Dt;class Nt{}Nt.STRAIGHT={type:3,value:"STRAIGHT"},Nt.WINDER={type:3,value:"WINDER"},Nt.SPIRAL={type:3,value:"SPIRAL"},Nt.CURVED={type:3,value:"CURVED"},Nt.FREEFORM={type:3,value:"FREEFORM"},Nt.USERDEFINED={type:3,value:"USERDEFINED"},Nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Nt;class Ct{}Ct.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},Ct.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},Ct.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},Ct.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},Ct.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},Ct.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},Ct.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},Ct.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},Ct.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},Ct.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},Ct.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},Ct.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},Ct.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},Ct.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=Ct;class Ot{}Ot.READWRITE={type:3,value:"READWRITE"},Ot.READONLY={type:3,value:"READONLY"},Ot.LOCKED={type:3,value:"LOCKED"},Ot.READWRITELOCKED={type:3,value:"READWRITELOCKED"},Ot.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=Ot;class bt{}bt.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},bt.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},bt.CABLE={type:3,value:"CABLE"},bt.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},bt.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveTypeEnum=bt;class St{}St.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},St.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},St.SHELL={type:3,value:"SHELL"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceTypeEnum=St;class wt{}wt.POSITIVE={type:3,value:"POSITIVE"},wt.NEGATIVE={type:3,value:"NEGATIVE"},wt.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=wt;class xt{}xt.BUMP={type:3,value:"BUMP"},xt.OPACITY={type:3,value:"OPACITY"},xt.REFLECTION={type:3,value:"REFLECTION"},xt.SELFILLUMINATION={type:3,value:"SELFILLUMINATION"},xt.SHININESS={type:3,value:"SHININESS"},xt.SPECULAR={type:3,value:"SPECULAR"},xt.TEXTURE={type:3,value:"TEXTURE"},xt.TRANSPARENCYMAP={type:3,value:"TRANSPARENCYMAP"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceTextureEnum=xt;class Bt{}Bt.CONTACTOR={type:3,value:"CONTACTOR"},Bt.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Bt.STARTER={type:3,value:"STARTER"},Bt.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Bt.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Bt;class Ft{}Ft.PREFORMED={type:3,value:"PREFORMED"},Ft.SECTIONAL={type:3,value:"SECTIONAL"},Ft.EXPANSION={type:3,value:"EXPANSION"},Ft.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=Ft;class Mt{}Mt.STRAND={type:3,value:"STRAND"},Mt.WIRE={type:3,value:"WIRE"},Mt.BAR={type:3,value:"BAR"},Mt.COATED={type:3,value:"COATED"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Mt;class Lt{}Lt.LEFT={type:3,value:"LEFT"},Lt.RIGHT={type:3,value:"RIGHT"},Lt.UP={type:3,value:"UP"},Lt.DOWN={type:3,value:"DOWN"},e.IfcTextPath=Lt;class Ut{}Ut.PEOPLE={type:3,value:"PEOPLE"},Ut.LIGHTING={type:3,value:"LIGHTING"},Ut.EQUIPMENT={type:3,value:"EQUIPMENT"},Ut.VENTILATIONINDOORAIR={type:3,value:"VENTILATIONINDOORAIR"},Ut.VENTILATIONOUTSIDEAIR={type:3,value:"VENTILATIONOUTSIDEAIR"},Ut.RECIRCULATEDAIR={type:3,value:"RECIRCULATEDAIR"},Ut.EXHAUSTAIR={type:3,value:"EXHAUSTAIR"},Ut.AIREXCHANGERATE={type:3,value:"AIREXCHANGERATE"},Ut.DRYBULBTEMPERATURE={type:3,value:"DRYBULBTEMPERATURE"},Ut.RELATIVEHUMIDITY={type:3,value:"RELATIVEHUMIDITY"},Ut.INFILTRATION={type:3,value:"INFILTRATION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadSourceEnum=Ut;class Ht{}Ht.SENSIBLE={type:3,value:"SENSIBLE"},Ht.LATENT={type:3,value:"LATENT"},Ht.RADIANT={type:3,value:"RADIANT"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadTypeEnum=Ht;class Gt{}Gt.CONTINUOUS={type:3,value:"CONTINUOUS"},Gt.DISCRETE={type:3,value:"DISCRETE"},Gt.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Gt.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Gt.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Gt.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Gt;class kt{}kt.ANNUAL={type:3,value:"ANNUAL"},kt.MONTHLY={type:3,value:"MONTHLY"},kt.WEEKLY={type:3,value:"WEEKLY"},kt.DAILY={type:3,value:"DAILY"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesScheduleTypeEnum=kt;class Vt{}Vt.CURRENT={type:3,value:"CURRENT"},Vt.FREQUENCY={type:3,value:"FREQUENCY"},Vt.VOLTAGE={type:3,value:"VOLTAGE"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Vt;class jt{}jt.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},jt.CONTINUOUS={type:3,value:"CONTINUOUS"},jt.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},jt.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=jt;class Qt{}Qt.ELEVATOR={type:3,value:"ELEVATOR"},Qt.ESCALATOR={type:3,value:"ESCALATOR"},Qt.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Qt;class Wt{}Wt.CARTESIAN={type:3,value:"CARTESIAN"},Wt.PARAMETER={type:3,value:"PARAMETER"},Wt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Wt;class zt{}zt.FINNED={type:3,value:"FINNED"},zt.USERDEFINED={type:3,value:"USERDEFINED"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=zt;class Kt{}Kt.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Kt.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Kt.AREAUNIT={type:3,value:"AREAUNIT"},Kt.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Kt.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Kt.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Kt.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Kt.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Kt.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Kt.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Kt.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Kt.FORCEUNIT={type:3,value:"FORCEUNIT"},Kt.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Kt.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Kt.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Kt.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Kt.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Kt.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Kt.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Kt.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Kt.MASSUNIT={type:3,value:"MASSUNIT"},Kt.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Kt.POWERUNIT={type:3,value:"POWERUNIT"},Kt.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Kt.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Kt.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Kt.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Kt.TIMEUNIT={type:3,value:"TIMEUNIT"},Kt.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Kt;class Yt{}Yt.AIRHANDLER={type:3,value:"AIRHANDLER"},Yt.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Yt.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Yt.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Yt;class Xt{}Xt.AIRRELEASE={type:3,value:"AIRRELEASE"},Xt.ANTIVACUUM={type:3,value:"ANTIVACUUM"},Xt.CHANGEOVER={type:3,value:"CHANGEOVER"},Xt.CHECK={type:3,value:"CHECK"},Xt.COMMISSIONING={type:3,value:"COMMISSIONING"},Xt.DIVERTING={type:3,value:"DIVERTING"},Xt.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},Xt.DOUBLECHECK={type:3,value:"DOUBLECHECK"},Xt.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},Xt.FAUCET={type:3,value:"FAUCET"},Xt.FLUSHING={type:3,value:"FLUSHING"},Xt.GASCOCK={type:3,value:"GASCOCK"},Xt.GASTAP={type:3,value:"GASTAP"},Xt.ISOLATING={type:3,value:"ISOLATING"},Xt.MIXING={type:3,value:"MIXING"},Xt.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},Xt.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},Xt.REGULATING={type:3,value:"REGULATING"},Xt.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},Xt.STEAMTRAP={type:3,value:"STEAMTRAP"},Xt.STOPCOCK={type:3,value:"STOPCOCK"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=Xt;class Zt{}Zt.COMPRESSION={type:3,value:"COMPRESSION"},Zt.SPRING={type:3,value:"SPRING"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Zt;class qt{}qt.STANDARD={type:3,value:"STANDARD"},qt.POLYGONAL={type:3,value:"POLYGONAL"},qt.SHEAR={type:3,value:"SHEAR"},qt.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},qt.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=qt;class Jt{}Jt.FLOORTRAP={type:3,value:"FLOORTRAP"},Jt.FLOORWASTE={type:3,value:"FLOORWASTE"},Jt.GULLYSUMP={type:3,value:"GULLYSUMP"},Jt.GULLYTRAP={type:3,value:"GULLYTRAP"},Jt.GREASEINTERCEPTOR={type:3,value:"GREASEINTERCEPTOR"},Jt.OILINTERCEPTOR={type:3,value:"OILINTERCEPTOR"},Jt.PETROLINTERCEPTOR={type:3,value:"PETROLINTERCEPTOR"},Jt.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Jt.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Jt.WASTETRAP={type:3,value:"WASTETRAP"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Jt;class $t{}$t.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},$t.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},$t.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},$t.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},$t.TOPHUNG={type:3,value:"TOPHUNG"},$t.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},$t.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},$t.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},$t.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},$t.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},$t.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},$t.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},$t.OTHEROPERATION={type:3,value:"OTHEROPERATION"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=$t;class es{}es.LEFT={type:3,value:"LEFT"},es.MIDDLE={type:3,value:"MIDDLE"},es.RIGHT={type:3,value:"RIGHT"},es.BOTTOM={type:3,value:"BOTTOM"},es.TOP={type:3,value:"TOP"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=es;class ts{}ts.ALUMINIUM={type:3,value:"ALUMINIUM"},ts.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},ts.STEEL={type:3,value:"STEEL"},ts.WOOD={type:3,value:"WOOD"},ts.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},ts.PLASTIC={type:3,value:"PLASTIC"},ts.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=ts;class ss{}ss.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ss.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ss.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ss.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ss.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ss.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ss.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ss.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ss.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ss;class is{}is.ACTUAL={type:3,value:"ACTUAL"},is.BASELINE={type:3,value:"BASELINE"},is.PLANNED={type:3,value:"PLANNED"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkControlTypeEnum=is;e.IfcActorRole=class extends pg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class rs extends pg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=rs;e.IfcApplication=class extends pg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class os extends pg{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.type=411424972}}e.IfcAppliedValue=os;e.IfcAppliedValueRelationship=class extends pg{constructor(e,t,s,i,r,o){super(e),this.ComponentOfTotal=t,this.Components=s,this.ArithmeticOperator=i,this.Name=r,this.Description=o,this.type=1110488051}};e.IfcApproval=class extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.Description=t,this.ApprovalDateTime=s,this.ApprovalStatus=i,this.ApprovalLevel=r,this.ApprovalQualifier=o,this.Name=n,this.Identifier=a,this.type=130549933}};e.IfcApprovalActorRelationship=class extends pg{constructor(e,t,s,i){super(e),this.Actor=t,this.Approval=s,this.Role=i,this.type=2080292479}};e.IfcApprovalPropertyRelationship=class extends pg{constructor(e,t,s){super(e),this.ApprovedProperties=t,this.Approval=s,this.type=390851274}};e.IfcApprovalRelationship=class extends pg{constructor(e,t,s,i,r){super(e),this.RelatedApproval=t,this.RelatingApproval=s,this.Description=i,this.Name=r,this.type=3869604511}};class ns extends pg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=ns;e.IfcBoundaryEdgeCondition=class extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessByLengthX=s,this.LinearStiffnessByLengthY=i,this.LinearStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends ns{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.LinearStiffnessByAreaX=s,this.LinearStiffnessByAreaY=i,this.LinearStiffnessByAreaZ=r,this.type=3367102660}};class as extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=as;e.IfcBoundaryNodeConditionWarping=class extends as{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};e.IfcCalendarDate=class extends pg{constructor(e,t,s,i){super(e),this.DayComponent=t,this.MonthComponent=s,this.YearComponent=i,this.type=622194075}};e.IfcClassification=class extends pg{constructor(e,t,s,i,r){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.type=747523909}};e.IfcClassificationItem=class extends pg{constructor(e,t,s,i){super(e),this.Notation=t,this.ItemOf=s,this.Title=i,this.type=1767535486}};e.IfcClassificationItemRelationship=class extends pg{constructor(e,t,s){super(e),this.RelatingItem=t,this.RelatedItems=s,this.type=1098599126}};e.IfcClassificationNotation=class extends pg{constructor(e,t){super(e),this.NotationFacets=t,this.type=938368621}};e.IfcClassificationNotationFacet=class extends pg{constructor(e,t){super(e),this.NotationValue=t,this.type=3639012971}};class ls extends pg{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=ls;class hs extends pg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=hs;class cs extends hs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=cs;e.IfcConnectionPortGeometry=class extends hs{constructor(e,t,s,i){super(e),this.LocationAtRelatingElement=t,this.LocationAtRelatedElement=s,this.ProfileOfPort=i,this.type=4257277454}};e.IfcConnectionSurfaceGeometry=class extends hs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};class As extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=As;e.IfcConstraintAggregationRelationship=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.LogicalAggregator=o,this.type=1658513725}};e.IfcConstraintClassificationRelationship=class extends pg{constructor(e,t,s){super(e),this.ClassifiedConstraint=t,this.RelatedClassifications=s,this.type=613356794}};e.IfcConstraintRelationship=class extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.type=347226245}};e.IfcCoordinatedUniversalTimeOffset=class extends pg{constructor(e,t,s,i){super(e),this.HourOffset=t,this.MinuteOffset=s,this.Sense=i,this.type=1065062679}};e.IfcCostValue=class extends os{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.CostType=a,this.Condition=l,this.type=602808272}};e.IfcCurrencyRelationship=class extends pg{constructor(e,t,s,i,r,o){super(e),this.RelatingMonetaryUnit=t,this.RelatedMonetaryUnit=s,this.ExchangeRate=i,this.RateDateTime=r,this.RateSource=o,this.type=539742890}};e.IfcCurveStyleFont=class extends pg{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends pg{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};e.IfcDateAndTime=class extends pg{constructor(e,t,s){super(e),this.DateComponent=t,this.TimeComponent=s,this.type=1072939445}};e.IfcDerivedUnit=class extends pg{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends pg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};e.IfcDocumentElectronicFormat=class extends pg{constructor(e,t,s,i){super(e),this.FileExtension=t,this.MimeContentType=s,this.MimeSubtype=i,this.type=1376555844}};e.IfcDocumentInformation=class extends pg{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.DocumentId=t,this.Name=s,this.Description=i,this.DocumentReferences=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends pg{constructor(e,t,s,i){super(e),this.RelatingDocument=t,this.RelatedDocuments=s,this.RelationshipType=i,this.type=770865208}};class us extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=3796139169}}e.IfcDraughtingCalloutRelationship=us;e.IfcEnvironmentalImpactValue=class extends os{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.ImpactType=a,this.Category=l,this.UserDefinedCategory=h,this.type=1648886627}};class ps extends pg{constructor(e,t,s,i){super(e),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ps;e.IfcExternallyDefinedHatchStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedSymbol=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3207319532}};e.IfcExternallyDefinedTextFont=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends pg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends pg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.LibraryReference=o,this.type=2655187982}};e.IfcLibraryReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3452421091}};e.IfcLightDistributionData=class extends pg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends pg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcLocalTime=class extends pg{constructor(e,t,s,i,r,o){super(e),this.HourComponent=t,this.MinuteComponent=s,this.SecondComponent=i,this.Zone=r,this.DaylightSavingOffset=o,this.type=30780891}};e.IfcMaterial=class extends pg{constructor(e,t){super(e),this.Name=t,this.type=1838606355}};e.IfcMaterialClassificationRelationship=class extends pg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};e.IfcMaterialLayer=class extends pg{constructor(e,t,s,i){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.type=248100487}};e.IfcMaterialLayerSet=class extends pg{constructor(e,t,s){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.type=3303938423}};e.IfcMaterialLayerSetUsage=class extends pg{constructor(e,t,s,i,r){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.type=1303795690}};e.IfcMaterialList=class extends pg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ds extends pg{constructor(e,t){super(e),this.Material=t,this.type=3265635763}}e.IfcMaterialProperties=ds;e.IfcMeasureWithUnit=class extends pg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};class fs extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.type=4256014907}}e.IfcMechanicalMaterialProperties=fs;e.IfcMechanicalSteelMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.YieldStress=a,this.UltimateStress=l,this.UltimateStrain=h,this.HardeningModule=c,this.ProportionalStress=A,this.PlasticStrain=u,this.Relaxations=p,this.type=677618848}};e.IfcMetric=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.type=3368373690}};e.IfcMonetaryUnit=class extends pg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Es extends pg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Es;class ms extends pg{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=ms;e.IfcObjective=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.ResultValues=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOpticalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t),this.Material=t,this.VisibleTransmittance=s,this.SolarTransmittance=i,this.ThermalIrTransmittance=r,this.ThermalIrEmissivityBack=o,this.ThermalIrEmissivityFront=n,this.VisibleReflectanceBack=a,this.VisibleReflectanceFront=l,this.SolarReflectanceFront=h,this.SolarReflectanceBack=c,this.type=1227763645}};e.IfcOrganization=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Id=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOrganizationRelationship=class extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOwnerHistory=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Id=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends pg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ys extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ys;class gs extends ys{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=gs;e.IfcPostalAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class Is extends pg{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=Is;class vs extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=990879717}}e.IfcPreDefinedSymbol=vs;e.IfcPreDefinedTerminatorSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=3213052703}};class Ts extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=Ts;class _s extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=_s;e.IfcPresentationLayerWithStyle=class extends _s{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class Rs extends pg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=Rs;e.IfcPresentationStyleAssignment=class extends pg{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class Ps extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=Ps;e.IfcProductsOfCombustionProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.N20Content=i,this.COContent=r,this.CO2Content=o,this.type=2267347899}};class Ds extends pg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ds;class Ns extends pg{constructor(e,t,s){super(e),this.ProfileName=t,this.ProfileDefinition=s,this.type=2802850158}}e.IfcProfileProperties=Ns;class Cs extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Cs;e.IfcPropertyConstraintRelationship=class extends pg{constructor(e,t,s,i,r){super(e),this.RelatingConstraint=t,this.RelatedProperties=s,this.Name=i,this.Description=r,this.type=3896028662}};e.IfcPropertyDependencyRelationship=class extends pg{constructor(e,t,s,i,r,o){super(e),this.DependingProperty=t,this.DependantProperty=s,this.Name=i,this.Description=r,this.Expression=o,this.type=148025276}};e.IfcPropertyEnumeration=class extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.type=2044713172}};e.IfcQuantityCount=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.type=2093928680}};e.IfcQuantityLength=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.type=931644368}};e.IfcQuantityTime=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.type=3252649465}};e.IfcQuantityVolume=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.type=2405470396}};e.IfcQuantityWeight=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.type=825690147}};e.IfcReferencesValueDocument=class extends pg{constructor(e,t,s,i,r){super(e),this.ReferencedDocument=t,this.ReferencingValues=s,this.Name=i,this.Description=r,this.type=2692823254}};e.IfcReinforcementBarProperties=class extends pg{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};e.IfcRelaxation=class extends pg{constructor(e,t,s){super(e),this.RelaxationValue=t,this.InitialStress=s,this.type=1222501353}};class Os extends pg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=Os;class bs extends pg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=bs;class Ss extends pg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ss;e.IfcRepresentationMap=class extends pg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};e.IfcRibPlateProfileProperties=class extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.Thickness=i,this.RibHeight=r,this.RibWidth=o,this.RibSpacing=n,this.Direction=a,this.type=3679540991}};class ws extends pg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=ws;e.IfcSIUnit=class extends Es{constructor(e,t,s,i){super(e,new ug(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};e.IfcSectionProperties=class extends pg{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends pg{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcShapeAspect=class extends pg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class xs extends Os{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=xs;e.IfcShapeRepresentation=class extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Bs extends Cs{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=Bs;class Fs extends pg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Fs;class Ms extends pg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Ms;class Ls extends Ms{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ls;e.IfcStructuralLoadTemperature=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaT_Constant=s,this.DeltaT_Y=i,this.DeltaT_Z=r,this.type=3408363356}};class Us extends Os{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Us;class Hs extends Ss{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}}e.IfcStyledItem=Hs;e.IfcStyledRepresentation=class extends Us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceStyle=class extends Rs{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends pg{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends pg{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Gs extends pg{constructor(e,t){super(e),this.SurfaceColour=t,this.type=846575682}}e.IfcSurfaceStyleShading=Gs;e.IfcSurfaceStyleWithTextures=class extends pg{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class ks extends pg{constructor(e,t,s,i,r){super(e),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.type=626085974}}e.IfcSurfaceTexture=ks;e.IfcSymbolStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.StyleOfSymbol=s,this.type=1290481447}};e.IfcTable=class extends pg{constructor(e,t,s){super(e),this.Name=t,this.Rows=s,this.type=985171141}};e.IfcTableRow=class extends pg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};e.IfcTelecomAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.type=912023232}};e.IfcTextStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.type=1447204868}};e.IfcTextStyleFontModel=class extends Ts{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTextStyleForDefinedFont=class extends pg{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};e.IfcTextStyleWithBoxCharacteristics=class extends pg{constructor(e,t,s,i,r,o){super(e),this.BoxHeight=t,this.BoxWidth=s,this.BoxSlantAngle=i,this.BoxRotateAngle=r,this.CharacterSpacing=o,this.type=1484833681}};class Vs extends pg{constructor(e){super(e),this.type=280115917}}e.IfcTextureCoordinate=Vs;e.IfcTextureCoordinateGenerator=class extends Vs{constructor(e,t,s){super(e),this.Mode=t,this.Parameter=s,this.type=1742049831}};e.IfcTextureMap=class extends Vs{constructor(e,t){super(e),this.TextureMaps=t,this.type=2552916305}};e.IfcTextureVertex=class extends pg{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcThermalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.BoilingPoint=i,this.FreezingPoint=r,this.ThermalConductivity=o,this.type=3317419933}};class js extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=js;e.IfcTimeSeriesReferenceRelationship=class extends pg{constructor(e,t,s){super(e),this.ReferencedTimeSeries=t,this.TimeSeriesReferences=s,this.type=1718945513}};e.IfcTimeSeriesValue=class extends pg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Qs extends Ss{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Qs;e.IfcTopologyRepresentation=class extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends pg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Ws extends Qs{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Ws;e.IfcVertexBasedTextureMap=class extends pg{constructor(e,t,s){super(e),this.TextureVertices=t,this.TexturePoints=s,this.type=3304826586}};e.IfcVertexPoint=class extends Ws{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends pg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWaterProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l){super(e,t),this.Material=t,this.IsPotable=s,this.Hardness=i,this.AlkalinityConcentration=r,this.AcidityConcentration=o,this.ImpuritiesContent=n,this.PHLevel=a,this.DissolvedSolidsContent=l,this.type=1065908215}};class zs extends Hs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2442683028}}e.IfcAnnotationOccurrence=zs;e.IfcAnnotationSurfaceOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=962685235}};class Ks extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3612888222}}e.IfcAnnotationSymbolOccurrence=Ks;e.IfcAnnotationTextOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2297822566}};class Ys extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Ys;class Xs extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Xs;e.IfcArbitraryProfileDefWithVoids=class extends Ys{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends ks{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.RasterFormat=o,this.RasterCode=n,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Xs{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassificationReference=class extends ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.ReferencedSource=r,this.type=647927063}};e.IfcColourRgb=class extends ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Cs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};e.IfcCompositeProfileDef=class extends Ds{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Zs extends Qs{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Zs;e.IfcConnectionCurveGeometry=class extends hs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends cs{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Es{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};e.IfcConversionBasedUnit=class extends Es{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}};e.IfcCurveStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.type=3800577675}};e.IfcDerivedProfileDef=class extends Ds{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}};e.IfcDimensionCalloutRelationship=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=2273265877}};e.IfcDimensionPair=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=1694125774}};e.IfcDocumentReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3732053477}};e.IfcDraughtingPreDefinedTextFont=class extends Ts{constructor(e,t){super(e,t),this.Name=t,this.type=4170525392}};class qs extends Qs{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=qs;e.IfcEdgeCurve=class extends qs{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcExtendedMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.ExtendedProperties=s,this.Description=i,this.Name=r,this.type=1860660968}};class Js extends Qs{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Js;class $s extends Qs{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=$s;e.IfcFaceOuterBound=class extends $s{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};e.IfcFaceSurface=class extends Js{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}};e.IfcFailureConnectionCondition=class extends Fs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.FillStyles=s,this.type=738692330}};e.IfcFuelProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.CombustionTemperature=s,this.CarbonContent=i,this.LowerHeatingValue=r,this.HigherHeatingValue=o,this.type=3857492461}};e.IfcGeneralMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.MolecularWeight=s,this.Porosity=i,this.MassDensity=r,this.type=803998398}};class ei extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.type=1446786286}}e.IfcGeneralProfileProperties=ei;class ti extends bs{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=ti;class si extends Ss{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=si;e.IfcGeometricRepresentationSubContext=class extends ti{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new ug(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class ii extends si{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=ii;e.IfcGridPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class ri extends si{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=ri;e.IfcHygroscopicMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.UpperVaporResistanceFactor=s,this.LowerVaporResistanceFactor=i,this.IsothermalMoistureCapacity=r,this.VaporPermeability=o,this.MoistureDiffusivity=n,this.type=2445078500}};e.IfcImageTexture=class extends ks{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.UrlReference=o,this.type=3905492369}};e.IfcIrregularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};class oi extends si{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=oi;e.IfcLightSourceAmbient=class extends oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends oi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class ni extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=ni;e.IfcLightSourceSpot=class extends ni{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class ai extends Qs{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=ai;e.IfcMappedItem=class extends Ss{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterialDefinitionRepresentation=class extends Ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMechanicalConcreteMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.CompressiveStrength=a,this.MaxAggregateSize=l,this.AdmixturesDescription=h,this.Workability=c,this.ProtectivePoreRatio=A,this.WaterImpermeability=u,this.type=1430189142}};class li extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=li;class hi extends si{constructor(e,t){super(e),this.RepeatFactor=t,this.type=2833995503}}e.IfcOneDirectionRepeatFactor=hi;e.IfcOpenShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrientedEdge=class extends qs{constructor(e,t,s){super(e,new ug(0),new ug(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class ci extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=ci;e.IfcPath=class extends Qs{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ys{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends ks{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.Width=o,this.Height=n,this.ColourComponents=a,this.Pixel=l,this.type=597895409}};class Ai extends si{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Ai;class ui extends si{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=ui;class pi extends si{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=pi;e.IfcPointOnCurve=class extends pi{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends pi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends ai{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends ri{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class di extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=di;class fi extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=fi;e.IfcPreDefinedDimensionSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=433424934}};e.IfcPreDefinedPointMarkerSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=179317114}};e.IfcProductDefinitionShape=class extends Ps{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcPropertyBoundedValue=class extends Bs{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.type=871118103}};class Ei extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=Ei;e.IfcPropertyEnumeratedValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};class mi extends Ei{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=mi;e.IfcPropertySingleValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends Bs{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.type=110355661}};class yi extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=yi;e.IfcRegularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementDefinitionProperties=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class gi extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=gi;e.IfcRoundedRectangleProfileDef=class extends yi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionedSpine=class extends si{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcServiceLifeFactor=class extends mi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PredefinedType=o,this.UpperValue=n,this.MostUsedValue=a,this.LowerValue=l,this.type=2411513650}};e.IfcShellBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};e.IfcSlippageConnectionCondition=class extends Fs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class Ii extends si{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=Ii;e.IfcSoundProperties=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.IsAttenuating=o,this.SoundScale=n,this.SoundValues=a,this.type=2485662743}};e.IfcSoundValue=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.SoundLevelTimeSeries=o,this.Frequency=n,this.SoundLevelSingleValue=a,this.type=1202362311}};e.IfcSpaceThermalLoadProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableValueRatio=o,this.ThermalLoadSource=n,this.PropertySource=a,this.SourceDescription=l,this.MaximumValue=h,this.MinimumValue=c,this.ThermalLoadTimeSeriesValues=A,this.UserDefinedThermalLoadSource=u,this.UserDefinedPropertySource=p,this.ThermalLoadType=d,this.type=390701378}};e.IfcStructuralLoadLinearForce=class extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class vi extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=vi;e.IfcStructuralLoadSingleDisplacementDistortion=class extends vi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ti extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ti;e.IfcStructuralLoadSingleForceWarping=class extends Ti{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};class _i extends ei{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o,n,a),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.type=3843319758}}e.IfcStructuralProfileProperties=_i;e.IfcStructuralSteelProfileProperties=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P,D,N){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.ShearAreaZ=R,this.ShearAreaY=P,this.PlasticShapeFactorY=D,this.PlasticShapeFactorZ=N,this.type=3653947884}};e.IfcSubedge=class extends qs{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Ri extends si{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Ri;e.IfcSurfaceStyleRendering=class extends Gs{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class Pi extends Ii{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=Pi;e.IfcSweptDiskSolid=class extends Ii{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}};class Di extends Ri{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Di;e.IfcTShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.CentreOfGravityInY=p,this.type=3071757647}};class Ni extends Ks{constructor(e,t,s,i,r){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.type=3028897424}}e.IfcTerminatorSymbol=Ni;class Ci extends si{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Ci;e.IfcTextLiteralWithExtent=class extends Ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTrapeziumProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};e.IfcTwoDirectionRepeatFactor=class extends hi{constructor(e,t,s){super(e,t),this.RepeatFactor=t,this.SecondRepeatFactor=s,this.type=1345879162}};class Oi extends li{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Oi;class bi extends Oi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=bi;e.IfcUShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.CentreOfGravityInX=A,this.type=427810014}};e.IfcVector=class extends si{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends ai{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.type=336235671}};e.IfcWindowPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};e.IfcWindowStyle=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};class Si extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3288037868}}e.IfcAnnotationCurveOccurrence=Si;e.IfcAnnotationFillArea=class extends si{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAnnotationFillAreaOccurrence=class extends zs{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.FillStyleTarget=r,this.GlobalOrLocal=o,this.type=2265737646}};e.IfcAnnotationSurface=class extends si{constructor(e,t,s){super(e),this.Item=t,this.TextureCoordinates=s,this.type=1302238472}};e.IfcAxis1Placement=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Ai{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class wi extends si{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=wi;class xi extends Ri{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=xi;e.IfcBoundingBox=class extends si{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends ri{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.CentreOfGravityInX=h,this.type=2898889636}};e.IfcCartesianPoint=class extends pi{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Bi extends si{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Bi;class Fi extends Bi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Fi;e.IfcCartesianTransformationOperator2DnonUniform=class extends Fi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Mi extends Bi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Mi;e.IfcCartesianTransformationOperator3DnonUniform=class extends Mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Li extends ci{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Li;e.IfcClosedShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcCompositeCurveSegment=class extends si{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}};e.IfcCraneRailAShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.BaseWidth2=o,this.Radius=n,this.HeadWidth=a,this.HeadDepth2=l,this.HeadDepth3=h,this.WebThickness=c,this.BaseWidth4=A,this.BaseDepth1=u,this.BaseDepth2=p,this.BaseDepth3=d,this.CentreOfGravityInY=f,this.type=4133800736}};e.IfcCraneRailFShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.HeadWidth=o,this.Radius=n,this.HeadDepth2=a,this.HeadDepth3=l,this.WebThickness=h,this.BaseDepth1=c,this.BaseDepth2=A,this.CentreOfGravityInY=u,this.type=194851669}};class Ui extends si{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Ui;e.IfcCsgSolid=class extends Ii{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Hi extends si{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Hi;e.IfcCurveBoundedPlane=class extends xi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcDefinedSymbol=class extends si{constructor(e,t,s){super(e),this.Definition=t,this.Target=s,this.type=693772133}};e.IfcDimensionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=606661476}};e.IfcDimensionCurveTerminator=class extends Ni{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.Role=o,this.type=4054601972}};e.IfcDirection=class extends si{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.type=2963535650}};e.IfcDoorPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorStyle=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};class Gi extends si{constructor(e,t){super(e),this.Contents=t,this.type=3073041342}}e.IfcDraughtingCallout=Gi;e.IfcDraughtingPreDefinedColour=class extends di{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends fi{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};e.IfcEdgeLoop=class extends ai{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class ki extends bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=ki;class Vi extends Ri{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Vi;e.IfcEllipseProfileDef=class extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};class ji extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.type=80994333}}e.IfcEnergyProperties=ji;e.IfcExtrudedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}};e.IfcFaceBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends si{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTileSymbolWithStyle=class extends si{constructor(e,t){super(e),this.Symbol=t,this.type=4203026998}};e.IfcFillAreaStyleTiles=class extends si{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFluidFlowProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PropertySource=o,this.FlowConditionTimeSeries=n,this.VelocityTimeSeries=a,this.FlowrateTimeSeries=l,this.Fluid=h,this.PressureTimeSeries=c,this.UserDefinedPropertySource=A,this.TemperatureSingleValue=u,this.WetBulbTemperatureSingleValue=p,this.WetBulbTemperatureTimeSeries=d,this.TemperatureTimeSeries=f,this.FlowrateSingleValue=E,this.FlowConditionSingleValue=m,this.VelocitySingleValue=y,this.PressureSingleValue=g,this.type=3455213021}};class Qi extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Qi;e.IfcFurnitureType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.type=1268542332}};e.IfcGeometricCurveSet=class extends ii{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};class Wi extends ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.type=1484403080}}e.IfcIShapeProfileDef=Wi;e.IfcLShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.CentreOfGravityInX=c,this.CentreOfGravityInY=A,this.type=572779678}};e.IfcLine=class extends Hi{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class zi extends Ii{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=zi;class Ki extends li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Ki;e.IfcOffsetCurve2D=class extends Hi{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Hi{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPermeableCoveringProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPlanarBox=class extends ui{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Vi{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class Yi extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2945172077}}e.IfcProcess=Yi;class Xi extends Ki{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xi;e.IfcProject=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=4194566429}};e.IfcPropertySet=class extends mi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcProxy=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends xi{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};class Zi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=Zi;class qi extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}}e.IfcRelAssignsToActor=qi;class Ji extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}}e.IfcRelAssignsToControl=Ji;e.IfcRelAssignsToGroup=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}};e.IfcRelAssignsToProcess=class extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToProjectOrder=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=3372526763}};e.IfcRelAssignsToResource=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $i extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$i;e.IfcRelAssociatesAppliedValue=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingAppliedValue=n,this.type=1327628568}};e.IfcRelAssociatesApproval=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileProperties=class extends $i{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileProperties=n,this.ProfileSectionLocation=a,this.ProfileOrientation=l,this.type=2851387026}};class er extends gi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=er;class tr extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tr;e.IfcRelConnectsPathElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};e.IfcRelConnectsStructuralElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralMember=n,this.type=3912681535}};class sr extends er{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sr;e.IfcRelConnectsWithEccentricity=class extends sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedSpace=o,this.RelatedCoverings=n,this.type=2802773753}};class ir extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=2551354335}}e.IfcRelDecomposes=ir;class rr extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=693640335}}e.IfcRelDefines=rr;class or extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}}e.IfcRelDefinesByProperties=or;e.IfcRelDefinesByType=class extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInteractionRequirements=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DailyInteraction=o,this.ImportanceRating=n,this.LocationOfInteraction=a,this.RelatedSpaceProgram=l,this.RelatingSpaceProgram=h,this.type=4189434867}};e.IfcRelNests=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelOccupiesSpaces=class extends qi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=2051452291}};e.IfcRelOverridesProperties=class extends or{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.OverridingProperties=a,this.type=202636808}};e.IfcRelProjectsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSchedulesCostItems=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=1058617721}};e.IfcRelSequence=class extends er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.type=4122056220}};e.IfcRelServicesBuildings=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};e.IfcRelSpaceBoundary=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}};e.IfcRelVoidsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};class nr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2914609552}}e.IfcResource=nr;e.IfcRevolvedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}};e.IfcRightCircularCone=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class ar extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=ar;class lr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=lr;e.IfcSphere=class extends Ui{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};class hr extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=hr;class cr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=cr;class Ar extends cr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=Ar;class ur extends hr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=ur;class pr extends Ar{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=pr;e.IfcStructuralSurfaceMemberVarying=class extends pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.SubsequentThickness=c,this.VaryingThicknessLocation=A,this.type=2218152070}};e.IfcStructuredDimensionCallout=class extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=4070609034}};e.IfcSurfaceCurveSweptAreaSolid=class extends Pi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Di{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Di{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1580310250}};class dr extends Yi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.type=3473067441}}e.IfcTask=dr;e.IfcTransportElementType=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class fr extends Ki{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=fr;e.IfcAnnotation=class extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};e.IfcAsymmetricIShapeProfileDef=class extends Wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.CentreOfGravityInY=u,this.type=3207858831}};e.IfcBlock=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends wi{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Er extends Hi{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Er;e.IfcBuilding=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class mr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=mr;e.IfcBuildingStorey=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcCircleHollowProfileDef=class extends Li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcColumnType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};class yr extends Er{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=yr;class gr extends Hi{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=gr;class Ir extends nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=2559216714}}e.IfcConstructionResource=Ir;class vr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3293443760}}e.IfcControl=vr;e.IfcCostItem=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3895139033}};e.IfcCostSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SubmittedBy=n,this.PreparedBy=a,this.SubmittedOn=l,this.Status=h,this.TargetUsers=c,this.UpdateDate=A,this.ID=u,this.PredefinedType=p,this.type=1419761937}};e.IfcCoveringType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3295246426}};e.IfcCurtainWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};class Tr extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=681481545}}e.IfcDimensionCurveDirectedCallout=Tr;class _r extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=_r;class Rr extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Rr;e.IfcElectricalBaseProperties=class extends ji{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.ElectricCurrentType=a,this.InputVoltage=l,this.InputFrequency=h,this.FullLoadCurrent=c,this.MinimumCircuitCurrent=A,this.MaximumPowerInput=u,this.RatedPowerInput=p,this.InputPhase=d,this.type=360485395}};class Pr extends Xi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Pr;e.IfcElementAssembly=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};class Dr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Dr;class Nr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Nr;e.IfcEllipse=class extends gr{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Cr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Cr;e.IfcEquipmentElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1962604670}};e.IfcEquipmentStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3272907226}};e.IfcEvaporativeCoolerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcFacetedBrep=class extends zi{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}};e.IfcFacetedBrepWithVoids=class extends zi{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Or extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=647756555}}e.IfcFastener=Or;class br extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2489546625}}e.IfcFastenerType=br;class Sr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Sr;class wr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=wr;class xr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=xr;class Br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Br;class Fr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Fr;e.IfcFlowMeterType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Mr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Mr;class Lr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Lr;class Ur extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=Ur;class Hr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=Hr;class Gr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=Gr;e.IfcFurnishingElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}};e.IfcFurnitureStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=814719939}};e.IfcGasTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=200128114}};e.IfcGrid=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.type=3009204131}};class kr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=kr;e.IfcHeatExchangerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcInventory=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.InventoryType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SkillSet=c,this.type=3827777499}};e.IfcLampType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcLinearDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2506943328}};e.IfcMechanicalFastener=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.type=377706215}};e.IfcMechanicalFastenerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2108223431}};e.IfcMemberType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcMove=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.MoveFrom=A,this.MoveTo=u,this.PunchList=p,this.type=1916936684}};e.IfcOccupant=class extends fr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends xr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3588315303}};e.IfcOrderAction=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.ActionID=A,this.type=3425660407}};e.IfcOutletType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LifeCyclePhase=n,this.type=2382730787}};e.IfcPermit=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PermitID=n,this.type=3327091369}};e.IfcPipeFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolyline=class extends Er{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class Vr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=Vr;e.IfcProcedure=class extends Yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ProcedureID=n,this.ProcedureType=a,this.UserDefinedProcedureType=l,this.type=2744685151}};e.IfcProjectOrder=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ID=n,this.PredefinedType=a,this.Status=l,this.type=2904328755}};e.IfcProjectOrderRecord=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Records=n,this.PredefinedType=a,this.type=3642467123}};e.IfcProjectionElement=class extends wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRadiusDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=3248260540}};e.IfcRailingType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRelAggregates=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRelAssignsTasks=class extends Ji{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.TimeForTask=l,this.type=2863920197}};e.IfcSanitaryTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcScheduleTimeControl=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ActualStart=n,this.EarlyStart=a,this.LateStart=l,this.ScheduleStart=h,this.ActualFinish=c,this.EarlyFinish=A,this.LateFinish=u,this.ScheduleFinish=p,this.ScheduleDuration=d,this.ActualDuration=f,this.RemainingTime=E,this.FreeFloat=m,this.TotalFloat=y,this.IsCritical=g,this.StatusTime=I,this.StartFloat=v,this.FinishFloat=T,this.Completion=_,this.type=3517283431}};e.IfcServiceLife=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ServiceLifeType=n,this.ServiceLifeDuration=a,this.type=4105383287}};e.IfcSite=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSpace=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.InteriorOrExteriorSpace=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceProgram=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SpaceProgramIdentifier=n,this.MaxRequiredArea=a,this.MinRequiredArea=l,this.RequestedLocation=h,this.StandardRequiredArea=c,this.type=652456506}};e.IfcSpaceType=class extends lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3812236995}};e.IfcStackTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};class jr extends hr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=682877961}}e.IfcStructuralAction=jr;class Qr extends cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=Qr;e.IfcStructuralCurveConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=4243806635}};class Wr extends Ar{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=214636428}}e.IfcStructuralCurveMember=Wr;e.IfcStructuralCurveMemberVarying=class extends Wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=2445595289}};class zr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1807405624}}e.IfcStructuralLinearAction=zr;e.IfcStructuralLinearActionVarying=class extends zr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=1721250024}};e.IfcStructuralLoadGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}};class Kr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1621171031}}e.IfcStructuralPlanarAction=Kr;e.IfcStructuralPlanarActionVarying=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=3987759626}};e.IfcStructuralPointAction=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=2082059205}};e.IfcStructuralPointConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=734778138}};e.IfcStructuralPointReaction=class extends ur{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};e.IfcStructuralSurfaceConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SubContractor=c,this.JobDescription=A,this.type=148013059}};e.IfcSwitchingDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class Yr extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=Yr;e.IfcTankType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTimeSeriesSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ApplicableDates=n,this.TimeSeriesScheduleType=a,this.TimeSeries=l,this.type=1637806684}};e.IfcTransformerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OperationType=h,this.CapacityByWeight=c,this.CapacityByNumber=A,this.type=1620046519}};e.IfcTrimmedCurve=class extends Er{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVirtualElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};class Xr extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=1028945134}}e.IfcWorkControl=Xr;e.IfcWorkPlan=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=4218914973}};e.IfcWorkSchedule=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=3342526732}};e.IfcZone=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1033361043}};e.Ifc2DCompositeCurve=class extends yr{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1213861670}};e.IfcActionRequest=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.RequestID=n,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAngularDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2470393545}};e.IfcAsset=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.AssetID=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};class Zr extends Er{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Zr;e.IfcBeamType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};class qr extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1916977116}}e.IfcBezierCurve=qr;e.IfcBoilerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Jr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=Jr;class $r extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=52481810}}e.IfcBuildingElementComponent=$r;e.IfcBuildingElementPart=class extends $r{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2979338954}};e.IfcBuildingElementProxy=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.CompositionType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcCableCarrierFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcCircle=class extends gr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCoilType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=843113511}};e.IfcCompressorType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcCondition=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2188551683}};e.IfcConditionCriterion=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Criterion=n,this.CriterionDateTime=a,this.type=1163958913}};e.IfcConstructionEquipmentResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.Suppliers=c,this.UsageRatio=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=488727124}};e.IfcCooledBeamType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3495092785}};e.IfcDamperType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiameterDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=4147604152}};e.IfcDiscreteAccessory=class extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1335981549}};class eo extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2635815018}}e.IfcDiscreteAccessoryType=eo;e.IfcDistributionChamberElementType=class extends Rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class to extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=to;class so extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=so;class io extends so{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=io;e.IfcDistributionPort=class extends Vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.type=3041715199}};e.IfcDoor=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=395920057}};e.IfcDuctFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};class ro extends xr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.type=855621170}}e.IfcEdgeFeature=ro;e.IfcElectricApplianceType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricFlowStorageDeviceType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricHeaterType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1365060375}};e.IfcElectricMotorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};e.IfcElectricalCircuit=class extends Yr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1634875225}};e.IfcElectricalElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=857184966}};e.IfcEnergyConversionDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}};e.IfcFanType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class oo extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=oo;e.IfcFlowFitting=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}};e.IfcFlowInstrumentType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMovingDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}};e.IfcFlowSegment=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}};e.IfcFlowStorageDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}};e.IfcFlowTerminal=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}};e.IfcFlowTreatmentDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}};e.IfcFooting=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcMember=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1073191201}};e.IfcPile=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPlate=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3171933400}};e.IfcRailing=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=3024970846}};e.IfcRampFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3283111854}};e.IfcRationalBezierCurve=class extends qr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.WeightsData=n,this.type=3055160366}};class no extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=no;e.IfcReinforcingMesh=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.type=2320036040}};e.IfcRoof=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=2016517767}};e.IfcRoundedEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Radius=c,this.type=1376911519}};e.IfcSensorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcSlab=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcStair=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=331165859}};e.IfcStairFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRiser=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends Yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.type=2515109513}};e.IfcTendon=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=2347447852}};e.IfcVibrationIsolatorType=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};class ao extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2391406946}}e.IfcWall=ao;e.IfcWallStandardCase=class extends ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3512223829}};e.IfcWindow=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=3304561284}};e.IfcActuatorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAlarmType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcBeam=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=753842376}};e.IfcChamferEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Width=c,this.Height=A,this.type=2454782716}};e.IfcControllerType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcDistributionChamberElement=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1052013943}};e.IfcDistributionControlElement=class extends so{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ControlElementId=h,this.type=1062813311}};e.IfcElectricDistributionPoint=class extends oo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.DistributionPointFunction=h,this.UserDefinedFunction=c,this.type=3700593921}};e.IfcReinforcingBar=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.BarRole=p,this.BarSurface=d,this.type=979691226}}}(rg||(rg={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.SNOW_S={type:3,value:"SNOW_S"},i.WIND_W={type:3,value:"WIND_W"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.FIRE={type:3,value:"FIRE"},i.IMPULSE={type:3,value:"IMPULSE"},i.IMPACT={type:3,value:"IMPACT"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.ERECTION={type:3,value:"ERECTION"},i.PROPPING={type:3,value:"PROPPING"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.CREEP={type:3,value:"CREEP"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.ICE={type:3,value:"ICE"},i.CURRENT={type:3,value:"CURRENT"},i.WAVE={type:3,value:"WAVE"},i.RAIN={type:3,value:"RAIN"},i.BRAKES={type:3,value:"BRAKES"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.HOME={type:3,value:"HOME"},n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.AMPLIFIER={type:3,value:"AMPLIFIER"},f.CAMERA={type:3,value:"CAMERA"},f.DISPLAY={type:3,value:"DISPLAY"},f.MICROPHONE={type:3,value:"MICROPHONE"},f.PLAYER={type:3,value:"PLAYER"},f.PROJECTOR={type:3,value:"PROJECTOR"},f.RECEIVER={type:3,value:"RECEIVER"},f.SPEAKER={type:3,value:"SPEAKER"},f.SWITCHER={type:3,value:"SWITCHER"},f.TELEPHONE={type:3,value:"TELEPHONE"},f.TUNER={type:3,value:"TUNER"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=f;class E{}E.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},E.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},E.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},E.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},E.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},E.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=E;class m{}m.PLANE_SURF={type:3,value:"PLANE_SURF"},m.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},m.CONICAL_SURF={type:3,value:"CONICAL_SURF"},m.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},m.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},m.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},m.RULED_SURF={type:3,value:"RULED_SURF"},m.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},m.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},m.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},m.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=m;class y{}y.BEAM={type:3,value:"BEAM"},y.JOIST={type:3,value:"JOIST"},y.HOLLOWCORE={type:3,value:"HOLLOWCORE"},y.LINTEL={type:3,value:"LINTEL"},y.SPANDREL={type:3,value:"SPANDREL"},y.T_BEAM={type:3,value:"T_BEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=y;class g{}g.GREATERTHAN={type:3,value:"GREATERTHAN"},g.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},g.LESSTHAN={type:3,value:"LESSTHAN"},g.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},g.EQUALTO={type:3,value:"EQUALTO"},g.NOTEQUALTO={type:3,value:"NOTEQUALTO"},g.INCLUDES={type:3,value:"INCLUDES"},g.NOTINCLUDES={type:3,value:"NOTINCLUDES"},g.INCLUDEDIN={type:3,value:"INCLUDEDIN"},g.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},e.IfcBenchmarkEnum=g;class I{}I.WATER={type:3,value:"WATER"},I.STEAM={type:3,value:"STEAM"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=I;class v{}v.UNION={type:3,value:"UNION"},v.INTERSECTION={type:3,value:"INTERSECTION"},v.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=v;class T{}T.INSULATION={type:3,value:"INSULATION"},T.PRECASTPANEL={type:3,value:"PRECASTPANEL"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=T;class _{}_.COMPLEX={type:3,value:"COMPLEX"},_.ELEMENT={type:3,value:"ELEMENT"},_.PARTIAL={type:3,value:"PARTIAL"},_.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},_.PROVISIONFORSPACE={type:3,value:"PROVISIONFORSPACE"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=_;class R{}R.FENESTRATION={type:3,value:"FENESTRATION"},R.FOUNDATION={type:3,value:"FOUNDATION"},R.LOADBEARING={type:3,value:"LOADBEARING"},R.OUTERSHELL={type:3,value:"OUTERSHELL"},R.SHADING={type:3,value:"SHADING"},R.TRANSPORT={type:3,value:"TRANSPORT"},R.USERDEFINED={type:3,value:"USERDEFINED"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=R;class P{}P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=P;class D{}D.BEND={type:3,value:"BEND"},D.CROSS={type:3,value:"CROSS"},D.REDUCER={type:3,value:"REDUCER"},D.TEE={type:3,value:"TEE"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=D;class N{}N.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},N.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},N.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},N.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=N;class C{}C.CONNECTOR={type:3,value:"CONNECTOR"},C.ENTRY={type:3,value:"ENTRY"},C.EXIT={type:3,value:"EXIT"},C.JUNCTION={type:3,value:"JUNCTION"},C.TRANSITION={type:3,value:"TRANSITION"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=C;class O{}O.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},O.CABLESEGMENT={type:3,value:"CABLESEGMENT"},O.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},O.CORESEGMENT={type:3,value:"CORESEGMENT"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=O;class b{}b.NOCHANGE={type:3,value:"NOCHANGE"},b.MODIFIED={type:3,value:"MODIFIED"},b.ADDED={type:3,value:"ADDED"},b.DELETED={type:3,value:"DELETED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=b;class S{}S.AIRCOOLED={type:3,value:"AIRCOOLED"},S.WATERCOOLED={type:3,value:"WATERCOOLED"},S.HEATRECOVERY={type:3,value:"HEATRECOVERY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=S;class w{}w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=w;class x{}x.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},x.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},x.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},x.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},x.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},x.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},x.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=x;class B{}B.COLUMN={type:3,value:"COLUMN"},B.PILASTER={type:3,value:"PILASTER"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=B;class F{}F.ANTENNA={type:3,value:"ANTENNA"},F.COMPUTER={type:3,value:"COMPUTER"},F.FAX={type:3,value:"FAX"},F.GATEWAY={type:3,value:"GATEWAY"},F.MODEM={type:3,value:"MODEM"},F.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},F.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},F.NETWORKHUB={type:3,value:"NETWORKHUB"},F.PRINTER={type:3,value:"PRINTER"},F.REPEATER={type:3,value:"REPEATER"},F.ROUTER={type:3,value:"ROUTER"},F.SCANNER={type:3,value:"SCANNER"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=F;class M{}M.P_COMPLEX={type:3,value:"P_COMPLEX"},M.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=M;class L{}L.DYNAMIC={type:3,value:"DYNAMIC"},L.RECIPROCATING={type:3,value:"RECIPROCATING"},L.ROTARY={type:3,value:"ROTARY"},L.SCROLL={type:3,value:"SCROLL"},L.TROCHOIDAL={type:3,value:"TROCHOIDAL"},L.SINGLESTAGE={type:3,value:"SINGLESTAGE"},L.BOOSTER={type:3,value:"BOOSTER"},L.OPENTYPE={type:3,value:"OPENTYPE"},L.HERMETIC={type:3,value:"HERMETIC"},L.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},L.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},L.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},L.ROTARYVANE={type:3,value:"ROTARYVANE"},L.SINGLESCREW={type:3,value:"SINGLESCREW"},L.TWINSCREW={type:3,value:"TWINSCREW"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=L;class U{}U.AIRCOOLED={type:3,value:"AIRCOOLED"},U.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},U.WATERCOOLED={type:3,value:"WATERCOOLED"},U.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},U.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},U.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},U.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=U;class H{}H.ATPATH={type:3,value:"ATPATH"},H.ATSTART={type:3,value:"ATSTART"},H.ATEND={type:3,value:"ATEND"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=H;class G{}G.HARD={type:3,value:"HARD"},G.SOFT={type:3,value:"SOFT"},G.ADVISORY={type:3,value:"ADVISORY"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=G;class k{}k.DEMOLISHING={type:3,value:"DEMOLISHING"},k.EARTHMOVING={type:3,value:"EARTHMOVING"},k.ERECTING={type:3,value:"ERECTING"},k.HEATING={type:3,value:"HEATING"},k.LIGHTING={type:3,value:"LIGHTING"},k.PAVING={type:3,value:"PAVING"},k.PUMPING={type:3,value:"PUMPING"},k.TRANSPORTING={type:3,value:"TRANSPORTING"},k.USERDEFINED={type:3,value:"USERDEFINED"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=k;class V{}V.AGGREGATES={type:3,value:"AGGREGATES"},V.CONCRETE={type:3,value:"CONCRETE"},V.DRYWALL={type:3,value:"DRYWALL"},V.FUEL={type:3,value:"FUEL"},V.GYPSUM={type:3,value:"GYPSUM"},V.MASONRY={type:3,value:"MASONRY"},V.METAL={type:3,value:"METAL"},V.PLASTIC={type:3,value:"PLASTIC"},V.WOOD={type:3,value:"WOOD"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},V.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=V;class j{}j.ASSEMBLY={type:3,value:"ASSEMBLY"},j.FORMWORK={type:3,value:"FORMWORK"},j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=j;class Q{}Q.FLOATING={type:3,value:"FLOATING"},Q.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},Q.PROPORTIONAL={type:3,value:"PROPORTIONAL"},Q.MULTIPOSITION={type:3,value:"MULTIPOSITION"},Q.TWOPOSITION={type:3,value:"TWOPOSITION"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=Q;class W{}W.ACTIVE={type:3,value:"ACTIVE"},W.PASSIVE={type:3,value:"PASSIVE"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=W;class z{}z.NATURALDRAFT={type:3,value:"NATURALDRAFT"},z.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},z.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=z;class K{}K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=K;class Y{}Y.BUDGET={type:3,value:"BUDGET"},Y.COSTPLAN={type:3,value:"COSTPLAN"},Y.ESTIMATE={type:3,value:"ESTIMATE"},Y.TENDER={type:3,value:"TENDER"},Y.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},Y.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},Y.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=Y;class X{}X.CEILING={type:3,value:"CEILING"},X.FLOORING={type:3,value:"FLOORING"},X.CLADDING={type:3,value:"CLADDING"},X.ROOFING={type:3,value:"ROOFING"},X.MOLDING={type:3,value:"MOLDING"},X.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},X.INSULATION={type:3,value:"INSULATION"},X.MEMBRANE={type:3,value:"MEMBRANE"},X.SLEEVING={type:3,value:"SLEEVING"},X.WRAPPING={type:3,value:"WRAPPING"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=X;class Z{}Z.OFFICE={type:3,value:"OFFICE"},Z.SITE={type:3,value:"SITE"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=Z;class q{}q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=q;class J{}J.LINEAR={type:3,value:"LINEAR"},J.LOG_LINEAR={type:3,value:"LOG_LINEAR"},J.LOG_LOG={type:3,value:"LOG_LOG"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=J;class ${}$.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},$.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},$.BLASTDAMPER={type:3,value:"BLASTDAMPER"},$.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},$.FIREDAMPER={type:3,value:"FIREDAMPER"},$.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},$.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},$.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},$.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},$.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},$.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=$;class ee{}ee.MEASURED={type:3,value:"MEASURED"},ee.PREDICTED={type:3,value:"PREDICTED"},ee.SIMULATED={type:3,value:"SIMULATED"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=ee;class te{}te.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},te.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},te.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},te.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},te.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},te.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},te.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},te.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},te.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},te.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},te.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},te.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},te.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},te.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},te.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},te.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},te.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},te.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},te.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},te.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},te.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},te.TORQUEUNIT={type:3,value:"TORQUEUNIT"},te.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},te.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},te.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},te.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},te.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},te.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},te.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},te.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},te.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},te.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},te.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},te.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},te.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},te.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},te.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},te.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},te.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},te.PHUNIT={type:3,value:"PHUNIT"},te.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},te.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},te.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},te.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},te.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},te.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},te.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},te.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},te.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},te.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},te.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},te.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},te.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=te;class se{}se.POSITIVE={type:3,value:"POSITIVE"},se.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=se;class ie{}ie.ANCHORPLATE={type:3,value:"ANCHORPLATE"},ie.BRACKET={type:3,value:"BRACKET"},ie.SHOE={type:3,value:"SHOE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=ie;class re{}re.FORMEDDUCT={type:3,value:"FORMEDDUCT"},re.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},re.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},re.MANHOLE={type:3,value:"MANHOLE"},re.METERCHAMBER={type:3,value:"METERCHAMBER"},re.SUMP={type:3,value:"SUMP"},re.TRENCH={type:3,value:"TRENCH"},re.VALVECHAMBER={type:3,value:"VALVECHAMBER"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=re;class oe{}oe.CABLE={type:3,value:"CABLE"},oe.CABLECARRIER={type:3,value:"CABLECARRIER"},oe.DUCT={type:3,value:"DUCT"},oe.PIPE={type:3,value:"PIPE"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=oe;class ne{}ne.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},ne.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},ne.CHEMICAL={type:3,value:"CHEMICAL"},ne.CHILLEDWATER={type:3,value:"CHILLEDWATER"},ne.COMMUNICATION={type:3,value:"COMMUNICATION"},ne.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},ne.CONDENSERWATER={type:3,value:"CONDENSERWATER"},ne.CONTROL={type:3,value:"CONTROL"},ne.CONVEYING={type:3,value:"CONVEYING"},ne.DATA={type:3,value:"DATA"},ne.DISPOSAL={type:3,value:"DISPOSAL"},ne.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},ne.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},ne.DRAINAGE={type:3,value:"DRAINAGE"},ne.EARTHING={type:3,value:"EARTHING"},ne.ELECTRICAL={type:3,value:"ELECTRICAL"},ne.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},ne.EXHAUST={type:3,value:"EXHAUST"},ne.FIREPROTECTION={type:3,value:"FIREPROTECTION"},ne.FUEL={type:3,value:"FUEL"},ne.GAS={type:3,value:"GAS"},ne.HAZARDOUS={type:3,value:"HAZARDOUS"},ne.HEATING={type:3,value:"HEATING"},ne.LIGHTING={type:3,value:"LIGHTING"},ne.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},ne.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},ne.OIL={type:3,value:"OIL"},ne.OPERATIONAL={type:3,value:"OPERATIONAL"},ne.POWERGENERATION={type:3,value:"POWERGENERATION"},ne.RAINWATER={type:3,value:"RAINWATER"},ne.REFRIGERATION={type:3,value:"REFRIGERATION"},ne.SECURITY={type:3,value:"SECURITY"},ne.SEWAGE={type:3,value:"SEWAGE"},ne.SIGNAL={type:3,value:"SIGNAL"},ne.STORMWATER={type:3,value:"STORMWATER"},ne.TELEPHONE={type:3,value:"TELEPHONE"},ne.TV={type:3,value:"TV"},ne.VACUUM={type:3,value:"VACUUM"},ne.VENT={type:3,value:"VENT"},ne.VENTILATION={type:3,value:"VENTILATION"},ne.WASTEWATER={type:3,value:"WASTEWATER"},ne.WATERSUPPLY={type:3,value:"WATERSUPPLY"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=ne;class ae{}ae.PUBLIC={type:3,value:"PUBLIC"},ae.RESTRICTED={type:3,value:"RESTRICTED"},ae.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ae.PERSONAL={type:3,value:"PERSONAL"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ae;class le{}le.DRAFT={type:3,value:"DRAFT"},le.FINALDRAFT={type:3,value:"FINALDRAFT"},le.FINAL={type:3,value:"FINAL"},le.REVISION={type:3,value:"REVISION"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=le;class he{}he.SWINGING={type:3,value:"SWINGING"},he.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},he.SLIDING={type:3,value:"SLIDING"},he.FOLDING={type:3,value:"FOLDING"},he.REVOLVING={type:3,value:"REVOLVING"},he.ROLLINGUP={type:3,value:"ROLLINGUP"},he.FIXEDPANEL={type:3,value:"FIXEDPANEL"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=he;class ce{}ce.LEFT={type:3,value:"LEFT"},ce.MIDDLE={type:3,value:"MIDDLE"},ce.RIGHT={type:3,value:"RIGHT"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=ce;class Ae{}Ae.ALUMINIUM={type:3,value:"ALUMINIUM"},Ae.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ae.STEEL={type:3,value:"STEEL"},Ae.WOOD={type:3,value:"WOOD"},Ae.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ae.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Ae.PLASTIC={type:3,value:"PLASTIC"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Ae;class ue{}ue.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},ue.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},ue.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},ue.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},ue.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},ue.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},ue.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},ue.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},ue.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},ue.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},ue.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},ue.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},ue.REVOLVING={type:3,value:"REVOLVING"},ue.ROLLINGUP={type:3,value:"ROLLINGUP"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=ue;class pe{}pe.DOOR={type:3,value:"DOOR"},pe.GATE={type:3,value:"GATE"},pe.TRAPDOOR={type:3,value:"TRAPDOOR"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=pe;class de{}de.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},de.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},de.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},de.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},de.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},de.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},de.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},de.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},de.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},de.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},de.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},de.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},de.REVOLVING={type:3,value:"REVOLVING"},de.ROLLINGUP={type:3,value:"ROLLINGUP"},de.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},de.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=de;class fe{}fe.BEND={type:3,value:"BEND"},fe.CONNECTOR={type:3,value:"CONNECTOR"},fe.ENTRY={type:3,value:"ENTRY"},fe.EXIT={type:3,value:"EXIT"},fe.JUNCTION={type:3,value:"JUNCTION"},fe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},fe.TRANSITION={type:3,value:"TRANSITION"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=fe;class Ee{}Ee.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ee.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Ee;class me{}me.FLATOVAL={type:3,value:"FLATOVAL"},me.RECTANGULAR={type:3,value:"RECTANGULAR"},me.ROUND={type:3,value:"ROUND"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=me;class ye{}ye.DISHWASHER={type:3,value:"DISHWASHER"},ye.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ye.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},ye.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ye.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},ye.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},ye.FREEZER={type:3,value:"FREEZER"},ye.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ye.HANDDRYER={type:3,value:"HANDDRYER"},ye.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},ye.MICROWAVE={type:3,value:"MICROWAVE"},ye.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ye.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ye.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ye.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ye.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ye;class ge{}ge.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},ge.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},ge.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},ge.SWITCHBOARD={type:3,value:"SWITCHBOARD"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=ge;class Ie{}Ie.BATTERY={type:3,value:"BATTERY"},Ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Ie.UPS={type:3,value:"UPS"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Ie;class ve{}ve.CHP={type:3,value:"CHP"},ve.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},ve.STANDALONE={type:3,value:"STANDALONE"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=ve;class Te{}Te.DC={type:3,value:"DC"},Te.INDUCTION={type:3,value:"INDUCTION"},Te.POLYPHASE={type:3,value:"POLYPHASE"},Te.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},Te.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=Te;class _e{}_e.TIMECLOCK={type:3,value:"TIMECLOCK"},_e.TIMEDELAY={type:3,value:"TIMEDELAY"},_e.RELAY={type:3,value:"RELAY"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=_e;class Re{}Re.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},Re.ARCH={type:3,value:"ARCH"},Re.BEAM_GRID={type:3,value:"BEAM_GRID"},Re.BRACED_FRAME={type:3,value:"BRACED_FRAME"},Re.GIRDER={type:3,value:"GIRDER"},Re.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},Re.RIGID_FRAME={type:3,value:"RIGID_FRAME"},Re.SLAB_FIELD={type:3,value:"SLAB_FIELD"},Re.TRUSS={type:3,value:"TRUSS"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=Re;class Pe{}Pe.COMPLEX={type:3,value:"COMPLEX"},Pe.ELEMENT={type:3,value:"ELEMENT"},Pe.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Pe;class De{}De.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},De.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=De;class Ne{}Ne.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Ne.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Ne.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Ne.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Ne.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Ne.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Ne.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Ne;class Ce{}Ce.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},Ce.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},Ce.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},Ce.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},Ce.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},Ce.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=Ce;class Oe{}Oe.EVENTRULE={type:3,value:"EVENTRULE"},Oe.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},Oe.EVENTTIME={type:3,value:"EVENTTIME"},Oe.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=Oe;class be{}be.STARTEVENT={type:3,value:"STARTEVENT"},be.ENDEVENT={type:3,value:"ENDEVENT"},be.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=be;class Se{}Se.EXTERNAL={type:3,value:"EXTERNAL"},Se.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Se.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Se.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Se;class we{}we.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},we.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},we.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},we.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},we.TUBEAXIAL={type:3,value:"TUBEAXIAL"},we.VANEAXIAL={type:3,value:"VANEAXIAL"},we.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=we;class xe{}xe.GLUE={type:3,value:"GLUE"},xe.MORTAR={type:3,value:"MORTAR"},xe.WELD={type:3,value:"WELD"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=xe;class Be{}Be.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},Be.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},Be.ODORFILTER={type:3,value:"ODORFILTER"},Be.OILFILTER={type:3,value:"OILFILTER"},Be.STRAINER={type:3,value:"STRAINER"},Be.WATERFILTER={type:3,value:"WATERFILTER"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=Be;class Fe{}Fe.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Fe.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Fe.HOSEREEL={type:3,value:"HOSEREEL"},Fe.SPRINKLER={type:3,value:"SPRINKLER"},Fe.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Fe;class Me{}Me.SOURCE={type:3,value:"SOURCE"},Me.SINK={type:3,value:"SINK"},Me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=Me;class Le{}Le.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},Le.THERMOMETER={type:3,value:"THERMOMETER"},Le.AMMETER={type:3,value:"AMMETER"},Le.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},Le.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},Le.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},Le.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},Le.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=Le;class Ue{}Ue.ENERGYMETER={type:3,value:"ENERGYMETER"},Ue.GASMETER={type:3,value:"GASMETER"},Ue.OILMETER={type:3,value:"OILMETER"},Ue.WATERMETER={type:3,value:"WATERMETER"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=Ue;class He{}He.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},He.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},He.PAD_FOOTING={type:3,value:"PAD_FOOTING"},He.PILE_CAP={type:3,value:"PILE_CAP"},He.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=He;class Ge{}Ge.CHAIR={type:3,value:"CHAIR"},Ge.TABLE={type:3,value:"TABLE"},Ge.DESK={type:3,value:"DESK"},Ge.BED={type:3,value:"BED"},Ge.FILECABINET={type:3,value:"FILECABINET"},Ge.SHELF={type:3,value:"SHELF"},Ge.SOFA={type:3,value:"SOFA"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=Ge;class ke{}ke.TERRAIN={type:3,value:"TERRAIN"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=ke;class Ve{}Ve.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Ve.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Ve.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Ve.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Ve.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Ve.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Ve.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Ve;class je{}je.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},je.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=je;class Qe{}Qe.RECTANGULAR={type:3,value:"RECTANGULAR"},Qe.RADIAL={type:3,value:"RADIAL"},Qe.TRIANGULAR={type:3,value:"TRIANGULAR"},Qe.IRREGULAR={type:3,value:"IRREGULAR"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=Qe;class We{}We.PLATE={type:3,value:"PLATE"},We.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=We;class ze{}ze.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ze.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ze.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ze.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ze.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ze.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ze.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ze.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ze.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ze.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ze.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ze.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ze.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ze;class Ke{}Ke.CYCLONIC={type:3,value:"CYCLONIC"},Ke.GREASE={type:3,value:"GREASE"},Ke.OIL={type:3,value:"OIL"},Ke.PETROL={type:3,value:"PETROL"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=Ke;class Ye{}Ye.INTERNAL={type:3,value:"INTERNAL"},Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=Ye;class Xe{}Xe.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Xe.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Xe.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Xe;class Ze{}Ze.DATA={type:3,value:"DATA"},Ze.POWER={type:3,value:"POWER"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ze;class qe{}qe.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},qe.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},qe.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},qe.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=qe;class Je{}Je.ADMINISTRATION={type:3,value:"ADMINISTRATION"},Je.CARPENTRY={type:3,value:"CARPENTRY"},Je.CLEANING={type:3,value:"CLEANING"},Je.CONCRETE={type:3,value:"CONCRETE"},Je.DRYWALL={type:3,value:"DRYWALL"},Je.ELECTRIC={type:3,value:"ELECTRIC"},Je.FINISHING={type:3,value:"FINISHING"},Je.FLOORING={type:3,value:"FLOORING"},Je.GENERAL={type:3,value:"GENERAL"},Je.HVAC={type:3,value:"HVAC"},Je.LANDSCAPING={type:3,value:"LANDSCAPING"},Je.MASONRY={type:3,value:"MASONRY"},Je.PAINTING={type:3,value:"PAINTING"},Je.PAVING={type:3,value:"PAVING"},Je.PLUMBING={type:3,value:"PLUMBING"},Je.ROOFING={type:3,value:"ROOFING"},Je.SITEGRADING={type:3,value:"SITEGRADING"},Je.STEELWORK={type:3,value:"STEELWORK"},Je.SURVEYING={type:3,value:"SURVEYING"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=Je;class $e{}$e.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},$e.FLUORESCENT={type:3,value:"FLUORESCENT"},$e.HALOGEN={type:3,value:"HALOGEN"},$e.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},$e.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},$e.LED={type:3,value:"LED"},$e.METALHALIDE={type:3,value:"METALHALIDE"},$e.OLED={type:3,value:"OLED"},$e.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=$e;class et{}et.AXIS1={type:3,value:"AXIS1"},et.AXIS2={type:3,value:"AXIS2"},et.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=et;class tt{}tt.TYPE_A={type:3,value:"TYPE_A"},tt.TYPE_B={type:3,value:"TYPE_B"},tt.TYPE_C={type:3,value:"TYPE_C"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=tt;class st{}st.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},st.FLUORESCENT={type:3,value:"FLUORESCENT"},st.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},st.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},st.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},st.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},st.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},st.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},st.METALHALIDE={type:3,value:"METALHALIDE"},st.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=st;class it{}it.POINTSOURCE={type:3,value:"POINTSOURCE"},it.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},it.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=it;class rt{}rt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},rt.LOAD_CASE={type:3,value:"LOAD_CASE"},rt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=rt;class ot{}ot.LOGICALAND={type:3,value:"LOGICALAND"},ot.LOGICALOR={type:3,value:"LOGICALOR"},ot.LOGICALXOR={type:3,value:"LOGICALXOR"},ot.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},ot.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},e.IfcLogicalOperatorEnum=ot;class nt{}nt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},nt.BOLT={type:3,value:"BOLT"},nt.DOWEL={type:3,value:"DOWEL"},nt.NAIL={type:3,value:"NAIL"},nt.NAILPLATE={type:3,value:"NAILPLATE"},nt.RIVET={type:3,value:"RIVET"},nt.SCREW={type:3,value:"SCREW"},nt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},nt.STAPLE={type:3,value:"STAPLE"},nt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=nt;class at{}at.AIRSTATION={type:3,value:"AIRSTATION"},at.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},at.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},at.OXYGENPLANT={type:3,value:"OXYGENPLANT"},at.VACUUMSTATION={type:3,value:"VACUUMSTATION"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=at;class lt{}lt.BRACE={type:3,value:"BRACE"},lt.CHORD={type:3,value:"CHORD"},lt.COLLAR={type:3,value:"COLLAR"},lt.MEMBER={type:3,value:"MEMBER"},lt.MULLION={type:3,value:"MULLION"},lt.PLATE={type:3,value:"PLATE"},lt.POST={type:3,value:"POST"},lt.PURLIN={type:3,value:"PURLIN"},lt.RAFTER={type:3,value:"RAFTER"},lt.STRINGER={type:3,value:"STRINGER"},lt.STRUT={type:3,value:"STRUT"},lt.STUD={type:3,value:"STUD"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=lt;class ht{}ht.BELTDRIVE={type:3,value:"BELTDRIVE"},ht.COUPLING={type:3,value:"COUPLING"},ht.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},ht.USERDEFINED={type:3,value:"USERDEFINED"},ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=ht;class ct{}ct.NULL={type:3,value:"NULL"},e.IfcNullStyle=ct;class At{}At.PRODUCT={type:3,value:"PRODUCT"},At.PROCESS={type:3,value:"PROCESS"},At.CONTROL={type:3,value:"CONTROL"},At.RESOURCE={type:3,value:"RESOURCE"},At.ACTOR={type:3,value:"ACTOR"},At.GROUP={type:3,value:"GROUP"},At.PROJECT={type:3,value:"PROJECT"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=At;class ut{}ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},ut.CODEWAIVER={type:3,value:"CODEWAIVER"},ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},ut.EXTERNAL={type:3,value:"EXTERNAL"},ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},ut.MODELVIEW={type:3,value:"MODELVIEW"},ut.PARAMETER={type:3,value:"PARAMETER"},ut.REQUIREMENT={type:3,value:"REQUIREMENT"},ut.SPECIFICATION={type:3,value:"SPECIFICATION"},ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=ut;class pt{}pt.ASSIGNEE={type:3,value:"ASSIGNEE"},pt.ASSIGNOR={type:3,value:"ASSIGNOR"},pt.LESSEE={type:3,value:"LESSEE"},pt.LESSOR={type:3,value:"LESSOR"},pt.LETTINGAGENT={type:3,value:"LETTINGAGENT"},pt.OWNER={type:3,value:"OWNER"},pt.TENANT={type:3,value:"TENANT"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=pt;class dt{}dt.OPENING={type:3,value:"OPENING"},dt.RECESS={type:3,value:"RECESS"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=dt;class ft{}ft.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},ft.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},ft.POWEROUTLET={type:3,value:"POWEROUTLET"},ft.DATAOUTLET={type:3,value:"DATAOUTLET"},ft.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},ft.USERDEFINED={type:3,value:"USERDEFINED"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=ft;class Et{}Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=Et;class mt{}mt.GRILL={type:3,value:"GRILL"},mt.LOUVER={type:3,value:"LOUVER"},mt.SCREEN={type:3,value:"SCREEN"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=mt;class yt{}yt.ACCESS={type:3,value:"ACCESS"},yt.BUILDING={type:3,value:"BUILDING"},yt.WORK={type:3,value:"WORK"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=yt;class gt{}gt.PHYSICAL={type:3,value:"PHYSICAL"},gt.VIRTUAL={type:3,value:"VIRTUAL"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=gt;class It{}It.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},It.COMPOSITE={type:3,value:"COMPOSITE"},It.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},It.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=It;class vt{}vt.BORED={type:3,value:"BORED"},vt.DRIVEN={type:3,value:"DRIVEN"},vt.JETGROUTING={type:3,value:"JETGROUTING"},vt.COHESION={type:3,value:"COHESION"},vt.FRICTION={type:3,value:"FRICTION"},vt.SUPPORT={type:3,value:"SUPPORT"},vt.USERDEFINED={type:3,value:"USERDEFINED"},vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=vt;class Tt{}Tt.BEND={type:3,value:"BEND"},Tt.CONNECTOR={type:3,value:"CONNECTOR"},Tt.ENTRY={type:3,value:"ENTRY"},Tt.EXIT={type:3,value:"EXIT"},Tt.JUNCTION={type:3,value:"JUNCTION"},Tt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Tt.TRANSITION={type:3,value:"TRANSITION"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Tt;class _t{}_t.CULVERT={type:3,value:"CULVERT"},_t.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},_t.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},_t.GUTTER={type:3,value:"GUTTER"},_t.SPOOL={type:3,value:"SPOOL"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=_t;class Rt{}Rt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Rt.SHEET={type:3,value:"SHEET"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Rt;class Pt{}Pt.CURVE3D={type:3,value:"CURVE3D"},Pt.PCURVE_S1={type:3,value:"PCURVE_S1"},Pt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Pt;class Dt{}Dt.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Dt.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Dt.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Dt.CALIBRATION={type:3,value:"CALIBRATION"},Dt.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Dt.SHUTDOWN={type:3,value:"SHUTDOWN"},Dt.STARTUP={type:3,value:"STARTUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Dt;class Nt{}Nt.CURVE={type:3,value:"CURVE"},Nt.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=Nt;class Ct{}Ct.CHANGEORDER={type:3,value:"CHANGEORDER"},Ct.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},Ct.MOVEORDER={type:3,value:"MOVEORDER"},Ct.PURCHASEORDER={type:3,value:"PURCHASEORDER"},Ct.WORKORDER={type:3,value:"WORKORDER"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=Ct;class Ot{}Ot.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},Ot.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=Ot;class bt{}bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=bt;class St{}St.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},St.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},St.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},St.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},St.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},St.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},St.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=St;class wt{}wt.ELECTRONIC={type:3,value:"ELECTRONIC"},wt.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},wt.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},wt.THERMAL={type:3,value:"THERMAL"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=wt;class xt{}xt.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},xt.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},xt.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},xt.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},xt.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},xt.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},xt.VARISTOR={type:3,value:"VARISTOR"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=xt;class Bt{}Bt.CIRCULATOR={type:3,value:"CIRCULATOR"},Bt.ENDSUCTION={type:3,value:"ENDSUCTION"},Bt.SPLITCASE={type:3,value:"SPLITCASE"},Bt.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},Bt.SUMPPUMP={type:3,value:"SUMPPUMP"},Bt.VERTICALINLINE={type:3,value:"VERTICALINLINE"},Bt.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=Bt;class Ft{}Ft.HANDRAIL={type:3,value:"HANDRAIL"},Ft.GUARDRAIL={type:3,value:"GUARDRAIL"},Ft.BALUSTRADE={type:3,value:"BALUSTRADE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=Ft;class Mt{}Mt.STRAIGHT={type:3,value:"STRAIGHT"},Mt.SPIRAL={type:3,value:"SPIRAL"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=Mt;class Lt{}Lt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},Lt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},Lt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},Lt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},Lt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},Lt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},Lt.USERDEFINED={type:3,value:"USERDEFINED"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=Lt;class Ut{}Ut.DAILY={type:3,value:"DAILY"},Ut.WEEKLY={type:3,value:"WEEKLY"},Ut.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},Ut.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},Ut.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},Ut.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},Ut.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},Ut.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=Ut;class Ht{}Ht.BLINN={type:3,value:"BLINN"},Ht.FLAT={type:3,value:"FLAT"},Ht.GLASS={type:3,value:"GLASS"},Ht.MATT={type:3,value:"MATT"},Ht.METAL={type:3,value:"METAL"},Ht.MIRROR={type:3,value:"MIRROR"},Ht.PHONG={type:3,value:"PHONG"},Ht.PLASTIC={type:3,value:"PLASTIC"},Ht.STRAUSS={type:3,value:"STRAUSS"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Ht;class Gt{}Gt.MAIN={type:3,value:"MAIN"},Gt.SHEAR={type:3,value:"SHEAR"},Gt.LIGATURE={type:3,value:"LIGATURE"},Gt.STUD={type:3,value:"STUD"},Gt.PUNCHING={type:3,value:"PUNCHING"},Gt.EDGE={type:3,value:"EDGE"},Gt.RING={type:3,value:"RING"},Gt.ANCHORING={type:3,value:"ANCHORING"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=Gt;class kt{}kt.PLAIN={type:3,value:"PLAIN"},kt.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=kt;class Vt{}Vt.ANCHORING={type:3,value:"ANCHORING"},Vt.EDGE={type:3,value:"EDGE"},Vt.LIGATURE={type:3,value:"LIGATURE"},Vt.MAIN={type:3,value:"MAIN"},Vt.PUNCHING={type:3,value:"PUNCHING"},Vt.RING={type:3,value:"RING"},Vt.SHEAR={type:3,value:"SHEAR"},Vt.STUD={type:3,value:"STUD"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=jt;class Qt{}Qt.SUPPLIER={type:3,value:"SUPPLIER"},Qt.MANUFACTURER={type:3,value:"MANUFACTURER"},Qt.CONTRACTOR={type:3,value:"CONTRACTOR"},Qt.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Qt.ARCHITECT={type:3,value:"ARCHITECT"},Qt.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Qt.COSTENGINEER={type:3,value:"COSTENGINEER"},Qt.CLIENT={type:3,value:"CLIENT"},Qt.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Qt.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Qt.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Qt.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Qt.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Qt.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Qt.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Qt.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Qt.ENGINEER={type:3,value:"ENGINEER"},Qt.OWNER={type:3,value:"OWNER"},Qt.CONSULTANT={type:3,value:"CONSULTANT"},Qt.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Qt.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Qt.RESELLER={type:3,value:"RESELLER"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Qt;class Wt{}Wt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Wt.SHED_ROOF={type:3,value:"SHED_ROOF"},Wt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Wt.HIP_ROOF={type:3,value:"HIP_ROOF"},Wt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Wt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Wt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Wt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Wt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Wt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Wt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Wt.DOME_ROOF={type:3,value:"DOME_ROOF"},Wt.FREEFORM={type:3,value:"FREEFORM"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Wt;class zt{}zt.EXA={type:3,value:"EXA"},zt.PETA={type:3,value:"PETA"},zt.TERA={type:3,value:"TERA"},zt.GIGA={type:3,value:"GIGA"},zt.MEGA={type:3,value:"MEGA"},zt.KILO={type:3,value:"KILO"},zt.HECTO={type:3,value:"HECTO"},zt.DECA={type:3,value:"DECA"},zt.DECI={type:3,value:"DECI"},zt.CENTI={type:3,value:"CENTI"},zt.MILLI={type:3,value:"MILLI"},zt.MICRO={type:3,value:"MICRO"},zt.NANO={type:3,value:"NANO"},zt.PICO={type:3,value:"PICO"},zt.FEMTO={type:3,value:"FEMTO"},zt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=zt;class Kt{}Kt.AMPERE={type:3,value:"AMPERE"},Kt.BECQUEREL={type:3,value:"BECQUEREL"},Kt.CANDELA={type:3,value:"CANDELA"},Kt.COULOMB={type:3,value:"COULOMB"},Kt.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Kt.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Kt.FARAD={type:3,value:"FARAD"},Kt.GRAM={type:3,value:"GRAM"},Kt.GRAY={type:3,value:"GRAY"},Kt.HENRY={type:3,value:"HENRY"},Kt.HERTZ={type:3,value:"HERTZ"},Kt.JOULE={type:3,value:"JOULE"},Kt.KELVIN={type:3,value:"KELVIN"},Kt.LUMEN={type:3,value:"LUMEN"},Kt.LUX={type:3,value:"LUX"},Kt.METRE={type:3,value:"METRE"},Kt.MOLE={type:3,value:"MOLE"},Kt.NEWTON={type:3,value:"NEWTON"},Kt.OHM={type:3,value:"OHM"},Kt.PASCAL={type:3,value:"PASCAL"},Kt.RADIAN={type:3,value:"RADIAN"},Kt.SECOND={type:3,value:"SECOND"},Kt.SIEMENS={type:3,value:"SIEMENS"},Kt.SIEVERT={type:3,value:"SIEVERT"},Kt.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Kt.STERADIAN={type:3,value:"STERADIAN"},Kt.TESLA={type:3,value:"TESLA"},Kt.VOLT={type:3,value:"VOLT"},Kt.WATT={type:3,value:"WATT"},Kt.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Kt;class Yt{}Yt.BATH={type:3,value:"BATH"},Yt.BIDET={type:3,value:"BIDET"},Yt.CISTERN={type:3,value:"CISTERN"},Yt.SHOWER={type:3,value:"SHOWER"},Yt.SINK={type:3,value:"SINK"},Yt.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Yt.TOILETPAN={type:3,value:"TOILETPAN"},Yt.URINAL={type:3,value:"URINAL"},Yt.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Yt.WCSEAT={type:3,value:"WCSEAT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Yt;class Xt{}Xt.UNIFORM={type:3,value:"UNIFORM"},Xt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=Xt;class Zt{}Zt.COSENSOR={type:3,value:"COSENSOR"},Zt.CO2SENSOR={type:3,value:"CO2SENSOR"},Zt.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Zt.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Zt.FIRESENSOR={type:3,value:"FIRESENSOR"},Zt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Zt.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Zt.GASSENSOR={type:3,value:"GASSENSOR"},Zt.HEATSENSOR={type:3,value:"HEATSENSOR"},Zt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Zt.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Zt.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Zt.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Zt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Zt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Zt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Zt.PHSENSOR={type:3,value:"PHSENSOR"},Zt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Zt.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Zt.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Zt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Zt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Zt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Zt.WINDSENSOR={type:3,value:"WINDSENSOR"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Zt;class qt{}qt.START_START={type:3,value:"START_START"},qt.START_FINISH={type:3,value:"START_FINISH"},qt.FINISH_START={type:3,value:"FINISH_START"},qt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=qt;class Jt{}Jt.JALOUSIE={type:3,value:"JALOUSIE"},Jt.SHUTTER={type:3,value:"SHUTTER"},Jt.AWNING={type:3,value:"AWNING"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=Jt;class $t{}$t.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},$t.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},$t.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},$t.P_LISTVALUE={type:3,value:"P_LISTVALUE"},$t.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},$t.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},$t.Q_LENGTH={type:3,value:"Q_LENGTH"},$t.Q_AREA={type:3,value:"Q_AREA"},$t.Q_VOLUME={type:3,value:"Q_VOLUME"},$t.Q_COUNT={type:3,value:"Q_COUNT"},$t.Q_WEIGHT={type:3,value:"Q_WEIGHT"},$t.Q_TIME={type:3,value:"Q_TIME"},e.IfcSimplePropertyTemplateTypeEnum=$t;class es{}es.FLOOR={type:3,value:"FLOOR"},es.ROOF={type:3,value:"ROOF"},es.LANDING={type:3,value:"LANDING"},es.BASESLAB={type:3,value:"BASESLAB"},es.USERDEFINED={type:3,value:"USERDEFINED"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=es;class ts{}ts.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},ts.SOLARPANEL={type:3,value:"SOLARPANEL"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=ts;class ss{}ss.CONVECTOR={type:3,value:"CONVECTOR"},ss.RADIATOR={type:3,value:"RADIATOR"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=ss;class is{}is.SPACE={type:3,value:"SPACE"},is.PARKING={type:3,value:"PARKING"},is.GFA={type:3,value:"GFA"},is.INTERNAL={type:3,value:"INTERNAL"},is.EXTERNAL={type:3,value:"EXTERNAL"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=is;class rs{}rs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},rs.FIRESAFETY={type:3,value:"FIRESAFETY"},rs.LIGHTING={type:3,value:"LIGHTING"},rs.OCCUPANCY={type:3,value:"OCCUPANCY"},rs.SECURITY={type:3,value:"SECURITY"},rs.THERMAL={type:3,value:"THERMAL"},rs.TRANSPORT={type:3,value:"TRANSPORT"},rs.VENTILATION={type:3,value:"VENTILATION"},rs.USERDEFINED={type:3,value:"USERDEFINED"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=rs;class os{}os.BIRDCAGE={type:3,value:"BIRDCAGE"},os.COWL={type:3,value:"COWL"},os.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=os;class ns{}ns.STRAIGHT={type:3,value:"STRAIGHT"},ns.WINDER={type:3,value:"WINDER"},ns.SPIRAL={type:3,value:"SPIRAL"},ns.CURVED={type:3,value:"CURVED"},ns.FREEFORM={type:3,value:"FREEFORM"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=ns;class as{}as.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},as.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},as.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},as.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},as.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},as.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},as.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},as.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},as.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},as.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},as.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},as.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},as.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},as.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=as;class ls{}ls.READWRITE={type:3,value:"READWRITE"},ls.READONLY={type:3,value:"READONLY"},ls.LOCKED={type:3,value:"LOCKED"},ls.READWRITELOCKED={type:3,value:"READWRITELOCKED"},ls.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=ls;class hs{}hs.CONST={type:3,value:"CONST"},hs.LINEAR={type:3,value:"LINEAR"},hs.POLYGONAL={type:3,value:"POLYGONAL"},hs.EQUIDISTANT={type:3,value:"EQUIDISTANT"},hs.SINUS={type:3,value:"SINUS"},hs.PARABOLA={type:3,value:"PARABOLA"},hs.DISCRETE={type:3,value:"DISCRETE"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=hs;class cs{}cs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},cs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},cs.CABLE={type:3,value:"CABLE"},cs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},cs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=cs;class As{}As.CONST={type:3,value:"CONST"},As.BILINEAR={type:3,value:"BILINEAR"},As.DISCRETE={type:3,value:"DISCRETE"},As.ISOCONTOUR={type:3,value:"ISOCONTOUR"},As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=As;class us{}us.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},us.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},us.SHELL={type:3,value:"SHELL"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=us;class ps{}ps.PURCHASE={type:3,value:"PURCHASE"},ps.WORK={type:3,value:"WORK"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=ps;class ds{}ds.MARK={type:3,value:"MARK"},ds.TAG={type:3,value:"TAG"},ds.TREATMENT={type:3,value:"TREATMENT"},ds.USERDEFINED={type:3,value:"USERDEFINED"},ds.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=ds;class fs{}fs.POSITIVE={type:3,value:"POSITIVE"},fs.NEGATIVE={type:3,value:"NEGATIVE"},fs.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=fs;class Es{}Es.CONTACTOR={type:3,value:"CONTACTOR"},Es.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Es.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Es.KEYPAD={type:3,value:"KEYPAD"},Es.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Es.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Es.STARTER={type:3,value:"STARTER"},Es.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Es.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Es.USERDEFINED={type:3,value:"USERDEFINED"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Es;class ms{}ms.PANEL={type:3,value:"PANEL"},ms.WORKSURFACE={type:3,value:"WORKSURFACE"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=ms;class ys{}ys.BASIN={type:3,value:"BASIN"},ys.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ys.EXPANSION={type:3,value:"EXPANSION"},ys.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ys.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ys.STORAGE={type:3,value:"STORAGE"},ys.VESSEL={type:3,value:"VESSEL"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ys;class gs{}gs.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},gs.WORKTIME={type:3,value:"WORKTIME"},gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=gs;class Is{}Is.ATTENDANCE={type:3,value:"ATTENDANCE"},Is.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Is.DEMOLITION={type:3,value:"DEMOLITION"},Is.DISMANTLE={type:3,value:"DISMANTLE"},Is.DISPOSAL={type:3,value:"DISPOSAL"},Is.INSTALLATION={type:3,value:"INSTALLATION"},Is.LOGISTIC={type:3,value:"LOGISTIC"},Is.MAINTENANCE={type:3,value:"MAINTENANCE"},Is.MOVE={type:3,value:"MOVE"},Is.OPERATION={type:3,value:"OPERATION"},Is.REMOVAL={type:3,value:"REMOVAL"},Is.RENOVATION={type:3,value:"RENOVATION"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=Is;class vs{}vs.COUPLER={type:3,value:"COUPLER"},vs.FIXED_END={type:3,value:"FIXED_END"},vs.TENSIONING_END={type:3,value:"TENSIONING_END"},vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=vs;class Ts{}Ts.BAR={type:3,value:"BAR"},Ts.COATED={type:3,value:"COATED"},Ts.STRAND={type:3,value:"STRAND"},Ts.WIRE={type:3,value:"WIRE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Ts;class _s{}_s.LEFT={type:3,value:"LEFT"},_s.RIGHT={type:3,value:"RIGHT"},_s.UP={type:3,value:"UP"},_s.DOWN={type:3,value:"DOWN"},e.IfcTextPath=_s;class Rs{}Rs.CONTINUOUS={type:3,value:"CONTINUOUS"},Rs.DISCRETE={type:3,value:"DISCRETE"},Rs.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Rs.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Rs.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Rs.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Rs;class Ps{}Ps.CURRENT={type:3,value:"CURRENT"},Ps.FREQUENCY={type:3,value:"FREQUENCY"},Ps.INVERTER={type:3,value:"INVERTER"},Ps.RECTIFIER={type:3,value:"RECTIFIER"},Ps.VOLTAGE={type:3,value:"VOLTAGE"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Ps;class Ds{}Ds.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},Ds.CONTINUOUS={type:3,value:"CONTINUOUS"},Ds.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},Ds.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=Ds;class Ns{}Ns.ELEVATOR={type:3,value:"ELEVATOR"},Ns.ESCALATOR={type:3,value:"ESCALATOR"},Ns.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ns.CRANEWAY={type:3,value:"CRANEWAY"},Ns.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ns.USERDEFINED={type:3,value:"USERDEFINED"},Ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ns;class Cs{}Cs.CARTESIAN={type:3,value:"CARTESIAN"},Cs.PARAMETER={type:3,value:"PARAMETER"},Cs.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Cs;class Os{}Os.FINNED={type:3,value:"FINNED"},Os.USERDEFINED={type:3,value:"USERDEFINED"},Os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=Os;class bs{}bs.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},bs.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},bs.AREAUNIT={type:3,value:"AREAUNIT"},bs.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},bs.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},bs.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},bs.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},bs.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},bs.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},bs.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},bs.ENERGYUNIT={type:3,value:"ENERGYUNIT"},bs.FORCEUNIT={type:3,value:"FORCEUNIT"},bs.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},bs.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},bs.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},bs.LENGTHUNIT={type:3,value:"LENGTHUNIT"},bs.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},bs.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},bs.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},bs.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},bs.MASSUNIT={type:3,value:"MASSUNIT"},bs.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},bs.POWERUNIT={type:3,value:"POWERUNIT"},bs.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},bs.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},bs.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},bs.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},bs.TIMEUNIT={type:3,value:"TIMEUNIT"},bs.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},bs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=bs;class Ss{}Ss.ALARMPANEL={type:3,value:"ALARMPANEL"},Ss.CONTROLPANEL={type:3,value:"CONTROLPANEL"},Ss.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},Ss.INDICATORPANEL={type:3,value:"INDICATORPANEL"},Ss.MIMICPANEL={type:3,value:"MIMICPANEL"},Ss.HUMIDISTAT={type:3,value:"HUMIDISTAT"},Ss.THERMOSTAT={type:3,value:"THERMOSTAT"},Ss.WEATHERSTATION={type:3,value:"WEATHERSTATION"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=Ss;class ws{}ws.AIRHANDLER={type:3,value:"AIRHANDLER"},ws.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},ws.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},ws.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},ws.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=ws;class xs{}xs.AIRRELEASE={type:3,value:"AIRRELEASE"},xs.ANTIVACUUM={type:3,value:"ANTIVACUUM"},xs.CHANGEOVER={type:3,value:"CHANGEOVER"},xs.CHECK={type:3,value:"CHECK"},xs.COMMISSIONING={type:3,value:"COMMISSIONING"},xs.DIVERTING={type:3,value:"DIVERTING"},xs.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},xs.DOUBLECHECK={type:3,value:"DOUBLECHECK"},xs.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},xs.FAUCET={type:3,value:"FAUCET"},xs.FLUSHING={type:3,value:"FLUSHING"},xs.GASCOCK={type:3,value:"GASCOCK"},xs.GASTAP={type:3,value:"GASTAP"},xs.ISOLATING={type:3,value:"ISOLATING"},xs.MIXING={type:3,value:"MIXING"},xs.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},xs.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},xs.REGULATING={type:3,value:"REGULATING"},xs.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},xs.STEAMTRAP={type:3,value:"STEAMTRAP"},xs.STOPCOCK={type:3,value:"STOPCOCK"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=xs;class Bs{}Bs.COMPRESSION={type:3,value:"COMPRESSION"},Bs.SPRING={type:3,value:"SPRING"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Bs;class Fs{}Fs.CUTOUT={type:3,value:"CUTOUT"},Fs.NOTCH={type:3,value:"NOTCH"},Fs.HOLE={type:3,value:"HOLE"},Fs.MITER={type:3,value:"MITER"},Fs.CHAMFER={type:3,value:"CHAMFER"},Fs.EDGE={type:3,value:"EDGE"},Fs.USERDEFINED={type:3,value:"USERDEFINED"},Fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Fs;class Ms{}Ms.MOVABLE={type:3,value:"MOVABLE"},Ms.PARAPET={type:3,value:"PARAPET"},Ms.PARTITIONING={type:3,value:"PARTITIONING"},Ms.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},Ms.SHEAR={type:3,value:"SHEAR"},Ms.SOLIDWALL={type:3,value:"SOLIDWALL"},Ms.STANDARD={type:3,value:"STANDARD"},Ms.POLYGONAL={type:3,value:"POLYGONAL"},Ms.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=Ms;class Ls{}Ls.FLOORTRAP={type:3,value:"FLOORTRAP"},Ls.FLOORWASTE={type:3,value:"FLOORWASTE"},Ls.GULLYSUMP={type:3,value:"GULLYSUMP"},Ls.GULLYTRAP={type:3,value:"GULLYTRAP"},Ls.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ls.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ls.WASTETRAP={type:3,value:"WASTETRAP"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ls;class Us{}Us.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Us.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Us.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Us.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Us.TOPHUNG={type:3,value:"TOPHUNG"},Us.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Us.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Us.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Us.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Us.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Us.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Us.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Us.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Us;class Hs{}Hs.LEFT={type:3,value:"LEFT"},Hs.MIDDLE={type:3,value:"MIDDLE"},Hs.RIGHT={type:3,value:"RIGHT"},Hs.BOTTOM={type:3,value:"BOTTOM"},Hs.TOP={type:3,value:"TOP"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Hs;class Gs{}Gs.ALUMINIUM={type:3,value:"ALUMINIUM"},Gs.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Gs.STEEL={type:3,value:"STEEL"},Gs.WOOD={type:3,value:"WOOD"},Gs.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Gs.PLASTIC={type:3,value:"PLASTIC"},Gs.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Gs;class ks{}ks.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ks.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ks.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ks.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ks.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ks.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ks.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ks.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ks.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ks;class Vs{}Vs.WINDOW={type:3,value:"WINDOW"},Vs.SKYLIGHT={type:3,value:"SKYLIGHT"},Vs.LIGHTDOME={type:3,value:"LIGHTDOME"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Vs;class js{}js.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},js.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},js.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},js.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},js.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},js.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},js.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},js.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},js.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=js;class Qs{}Qs.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Qs.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Qs.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Qs.USERDEFINED={type:3,value:"USERDEFINED"},Qs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Qs;class Ws{}Ws.ACTUAL={type:3,value:"ACTUAL"},Ws.BASELINE={type:3,value:"BASELINE"},Ws.PLANNED={type:3,value:"PLANNED"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=Ws;class zs{}zs.ACTUAL={type:3,value:"ACTUAL"},zs.BASELINE={type:3,value:"BASELINE"},zs.PLANNED={type:3,value:"PLANNED"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=zs;e.IfcActorRole=class extends pg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Ks extends pg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Ks;e.IfcApplication=class extends pg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Ys extends pg{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Ys;e.IfcApproval=class extends pg{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Xs extends pg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Xs;e.IfcBoundaryEdgeCondition=class extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Xs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Zs extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Zs;e.IfcBoundaryNodeConditionWarping=class extends Zs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class qs extends pg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=qs;class Js extends qs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Js;e.IfcConnectionSurfaceGeometry=class extends qs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends qs{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class $s extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=$s;class ei extends pg{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=ei;class ti extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ti;e.IfcCostValue=class extends Ys{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends pg{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends pg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class si extends pg{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=si;class ii extends pg{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ii;e.IfcExternallyDefinedHatchStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends pg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends pg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends si{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends pg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends pg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends ei{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends pg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class ri extends pg{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=ri;class oi extends ri{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=oi;e.IfcMaterialLayerSet=class extends ri{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends pg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ni extends ri{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=ni;e.IfcMaterialProfileSet=class extends ri{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends ni{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class ai extends pg{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=ai;e.IfcMeasureWithUnit=class extends pg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends pg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class li extends pg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=li;class hi extends pg{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=hi;e.IfcObjective=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends pg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ci extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ci;class Ai extends ci{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=Ai;e.IfcPostalAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class ui extends pg{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=ui;class pi extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=pi;e.IfcPresentationLayerWithStyle=class extends pi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class di extends pg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=di;e.IfcPresentationStyleAssignment=class extends pg{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class fi extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=fi;class Ei extends pg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ei;e.IfcProjectedCRS=class extends ti{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class mi extends pg{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=mi;e.IfcPropertyEnumeration=class extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityTime=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends pg{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class yi extends pg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=yi;class gi extends pg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=gi;class Ii extends pg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ii;e.IfcRepresentationMap=class extends pg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class vi extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=vi;class Ti extends pg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=Ti;e.IfcSIUnit=class extends li{constructor(e,t,s,i){super(e,new ug(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};class _i extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=_i;e.IfcShapeAspect=class extends pg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class Ri extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=Ri;e.IfcShapeRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Pi extends pg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Pi;class Di extends pg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Di;e.IfcStructuralLoadConfiguration=class extends Di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class Ni extends Di{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=Ni;class Ci extends Ni{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ci;e.IfcStructuralLoadTemperature=class extends Ci{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class Oi extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Oi;e.IfcStyledItem=class extends Ii{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends Oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends Ni{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends ui{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends ui{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class bi extends ui{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=bi;e.IfcSurfaceStyleWithTextures=class extends ui{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class Si extends ui{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=Si;e.IfcTable=class extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends pg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class wi extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=wi;e.IfcTaskTimeRecurring=class extends wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends ui{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends ui{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class xi extends ui{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=xi;e.IfcTextureCoordinateGenerator=class extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};e.IfcTextureMap=class extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends ui{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends ui{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends pg{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class Bi extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=Bi;e.IfcTimeSeriesValue=class extends pg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Fi extends Ii{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Fi;e.IfcTopologyRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends pg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Mi extends Fi{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Mi;e.IfcVertexPoint=class extends Mi{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends pg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends _i{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.Start=o,this.Finish=n,this.type=1236880293}};e.IfcApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Li extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Li;class Ui extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Ui;e.IfcArbitraryProfileDefWithVoids=class extends Li{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends Si{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Ui{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends si{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Location=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends ui{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Hi extends ui{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Hi;e.IfcCompositeProfileDef=class extends Ei{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Gi extends Fi{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Gi;e.IfcConnectionCurveGeometry=class extends qs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Js{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends li{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class ki extends li{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=ki;e.IfcConversionBasedUnitWithOffset=class extends ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends vi{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends ui{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends ui{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends ui{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Vi extends Ei{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Vi;e.IfcDocumentInformation=class extends si{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends ii{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class ji extends Fi{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=ji;e.IfcEdgeCurve=class extends ji{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends _i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class Qi extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=Qi;e.IfcExternalReferenceRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Wi extends Fi{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Wi;class zi extends Fi{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=zi;e.IfcFaceOuterBound=class extends zi{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Ki extends Wi{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Ki;e.IfcFailureConnectionCondition=class extends Pi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelorDraughting=i,this.type=738692330}};class Yi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Yi;class Xi extends Ii{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Xi;e.IfcGeometricRepresentationSubContext=class extends Yi{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new ug(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class Zi extends Xi{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Zi;e.IfcGridPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class qi extends Xi{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=qi;e.IfcImageTexture=class extends Si{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends ui{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class Ji extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=Ji;e.IfcIndexedTriangleTextureMap=class extends Ji{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends _i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class $i extends Xi{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=$i;e.IfcLightSourceAmbient=class extends $i{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends $i{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class er extends $i{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=er;e.IfcLightSourceSpot=class extends er{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class tr extends Fi{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=tr;e.IfcMappedItem=class extends Ii{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends ri{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends fi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends ai{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class sr extends ai{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=sr;e.IfcMaterialProfileSetUsageTapering=class extends sr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.Expression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Vi{constructor(e,t,s,i,r){super(e,t,s,i,new ug(0),r),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Label=r,this.type=2998442950}};class ir extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=ir;e.IfcOpenShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends ji{constructor(e,t,s){super(e,new ug(0),new ug(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class rr extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=rr;e.IfcPath=class extends Fi{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ci{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends Si{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class or extends Xi{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=or;class nr extends Xi{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=nr;class ar extends Xi{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=ar;e.IfcPointOnCurve=class extends ar{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends ar{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends tr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends qi{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class lr extends ui{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=lr;class hr extends mi{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=hr;class cr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=cr;e.IfcProductDefinitionShape=class extends fi{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class Ar extends mi{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Ar;class ur extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=ur;e.IfcPropertyDependencyRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class pr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=pr;class dr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=dr;class fr extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=fr;class Er extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=Er;e.IfcRegularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class mr extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=mr;e.IfcResourceApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends Er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends hr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Xi{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcShellBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class yr extends Ar{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=yr;e.IfcSlippageConnectionCondition=class extends Pi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class gr extends Xi{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=gr;e.IfcStructuralLoadLinearForce=class extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ci{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class Ir extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=Ir;e.IfcStructuralLoadSingleDisplacementDistortion=class extends Ir{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class vr extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=vr;e.IfcStructuralLoadSingleForceWarping=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends ji{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Tr extends Xi{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Tr;e.IfcSurfaceStyleRendering=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class _r extends gr{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=_r;class Rr extends gr{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=Rr;e.IfcSweptDiskSolidPolygonal=class extends Rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Pr extends Tr{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Pr;e.IfcTShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class Dr extends Xi{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=Dr;class Nr extends Xi{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Nr;e.IfcTextLiteralWithExtent=class extends Nr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends cr{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class Cr extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Cr;class Or extends Cr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Or;class br extends Cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=br;class Sr extends Cr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=Sr;e.IfcUShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Xi{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends tr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowStyle=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Ki{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Xi{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends or{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class wr extends Xi{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=wr;class xr extends Tr{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=xr;e.IfcBoundingBox=class extends Xi{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends qi{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends ar{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Br extends Xi{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Br;e.IfcCartesianPointList2D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=2059837836}};class Fr extends Xi{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Fr;class Mr extends Fr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Mr;e.IfcCartesianTransformationOperator2DnonUniform=class extends Mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Lr extends Fr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Lr;e.IfcCartesianTransformationOperator3DnonUniform=class extends Lr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Ur extends rr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Ur;e.IfcClosedShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Hi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Ar{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Hr extends Xi{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Hr;class Gr extends Sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=Gr;class kr extends ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=kr;e.IfcCrewResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class Vr extends Xi{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Vr;e.IfcCsgSolid=class extends gr{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class jr extends Xi{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=jr;e.IfcCurveBoundedPlane=class extends xr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends xr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcDirection=class extends Xi{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorStyle=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};e.IfcEdgeLoop=class extends tr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends fr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Qr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Qr;class Wr extends Tr{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Wr;e.IfcEllipseProfileDef=class extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class zr extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=zr;e.IfcExtrudedAreaSolidTapered=class extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Xi{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFixedReferenceSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}};class Kr extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Kr;e.IfcFurnitureType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Zi{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class Yr extends Dr{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=Yr;e.IfcIndexedPolygonalFaceWithVoids=class extends Yr{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcLShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends jr{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Xr extends gr{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Xr;class Zr extends ir{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Zr;e.IfcOffsetCurve2D=class extends jr{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends jr{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPcurve=class extends jr{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends nr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Wr{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class qr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=qr;class Jr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=Jr;class $r extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=$r;e.IfcProcedureType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class eo extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=eo;class to extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=to;e.IfcProject=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends yr{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends pr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends dr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends yr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class so extends dr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=so;e.IfcProxy=class extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends Er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends xr{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class io extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=io;e.IfcRelAssignsToActor=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class ro extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=ro;e.IfcRelAssignsToGroupByFactor=class extends ro{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class oo extends mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=oo;e.IfcRelAssociatesApproval=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends oo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};class no extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=no;class ao extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=ao;e.IfcRelConnectsPathElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class lo extends no{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=lo;e.IfcRelConnectsWithEccentricity=class extends lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class ho extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=ho;class co extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=co;e.IfcRelDefinesByObject=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceType=l,this.ImpliedOrder=h,this.type=427948657}};e.IfcRelNests=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelProjectsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class Ao extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=Ao;class uo extends Ao{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=uo;e.IfcRelSpaceBoundary2ndLevel=class extends uo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Hr{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class po extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=po;class fo extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=fo;e.IfcRevolvedAreaSolidTapered=class extends fo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};e.IfcSimplePropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class Eo extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=Eo;class mo extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=mo;class yo extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=yo;class go extends mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=go;e.IfcSpatialZone=class extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends Vr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class Io extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=Io;class vo extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=vo;class To extends vo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=To;class _o extends Io{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=_o;class Ro extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=Ro;e.IfcStructuralSurfaceMemberVarying=class extends Ro{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class Po extends jr{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=Po;e.IfcSurfaceCurveSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Pr{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Pr{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Do extends Dr{constructor(e,t){super(e),this.Coordinates=t,this.type=2387106220}}e.IfcTessellatedFaceSet=Do;e.IfcToroidalSurface=class extends Wr{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};e.IfcTransportElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};e.IfcTriangulatedFaceSet=class extends Do{constructor(e,t,s,i,r,o){super(e,t),this.Coordinates=t,this.Normals=s,this.Closed=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}};e.IfcWindowLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class No extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=No;class Co extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Co;e.IfcAdvancedBrepWithVoids=class extends Co{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};class Oo extends xr{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Oo;class bo extends Oo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=bo;e.IfcBlock=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends wr{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class So extends jr{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=So;e.IfcBuilding=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class wo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=wo;e.IfcBuildingStorey=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcChimneyType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Ur{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcColumnType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class xo extends So{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=xo;class Bo extends xo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=Bo;class Fo extends jr{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=Fo;e.IfcConstructionEquipmentResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Mo extends po{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Mo;class Lo extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Lo;e.IfcCostItem=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCoveringType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Uo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Uo;class Ho extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Ho;e.IfcDoorLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends Jr{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Go extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Go;e.IfcElementAssembly=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class ko extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=ko;class Vo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Vo;e.IfcEllipse=class extends Fo{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=jo;e.IfcEngineType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class Qo extends Eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=Qo;class Wo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Wo;e.IfcFacetedBrepWithVoids=class extends Wo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};e.IfcFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class zo extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=zo;class Ko extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Ko;class Yo extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Yo;class Xo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Xo;class Zo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Zo;e.IfcFlowMeterType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class qo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=qo;class Jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Jo;class $o extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=$o;class en extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=en;class tn extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=tn;e.IfcFootingType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class sn extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=sn;e.IfcFurniture=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};e.IfcGrid=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};class rn extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=rn;e.IfcHeatExchangerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcIndexedPolyCurve=class extends So{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcMechanicalFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcOccupant=class extends No{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};class on extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}}e.IfcOpeningElement=on;e.IfcOpeningStandardCase=class extends on{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3079942009}};e.IfcOutletType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends Lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Do{constructor(e,t,s,i,r){super(e,t),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends So{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class nn extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=nn;e.IfcProcedure=class extends eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailingType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends bo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};class an extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=an;class ln extends Vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ln;e.IfcReinforcingMesh=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAggregates=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoofType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcShadingDeviceType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSite=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class hn extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=hn;class cn extends vo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=cn;class An extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=An;e.IfcStructuralCurveConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.Axis=h,this.type=4243806635}};class un extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=un;e.IfcStructuralCurveMemberVarying=class extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends An{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class pn extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=pn;e.IfcStructuralPointAction=class extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class dn extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=dn;e.IfcStructuralSurfaceConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends zo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class fn extends rn{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=fn;e.IfcSystemFurnitureElement=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTransformerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTrimmedCurve=class extends So{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVibrationIsolator=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcVoidingFeature=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class En extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=En;e.IfcWorkPlan=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends fn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAsset=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class mn extends So{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=yn;e.IfcBeamType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBoilerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class gn extends Bo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=gn;class In extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=In;e.IfcBuildingElementPart=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxy=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};e.IfcBurnerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends Fo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};class vn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}}e.IfcColumn=vn;e.IfcColumnStandardCase=class extends vn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=905975707}};e.IfcCommunicationsApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcCooledBeamType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiscreteAccessory=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionChamberElementType=class extends Ho{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Tn extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Tn;class _n extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=_n;class Rn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Rn;e.IfcDistributionPort=class extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Pn extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Pn;class Dn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}}e.IfcDoor=Dn;e.IfcDoorStandardCase=class extends Dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=3242481149}};e.IfcDuctFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcElectricApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Nn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Nn;e.IfcEngine=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends Qo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Cn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Cn;class On extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=On;e.IfcFlowInstrumentType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=bn;class Sn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Sn;class wn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=wn;class xn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=xn;class Bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=Bn;e.IfcFooting=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcHeatExchanger=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcLamp=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};e.IfcMedicalDevice=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};class Fn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}}e.IfcMember=Fn;e.IfcMemberStandardCase=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1911478936}};e.IfcMotorConnection=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcOuterBoundaryCurve=class extends gn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPile=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};class Mn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}}e.IfcPlate=Mn;e.IfcPlateStandardCase=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1156407060}};e.IfcProtectiveDevice=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRailing=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcingBar=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};class Ln extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}}e.IfcSlab=Ln;e.IfcSlabElementedCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3127900445}};e.IfcSlabStandardCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3027962421}};e.IfcSolarDevice=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTransformer=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTubeBundle=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Un extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Un;e.IfcWallElementedCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4156078855}};e.IfcWallStandardCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};class Hn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}}e.IfcWindow=Hn;e.IfcWindowStandardCase=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=486154966}};e.IfcActuatorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAudioVisualAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};class Gn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}}e.IfcBeam=Gn;e.IfcBeamStandardCase=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2906023776}};e.IfcBoiler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBurner=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcChiller=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcCooledBeam=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionChamberElement=class extends Rn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class kn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=kn;e.IfcDuctFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricGenerator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcProtectiveDeviceTrippingUnit=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(og||(og={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.BRAKES={type:3,value:"BRAKES"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.CREEP={type:3,value:"CREEP"},i.CURRENT={type:3,value:"CURRENT"},i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.ERECTION={type:3,value:"ERECTION"},i.FIRE={type:3,value:"FIRE"},i.ICE={type:3,value:"ICE"},i.IMPACT={type:3,value:"IMPACT"},i.IMPULSE={type:3,value:"IMPULSE"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.PROPPING={type:3,value:"PROPPING"},i.RAIN={type:3,value:"RAIN"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.SNOW_S={type:3,value:"SNOW_S"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.WAVE={type:3,value:"WAVE"},i.WIND_W={type:3,value:"WIND_W"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.HOME={type:3,value:"HOME"},n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.RAILWAYCROCODILE={type:3,value:"RAILWAYCROCODILE"},c.RAILWAYDETONATOR={type:3,value:"RAILWAYDETONATOR"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.BLOSSCURVE={type:3,value:"BLOSSCURVE"},A.CONSTANTCANT={type:3,value:"CONSTANTCANT"},A.COSINECURVE={type:3,value:"COSINECURVE"},A.HELMERTCURVE={type:3,value:"HELMERTCURVE"},A.LINEARTRANSITION={type:3,value:"LINEARTRANSITION"},A.SINECURVE={type:3,value:"SINECURVE"},A.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentCantSegmentTypeEnum=A;class u{}u.BLOSSCURVE={type:3,value:"BLOSSCURVE"},u.CIRCULARARC={type:3,value:"CIRCULARARC"},u.CLOTHOID={type:3,value:"CLOTHOID"},u.COSINECURVE={type:3,value:"COSINECURVE"},u.CUBIC={type:3,value:"CUBIC"},u.HELMERTCURVE={type:3,value:"HELMERTCURVE"},u.LINE={type:3,value:"LINE"},u.SINECURVE={type:3,value:"SINECURVE"},u.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentHorizontalSegmentTypeEnum=u;class p{}p.USERDEFINED={type:3,value:"USERDEFINED"},p.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlignmentTypeEnum=p;class d{}d.CIRCULARARC={type:3,value:"CIRCULARARC"},d.CLOTHOID={type:3,value:"CLOTHOID"},d.CONSTANTGRADIENT={type:3,value:"CONSTANTGRADIENT"},d.PARABOLICARC={type:3,value:"PARABOLICARC"},e.IfcAlignmentVerticalSegmentTypeEnum=d;class f{}f.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},f.LOADING_3D={type:3,value:"LOADING_3D"},f.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=f;class E{}E.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},E.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},E.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},E.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=E;class m{}m.ASBUILTAREA={type:3,value:"ASBUILTAREA"},m.ASBUILTLINE={type:3,value:"ASBUILTLINE"},m.ASBUILTPOINT={type:3,value:"ASBUILTPOINT"},m.ASSUMEDAREA={type:3,value:"ASSUMEDAREA"},m.ASSUMEDLINE={type:3,value:"ASSUMEDLINE"},m.ASSUMEDPOINT={type:3,value:"ASSUMEDPOINT"},m.NON_PHYSICAL_SIGNAL={type:3,value:"NON_PHYSICAL_SIGNAL"},m.SUPERELEVATIONEVENT={type:3,value:"SUPERELEVATIONEVENT"},m.WIDTHEVENT={type:3,value:"WIDTHEVENT"},m.USERDEFINED={type:3,value:"USERDEFINED"},m.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnnotationTypeEnum=m;class y{}y.ADD={type:3,value:"ADD"},y.DIVIDE={type:3,value:"DIVIDE"},y.MULTIPLY={type:3,value:"MULTIPLY"},y.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=y;class g{}g.FACTORY={type:3,value:"FACTORY"},g.SITE={type:3,value:"SITE"},g.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=g;class I{}I.AMPLIFIER={type:3,value:"AMPLIFIER"},I.CAMERA={type:3,value:"CAMERA"},I.COMMUNICATIONTERMINAL={type:3,value:"COMMUNICATIONTERMINAL"},I.DISPLAY={type:3,value:"DISPLAY"},I.MICROPHONE={type:3,value:"MICROPHONE"},I.PLAYER={type:3,value:"PLAYER"},I.PROJECTOR={type:3,value:"PROJECTOR"},I.RECEIVER={type:3,value:"RECEIVER"},I.RECORDINGEQUIPMENT={type:3,value:"RECORDINGEQUIPMENT"},I.SPEAKER={type:3,value:"SPEAKER"},I.SWITCHER={type:3,value:"SWITCHER"},I.TELEPHONE={type:3,value:"TELEPHONE"},I.TUNER={type:3,value:"TUNER"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=I;class v{}v.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},v.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},v.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},v.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},v.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},v.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=v;class T{}T.CONICAL_SURF={type:3,value:"CONICAL_SURF"},T.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},T.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},T.PLANE_SURF={type:3,value:"PLANE_SURF"},T.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},T.RULED_SURF={type:3,value:"RULED_SURF"},T.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},T.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},T.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},T.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},T.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=T;class _{}_.BEAM={type:3,value:"BEAM"},_.CORNICE={type:3,value:"CORNICE"},_.DIAPHRAGM={type:3,value:"DIAPHRAGM"},_.EDGEBEAM={type:3,value:"EDGEBEAM"},_.GIRDER_SEGMENT={type:3,value:"GIRDER_SEGMENT"},_.HATSTONE={type:3,value:"HATSTONE"},_.HOLLOWCORE={type:3,value:"HOLLOWCORE"},_.JOIST={type:3,value:"JOIST"},_.LINTEL={type:3,value:"LINTEL"},_.PIERCAP={type:3,value:"PIERCAP"},_.SPANDREL={type:3,value:"SPANDREL"},_.T_BEAM={type:3,value:"T_BEAM"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=_;class R{}R.FIXED_MOVEMENT={type:3,value:"FIXED_MOVEMENT"},R.FREE_MOVEMENT={type:3,value:"FREE_MOVEMENT"},R.GUIDED_LONGITUDINAL={type:3,value:"GUIDED_LONGITUDINAL"},R.GUIDED_TRANSVERSAL={type:3,value:"GUIDED_TRANSVERSAL"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeDisplacementEnum=R;class P{}P.CYLINDRICAL={type:3,value:"CYLINDRICAL"},P.DISK={type:3,value:"DISK"},P.ELASTOMERIC={type:3,value:"ELASTOMERIC"},P.GUIDE={type:3,value:"GUIDE"},P.POT={type:3,value:"POT"},P.ROCKER={type:3,value:"ROCKER"},P.ROLLER={type:3,value:"ROLLER"},P.SPHERICAL={type:3,value:"SPHERICAL"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeEnum=P;class D{}D.EQUALTO={type:3,value:"EQUALTO"},D.GREATERTHAN={type:3,value:"GREATERTHAN"},D.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},D.INCLUDEDIN={type:3,value:"INCLUDEDIN"},D.INCLUDES={type:3,value:"INCLUDES"},D.LESSTHAN={type:3,value:"LESSTHAN"},D.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},D.NOTEQUALTO={type:3,value:"NOTEQUALTO"},D.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},D.NOTINCLUDES={type:3,value:"NOTINCLUDES"},e.IfcBenchmarkEnum=D;class N{}N.STEAM={type:3,value:"STEAM"},N.WATER={type:3,value:"WATER"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=N;class C{}C.DIFFERENCE={type:3,value:"DIFFERENCE"},C.INTERSECTION={type:3,value:"INTERSECTION"},C.UNION={type:3,value:"UNION"},e.IfcBooleanOperator=C;class O{}O.ABUTMENT={type:3,value:"ABUTMENT"},O.DECK={type:3,value:"DECK"},O.DECK_SEGMENT={type:3,value:"DECK_SEGMENT"},O.FOUNDATION={type:3,value:"FOUNDATION"},O.PIER={type:3,value:"PIER"},O.PIER_SEGMENT={type:3,value:"PIER_SEGMENT"},O.PYLON={type:3,value:"PYLON"},O.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},O.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},O.SURFACESTRUCTURE={type:3,value:"SURFACESTRUCTURE"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgePartTypeEnum=O;class b{}b.ARCHED={type:3,value:"ARCHED"},b.CABLE_STAYED={type:3,value:"CABLE_STAYED"},b.CANTILEVER={type:3,value:"CANTILEVER"},b.CULVERT={type:3,value:"CULVERT"},b.FRAMEWORK={type:3,value:"FRAMEWORK"},b.GIRDER={type:3,value:"GIRDER"},b.SUSPENSION={type:3,value:"SUSPENSION"},b.TRUSS={type:3,value:"TRUSS"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgeTypeEnum=b;class S{}S.APRON={type:3,value:"APRON"},S.ARMOURUNIT={type:3,value:"ARMOURUNIT"},S.INSULATION={type:3,value:"INSULATION"},S.PRECASTPANEL={type:3,value:"PRECASTPANEL"},S.SAFETYCAGE={type:3,value:"SAFETYCAGE"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=S;class w{}w.COMPLEX={type:3,value:"COMPLEX"},w.ELEMENT={type:3,value:"ELEMENT"},w.PARTIAL={type:3,value:"PARTIAL"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=w;class x{}x.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},x.FENESTRATION={type:3,value:"FENESTRATION"},x.FOUNDATION={type:3,value:"FOUNDATION"},x.LOADBEARING={type:3,value:"LOADBEARING"},x.OUTERSHELL={type:3,value:"OUTERSHELL"},x.PRESTRESSING={type:3,value:"PRESTRESSING"},x.REINFORCING={type:3,value:"REINFORCING"},x.SHADING={type:3,value:"SHADING"},x.TRANSPORT={type:3,value:"TRANSPORT"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=x;class B{}B.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},B.FENESTRATION={type:3,value:"FENESTRATION"},B.FOUNDATION={type:3,value:"FOUNDATION"},B.LOADBEARING={type:3,value:"LOADBEARING"},B.MOORING={type:3,value:"MOORING"},B.OUTERSHELL={type:3,value:"OUTERSHELL"},B.PRESTRESSING={type:3,value:"PRESTRESSING"},B.RAILWAYLINE={type:3,value:"RAILWAYLINE"},B.RAILWAYTRACK={type:3,value:"RAILWAYTRACK"},B.REINFORCING={type:3,value:"REINFORCING"},B.SHADING={type:3,value:"SHADING"},B.TRACKCIRCUIT={type:3,value:"TRACKCIRCUIT"},B.TRANSPORT={type:3,value:"TRANSPORT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuiltSystemTypeEnum=B;class F{}F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=F;class M{}M.BEND={type:3,value:"BEND"},M.CONNECTOR={type:3,value:"CONNECTOR"},M.CROSS={type:3,value:"CROSS"},M.JUNCTION={type:3,value:"JUNCTION"},M.TEE={type:3,value:"TEE"},M.TRANSITION={type:3,value:"TRANSITION"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=M;class L{}L.CABLEBRACKET={type:3,value:"CABLEBRACKET"},L.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},L.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},L.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},L.CATENARYWIRE={type:3,value:"CATENARYWIRE"},L.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},L.DROPPER={type:3,value:"DROPPER"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=L;class U{}U.CONNECTOR={type:3,value:"CONNECTOR"},U.ENTRY={type:3,value:"ENTRY"},U.EXIT={type:3,value:"EXIT"},U.FANOUT={type:3,value:"FANOUT"},U.JUNCTION={type:3,value:"JUNCTION"},U.TRANSITION={type:3,value:"TRANSITION"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=U;class H{}H.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},H.CABLESEGMENT={type:3,value:"CABLESEGMENT"},H.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},H.CONTACTWIRESEGMENT={type:3,value:"CONTACTWIRESEGMENT"},H.CORESEGMENT={type:3,value:"CORESEGMENT"},H.FIBERSEGMENT={type:3,value:"FIBERSEGMENT"},H.FIBERTUBE={type:3,value:"FIBERTUBE"},H.OPTICALCABLESEGMENT={type:3,value:"OPTICALCABLESEGMENT"},H.STITCHWIRE={type:3,value:"STITCHWIRE"},H.WIREPAIRSEGMENT={type:3,value:"WIREPAIRSEGMENT"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=H;class G{}G.CAISSON={type:3,value:"CAISSON"},G.WELL={type:3,value:"WELL"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCaissonFoundationTypeEnum=G;class k{}k.ADDED={type:3,value:"ADDED"},k.DELETED={type:3,value:"DELETED"},k.MODIFIED={type:3,value:"MODIFIED"},k.NOCHANGE={type:3,value:"NOCHANGE"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=k;class V{}V.AIRCOOLED={type:3,value:"AIRCOOLED"},V.HEATRECOVERY={type:3,value:"HEATRECOVERY"},V.WATERCOOLED={type:3,value:"WATERCOOLED"},V.USERDEFINED={type:3,value:"USERDEFINED"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=V;class j{}j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=j;class Q{}Q.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},Q.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},Q.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},Q.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},Q.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},Q.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},Q.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=Q;class W{}W.COLUMN={type:3,value:"COLUMN"},W.PIERSTEM={type:3,value:"PIERSTEM"},W.PIERSTEM_SEGMENT={type:3,value:"PIERSTEM_SEGMENT"},W.PILASTER={type:3,value:"PILASTER"},W.STANDCOLUMN={type:3,value:"STANDCOLUMN"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=W;class z{}z.ANTENNA={type:3,value:"ANTENNA"},z.AUTOMATON={type:3,value:"AUTOMATON"},z.COMPUTER={type:3,value:"COMPUTER"},z.FAX={type:3,value:"FAX"},z.GATEWAY={type:3,value:"GATEWAY"},z.INTELLIGENTPERIPHERAL={type:3,value:"INTELLIGENTPERIPHERAL"},z.IPNETWORKEQUIPMENT={type:3,value:"IPNETWORKEQUIPMENT"},z.LINESIDEELECTRONICUNIT={type:3,value:"LINESIDEELECTRONICUNIT"},z.MODEM={type:3,value:"MODEM"},z.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},z.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},z.NETWORKHUB={type:3,value:"NETWORKHUB"},z.OPTICALLINETERMINAL={type:3,value:"OPTICALLINETERMINAL"},z.OPTICALNETWORKUNIT={type:3,value:"OPTICALNETWORKUNIT"},z.PRINTER={type:3,value:"PRINTER"},z.RADIOBLOCKCENTER={type:3,value:"RADIOBLOCKCENTER"},z.REPEATER={type:3,value:"REPEATER"},z.ROUTER={type:3,value:"ROUTER"},z.SCANNER={type:3,value:"SCANNER"},z.TELECOMMAND={type:3,value:"TELECOMMAND"},z.TELEPHONYEXCHANGE={type:3,value:"TELEPHONYEXCHANGE"},z.TRANSITIONCOMPONENT={type:3,value:"TRANSITIONCOMPONENT"},z.TRANSPONDER={type:3,value:"TRANSPONDER"},z.TRANSPORTEQUIPMENT={type:3,value:"TRANSPORTEQUIPMENT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=z;class K{}K.P_COMPLEX={type:3,value:"P_COMPLEX"},K.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=K;class Y{}Y.BOOSTER={type:3,value:"BOOSTER"},Y.DYNAMIC={type:3,value:"DYNAMIC"},Y.HERMETIC={type:3,value:"HERMETIC"},Y.OPENTYPE={type:3,value:"OPENTYPE"},Y.RECIPROCATING={type:3,value:"RECIPROCATING"},Y.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},Y.ROTARY={type:3,value:"ROTARY"},Y.ROTARYVANE={type:3,value:"ROTARYVANE"},Y.SCROLL={type:3,value:"SCROLL"},Y.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},Y.SINGLESCREW={type:3,value:"SINGLESCREW"},Y.SINGLESTAGE={type:3,value:"SINGLESTAGE"},Y.TROCHOIDAL={type:3,value:"TROCHOIDAL"},Y.TWINSCREW={type:3,value:"TWINSCREW"},Y.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=Y;class X{}X.AIRCOOLED={type:3,value:"AIRCOOLED"},X.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},X.WATERCOOLED={type:3,value:"WATERCOOLED"},X.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},X.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},X.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},X.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=X;class Z{}Z.ATEND={type:3,value:"ATEND"},Z.ATPATH={type:3,value:"ATPATH"},Z.ATSTART={type:3,value:"ATSTART"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=Z;class q{}q.ADVISORY={type:3,value:"ADVISORY"},q.HARD={type:3,value:"HARD"},q.SOFT={type:3,value:"SOFT"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=q;class J{}J.DEMOLISHING={type:3,value:"DEMOLISHING"},J.EARTHMOVING={type:3,value:"EARTHMOVING"},J.ERECTING={type:3,value:"ERECTING"},J.HEATING={type:3,value:"HEATING"},J.LIGHTING={type:3,value:"LIGHTING"},J.PAVING={type:3,value:"PAVING"},J.PUMPING={type:3,value:"PUMPING"},J.TRANSPORTING={type:3,value:"TRANSPORTING"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=J;class ${}$.AGGREGATES={type:3,value:"AGGREGATES"},$.CONCRETE={type:3,value:"CONCRETE"},$.DRYWALL={type:3,value:"DRYWALL"},$.FUEL={type:3,value:"FUEL"},$.GYPSUM={type:3,value:"GYPSUM"},$.MASONRY={type:3,value:"MASONRY"},$.METAL={type:3,value:"METAL"},$.PLASTIC={type:3,value:"PLASTIC"},$.WOOD={type:3,value:"WOOD"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=$;class ee{}ee.ASSEMBLY={type:3,value:"ASSEMBLY"},ee.FORMWORK={type:3,value:"FORMWORK"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=ee;class te{}te.FLOATING={type:3,value:"FLOATING"},te.MULTIPOSITION={type:3,value:"MULTIPOSITION"},te.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},te.PROPORTIONAL={type:3,value:"PROPORTIONAL"},te.TWOPOSITION={type:3,value:"TWOPOSITION"},te.USERDEFINED={type:3,value:"USERDEFINED"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=te;class se{}se.BELTCONVEYOR={type:3,value:"BELTCONVEYOR"},se.BUCKETCONVEYOR={type:3,value:"BUCKETCONVEYOR"},se.CHUTECONVEYOR={type:3,value:"CHUTECONVEYOR"},se.SCREWCONVEYOR={type:3,value:"SCREWCONVEYOR"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConveyorSegmentTypeEnum=se;class ie{}ie.ACTIVE={type:3,value:"ACTIVE"},ie.PASSIVE={type:3,value:"PASSIVE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=ie;class re{}re.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},re.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},re.NATURALDRAFT={type:3,value:"NATURALDRAFT"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=re;class oe{}oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=oe;class ne{}ne.BUDGET={type:3,value:"BUDGET"},ne.COSTPLAN={type:3,value:"COSTPLAN"},ne.ESTIMATE={type:3,value:"ESTIMATE"},ne.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},ne.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},ne.TENDER={type:3,value:"TENDER"},ne.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=ne;class ae{}ae.ARMOUR={type:3,value:"ARMOUR"},ae.BALLASTBED={type:3,value:"BALLASTBED"},ae.CORE={type:3,value:"CORE"},ae.FILTER={type:3,value:"FILTER"},ae.PAVEMENT={type:3,value:"PAVEMENT"},ae.PROTECTION={type:3,value:"PROTECTION"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCourseTypeEnum=ae;class le{}le.CEILING={type:3,value:"CEILING"},le.CLADDING={type:3,value:"CLADDING"},le.COPING={type:3,value:"COPING"},le.FLOORING={type:3,value:"FLOORING"},le.INSULATION={type:3,value:"INSULATION"},le.MEMBRANE={type:3,value:"MEMBRANE"},le.MOLDING={type:3,value:"MOLDING"},le.ROOFING={type:3,value:"ROOFING"},le.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},le.SLEEVING={type:3,value:"SLEEVING"},le.TOPPING={type:3,value:"TOPPING"},le.WRAPPING={type:3,value:"WRAPPING"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=le;class he{}he.OFFICE={type:3,value:"OFFICE"},he.SITE={type:3,value:"SITE"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=he;class ce{}ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=ce;class Ae{}Ae.LINEAR={type:3,value:"LINEAR"},Ae.LOG_LINEAR={type:3,value:"LOG_LINEAR"},Ae.LOG_LOG={type:3,value:"LOG_LOG"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=Ae;class ue{}ue.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},ue.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},ue.BLASTDAMPER={type:3,value:"BLASTDAMPER"},ue.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},ue.FIREDAMPER={type:3,value:"FIREDAMPER"},ue.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},ue.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},ue.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},ue.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},ue.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},ue.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=ue;class pe{}pe.MEASURED={type:3,value:"MEASURED"},pe.PREDICTED={type:3,value:"PREDICTED"},pe.SIMULATED={type:3,value:"SIMULATED"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=pe;class de{}de.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},de.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},de.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},de.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},de.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},de.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},de.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},de.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},de.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},de.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},de.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},de.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},de.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},de.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},de.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},de.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},de.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},de.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},de.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},de.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},de.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},de.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},de.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},de.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},de.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},de.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},de.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},de.PHUNIT={type:3,value:"PHUNIT"},de.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},de.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},de.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},de.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},de.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},de.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},de.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},de.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},de.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},de.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},de.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},de.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},de.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},de.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},de.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},de.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},de.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},de.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},de.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},de.TORQUEUNIT={type:3,value:"TORQUEUNIT"},de.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},de.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},de.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},de.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},de.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=de;class fe{}fe.NEGATIVE={type:3,value:"NEGATIVE"},fe.POSITIVE={type:3,value:"POSITIVE"},e.IfcDirectionSenseEnum=fe;class Ee{}Ee.ANCHORPLATE={type:3,value:"ANCHORPLATE"},Ee.BIRDPROTECTION={type:3,value:"BIRDPROTECTION"},Ee.BRACKET={type:3,value:"BRACKET"},Ee.CABLEARRANGER={type:3,value:"CABLEARRANGER"},Ee.ELASTIC_CUSHION={type:3,value:"ELASTIC_CUSHION"},Ee.EXPANSION_JOINT_DEVICE={type:3,value:"EXPANSION_JOINT_DEVICE"},Ee.FILLER={type:3,value:"FILLER"},Ee.FLASHING={type:3,value:"FLASHING"},Ee.INSULATOR={type:3,value:"INSULATOR"},Ee.LOCK={type:3,value:"LOCK"},Ee.PANEL_STRENGTHENING={type:3,value:"PANEL_STRENGTHENING"},Ee.POINTMACHINEMOUNTINGDEVICE={type:3,value:"POINTMACHINEMOUNTINGDEVICE"},Ee.POINT_MACHINE_LOCKING_DEVICE={type:3,value:"POINT_MACHINE_LOCKING_DEVICE"},Ee.RAILBRACE={type:3,value:"RAILBRACE"},Ee.RAILPAD={type:3,value:"RAILPAD"},Ee.RAIL_LUBRICATION={type:3,value:"RAIL_LUBRICATION"},Ee.RAIL_MECHANICAL_EQUIPMENT={type:3,value:"RAIL_MECHANICAL_EQUIPMENT"},Ee.SHOE={type:3,value:"SHOE"},Ee.SLIDINGCHAIR={type:3,value:"SLIDINGCHAIR"},Ee.SOUNDABSORPTION={type:3,value:"SOUNDABSORPTION"},Ee.TENSIONINGEQUIPMENT={type:3,value:"TENSIONINGEQUIPMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=Ee;class me{}me.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},me.DISPATCHINGBOARD={type:3,value:"DISPATCHINGBOARD"},me.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},me.DISTRIBUTIONFRAME={type:3,value:"DISTRIBUTIONFRAME"},me.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},me.SWITCHBOARD={type:3,value:"SWITCHBOARD"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionBoardTypeEnum=me;class ye{}ye.FORMEDDUCT={type:3,value:"FORMEDDUCT"},ye.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},ye.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},ye.MANHOLE={type:3,value:"MANHOLE"},ye.METERCHAMBER={type:3,value:"METERCHAMBER"},ye.SUMP={type:3,value:"SUMP"},ye.TRENCH={type:3,value:"TRENCH"},ye.VALVECHAMBER={type:3,value:"VALVECHAMBER"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=ye;class ge{}ge.CABLE={type:3,value:"CABLE"},ge.CABLECARRIER={type:3,value:"CABLECARRIER"},ge.DUCT={type:3,value:"DUCT"},ge.PIPE={type:3,value:"PIPE"},ge.WIRELESS={type:3,value:"WIRELESS"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=ge;class Ie{}Ie.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},Ie.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},Ie.CATENARY_SYSTEM={type:3,value:"CATENARY_SYSTEM"},Ie.CHEMICAL={type:3,value:"CHEMICAL"},Ie.CHILLEDWATER={type:3,value:"CHILLEDWATER"},Ie.COMMUNICATION={type:3,value:"COMMUNICATION"},Ie.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},Ie.CONDENSERWATER={type:3,value:"CONDENSERWATER"},Ie.CONTROL={type:3,value:"CONTROL"},Ie.CONVEYING={type:3,value:"CONVEYING"},Ie.DATA={type:3,value:"DATA"},Ie.DISPOSAL={type:3,value:"DISPOSAL"},Ie.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},Ie.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},Ie.DRAINAGE={type:3,value:"DRAINAGE"},Ie.EARTHING={type:3,value:"EARTHING"},Ie.ELECTRICAL={type:3,value:"ELECTRICAL"},Ie.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},Ie.EXHAUST={type:3,value:"EXHAUST"},Ie.FIREPROTECTION={type:3,value:"FIREPROTECTION"},Ie.FIXEDTRANSMISSIONNETWORK={type:3,value:"FIXEDTRANSMISSIONNETWORK"},Ie.FUEL={type:3,value:"FUEL"},Ie.GAS={type:3,value:"GAS"},Ie.HAZARDOUS={type:3,value:"HAZARDOUS"},Ie.HEATING={type:3,value:"HEATING"},Ie.LIGHTING={type:3,value:"LIGHTING"},Ie.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},Ie.MOBILENETWORK={type:3,value:"MOBILENETWORK"},Ie.MONITORINGSYSTEM={type:3,value:"MONITORINGSYSTEM"},Ie.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},Ie.OIL={type:3,value:"OIL"},Ie.OPERATIONAL={type:3,value:"OPERATIONAL"},Ie.OPERATIONALTELEPHONYSYSTEM={type:3,value:"OPERATIONALTELEPHONYSYSTEM"},Ie.OVERHEAD_CONTACTLINE_SYSTEM={type:3,value:"OVERHEAD_CONTACTLINE_SYSTEM"},Ie.POWERGENERATION={type:3,value:"POWERGENERATION"},Ie.RAINWATER={type:3,value:"RAINWATER"},Ie.REFRIGERATION={type:3,value:"REFRIGERATION"},Ie.RETURN_CIRCUIT={type:3,value:"RETURN_CIRCUIT"},Ie.SECURITY={type:3,value:"SECURITY"},Ie.SEWAGE={type:3,value:"SEWAGE"},Ie.SIGNAL={type:3,value:"SIGNAL"},Ie.STORMWATER={type:3,value:"STORMWATER"},Ie.TELEPHONE={type:3,value:"TELEPHONE"},Ie.TV={type:3,value:"TV"},Ie.VACUUM={type:3,value:"VACUUM"},Ie.VENT={type:3,value:"VENT"},Ie.VENTILATION={type:3,value:"VENTILATION"},Ie.WASTEWATER={type:3,value:"WASTEWATER"},Ie.WATERSUPPLY={type:3,value:"WATERSUPPLY"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=Ie;class ve{}ve.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ve.PERSONAL={type:3,value:"PERSONAL"},ve.PUBLIC={type:3,value:"PUBLIC"},ve.RESTRICTED={type:3,value:"RESTRICTED"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ve;class Te{}Te.DRAFT={type:3,value:"DRAFT"},Te.FINAL={type:3,value:"FINAL"},Te.FINALDRAFT={type:3,value:"FINALDRAFT"},Te.REVISION={type:3,value:"REVISION"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=Te;class _e{}_e.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},_e.FIXEDPANEL={type:3,value:"FIXEDPANEL"},_e.FOLDING={type:3,value:"FOLDING"},_e.REVOLVING={type:3,value:"REVOLVING"},_e.ROLLINGUP={type:3,value:"ROLLINGUP"},_e.SLIDING={type:3,value:"SLIDING"},_e.SWINGING={type:3,value:"SWINGING"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=_e;class Re{}Re.LEFT={type:3,value:"LEFT"},Re.MIDDLE={type:3,value:"MIDDLE"},Re.RIGHT={type:3,value:"RIGHT"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Re;class Pe{}Pe.ALUMINIUM={type:3,value:"ALUMINIUM"},Pe.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Pe.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Pe.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Pe.PLASTIC={type:3,value:"PLASTIC"},Pe.STEEL={type:3,value:"STEEL"},Pe.WOOD={type:3,value:"WOOD"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Pe;class De{}De.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},De.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},De.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},De.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},De.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},De.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},De.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},De.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},De.REVOLVING={type:3,value:"REVOLVING"},De.ROLLINGUP={type:3,value:"ROLLINGUP"},De.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},De.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},De.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},De.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=De;class Ne{}Ne.BOOM_BARRIER={type:3,value:"BOOM_BARRIER"},Ne.DOOR={type:3,value:"DOOR"},Ne.GATE={type:3,value:"GATE"},Ne.TRAPDOOR={type:3,value:"TRAPDOOR"},Ne.TURNSTILE={type:3,value:"TURNSTILE"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=Ne;class Ce{}Ce.DOUBLE_PANEL_DOUBLE_SWING={type:3,value:"DOUBLE_PANEL_DOUBLE_SWING"},Ce.DOUBLE_PANEL_FOLDING={type:3,value:"DOUBLE_PANEL_FOLDING"},Ce.DOUBLE_PANEL_LIFTING_VERTICAL={type:3,value:"DOUBLE_PANEL_LIFTING_VERTICAL"},Ce.DOUBLE_PANEL_SINGLE_SWING={type:3,value:"DOUBLE_PANEL_SINGLE_SWING"},Ce.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT"},Ce.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT"},Ce.DOUBLE_PANEL_SLIDING={type:3,value:"DOUBLE_PANEL_SLIDING"},Ce.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Ce.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Ce.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Ce.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Ce.LIFTING_HORIZONTAL={type:3,value:"LIFTING_HORIZONTAL"},Ce.LIFTING_VERTICAL_LEFT={type:3,value:"LIFTING_VERTICAL_LEFT"},Ce.LIFTING_VERTICAL_RIGHT={type:3,value:"LIFTING_VERTICAL_RIGHT"},Ce.REVOLVING_HORIZONTAL={type:3,value:"REVOLVING_HORIZONTAL"},Ce.REVOLVING_VERTICAL={type:3,value:"REVOLVING_VERTICAL"},Ce.ROLLINGUP={type:3,value:"ROLLINGUP"},Ce.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Ce.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Ce.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Ce.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Ce.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},Ce.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=Ce;class Oe{}Oe.BEND={type:3,value:"BEND"},Oe.CONNECTOR={type:3,value:"CONNECTOR"},Oe.ENTRY={type:3,value:"ENTRY"},Oe.EXIT={type:3,value:"EXIT"},Oe.JUNCTION={type:3,value:"JUNCTION"},Oe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Oe.TRANSITION={type:3,value:"TRANSITION"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=Oe;class be{}be.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},be.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=be;class Se{}Se.FLATOVAL={type:3,value:"FLATOVAL"},Se.RECTANGULAR={type:3,value:"RECTANGULAR"},Se.ROUND={type:3,value:"ROUND"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=Se;class we{}we.BASE_EXCAVATION={type:3,value:"BASE_EXCAVATION"},we.CUT={type:3,value:"CUT"},we.DREDGING={type:3,value:"DREDGING"},we.EXCAVATION={type:3,value:"EXCAVATION"},we.OVEREXCAVATION={type:3,value:"OVEREXCAVATION"},we.PAVEMENTMILLING={type:3,value:"PAVEMENTMILLING"},we.STEPEXCAVATION={type:3,value:"STEPEXCAVATION"},we.TOPSOILREMOVAL={type:3,value:"TOPSOILREMOVAL"},we.TRENCH={type:3,value:"TRENCH"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksCutTypeEnum=we;class xe{}xe.BACKFILL={type:3,value:"BACKFILL"},xe.COUNTERWEIGHT={type:3,value:"COUNTERWEIGHT"},xe.EMBANKMENT={type:3,value:"EMBANKMENT"},xe.SLOPEFILL={type:3,value:"SLOPEFILL"},xe.SUBGRADE={type:3,value:"SUBGRADE"},xe.SUBGRADEBED={type:3,value:"SUBGRADEBED"},xe.TRANSITIONSECTION={type:3,value:"TRANSITIONSECTION"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksFillTypeEnum=xe;class Be{}Be.DISHWASHER={type:3,value:"DISHWASHER"},Be.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},Be.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},Be.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},Be.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},Be.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},Be.FREEZER={type:3,value:"FREEZER"},Be.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},Be.HANDDRYER={type:3,value:"HANDDRYER"},Be.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},Be.MICROWAVE={type:3,value:"MICROWAVE"},Be.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},Be.REFRIGERATOR={type:3,value:"REFRIGERATOR"},Be.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},Be.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},Be.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=Be;class Fe{}Fe.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},Fe.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},Fe.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},Fe.SWITCHBOARD={type:3,value:"SWITCHBOARD"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=Fe;class Me{}Me.BATTERY={type:3,value:"BATTERY"},Me.CAPACITOR={type:3,value:"CAPACITOR"},Me.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Me.COMPENSATOR={type:3,value:"COMPENSATOR"},Me.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Me.INDUCTOR={type:3,value:"INDUCTOR"},Me.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Me.RECHARGER={type:3,value:"RECHARGER"},Me.UPS={type:3,value:"UPS"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Me;class Le{}Le.ELECTRONICFILTER={type:3,value:"ELECTRONICFILTER"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowTreatmentDeviceTypeEnum=Le;class Ue{}Ue.CHP={type:3,value:"CHP"},Ue.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},Ue.STANDALONE={type:3,value:"STANDALONE"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=Ue;class He{}He.DC={type:3,value:"DC"},He.INDUCTION={type:3,value:"INDUCTION"},He.POLYPHASE={type:3,value:"POLYPHASE"},He.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},He.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=He;class Ge{}Ge.RELAY={type:3,value:"RELAY"},Ge.TIMECLOCK={type:3,value:"TIMECLOCK"},Ge.TIMEDELAY={type:3,value:"TIMEDELAY"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=Ge;class ke{}ke.ABUTMENT={type:3,value:"ABUTMENT"},ke.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},ke.ARCH={type:3,value:"ARCH"},ke.BEAM_GRID={type:3,value:"BEAM_GRID"},ke.BRACED_FRAME={type:3,value:"BRACED_FRAME"},ke.CROSS_BRACING={type:3,value:"CROSS_BRACING"},ke.DECK={type:3,value:"DECK"},ke.DILATATIONPANEL={type:3,value:"DILATATIONPANEL"},ke.ENTRANCEWORKS={type:3,value:"ENTRANCEWORKS"},ke.GIRDER={type:3,value:"GIRDER"},ke.GRID={type:3,value:"GRID"},ke.MAST={type:3,value:"MAST"},ke.PIER={type:3,value:"PIER"},ke.PYLON={type:3,value:"PYLON"},ke.RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY={type:3,value:"RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY"},ke.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},ke.RIGID_FRAME={type:3,value:"RIGID_FRAME"},ke.SHELTER={type:3,value:"SHELTER"},ke.SIGNALASSEMBLY={type:3,value:"SIGNALASSEMBLY"},ke.SLAB_FIELD={type:3,value:"SLAB_FIELD"},ke.SUMPBUSTER={type:3,value:"SUMPBUSTER"},ke.SUPPORTINGASSEMBLY={type:3,value:"SUPPORTINGASSEMBLY"},ke.SUSPENSIONASSEMBLY={type:3,value:"SUSPENSIONASSEMBLY"},ke.TRACKPANEL={type:3,value:"TRACKPANEL"},ke.TRACTION_SWITCHING_ASSEMBLY={type:3,value:"TRACTION_SWITCHING_ASSEMBLY"},ke.TRAFFIC_CALMING_DEVICE={type:3,value:"TRAFFIC_CALMING_DEVICE"},ke.TRUSS={type:3,value:"TRUSS"},ke.TURNOUTPANEL={type:3,value:"TURNOUTPANEL"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=ke;class Ve{}Ve.COMPLEX={type:3,value:"COMPLEX"},Ve.ELEMENT={type:3,value:"ELEMENT"},Ve.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Ve;class je{}je.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},je.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=je;class Qe{}Qe.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Qe.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Qe.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Qe.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Qe.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Qe.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Qe.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Qe;class We{}We.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},We.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},We.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},We.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},We.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},We.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=We;class ze{}ze.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},ze.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},ze.EVENTRULE={type:3,value:"EVENTRULE"},ze.EVENTTIME={type:3,value:"EVENTTIME"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=ze;class Ke{}Ke.ENDEVENT={type:3,value:"ENDEVENT"},Ke.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Ke.STARTEVENT={type:3,value:"STARTEVENT"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Ke;class Ye{}Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Ye;class Xe{}Xe.ABOVEGROUND={type:3,value:"ABOVEGROUND"},Xe.BELOWGROUND={type:3,value:"BELOWGROUND"},Xe.JUNCTION={type:3,value:"JUNCTION"},Xe.LEVELCROSSING={type:3,value:"LEVELCROSSING"},Xe.SEGMENT={type:3,value:"SEGMENT"},Xe.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},Xe.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},Xe.TERMINAL={type:3,value:"TERMINAL"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityPartCommonTypeEnum=Xe;class Ze{}Ze.LATERAL={type:3,value:"LATERAL"},Ze.LONGITUDINAL={type:3,value:"LONGITUDINAL"},Ze.REGION={type:3,value:"REGION"},Ze.VERTICAL={type:3,value:"VERTICAL"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityUsageEnum=Ze;class qe{}qe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},qe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},qe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},qe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},qe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},qe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},qe.VANEAXIAL={type:3,value:"VANEAXIAL"},qe.USERDEFINED={type:3,value:"USERDEFINED"},qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=qe;class Je{}Je.GLUE={type:3,value:"GLUE"},Je.MORTAR={type:3,value:"MORTAR"},Je.WELD={type:3,value:"WELD"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=Je;class $e{}$e.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},$e.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},$e.ODORFILTER={type:3,value:"ODORFILTER"},$e.OILFILTER={type:3,value:"OILFILTER"},$e.STRAINER={type:3,value:"STRAINER"},$e.WATERFILTER={type:3,value:"WATERFILTER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=$e;class et{}et.BREECHINGINLET={type:3,value:"BREECHINGINLET"},et.FIREHYDRANT={type:3,value:"FIREHYDRANT"},et.FIREMONITOR={type:3,value:"FIREMONITOR"},et.HOSEREEL={type:3,value:"HOSEREEL"},et.SPRINKLER={type:3,value:"SPRINKLER"},et.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},et.USERDEFINED={type:3,value:"USERDEFINED"},et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=et;class tt{}tt.SINK={type:3,value:"SINK"},tt.SOURCE={type:3,value:"SOURCE"},tt.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=tt;class st{}st.AMMETER={type:3,value:"AMMETER"},st.COMBINED={type:3,value:"COMBINED"},st.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},st.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},st.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},st.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},st.THERMOMETER={type:3,value:"THERMOMETER"},st.VOLTMETER={type:3,value:"VOLTMETER"},st.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},st.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=st;class it{}it.ENERGYMETER={type:3,value:"ENERGYMETER"},it.GASMETER={type:3,value:"GASMETER"},it.OILMETER={type:3,value:"OILMETER"},it.WATERMETER={type:3,value:"WATERMETER"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=it;class rt{}rt.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},rt.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},rt.PAD_FOOTING={type:3,value:"PAD_FOOTING"},rt.PILE_CAP={type:3,value:"PILE_CAP"},rt.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=rt;class ot{}ot.BED={type:3,value:"BED"},ot.CHAIR={type:3,value:"CHAIR"},ot.DESK={type:3,value:"DESK"},ot.FILECABINET={type:3,value:"FILECABINET"},ot.SHELF={type:3,value:"SHELF"},ot.SOFA={type:3,value:"SOFA"},ot.TABLE={type:3,value:"TABLE"},ot.TECHNICALCABINET={type:3,value:"TECHNICALCABINET"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=ot;class nt{}nt.SOIL_BORING_POINT={type:3,value:"SOIL_BORING_POINT"},nt.TERRAIN={type:3,value:"TERRAIN"},nt.VEGETATION={type:3,value:"VEGETATION"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=nt;class at{}at.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},at.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},at.MODEL_VIEW={type:3,value:"MODEL_VIEW"},at.PLAN_VIEW={type:3,value:"PLAN_VIEW"},at.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},at.SECTION_VIEW={type:3,value:"SECTION_VIEW"},at.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=at;class lt{}lt.SOLID={type:3,value:"SOLID"},lt.VOID={type:3,value:"VOID"},lt.WATER={type:3,value:"WATER"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeotechnicalStratumTypeEnum=lt;class ht{}ht.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},ht.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=ht;class ct{}ct.IRREGULAR={type:3,value:"IRREGULAR"},ct.RADIAL={type:3,value:"RADIAL"},ct.RECTANGULAR={type:3,value:"RECTANGULAR"},ct.TRIANGULAR={type:3,value:"TRIANGULAR"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=ct;class At{}At.PLATE={type:3,value:"PLATE"},At.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},At.TURNOUTHEATING={type:3,value:"TURNOUTHEATING"},At.USERDEFINED={type:3,value:"USERDEFINED"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=At;class ut{}ut.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ut.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ut.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ut.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ut.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ut.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ut.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ut.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ut.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ut.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ut.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ut.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ut.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ut;class pt{}pt.BUMPER={type:3,value:"BUMPER"},pt.CRASHCUSHION={type:3,value:"CRASHCUSHION"},pt.DAMPINGSYSTEM={type:3,value:"DAMPINGSYSTEM"},pt.FENDER={type:3,value:"FENDER"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcImpactProtectionDeviceTypeEnum=pt;class dt{}dt.CYCLONIC={type:3,value:"CYCLONIC"},dt.GREASE={type:3,value:"GREASE"},dt.OIL={type:3,value:"OIL"},dt.PETROL={type:3,value:"PETROL"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=dt;class ft{}ft.EXTERNAL={type:3,value:"EXTERNAL"},ft.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},ft.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},ft.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},ft.INTERNAL={type:3,value:"INTERNAL"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=ft;class Et{}Et.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Et.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Et.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Et;class mt{}mt.DATA={type:3,value:"DATA"},mt.POWER={type:3,value:"POWER"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=mt;class yt{}yt.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},yt.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},yt.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},yt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=yt;class gt{}gt.ADMINISTRATION={type:3,value:"ADMINISTRATION"},gt.CARPENTRY={type:3,value:"CARPENTRY"},gt.CLEANING={type:3,value:"CLEANING"},gt.CONCRETE={type:3,value:"CONCRETE"},gt.DRYWALL={type:3,value:"DRYWALL"},gt.ELECTRIC={type:3,value:"ELECTRIC"},gt.FINISHING={type:3,value:"FINISHING"},gt.FLOORING={type:3,value:"FLOORING"},gt.GENERAL={type:3,value:"GENERAL"},gt.HVAC={type:3,value:"HVAC"},gt.LANDSCAPING={type:3,value:"LANDSCAPING"},gt.MASONRY={type:3,value:"MASONRY"},gt.PAINTING={type:3,value:"PAINTING"},gt.PAVING={type:3,value:"PAVING"},gt.PLUMBING={type:3,value:"PLUMBING"},gt.ROOFING={type:3,value:"ROOFING"},gt.SITEGRADING={type:3,value:"SITEGRADING"},gt.STEELWORK={type:3,value:"STEELWORK"},gt.SURVEYING={type:3,value:"SURVEYING"},gt.USERDEFINED={type:3,value:"USERDEFINED"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=gt;class It{}It.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},It.FLUORESCENT={type:3,value:"FLUORESCENT"},It.HALOGEN={type:3,value:"HALOGEN"},It.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},It.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},It.LED={type:3,value:"LED"},It.METALHALIDE={type:3,value:"METALHALIDE"},It.OLED={type:3,value:"OLED"},It.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=It;class vt{}vt.AXIS1={type:3,value:"AXIS1"},vt.AXIS2={type:3,value:"AXIS2"},vt.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=vt;class Tt{}Tt.TYPE_A={type:3,value:"TYPE_A"},Tt.TYPE_B={type:3,value:"TYPE_B"},Tt.TYPE_C={type:3,value:"TYPE_C"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Tt;class _t{}_t.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},_t.FLUORESCENT={type:3,value:"FLUORESCENT"},_t.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},_t.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},_t.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},_t.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},_t.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},_t.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},_t.METALHALIDE={type:3,value:"METALHALIDE"},_t.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=_t;class Rt{}Rt.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},Rt.POINTSOURCE={type:3,value:"POINTSOURCE"},Rt.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=Rt;class Pt{}Pt.HOSEREEL={type:3,value:"HOSEREEL"},Pt.LOADINGARM={type:3,value:"LOADINGARM"},Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLiquidTerminalTypeEnum=Pt;class Dt{}Dt.LOAD_CASE={type:3,value:"LOAD_CASE"},Dt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Dt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Dt;class Nt{}Nt.LOGICALAND={type:3,value:"LOGICALAND"},Nt.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},Nt.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},Nt.LOGICALOR={type:3,value:"LOGICALOR"},Nt.LOGICALXOR={type:3,value:"LOGICALXOR"},e.IfcLogicalOperatorEnum=Nt;class Ct{}Ct.BARRIERBEACH={type:3,value:"BARRIERBEACH"},Ct.BREAKWATER={type:3,value:"BREAKWATER"},Ct.CANAL={type:3,value:"CANAL"},Ct.DRYDOCK={type:3,value:"DRYDOCK"},Ct.FLOATINGDOCK={type:3,value:"FLOATINGDOCK"},Ct.HYDROLIFT={type:3,value:"HYDROLIFT"},Ct.JETTY={type:3,value:"JETTY"},Ct.LAUNCHRECOVERY={type:3,value:"LAUNCHRECOVERY"},Ct.MARINEDEFENCE={type:3,value:"MARINEDEFENCE"},Ct.NAVIGATIONALCHANNEL={type:3,value:"NAVIGATIONALCHANNEL"},Ct.PORT={type:3,value:"PORT"},Ct.QUAY={type:3,value:"QUAY"},Ct.REVETMENT={type:3,value:"REVETMENT"},Ct.SHIPLIFT={type:3,value:"SHIPLIFT"},Ct.SHIPLOCK={type:3,value:"SHIPLOCK"},Ct.SHIPYARD={type:3,value:"SHIPYARD"},Ct.SLIPWAY={type:3,value:"SLIPWAY"},Ct.WATERWAY={type:3,value:"WATERWAY"},Ct.WATERWAYSHIPLIFT={type:3,value:"WATERWAYSHIPLIFT"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarineFacilityTypeEnum=Ct;class Ot{}Ot.ABOVEWATERLINE={type:3,value:"ABOVEWATERLINE"},Ot.ANCHORAGE={type:3,value:"ANCHORAGE"},Ot.APPROACHCHANNEL={type:3,value:"APPROACHCHANNEL"},Ot.BELOWWATERLINE={type:3,value:"BELOWWATERLINE"},Ot.BERTHINGSTRUCTURE={type:3,value:"BERTHINGSTRUCTURE"},Ot.CHAMBER={type:3,value:"CHAMBER"},Ot.CILL_LEVEL={type:3,value:"CILL_LEVEL"},Ot.COPELEVEL={type:3,value:"COPELEVEL"},Ot.CORE={type:3,value:"CORE"},Ot.CREST={type:3,value:"CREST"},Ot.GATEHEAD={type:3,value:"GATEHEAD"},Ot.GUDINGSTRUCTURE={type:3,value:"GUDINGSTRUCTURE"},Ot.HIGHWATERLINE={type:3,value:"HIGHWATERLINE"},Ot.LANDFIELD={type:3,value:"LANDFIELD"},Ot.LEEWARDSIDE={type:3,value:"LEEWARDSIDE"},Ot.LOWWATERLINE={type:3,value:"LOWWATERLINE"},Ot.MANUFACTURING={type:3,value:"MANUFACTURING"},Ot.NAVIGATIONALAREA={type:3,value:"NAVIGATIONALAREA"},Ot.PROTECTION={type:3,value:"PROTECTION"},Ot.SHIPTRANSFER={type:3,value:"SHIPTRANSFER"},Ot.STORAGEAREA={type:3,value:"STORAGEAREA"},Ot.VEHICLESERVICING={type:3,value:"VEHICLESERVICING"},Ot.WATERFIELD={type:3,value:"WATERFIELD"},Ot.WEATHERSIDE={type:3,value:"WEATHERSIDE"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarinePartTypeEnum=Ot;class bt{}bt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},bt.BOLT={type:3,value:"BOLT"},bt.CHAIN={type:3,value:"CHAIN"},bt.COUPLER={type:3,value:"COUPLER"},bt.DOWEL={type:3,value:"DOWEL"},bt.NAIL={type:3,value:"NAIL"},bt.NAILPLATE={type:3,value:"NAILPLATE"},bt.RAILFASTENING={type:3,value:"RAILFASTENING"},bt.RAILJOINT={type:3,value:"RAILJOINT"},bt.RIVET={type:3,value:"RIVET"},bt.ROPE={type:3,value:"ROPE"},bt.SCREW={type:3,value:"SCREW"},bt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},bt.STAPLE={type:3,value:"STAPLE"},bt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=bt;class St{}St.AIRSTATION={type:3,value:"AIRSTATION"},St.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},St.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},St.OXYGENPLANT={type:3,value:"OXYGENPLANT"},St.VACUUMSTATION={type:3,value:"VACUUMSTATION"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=St;class wt{}wt.ARCH_SEGMENT={type:3,value:"ARCH_SEGMENT"},wt.BRACE={type:3,value:"BRACE"},wt.CHORD={type:3,value:"CHORD"},wt.COLLAR={type:3,value:"COLLAR"},wt.MEMBER={type:3,value:"MEMBER"},wt.MULLION={type:3,value:"MULLION"},wt.PLATE={type:3,value:"PLATE"},wt.POST={type:3,value:"POST"},wt.PURLIN={type:3,value:"PURLIN"},wt.RAFTER={type:3,value:"RAFTER"},wt.STAY_CABLE={type:3,value:"STAY_CABLE"},wt.STIFFENING_RIB={type:3,value:"STIFFENING_RIB"},wt.STRINGER={type:3,value:"STRINGER"},wt.STRUCTURALCABLE={type:3,value:"STRUCTURALCABLE"},wt.STRUT={type:3,value:"STRUT"},wt.STUD={type:3,value:"STUD"},wt.SUSPENDER={type:3,value:"SUSPENDER"},wt.SUSPENSION_CABLE={type:3,value:"SUSPENSION_CABLE"},wt.TIEBAR={type:3,value:"TIEBAR"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=wt;class xt{}xt.ACCESSPOINT={type:3,value:"ACCESSPOINT"},xt.BASEBANDUNIT={type:3,value:"BASEBANDUNIT"},xt.BASETRANSCEIVERSTATION={type:3,value:"BASETRANSCEIVERSTATION"},xt.E_UTRAN_NODE_B={type:3,value:"E_UTRAN_NODE_B"},xt.GATEWAY_GPRS_SUPPORT_NODE={type:3,value:"GATEWAY_GPRS_SUPPORT_NODE"},xt.MASTERUNIT={type:3,value:"MASTERUNIT"},xt.MOBILESWITCHINGCENTER={type:3,value:"MOBILESWITCHINGCENTER"},xt.MSCSERVER={type:3,value:"MSCSERVER"},xt.PACKETCONTROLUNIT={type:3,value:"PACKETCONTROLUNIT"},xt.REMOTERADIOUNIT={type:3,value:"REMOTERADIOUNIT"},xt.REMOTEUNIT={type:3,value:"REMOTEUNIT"},xt.SERVICE_GPRS_SUPPORT_NODE={type:3,value:"SERVICE_GPRS_SUPPORT_NODE"},xt.SUBSCRIBERSERVER={type:3,value:"SUBSCRIBERSERVER"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMobileTelecommunicationsApplianceTypeEnum=xt;class Bt{}Bt.BOLLARD={type:3,value:"BOLLARD"},Bt.LINETENSIONER={type:3,value:"LINETENSIONER"},Bt.MAGNETICDEVICE={type:3,value:"MAGNETICDEVICE"},Bt.MOORINGHOOKS={type:3,value:"MOORINGHOOKS"},Bt.VACUUMDEVICE={type:3,value:"VACUUMDEVICE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMooringDeviceTypeEnum=Bt;class Ft{}Ft.BELTDRIVE={type:3,value:"BELTDRIVE"},Ft.COUPLING={type:3,value:"COUPLING"},Ft.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Ft;class Mt{}Mt.BEACON={type:3,value:"BEACON"},Mt.BUOY={type:3,value:"BUOY"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcNavigationElementTypeEnum=Mt;class Lt{}Lt.ACTOR={type:3,value:"ACTOR"},Lt.CONTROL={type:3,value:"CONTROL"},Lt.GROUP={type:3,value:"GROUP"},Lt.PROCESS={type:3,value:"PROCESS"},Lt.PRODUCT={type:3,value:"PRODUCT"},Lt.PROJECT={type:3,value:"PROJECT"},Lt.RESOURCE={type:3,value:"RESOURCE"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=Lt;class Ut{}Ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ut.CODEWAIVER={type:3,value:"CODEWAIVER"},Ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ut.EXTERNAL={type:3,value:"EXTERNAL"},Ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},Ut.MODELVIEW={type:3,value:"MODELVIEW"},Ut.PARAMETER={type:3,value:"PARAMETER"},Ut.REQUIREMENT={type:3,value:"REQUIREMENT"},Ut.SPECIFICATION={type:3,value:"SPECIFICATION"},Ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ut;class Ht{}Ht.ASSIGNEE={type:3,value:"ASSIGNEE"},Ht.ASSIGNOR={type:3,value:"ASSIGNOR"},Ht.LESSEE={type:3,value:"LESSEE"},Ht.LESSOR={type:3,value:"LESSOR"},Ht.LETTINGAGENT={type:3,value:"LETTINGAGENT"},Ht.OWNER={type:3,value:"OWNER"},Ht.TENANT={type:3,value:"TENANT"},Ht.USERDEFINED={type:3,value:"USERDEFINED"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=Ht;class Gt{}Gt.OPENING={type:3,value:"OPENING"},Gt.RECESS={type:3,value:"RECESS"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=Gt;class kt{}kt.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},kt.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},kt.DATAOUTLET={type:3,value:"DATAOUTLET"},kt.POWEROUTLET={type:3,value:"POWEROUTLET"},kt.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=kt;class Vt{}Vt.FLEXIBLE={type:3,value:"FLEXIBLE"},Vt.RIGID={type:3,value:"RIGID"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPavementTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=jt;class Qt{}Qt.GRILL={type:3,value:"GRILL"},Qt.LOUVER={type:3,value:"LOUVER"},Qt.SCREEN={type:3,value:"SCREEN"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=Qt;class Wt{}Wt.ACCESS={type:3,value:"ACCESS"},Wt.BUILDING={type:3,value:"BUILDING"},Wt.WORK={type:3,value:"WORK"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=Wt;class zt{}zt.PHYSICAL={type:3,value:"PHYSICAL"},zt.VIRTUAL={type:3,value:"VIRTUAL"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=zt;class Kt{}Kt.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},Kt.COMPOSITE={type:3,value:"COMPOSITE"},Kt.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},Kt.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},Kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=Kt;class Yt{}Yt.BORED={type:3,value:"BORED"},Yt.COHESION={type:3,value:"COHESION"},Yt.DRIVEN={type:3,value:"DRIVEN"},Yt.FRICTION={type:3,value:"FRICTION"},Yt.JETGROUTING={type:3,value:"JETGROUTING"},Yt.SUPPORT={type:3,value:"SUPPORT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=Yt;class Xt{}Xt.BEND={type:3,value:"BEND"},Xt.CONNECTOR={type:3,value:"CONNECTOR"},Xt.ENTRY={type:3,value:"ENTRY"},Xt.EXIT={type:3,value:"EXIT"},Xt.JUNCTION={type:3,value:"JUNCTION"},Xt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Xt.TRANSITION={type:3,value:"TRANSITION"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Xt;class Zt{}Zt.CULVERT={type:3,value:"CULVERT"},Zt.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Zt.GUTTER={type:3,value:"GUTTER"},Zt.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Zt.SPOOL={type:3,value:"SPOOL"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Zt;class qt{}qt.BASE_PLATE={type:3,value:"BASE_PLATE"},qt.COVER_PLATE={type:3,value:"COVER_PLATE"},qt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},qt.FLANGE_PLATE={type:3,value:"FLANGE_PLATE"},qt.GUSSET_PLATE={type:3,value:"GUSSET_PLATE"},qt.SHEET={type:3,value:"SHEET"},qt.SPLICE_PLATE={type:3,value:"SPLICE_PLATE"},qt.STIFFENER_PLATE={type:3,value:"STIFFENER_PLATE"},qt.WEB_PLATE={type:3,value:"WEB_PLATE"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=qt;class Jt{}Jt.CURVE3D={type:3,value:"CURVE3D"},Jt.PCURVE_S1={type:3,value:"PCURVE_S1"},Jt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Jt;class $t{}$t.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},$t.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},$t.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},$t.CALIBRATION={type:3,value:"CALIBRATION"},$t.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},$t.SHUTDOWN={type:3,value:"SHUTDOWN"},$t.STARTUP={type:3,value:"STARTUP"},$t.USERDEFINED={type:3,value:"USERDEFINED"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=$t;class es{}es.AREA={type:3,value:"AREA"},es.CURVE={type:3,value:"CURVE"},e.IfcProfileTypeEnum=es;class ts{}ts.CHANGEORDER={type:3,value:"CHANGEORDER"},ts.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},ts.MOVEORDER={type:3,value:"MOVEORDER"},ts.PURCHASEORDER={type:3,value:"PURCHASEORDER"},ts.WORKORDER={type:3,value:"WORKORDER"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=ts;class ss{}ss.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},ss.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=ss;class is{}is.BLISTER={type:3,value:"BLISTER"},is.DEVIATOR={type:3,value:"DEVIATOR"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=is;class rs{}rs.PSET_MATERIALDRIVEN={type:3,value:"PSET_MATERIALDRIVEN"},rs.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},rs.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},rs.PSET_PROFILEDRIVEN={type:3,value:"PSET_PROFILEDRIVEN"},rs.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},rs.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},rs.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},rs.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},rs.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=rs;class os{}os.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},os.ELECTRONIC={type:3,value:"ELECTRONIC"},os.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},os.THERMAL={type:3,value:"THERMAL"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=os;class ns{}ns.ANTI_ARCING_DEVICE={type:3,value:"ANTI_ARCING_DEVICE"},ns.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},ns.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},ns.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},ns.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},ns.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},ns.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},ns.SPARKGAP={type:3,value:"SPARKGAP"},ns.VARISTOR={type:3,value:"VARISTOR"},ns.VOLTAGELIMITER={type:3,value:"VOLTAGELIMITER"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=ns;class as{}as.CIRCULATOR={type:3,value:"CIRCULATOR"},as.ENDSUCTION={type:3,value:"ENDSUCTION"},as.SPLITCASE={type:3,value:"SPLITCASE"},as.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},as.SUMPPUMP={type:3,value:"SUMPPUMP"},as.VERTICALINLINE={type:3,value:"VERTICALINLINE"},as.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=as;class ls{}ls.BLADE={type:3,value:"BLADE"},ls.CHECKRAIL={type:3,value:"CHECKRAIL"},ls.GUARDRAIL={type:3,value:"GUARDRAIL"},ls.RACKRAIL={type:3,value:"RACKRAIL"},ls.RAIL={type:3,value:"RAIL"},ls.STOCKRAIL={type:3,value:"STOCKRAIL"},ls.USERDEFINED={type:3,value:"USERDEFINED"},ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailTypeEnum=ls;class hs{}hs.BALUSTRADE={type:3,value:"BALUSTRADE"},hs.FENCE={type:3,value:"FENCE"},hs.GUARDRAIL={type:3,value:"GUARDRAIL"},hs.HANDRAIL={type:3,value:"HANDRAIL"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=hs;class cs{}cs.DILATATIONSUPERSTRUCTURE={type:3,value:"DILATATIONSUPERSTRUCTURE"},cs.LINESIDESTRUCTURE={type:3,value:"LINESIDESTRUCTURE"},cs.LINESIDESTRUCTUREPART={type:3,value:"LINESIDESTRUCTUREPART"},cs.PLAINTRACKSUPERSTRUCTURE={type:3,value:"PLAINTRACKSUPERSTRUCTURE"},cs.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},cs.TRACKSTRUCTURE={type:3,value:"TRACKSTRUCTURE"},cs.TRACKSTRUCTUREPART={type:3,value:"TRACKSTRUCTUREPART"},cs.TURNOUTSUPERSTRUCTURE={type:3,value:"TURNOUTSUPERSTRUCTURE"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayPartTypeEnum=cs;class As{}As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayTypeEnum=As;class us{}us.SPIRAL={type:3,value:"SPIRAL"},us.STRAIGHT={type:3,value:"STRAIGHT"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=us;class ps{}ps.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},ps.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},ps.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},ps.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},ps.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},ps.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=ps;class ds{}ds.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},ds.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},ds.DAILY={type:3,value:"DAILY"},ds.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},ds.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},ds.WEEKLY={type:3,value:"WEEKLY"},ds.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},ds.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=ds;class fs{}fs.BOUNDARY={type:3,value:"BOUNDARY"},fs.INTERSECTION={type:3,value:"INTERSECTION"},fs.KILOPOINT={type:3,value:"KILOPOINT"},fs.LANDMARK={type:3,value:"LANDMARK"},fs.MILEPOINT={type:3,value:"MILEPOINT"},fs.POSITION={type:3,value:"POSITION"},fs.REFERENCEMARKER={type:3,value:"REFERENCEMARKER"},fs.STATION={type:3,value:"STATION"},fs.USERDEFINED={type:3,value:"USERDEFINED"},fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReferentTypeEnum=fs;class Es{}Es.BLINN={type:3,value:"BLINN"},Es.FLAT={type:3,value:"FLAT"},Es.GLASS={type:3,value:"GLASS"},Es.MATT={type:3,value:"MATT"},Es.METAL={type:3,value:"METAL"},Es.MIRROR={type:3,value:"MIRROR"},Es.PHONG={type:3,value:"PHONG"},Es.PHYSICAL={type:3,value:"PHYSICAL"},Es.PLASTIC={type:3,value:"PLASTIC"},Es.STRAUSS={type:3,value:"STRAUSS"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Es;class ms{}ms.DYNAMICALLYCOMPACTED={type:3,value:"DYNAMICALLYCOMPACTED"},ms.GROUTED={type:3,value:"GROUTED"},ms.REPLACED={type:3,value:"REPLACED"},ms.ROLLERCOMPACTED={type:3,value:"ROLLERCOMPACTED"},ms.SURCHARGEPRELOADED={type:3,value:"SURCHARGEPRELOADED"},ms.VERTICALLYDRAINED={type:3,value:"VERTICALLYDRAINED"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcedSoilTypeEnum=ms;class ys{}ys.ANCHORING={type:3,value:"ANCHORING"},ys.EDGE={type:3,value:"EDGE"},ys.LIGATURE={type:3,value:"LIGATURE"},ys.MAIN={type:3,value:"MAIN"},ys.PUNCHING={type:3,value:"PUNCHING"},ys.RING={type:3,value:"RING"},ys.SHEAR={type:3,value:"SHEAR"},ys.STUD={type:3,value:"STUD"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=ys;class gs{}gs.PLAIN={type:3,value:"PLAIN"},gs.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=gs;class Is{}Is.ANCHORING={type:3,value:"ANCHORING"},Is.EDGE={type:3,value:"EDGE"},Is.LIGATURE={type:3,value:"LIGATURE"},Is.MAIN={type:3,value:"MAIN"},Is.PUNCHING={type:3,value:"PUNCHING"},Is.RING={type:3,value:"RING"},Is.SHEAR={type:3,value:"SHEAR"},Is.SPACEBAR={type:3,value:"SPACEBAR"},Is.STUD={type:3,value:"STUD"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Is;class vs{}vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=vs;class Ts{}Ts.BICYCLECROSSING={type:3,value:"BICYCLECROSSING"},Ts.BUS_STOP={type:3,value:"BUS_STOP"},Ts.CARRIAGEWAY={type:3,value:"CARRIAGEWAY"},Ts.CENTRALISLAND={type:3,value:"CENTRALISLAND"},Ts.CENTRALRESERVE={type:3,value:"CENTRALRESERVE"},Ts.HARDSHOULDER={type:3,value:"HARDSHOULDER"},Ts.INTERSECTION={type:3,value:"INTERSECTION"},Ts.LAYBY={type:3,value:"LAYBY"},Ts.PARKINGBAY={type:3,value:"PARKINGBAY"},Ts.PASSINGBAY={type:3,value:"PASSINGBAY"},Ts.PEDESTRIAN_CROSSING={type:3,value:"PEDESTRIAN_CROSSING"},Ts.RAILWAYCROSSING={type:3,value:"RAILWAYCROSSING"},Ts.REFUGEISLAND={type:3,value:"REFUGEISLAND"},Ts.ROADSEGMENT={type:3,value:"ROADSEGMENT"},Ts.ROADSIDE={type:3,value:"ROADSIDE"},Ts.ROADSIDEPART={type:3,value:"ROADSIDEPART"},Ts.ROADWAYPLATEAU={type:3,value:"ROADWAYPLATEAU"},Ts.ROUNDABOUT={type:3,value:"ROUNDABOUT"},Ts.SHOULDER={type:3,value:"SHOULDER"},Ts.SIDEWALK={type:3,value:"SIDEWALK"},Ts.SOFTSHOULDER={type:3,value:"SOFTSHOULDER"},Ts.TOLLPLAZA={type:3,value:"TOLLPLAZA"},Ts.TRAFFICISLAND={type:3,value:"TRAFFICISLAND"},Ts.TRAFFICLANE={type:3,value:"TRAFFICLANE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadPartTypeEnum=Ts;class _s{}_s.USERDEFINED={type:3,value:"USERDEFINED"},_s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadTypeEnum=_s;class Rs{}Rs.ARCHITECT={type:3,value:"ARCHITECT"},Rs.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Rs.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Rs.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Rs.CLIENT={type:3,value:"CLIENT"},Rs.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Rs.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Rs.CONSULTANT={type:3,value:"CONSULTANT"},Rs.CONTRACTOR={type:3,value:"CONTRACTOR"},Rs.COSTENGINEER={type:3,value:"COSTENGINEER"},Rs.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Rs.ENGINEER={type:3,value:"ENGINEER"},Rs.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Rs.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Rs.MANUFACTURER={type:3,value:"MANUFACTURER"},Rs.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Rs.OWNER={type:3,value:"OWNER"},Rs.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Rs.RESELLER={type:3,value:"RESELLER"},Rs.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Rs.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Rs.SUPPLIER={type:3,value:"SUPPLIER"},Rs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Rs;class Ps{}Ps.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Ps.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Ps.DOME_ROOF={type:3,value:"DOME_ROOF"},Ps.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Ps.FREEFORM={type:3,value:"FREEFORM"},Ps.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Ps.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Ps.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Ps.HIP_ROOF={type:3,value:"HIP_ROOF"},Ps.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Ps.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Ps.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Ps.SHED_ROOF={type:3,value:"SHED_ROOF"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Ps;class Ds{}Ds.ATTO={type:3,value:"ATTO"},Ds.CENTI={type:3,value:"CENTI"},Ds.DECA={type:3,value:"DECA"},Ds.DECI={type:3,value:"DECI"},Ds.EXA={type:3,value:"EXA"},Ds.FEMTO={type:3,value:"FEMTO"},Ds.GIGA={type:3,value:"GIGA"},Ds.HECTO={type:3,value:"HECTO"},Ds.KILO={type:3,value:"KILO"},Ds.MEGA={type:3,value:"MEGA"},Ds.MICRO={type:3,value:"MICRO"},Ds.MILLI={type:3,value:"MILLI"},Ds.NANO={type:3,value:"NANO"},Ds.PETA={type:3,value:"PETA"},Ds.PICO={type:3,value:"PICO"},Ds.TERA={type:3,value:"TERA"},e.IfcSIPrefix=Ds;class Ns{}Ns.AMPERE={type:3,value:"AMPERE"},Ns.BECQUEREL={type:3,value:"BECQUEREL"},Ns.CANDELA={type:3,value:"CANDELA"},Ns.COULOMB={type:3,value:"COULOMB"},Ns.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Ns.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Ns.FARAD={type:3,value:"FARAD"},Ns.GRAM={type:3,value:"GRAM"},Ns.GRAY={type:3,value:"GRAY"},Ns.HENRY={type:3,value:"HENRY"},Ns.HERTZ={type:3,value:"HERTZ"},Ns.JOULE={type:3,value:"JOULE"},Ns.KELVIN={type:3,value:"KELVIN"},Ns.LUMEN={type:3,value:"LUMEN"},Ns.LUX={type:3,value:"LUX"},Ns.METRE={type:3,value:"METRE"},Ns.MOLE={type:3,value:"MOLE"},Ns.NEWTON={type:3,value:"NEWTON"},Ns.OHM={type:3,value:"OHM"},Ns.PASCAL={type:3,value:"PASCAL"},Ns.RADIAN={type:3,value:"RADIAN"},Ns.SECOND={type:3,value:"SECOND"},Ns.SIEMENS={type:3,value:"SIEMENS"},Ns.SIEVERT={type:3,value:"SIEVERT"},Ns.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Ns.STERADIAN={type:3,value:"STERADIAN"},Ns.TESLA={type:3,value:"TESLA"},Ns.VOLT={type:3,value:"VOLT"},Ns.WATT={type:3,value:"WATT"},Ns.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Ns;class Cs{}Cs.BATH={type:3,value:"BATH"},Cs.BIDET={type:3,value:"BIDET"},Cs.CISTERN={type:3,value:"CISTERN"},Cs.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Cs.SHOWER={type:3,value:"SHOWER"},Cs.SINK={type:3,value:"SINK"},Cs.TOILETPAN={type:3,value:"TOILETPAN"},Cs.URINAL={type:3,value:"URINAL"},Cs.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Cs.WCSEAT={type:3,value:"WCSEAT"},Cs.USERDEFINED={type:3,value:"USERDEFINED"},Cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Cs;class Os{}Os.TAPERED={type:3,value:"TAPERED"},Os.UNIFORM={type:3,value:"UNIFORM"},e.IfcSectionTypeEnum=Os;class bs{}bs.CO2SENSOR={type:3,value:"CO2SENSOR"},bs.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},bs.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},bs.COSENSOR={type:3,value:"COSENSOR"},bs.EARTHQUAKESENSOR={type:3,value:"EARTHQUAKESENSOR"},bs.FIRESENSOR={type:3,value:"FIRESENSOR"},bs.FLOWSENSOR={type:3,value:"FLOWSENSOR"},bs.FOREIGNOBJECTDETECTIONSENSOR={type:3,value:"FOREIGNOBJECTDETECTIONSENSOR"},bs.FROSTSENSOR={type:3,value:"FROSTSENSOR"},bs.GASSENSOR={type:3,value:"GASSENSOR"},bs.HEATSENSOR={type:3,value:"HEATSENSOR"},bs.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},bs.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},bs.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},bs.LEVELSENSOR={type:3,value:"LEVELSENSOR"},bs.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},bs.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},bs.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},bs.OBSTACLESENSOR={type:3,value:"OBSTACLESENSOR"},bs.PHSENSOR={type:3,value:"PHSENSOR"},bs.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},bs.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},bs.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},bs.RAINSENSOR={type:3,value:"RAINSENSOR"},bs.SMOKESENSOR={type:3,value:"SMOKESENSOR"},bs.SNOWDEPTHSENSOR={type:3,value:"SNOWDEPTHSENSOR"},bs.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},bs.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},bs.TRAINSENSOR={type:3,value:"TRAINSENSOR"},bs.TURNOUTCLOSURESENSOR={type:3,value:"TURNOUTCLOSURESENSOR"},bs.WHEELSENSOR={type:3,value:"WHEELSENSOR"},bs.WINDSENSOR={type:3,value:"WINDSENSOR"},bs.USERDEFINED={type:3,value:"USERDEFINED"},bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=bs;class Ss{}Ss.FINISH_FINISH={type:3,value:"FINISH_FINISH"},Ss.FINISH_START={type:3,value:"FINISH_START"},Ss.START_FINISH={type:3,value:"START_FINISH"},Ss.START_START={type:3,value:"START_START"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=Ss;class ws{}ws.AWNING={type:3,value:"AWNING"},ws.JALOUSIE={type:3,value:"JALOUSIE"},ws.SHUTTER={type:3,value:"SHUTTER"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=ws;class xs{}xs.MARKER={type:3,value:"MARKER"},xs.MIRROR={type:3,value:"MIRROR"},xs.PICTORAL={type:3,value:"PICTORAL"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignTypeEnum=xs;class Bs{}Bs.AUDIO={type:3,value:"AUDIO"},Bs.MIXED={type:3,value:"MIXED"},Bs.VISUAL={type:3,value:"VISUAL"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignalTypeEnum=Bs;class Fs{}Fs.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},Fs.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},Fs.P_LISTVALUE={type:3,value:"P_LISTVALUE"},Fs.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},Fs.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},Fs.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},Fs.Q_AREA={type:3,value:"Q_AREA"},Fs.Q_COUNT={type:3,value:"Q_COUNT"},Fs.Q_LENGTH={type:3,value:"Q_LENGTH"},Fs.Q_NUMBER={type:3,value:"Q_NUMBER"},Fs.Q_TIME={type:3,value:"Q_TIME"},Fs.Q_VOLUME={type:3,value:"Q_VOLUME"},Fs.Q_WEIGHT={type:3,value:"Q_WEIGHT"},e.IfcSimplePropertyTemplateTypeEnum=Fs;class Ms{}Ms.APPROACH_SLAB={type:3,value:"APPROACH_SLAB"},Ms.BASESLAB={type:3,value:"BASESLAB"},Ms.FLOOR={type:3,value:"FLOOR"},Ms.LANDING={type:3,value:"LANDING"},Ms.PAVING={type:3,value:"PAVING"},Ms.ROOF={type:3,value:"ROOF"},Ms.SIDEWALK={type:3,value:"SIDEWALK"},Ms.TRACKSLAB={type:3,value:"TRACKSLAB"},Ms.WEARING={type:3,value:"WEARING"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Ms;class Ls{}Ls.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},Ls.SOLARPANEL={type:3,value:"SOLARPANEL"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=Ls;class Us{}Us.CONVECTOR={type:3,value:"CONVECTOR"},Us.RADIATOR={type:3,value:"RADIATOR"},Us.USERDEFINED={type:3,value:"USERDEFINED"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Us;class Hs{}Hs.BERTH={type:3,value:"BERTH"},Hs.EXTERNAL={type:3,value:"EXTERNAL"},Hs.GFA={type:3,value:"GFA"},Hs.INTERNAL={type:3,value:"INTERNAL"},Hs.PARKING={type:3,value:"PARKING"},Hs.SPACE={type:3,value:"SPACE"},Hs.USERDEFINED={type:3,value:"USERDEFINED"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Hs;class Gs{}Gs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Gs.FIRESAFETY={type:3,value:"FIRESAFETY"},Gs.INTERFERENCE={type:3,value:"INTERFERENCE"},Gs.LIGHTING={type:3,value:"LIGHTING"},Gs.OCCUPANCY={type:3,value:"OCCUPANCY"},Gs.RESERVATION={type:3,value:"RESERVATION"},Gs.SECURITY={type:3,value:"SECURITY"},Gs.THERMAL={type:3,value:"THERMAL"},Gs.TRANSPORT={type:3,value:"TRANSPORT"},Gs.VENTILATION={type:3,value:"VENTILATION"},Gs.USERDEFINED={type:3,value:"USERDEFINED"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=Gs;class ks{}ks.BIRDCAGE={type:3,value:"BIRDCAGE"},ks.COWL={type:3,value:"COWL"},ks.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=ks;class Vs{}Vs.CURVED={type:3,value:"CURVED"},Vs.FREEFORM={type:3,value:"FREEFORM"},Vs.SPIRAL={type:3,value:"SPIRAL"},Vs.STRAIGHT={type:3,value:"STRAIGHT"},Vs.WINDER={type:3,value:"WINDER"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Vs;class js{}js.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},js.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},js.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},js.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},js.LADDER={type:3,value:"LADDER"},js.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},js.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},js.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},js.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},js.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},js.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},js.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},js.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},js.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},js.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=js;class Qs{}Qs.LOCKED={type:3,value:"LOCKED"},Qs.READONLY={type:3,value:"READONLY"},Qs.READONLYLOCKED={type:3,value:"READONLYLOCKED"},Qs.READWRITE={type:3,value:"READWRITE"},Qs.READWRITELOCKED={type:3,value:"READWRITELOCKED"},e.IfcStateEnum=Qs;class Ws{}Ws.CONST={type:3,value:"CONST"},Ws.DISCRETE={type:3,value:"DISCRETE"},Ws.EQUIDISTANT={type:3,value:"EQUIDISTANT"},Ws.LINEAR={type:3,value:"LINEAR"},Ws.PARABOLA={type:3,value:"PARABOLA"},Ws.POLYGONAL={type:3,value:"POLYGONAL"},Ws.SINUS={type:3,value:"SINUS"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=Ws;class zs{}zs.CABLE={type:3,value:"CABLE"},zs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},zs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},zs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},zs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=zs;class Ks{}Ks.BILINEAR={type:3,value:"BILINEAR"},Ks.CONST={type:3,value:"CONST"},Ks.DISCRETE={type:3,value:"DISCRETE"},Ks.ISOCONTOUR={type:3,value:"ISOCONTOUR"},Ks.USERDEFINED={type:3,value:"USERDEFINED"},Ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=Ks;class Ys{}Ys.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},Ys.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},Ys.SHELL={type:3,value:"SHELL"},Ys.USERDEFINED={type:3,value:"USERDEFINED"},Ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=Ys;class Xs{}Xs.PURCHASE={type:3,value:"PURCHASE"},Xs.WORK={type:3,value:"WORK"},Xs.USERDEFINED={type:3,value:"USERDEFINED"},Xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=Xs;class Zs{}Zs.DEFECT={type:3,value:"DEFECT"},Zs.HATCHMARKING={type:3,value:"HATCHMARKING"},Zs.LINEMARKING={type:3,value:"LINEMARKING"},Zs.MARK={type:3,value:"MARK"},Zs.NONSKIDSURFACING={type:3,value:"NONSKIDSURFACING"},Zs.PAVEMENTSURFACEMARKING={type:3,value:"PAVEMENTSURFACEMARKING"},Zs.RUMBLESTRIP={type:3,value:"RUMBLESTRIP"},Zs.SYMBOLMARKING={type:3,value:"SYMBOLMARKING"},Zs.TAG={type:3,value:"TAG"},Zs.TRANSVERSERUMBLESTRIP={type:3,value:"TRANSVERSERUMBLESTRIP"},Zs.TREATMENT={type:3,value:"TREATMENT"},Zs.USERDEFINED={type:3,value:"USERDEFINED"},Zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=Zs;class qs{}qs.BOTH={type:3,value:"BOTH"},qs.NEGATIVE={type:3,value:"NEGATIVE"},qs.POSITIVE={type:3,value:"POSITIVE"},e.IfcSurfaceSide=qs;class Js{}Js.CONTACTOR={type:3,value:"CONTACTOR"},Js.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Js.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Js.KEYPAD={type:3,value:"KEYPAD"},Js.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Js.RELAY={type:3,value:"RELAY"},Js.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Js.STARTER={type:3,value:"STARTER"},Js.START_AND_STOP_EQUIPMENT={type:3,value:"START_AND_STOP_EQUIPMENT"},Js.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Js.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Js.USERDEFINED={type:3,value:"USERDEFINED"},Js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Js;class $s{}$s.PANEL={type:3,value:"PANEL"},$s.SUBRACK={type:3,value:"SUBRACK"},$s.WORKSURFACE={type:3,value:"WORKSURFACE"},$s.USERDEFINED={type:3,value:"USERDEFINED"},$s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=$s;class ei{}ei.BASIN={type:3,value:"BASIN"},ei.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ei.EXPANSION={type:3,value:"EXPANSION"},ei.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ei.OILRETENTIONTRAY={type:3,value:"OILRETENTIONTRAY"},ei.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ei.STORAGE={type:3,value:"STORAGE"},ei.VESSEL={type:3,value:"VESSEL"},ei.USERDEFINED={type:3,value:"USERDEFINED"},ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ei;class ti{}ti.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},ti.WORKTIME={type:3,value:"WORKTIME"},ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=ti;class si{}si.ADJUSTMENT={type:3,value:"ADJUSTMENT"},si.ATTENDANCE={type:3,value:"ATTENDANCE"},si.CALIBRATION={type:3,value:"CALIBRATION"},si.CONSTRUCTION={type:3,value:"CONSTRUCTION"},si.DEMOLITION={type:3,value:"DEMOLITION"},si.DISMANTLE={type:3,value:"DISMANTLE"},si.DISPOSAL={type:3,value:"DISPOSAL"},si.EMERGENCY={type:3,value:"EMERGENCY"},si.INSPECTION={type:3,value:"INSPECTION"},si.INSTALLATION={type:3,value:"INSTALLATION"},si.LOGISTIC={type:3,value:"LOGISTIC"},si.MAINTENANCE={type:3,value:"MAINTENANCE"},si.MOVE={type:3,value:"MOVE"},si.OPERATION={type:3,value:"OPERATION"},si.REMOVAL={type:3,value:"REMOVAL"},si.RENOVATION={type:3,value:"RENOVATION"},si.SAFETY={type:3,value:"SAFETY"},si.SHUTDOWN={type:3,value:"SHUTDOWN"},si.STARTUP={type:3,value:"STARTUP"},si.TESTING={type:3,value:"TESTING"},si.TROUBLESHOOTING={type:3,value:"TROUBLESHOOTING"},si.USERDEFINED={type:3,value:"USERDEFINED"},si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=si;class ii{}ii.COUPLER={type:3,value:"COUPLER"},ii.FIXED_END={type:3,value:"FIXED_END"},ii.TENSIONING_END={type:3,value:"TENSIONING_END"},ii.USERDEFINED={type:3,value:"USERDEFINED"},ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=ii;class ri{}ri.COUPLER={type:3,value:"COUPLER"},ri.DIABOLO={type:3,value:"DIABOLO"},ri.DUCT={type:3,value:"DUCT"},ri.GROUTING_DUCT={type:3,value:"GROUTING_DUCT"},ri.TRUMPET={type:3,value:"TRUMPET"},ri.USERDEFINED={type:3,value:"USERDEFINED"},ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonConduitTypeEnum=ri;class oi{}oi.BAR={type:3,value:"BAR"},oi.COATED={type:3,value:"COATED"},oi.STRAND={type:3,value:"STRAND"},oi.WIRE={type:3,value:"WIRE"},oi.USERDEFINED={type:3,value:"USERDEFINED"},oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=oi;class ni{}ni.DOWN={type:3,value:"DOWN"},ni.LEFT={type:3,value:"LEFT"},ni.RIGHT={type:3,value:"RIGHT"},ni.UP={type:3,value:"UP"},e.IfcTextPath=ni;class ai{}ai.CONTINUOUS={type:3,value:"CONTINUOUS"},ai.DISCRETE={type:3,value:"DISCRETE"},ai.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},ai.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},ai.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},ai.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=ai;class li{}li.BLOCKINGDEVICE={type:3,value:"BLOCKINGDEVICE"},li.DERAILER={type:3,value:"DERAILER"},li.FROG={type:3,value:"FROG"},li.HALF_SET_OF_BLADES={type:3,value:"HALF_SET_OF_BLADES"},li.SLEEPER={type:3,value:"SLEEPER"},li.SPEEDREGULATOR={type:3,value:"SPEEDREGULATOR"},li.TRACKENDOFALIGNMENT={type:3,value:"TRACKENDOFALIGNMENT"},li.VEHICLESTOP={type:3,value:"VEHICLESTOP"},li.USERDEFINED={type:3,value:"USERDEFINED"},li.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTrackElementTypeEnum=li;class hi{}hi.CHOPPER={type:3,value:"CHOPPER"},hi.COMBINED={type:3,value:"COMBINED"},hi.CURRENT={type:3,value:"CURRENT"},hi.FREQUENCY={type:3,value:"FREQUENCY"},hi.INVERTER={type:3,value:"INVERTER"},hi.RECTIFIER={type:3,value:"RECTIFIER"},hi.VOLTAGE={type:3,value:"VOLTAGE"},hi.USERDEFINED={type:3,value:"USERDEFINED"},hi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=hi;class ci{}ci.CONTINUOUS={type:3,value:"CONTINUOUS"},ci.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},ci.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},ci.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},e.IfcTransitionCode=ci;class Ai{}Ai.CRANEWAY={type:3,value:"CRANEWAY"},Ai.ELEVATOR={type:3,value:"ELEVATOR"},Ai.ESCALATOR={type:3,value:"ESCALATOR"},Ai.HAULINGGEAR={type:3,value:"HAULINGGEAR"},Ai.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ai.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ai.USERDEFINED={type:3,value:"USERDEFINED"},Ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ai;class ui{}ui.CARTESIAN={type:3,value:"CARTESIAN"},ui.PARAMETER={type:3,value:"PARAMETER"},ui.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=ui;class pi{}pi.FINNED={type:3,value:"FINNED"},pi.USERDEFINED={type:3,value:"USERDEFINED"},pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=pi;class di{}di.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},di.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},di.AREAUNIT={type:3,value:"AREAUNIT"},di.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},di.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},di.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},di.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},di.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},di.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},di.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},di.ENERGYUNIT={type:3,value:"ENERGYUNIT"},di.FORCEUNIT={type:3,value:"FORCEUNIT"},di.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},di.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},di.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},di.LENGTHUNIT={type:3,value:"LENGTHUNIT"},di.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},di.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},di.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},di.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},di.MASSUNIT={type:3,value:"MASSUNIT"},di.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},di.POWERUNIT={type:3,value:"POWERUNIT"},di.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},di.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},di.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},di.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},di.TIMEUNIT={type:3,value:"TIMEUNIT"},di.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},di.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=di;class fi{}fi.ALARMPANEL={type:3,value:"ALARMPANEL"},fi.BASESTATIONCONTROLLER={type:3,value:"BASESTATIONCONTROLLER"},fi.COMBINED={type:3,value:"COMBINED"},fi.CONTROLPANEL={type:3,value:"CONTROLPANEL"},fi.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},fi.HUMIDISTAT={type:3,value:"HUMIDISTAT"},fi.INDICATORPANEL={type:3,value:"INDICATORPANEL"},fi.MIMICPANEL={type:3,value:"MIMICPANEL"},fi.THERMOSTAT={type:3,value:"THERMOSTAT"},fi.WEATHERSTATION={type:3,value:"WEATHERSTATION"},fi.USERDEFINED={type:3,value:"USERDEFINED"},fi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=fi;class Ei{}Ei.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Ei.AIRHANDLER={type:3,value:"AIRHANDLER"},Ei.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},Ei.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Ei.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Ei.USERDEFINED={type:3,value:"USERDEFINED"},Ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Ei;class mi{}mi.AIRRELEASE={type:3,value:"AIRRELEASE"},mi.ANTIVACUUM={type:3,value:"ANTIVACUUM"},mi.CHANGEOVER={type:3,value:"CHANGEOVER"},mi.CHECK={type:3,value:"CHECK"},mi.COMMISSIONING={type:3,value:"COMMISSIONING"},mi.DIVERTING={type:3,value:"DIVERTING"},mi.DOUBLECHECK={type:3,value:"DOUBLECHECK"},mi.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},mi.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},mi.FAUCET={type:3,value:"FAUCET"},mi.FLUSHING={type:3,value:"FLUSHING"},mi.GASCOCK={type:3,value:"GASCOCK"},mi.GASTAP={type:3,value:"GASTAP"},mi.ISOLATING={type:3,value:"ISOLATING"},mi.MIXING={type:3,value:"MIXING"},mi.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},mi.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},mi.REGULATING={type:3,value:"REGULATING"},mi.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},mi.STEAMTRAP={type:3,value:"STEAMTRAP"},mi.STOPCOCK={type:3,value:"STOPCOCK"},mi.USERDEFINED={type:3,value:"USERDEFINED"},mi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=mi;class yi{}yi.CARGO={type:3,value:"CARGO"},yi.ROLLINGSTOCK={type:3,value:"ROLLINGSTOCK"},yi.VEHICLE={type:3,value:"VEHICLE"},yi.VEHICLEAIR={type:3,value:"VEHICLEAIR"},yi.VEHICLEMARINE={type:3,value:"VEHICLEMARINE"},yi.VEHICLETRACKED={type:3,value:"VEHICLETRACKED"},yi.VEHICLEWHEELED={type:3,value:"VEHICLEWHEELED"},yi.USERDEFINED={type:3,value:"USERDEFINED"},yi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVehicleTypeEnum=yi;class gi{}gi.AXIAL_YIELD={type:3,value:"AXIAL_YIELD"},gi.BENDING_YIELD={type:3,value:"BENDING_YIELD"},gi.FRICTION={type:3,value:"FRICTION"},gi.RUBBER={type:3,value:"RUBBER"},gi.SHEAR_YIELD={type:3,value:"SHEAR_YIELD"},gi.VISCOUS={type:3,value:"VISCOUS"},gi.USERDEFINED={type:3,value:"USERDEFINED"},gi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationDamperTypeEnum=gi;class Ii{}Ii.BASE={type:3,value:"BASE"},Ii.COMPRESSION={type:3,value:"COMPRESSION"},Ii.SPRING={type:3,value:"SPRING"},Ii.USERDEFINED={type:3,value:"USERDEFINED"},Ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Ii;class vi{}vi.BOUNDARY={type:3,value:"BOUNDARY"},vi.CLEARANCE={type:3,value:"CLEARANCE"},vi.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},vi.USERDEFINED={type:3,value:"USERDEFINED"},vi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVirtualElementTypeEnum=vi;class Ti{}Ti.CHAMFER={type:3,value:"CHAMFER"},Ti.CUTOUT={type:3,value:"CUTOUT"},Ti.EDGE={type:3,value:"EDGE"},Ti.HOLE={type:3,value:"HOLE"},Ti.MITER={type:3,value:"MITER"},Ti.NOTCH={type:3,value:"NOTCH"},Ti.USERDEFINED={type:3,value:"USERDEFINED"},Ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Ti;class _i{}_i.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},_i.MOVABLE={type:3,value:"MOVABLE"},_i.PARAPET={type:3,value:"PARAPET"},_i.PARTITIONING={type:3,value:"PARTITIONING"},_i.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},_i.POLYGONAL={type:3,value:"POLYGONAL"},_i.RETAININGWALL={type:3,value:"RETAININGWALL"},_i.SHEAR={type:3,value:"SHEAR"},_i.SOLIDWALL={type:3,value:"SOLIDWALL"},_i.STANDARD={type:3,value:"STANDARD"},_i.WAVEWALL={type:3,value:"WAVEWALL"},_i.USERDEFINED={type:3,value:"USERDEFINED"},_i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=_i;class Ri{}Ri.FLOORTRAP={type:3,value:"FLOORTRAP"},Ri.FLOORWASTE={type:3,value:"FLOORWASTE"},Ri.GULLYSUMP={type:3,value:"GULLYSUMP"},Ri.GULLYTRAP={type:3,value:"GULLYTRAP"},Ri.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ri.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ri.WASTETRAP={type:3,value:"WASTETRAP"},Ri.USERDEFINED={type:3,value:"USERDEFINED"},Ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ri;class Pi{}Pi.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Pi.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Pi.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Pi.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Pi.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Pi.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Pi.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Pi.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Pi.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Pi.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Pi.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Pi.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Pi.TOPHUNG={type:3,value:"TOPHUNG"},Pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Pi;class Di{}Di.BOTTOM={type:3,value:"BOTTOM"},Di.LEFT={type:3,value:"LEFT"},Di.MIDDLE={type:3,value:"MIDDLE"},Di.RIGHT={type:3,value:"RIGHT"},Di.TOP={type:3,value:"TOP"},Di.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Di;class Ni{}Ni.ALUMINIUM={type:3,value:"ALUMINIUM"},Ni.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ni.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ni.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Ni.PLASTIC={type:3,value:"PLASTIC"},Ni.STEEL={type:3,value:"STEEL"},Ni.WOOD={type:3,value:"WOOD"},Ni.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Ni;class Ci{}Ci.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},Ci.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},Ci.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},Ci.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},Ci.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},Ci.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},Ci.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},Ci.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},Ci.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},Ci.USERDEFINED={type:3,value:"USERDEFINED"},Ci.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=Ci;class Oi{}Oi.LIGHTDOME={type:3,value:"LIGHTDOME"},Oi.SKYLIGHT={type:3,value:"SKYLIGHT"},Oi.WINDOW={type:3,value:"WINDOW"},Oi.USERDEFINED={type:3,value:"USERDEFINED"},Oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Oi;class bi{}bi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},bi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},bi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},bi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},bi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},bi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},bi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},bi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},bi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},bi.USERDEFINED={type:3,value:"USERDEFINED"},bi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=bi;class Si{}Si.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Si.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Si.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Si.USERDEFINED={type:3,value:"USERDEFINED"},Si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Si;class wi{}wi.ACTUAL={type:3,value:"ACTUAL"},wi.BASELINE={type:3,value:"BASELINE"},wi.PLANNED={type:3,value:"PLANNED"},wi.USERDEFINED={type:3,value:"USERDEFINED"},wi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=wi;class xi{}xi.ACTUAL={type:3,value:"ACTUAL"},xi.BASELINE={type:3,value:"BASELINE"},xi.PLANNED={type:3,value:"PLANNED"},xi.USERDEFINED={type:3,value:"USERDEFINED"},xi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=xi;e.IfcActorRole=class extends pg{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Bi extends pg{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Bi;class Fi extends pg{constructor(e,t,s){super(e),this.StartTag=t,this.EndTag=s,this.type=2879124712}}e.IfcAlignmentParameterSegment=Fi;e.IfcAlignmentVerticalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartHeight=o,this.StartGradient=n,this.EndGradient=a,this.RadiusOfCurvature=l,this.PredefinedType=h,this.type=3633395639}};e.IfcApplication=class extends pg{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Mi extends pg{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Mi;e.IfcApproval=class extends pg{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Li extends pg{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Li;e.IfcBoundaryEdgeCondition=class extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Li{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Ui extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Ui;e.IfcBoundaryNodeConditionWarping=class extends Ui{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class Hi extends pg{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=Hi;class Gi extends Hi{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Gi;e.IfcConnectionSurfaceGeometry=class extends Hi{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends Hi{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class ki extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=ki;class Vi extends pg{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=Vi;class ji extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ji;e.IfcCostValue=class extends Mi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends pg{constructor(e,t,s,i,r){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.Name=r,this.type=1765591967}};e.IfcDerivedUnitElement=class extends pg{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends pg{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class Qi extends pg{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=Qi;class Wi extends pg{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=Wi;e.IfcExternallyDefinedHatchStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends pg{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends pg{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends Qi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends pg{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends pg{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends Vi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.ScaleY=h,this.ScaleZ=c,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends pg{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class zi extends pg{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=zi;class Ki extends zi{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=Ki;e.IfcMaterialLayerSet=class extends zi{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends pg{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class Yi extends zi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=Yi;e.IfcMaterialProfileSet=class extends zi{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends Yi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class Xi extends pg{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=Xi;e.IfcMeasureWithUnit=class extends pg{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends pg{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Zi extends pg{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Zi;class qi extends pg{constructor(e,t){super(e),this.PlacementRelTo=t,this.type=3701648758}}e.IfcObjectPlacement=qi;e.IfcObjective=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends pg{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class Ji extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=Ji;class $i extends Ji{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=$i;e.IfcPostalAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class er extends pg{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=er;class tr extends pg{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=tr;e.IfcPresentationLayerWithStyle=class extends tr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class sr extends pg{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=sr;class ir extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=ir;class rr extends pg{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=rr;e.IfcProjectedCRS=class extends ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class or extends pg{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=or;e.IfcPropertyEnumeration=class extends or{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityNumber=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.NumberValue=r,this.Formula=o,this.type=2691318326}};e.IfcQuantityTime=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends pg{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class nr extends pg{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=nr;class ar extends pg{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=ar;class lr extends pg{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=lr;e.IfcRepresentationMap=class extends pg{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class hr extends pg{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=hr;class cr extends pg{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=cr;e.IfcSIUnit=class extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Prefix=i,this.Name=r,this.type=448429030}};class Ar extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=Ar;e.IfcShapeAspect=class extends pg{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ur extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ur;e.IfcShapeRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class pr extends pg{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=pr;class dr extends pg{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=dr;e.IfcStructuralLoadConfiguration=class extends dr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class fr extends dr{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=fr;class Er extends fr{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Er;e.IfcStructuralLoadTemperature=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class mr extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=mr;e.IfcStyledItem=class extends lr{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends fr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends er{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends er{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class yr extends er{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=yr;e.IfcSurfaceStyleWithTextures=class extends er{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class gr extends er{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=gr;e.IfcTable=class extends pg{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends pg{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends pg{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class Ir extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=Ir;e.IfcTaskTimeRecurring=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends er{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends er{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class vr extends er{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=vr;e.IfcTextureCoordinateGenerator=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};class Tr extends pg{constructor(e,t,s){super(e),this.TexCoordIndex=t,this.TexCoordsOf=s,this.type=222769930}}e.IfcTextureCoordinateIndices=Tr;e.IfcTextureCoordinateIndicesWithVoids=class extends Tr{constructor(e,t,s,i){super(e,t,s),this.TexCoordIndex=t,this.TexCoordsOf=s,this.InnerTexCoordIndices=i,this.type=1010789467}};e.IfcTextureMap=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends er{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends er{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends pg{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class _r extends pg{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=_r;e.IfcTimeSeriesValue=class extends pg{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Rr extends lr{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Rr;e.IfcTopologyRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends pg{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Pr extends Rr{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Pr;e.IfcVertexPoint=class extends Pr{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends pg{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends Ar{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.StartDate=o,this.FinishDate=n,this.type=1236880293}};e.IfcAlignmentCantSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartCantLeft=o,this.EndCantLeft=n,this.StartCantRight=a,this.EndCantRight=l,this.PredefinedType=h,this.type=3752311538}};e.IfcAlignmentHorizontalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartPoint=i,this.StartDirection=r,this.StartRadiusOfCurvature=o,this.EndRadiusOfCurvature=n,this.SegmentLength=a,this.GravityCenterLineHeight=l,this.PredefinedType=h,this.type=536804194}};e.IfcApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Dr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Dr;class Nr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Nr;e.IfcArbitraryProfileDefWithVoids=class extends Dr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends gr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Nr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends Qi{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Specification=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends er{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Cr extends er{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Cr;e.IfcCompositeProfileDef=class extends rr{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Or extends Rr{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Or;e.IfcConnectionCurveGeometry=class extends Hi{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Gi{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Zi{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class br extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=br;e.IfcConversionBasedUnitWithOffset=class extends br{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends hr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends er{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends er{constructor(e,t,s,i){super(e),this.Name=t,this.CurveStyleFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends er{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Sr extends rr{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Sr;e.IfcDocumentInformation=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends Wi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class wr extends Rr{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=wr;e.IfcEdgeCurve=class extends wr{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends Ar{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class xr extends or{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=xr;e.IfcExternalReferenceRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Br extends Rr{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Br;class Fr extends Rr{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=Fr;e.IfcFaceOuterBound=class extends Fr{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Mr extends Br{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Mr;e.IfcFailureConnectionCondition=class extends pr{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelOrDraughting=i,this.type=738692330}};class Lr extends ar{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Lr;class Ur extends lr{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Ur;e.IfcGeometricRepresentationSubContext=class extends Lr{constructor(e,s,i,r,o,n,a,l){super(e,s,i,new t(0),null,r,null),this.ContextIdentifier=s,this.ContextType=i,this.WorldCoordinateSystem=r,this.ParentContext=o,this.TargetScale=n,this.TargetView=a,this.UserDefinedTargetView=l,this.type=4142052618}};class Hr extends Ur{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Hr;e.IfcGridPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.PlacementLocation=s,this.PlacementRefDirection=i,this.type=178086475}};class Gr extends Ur{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=Gr;e.IfcImageTexture=class extends gr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends er{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class kr extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=kr;e.IfcIndexedTriangleTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends Ar{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class Vr extends Ur{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=Vr;e.IfcLightSourceAmbient=class extends Vr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends Vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends Vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class jr extends Vr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=jr;e.IfcLightSourceSpot=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLinearPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.CartesianPosition=i,this.type=388784114}};e.IfcLocalPlacement=class extends qi{constructor(e,t,s){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class Qr extends Rr{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=Qr;e.IfcMappedItem=class extends lr{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends zi{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends ir{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class Wr extends Xi{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=Wr;e.IfcMaterialProfileSetUsageTapering=class extends Wr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends xr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.MaterialExpression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Sr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=2998442950}};class zr extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=zr;e.IfcOpenCrossProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.HorizontalWidths=i,this.Widths=r,this.Slopes=o,this.Tags=n,this.OffsetPoint=a,this.type=182550632}};e.IfcOpenShell=class extends Or{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends wr{constructor(e,t,s,i){super(e,t,new ug(0)),this.EdgeStart=t,this.EdgeElement=s,this.Orientation=i,this.type=1029017970}};class Kr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=Kr;e.IfcPath=class extends Rr{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends Ji{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends gr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class Yr extends Ur{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Yr;class Xr extends Ur{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=Xr;class Zr extends Ur{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=Zr;e.IfcPointByDistanceExpression=class extends Zr{constructor(e,t,s,i,r,o){super(e),this.DistanceAlong=t,this.OffsetLateral=s,this.OffsetVertical=i,this.OffsetLongitudinal=r,this.BasisCurve=o,this.type=2165702409}};e.IfcPointOnCurve=class extends Zr{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends Zr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends Qr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends Gr{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class qr extends er{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=qr;class Jr extends or{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=Jr;class $r extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=$r;e.IfcProductDefinitionShape=class extends ir{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends xr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class eo extends or{constructor(e,t,s){super(e),this.Name=t,this.Specification=s,this.type=2598011224}}e.IfcProperty=eo;class to extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=to;e.IfcPropertyDependencyRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class so extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=so;class io extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=io;class ro extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=ro;class oo extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=oo;e.IfcRegularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class no extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=no;e.IfcResourceApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends Jr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Ur{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};class ao extends Ur{constructor(e,t){super(e),this.Transition=t,this.type=823603102}}e.IfcSegment=ao;e.IfcShellBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class lo extends eo{constructor(e,t,s){super(e,t,s),this.Name=t,this.Specification=s,this.type=3692461612}}e.IfcSimpleProperty=lo;e.IfcSlippageConnectionCondition=class extends pr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class ho extends Ur{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=ho;e.IfcStructuralLoadLinearForce=class extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class co extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=co;e.IfcStructuralLoadSingleDisplacementDistortion=class extends co{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ao extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ao;e.IfcStructuralLoadSingleForceWarping=class extends Ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends wr{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class uo extends Ur{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=uo;e.IfcSurfaceStyleRendering=class extends yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class po extends ho{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=po;class fo extends ho{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=fo;e.IfcSweptDiskSolidPolygonal=class extends fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Eo extends uo{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Eo;e.IfcTShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class mo extends Ur{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=mo;class yo extends Ur{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=yo;e.IfcTextLiteralWithExtent=class extends yo{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class go extends zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=go;class Io extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Io;class vo extends go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=vo;class To extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=To;e.IfcUShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Ur{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends Qr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcZShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Mr{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Ur{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};e.IfcAxis2PlacementLinear=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=3425423356}};class _o extends Ur{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=_o;class Ro extends uo{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=Ro;e.IfcBoundingBox=class extends Ur{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends Gr{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends Zr{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Po extends Ur{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Po;e.IfcCartesianPointList2D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=2059837836}};class Do extends Ur{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Do;class No extends Do{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=No;e.IfcCartesianTransformationOperator2DnonUniform=class extends No{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Co extends Do{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Co;e.IfcCartesianTransformationOperator3DnonUniform=class extends Co{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Oo extends Kr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Oo;e.IfcClosedShell=class extends Or{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Cr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends eo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class bo extends ao{constructor(e,t,s,i){super(e,t),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=bo;class So extends To{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=So;class wo extends zr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=wo;e.IfcCrewResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class xo extends Ur{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=xo;e.IfcCsgSolid=class extends ho{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Bo extends Ur{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Bo;e.IfcCurveBoundedPlane=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcCurveSegment=class extends ao{constructor(e,t,s,i,r,o){super(e,t),this.Transition=t,this.Placement=s,this.SegmentStart=i,this.SegmentLength=r,this.ParentCurve=o,this.type=4212018352}};e.IfcDirection=class extends Ur{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};class Fo extends po{constructor(e,t,s,i,r,o){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.type=593015953}}e.IfcDirectrixCurveSweptAreaSolid=Fo;e.IfcEdgeLoop=class extends Qr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends ro{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Mo extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Mo;class Lo extends uo{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Lo;e.IfcEllipseProfileDef=class extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class Uo extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=Uo;e.IfcExtrudedAreaSolidTapered=class extends Uo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Ur{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Ur{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};class Ho extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}}e.IfcFixedReferenceSweptAreaSolid=Ho;class Go extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Go;e.IfcFurnitureType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Hr{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class ko extends mo{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=ko;e.IfcIndexedPolygonalFaceWithVoids=class extends ko{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcIndexedPolygonalTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndices=r,this.type=3465909080}};e.IfcLShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends Bo{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Vo extends ho{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Vo;class jo extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=jo;class Qo extends Bo{constructor(e,t){super(e),this.BasisCurve=t,this.type=590820931}}e.IfcOffsetCurve=Qo;e.IfcOffsetCurve2D=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Qo{constructor(e,t,s,i,r){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcOffsetCurveByDistances=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.OffsetValues=s,this.Tag=i,this.type=2485787929}};e.IfcPcurve=class extends Bo{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends Xr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Lo{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};e.IfcPolynomialCurve=class extends Bo{constructor(e,t,s,i,r){super(e),this.Position=t,this.CoefficientsX=s,this.CoefficientsY=i,this.CoefficientsZ=r,this.type=3381221214}};class Wo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=Wo;class zo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=zo;class Ko extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=Ko;e.IfcProcedureType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class Yo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=Yo;class Xo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xo;e.IfcProject=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends lo{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Specification=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends so{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Specification=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class Zo extends io{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=Zo;e.IfcRectangleHollowProfileDef=class extends oo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends xo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends Ko{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class qo extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=qo;e.IfcRelAssignsToActor=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class Jo extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=Jo;e.IfcRelAssignsToGroupByFactor=class extends Jo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $o extends no{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$o;e.IfcRelAssociatesApproval=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $o{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileDef=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileDef=n,this.type=1033248425}};class en extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=en;class tn extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tn;e.IfcRelConnectsPathElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class sn extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sn;e.IfcRelConnectsWithEccentricity=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class rn extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=rn;class on extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=on;e.IfcRelDefinesByObject=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceSpace=l,this.InterferenceType=h,this.ImpliedOrder=c,this.type=427948657}};e.IfcRelNests=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelPositions=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPositioningElement=o,this.RelatedProducts=n,this.type=1441486842}};e.IfcRelProjectsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class nn extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=nn;class an extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=an;e.IfcRelSpaceBoundary2ndLevel=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends bo{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class ln extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=ln;class hn extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=hn;e.IfcRevolvedAreaSolidTapered=class extends hn{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends xo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends xo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class cn extends ho{constructor(e,t,s){super(e),this.Directrix=t,this.CrossSections=s,this.type=1862484736}}e.IfcSectionedSolid=cn;e.IfcSectionedSolidHorizontal=class extends cn{constructor(e,t,s,i){super(e,t,s),this.Directrix=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1290935644}};e.IfcSectionedSurface=class extends uo{constructor(e,t,s,i){super(e),this.Directrix=t,this.CrossSectionPositions=s,this.CrossSections=i,this.type=1356537516}};e.IfcSimplePropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class An extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=An;class un extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=un;class pn extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=pn;class dn extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=dn;e.IfcSpatialZone=class extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends un{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends xo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class fn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2735484536}}e.IfcSpiral=fn;class En extends Xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=En;class mn extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=yn;class gn extends En{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=gn;class In extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=In;e.IfcStructuralSurfaceMemberVarying=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class vn extends Bo{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=vn;e.IfcSurfaceCurveSweptAreaSolid=class extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Eo{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Eo{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Tn extends mo{constructor(e,t,s){super(e),this.Coordinates=t,this.Closed=s,this.type=2387106220}}e.IfcTessellatedFaceSet=Tn;e.IfcThirdOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o){super(e,t),this.Position=t,this.CubicTerm=s,this.QuadraticTerm=i,this.LinearTerm=r,this.ConstantTerm=o,this.type=782932809}};e.IfcToroidalSurface=class extends Lo{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};class _n extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3665877780}}e.IfcTransportationDeviceType=_n;class Rn extends Tn{constructor(e,t,s,i,r,o){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}}e.IfcTriangulatedFaceSet=Rn;e.IfcTriangulatedIrregularNetwork=class extends Rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.Flags=n,this.type=1229763772}};e.IfcVehicleType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3651464721}};e.IfcWindowLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class Pn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=Pn;class Dn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Dn;e.IfcAdvancedBrepWithVoids=class extends Dn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=1674181508}};class Nn extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Nn;class Cn extends Nn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=Cn;e.IfcBlock=class extends xo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends _o{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class On extends Bo{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=On;e.IfcBuildingStorey=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};class bn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1626504194}}e.IfcBuiltElementType=bn;e.IfcChimneyType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Oo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcClothoid=class extends fn{constructor(e,t,s){super(e,t),this.Position=t,this.ClothoidConstant=s,this.type=3497074424}};e.IfcColumnType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class Sn extends On{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=Sn;class wn extends Sn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=wn;class xn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=xn;e.IfcConstructionEquipmentResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Bn extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Bn;class Fn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Fn;e.IfcCosineSpiral=class extends fn{constructor(e,t,s,i){super(e,t),this.Position=t,this.CosineTerm=s,this.ConstantTerm=i,this.type=2000195564}};e.IfcCostItem=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCourseType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4189326743}};e.IfcCoveringType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Mn extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1306400036}}e.IfcDeepFoundationType=Mn;e.IfcDirectrixDerivedReferenceSweptAreaSolid=class extends Ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=4234616927}};class Ln extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Ln;class Un extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Un;e.IfcDoorLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends Wo{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends zo{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Hn extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Hn;e.IfcElementAssembly=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class Gn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Gn;class kn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=kn;e.IfcEllipse=class extends xn{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Vn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Vn;e.IfcEngineType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class jn extends An{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=jn;class Qn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Qn;e.IfcFacetedBrepWithVoids=class extends Qn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Wn extends pn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=24185140}}e.IfcFacility=Wn;class zn extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.type=1310830890}}e.IfcFacilityPart=zn;e.IfcFacilityPartCommon=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=4228831410}};e.IfcFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class Kn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Kn;class Yn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Yn;class Xn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Xn;class Zn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Zn;class qn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=qn;e.IfcFlowMeterType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Jn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Jn;class $n extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=$n;class ea extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=ea;class ta extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=ta;class sa extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=sa;e.IfcFootingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class ia extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=ia;e.IfcFurniture=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};class ra extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4230923436}}e.IfcGeotechnicalElement=ra;e.IfcGeotechnicalStratum=class extends ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1594536857}};e.IfcGradientCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=2898700619}};class oa extends jo{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=oa;e.IfcHeatExchangerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcImpactProtectionDevice=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2568555532}};e.IfcImpactProtectionDeviceType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3948183225}};e.IfcIndexedPolyCurve=class extends On{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcKerbType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.Mountable=c,this.type=679976338}};e.IfcLaborResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};class na extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=2176059722}}e.IfcLinearElement=na;e.IfcLiquidTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1770583370}};e.IfcMarineFacility=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=525669439}};e.IfcMarinePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=976884017}};e.IfcMechanicalFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMobileTelecommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1950438474}};e.IfcMooringDeviceType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=710110818}};e.IfcMotorConnectionType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcNavigationElementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=506776471}};e.IfcOccupant=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}};e.IfcOutletType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPavementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=514975943}};e.IfcPerformanceHistory=class extends Fn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Tn{constructor(e,t,s,i,r){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends On{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class aa extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=aa;class la extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1946335990}}e.IfcPositioningElement=la;e.IfcProcedure=class extends Yo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1763565496}};e.IfcRailingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRailway=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=3992365140}};e.IfcRailwayPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=1891881377}};e.IfcRampFlightType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};e.IfcReferent=class extends la{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=4021432810}};class ha extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=ha;class ca extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ca;e.IfcReinforcingMesh=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAdheresToElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedSurfaceFeatures=n,this.type=3818125796}};e.IfcRelAggregates=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoad=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=146592293}};e.IfcRoadPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=550521510}};e.IfcRoofType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcSecondOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.QuadraticTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=3649235739}};e.IfcSegmentedReferenceCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=544395925}};e.IfcSeventhOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.Position=t,this.SepticTerm=s,this.SexticTerm=i,this.QuinticTerm=r,this.QuarticTerm=o,this.CubicTerm=n,this.QuadraticTerm=a,this.LinearTerm=l,this.ConstantTerm=h,this.type=1027922057}};e.IfcShadingDeviceType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSign=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=33720170}};e.IfcSignType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3599934289}};e.IfcSignalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1894708472}};e.IfcSineSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.SineTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=42703149}};e.IfcSite=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class Aa extends En{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=Aa;class ua extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=ua;class pa extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=pa;e.IfcStructuralCurveConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.AxisDirection=h,this.type=4243806635}};class da extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=da;e.IfcStructuralCurveMemberVarying=class extends da{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends pa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class fa extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=fa;e.IfcStructuralPointAction=class extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends oa{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class Ea extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=Ea;e.IfcStructuralSurfaceConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends Kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class ma extends oa{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=ma;e.IfcSystemFurnitureElement=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonConduit=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=3663046924}};e.IfcTendonConduitType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2281632017}};e.IfcTendonType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTrackElementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=618700268}};e.IfcTransformerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElementType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class ya extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1953115116}}e.IfcTransportationDevice=ya;e.IfcTrimmedCurve=class extends On{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVehicle=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=840318589}};e.IfcVibrationDamper=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1530820697}};e.IfcVibrationDamperType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3956297820}};e.IfcVibrationIsolator=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2769231204}};e.IfcVoidingFeature=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class ga extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=ga;e.IfcWorkPlan=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends ma{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAlignmentCant=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.RailHeadDistance=l,this.type=4266260250}};e.IfcAlignmentHorizontal=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1545765605}};e.IfcAlignmentSegment=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.DesignParameters=l,this.type=317615605}};e.IfcAlignmentVertical=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1662888072}};e.IfcAsset=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class Ia extends On{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Ia;class va extends Ia{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=va;e.IfcBeamType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBearingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3649138523}};e.IfcBoilerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Ta extends wn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=Ta;e.IfcBridge=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=644574406}};e.IfcBridgePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=963979645}};e.IfcBuilding=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};e.IfcBuildingElementPart=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxyType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};class _a extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1876633798}}e.IfcBuiltElement=_a;e.IfcBuiltSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=3862327254}};e.IfcBurnerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcCaissonFoundationType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3203706013}};e.IfcChillerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends xn{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}};e.IfcCommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcConveyorSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2940368186}};e.IfcCooledBeamType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCourse=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1502416096}};e.IfcCovering=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};class Ra extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3426335179}}e.IfcDeepFoundation=Ra;e.IfcDiscreteAccessory=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=479945903}};e.IfcDistributionChamberElementType=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Pa extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Pa;class Da extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=Da;class Na extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Na;e.IfcDistributionPort=class extends aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Ca extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Ca;e.IfcDoor=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}};e.IfcDuctFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcEarthworksCut=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3071239417}};class Oa extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1077100507}}e.IfcEarthworksElement=Oa;e.IfcEarthworksFill=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3376911765}};e.IfcElectricApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricFlowTreatmentDeviceType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2142170206}};e.IfcElectricGeneratorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=ba;e.IfcEngine=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends jn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Sa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Sa;class wa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=wa;e.IfcFlowInstrumentType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class xa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=xa;class Ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Ba;class Fa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=Fa;class Ma extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=Ma;class La extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=La;e.IfcFooting=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};class Ua extends ra{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2713699986}}e.IfcGeotechnicalAssembly=Ua;e.IfcGrid=class extends la{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};e.IfcHeatExchanger=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcKerb=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.Mountable=h,this.type=2696325953}};e.IfcLamp=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};class Ha extends la{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1154579445}}e.IfcLinearPositioningElement=Ha;e.IfcLiquidTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1638804497}};e.IfcMedicalDevice=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};e.IfcMember=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}};e.IfcMobileTelecommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2078563270}};e.IfcMooringDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=234836483}};e.IfcMotorConnection=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcNavigationElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2182337498}};e.IfcOuterBoundaryCurve=class extends Ta{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPavement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1383356374}};e.IfcPile=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};e.IfcPlate=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}};e.IfcProtectiveDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRail=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3290496277}};e.IfcRailing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends va{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcedSoil=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3798194928}};e.IfcReinforcingBar=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};e.IfcSignal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=991950508}};e.IfcSlab=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcSolarDevice=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends ma{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends fa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends Ea{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTrackElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3425753595}};e.IfcTransformer=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTransportElement=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTubeBundle=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Ga extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Ga;e.IfcWallStandardCase=class extends Ga{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};e.IfcWindow=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}};e.IfcActuatorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAlignment=class extends Ha{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=325726236}};e.IfcAudioVisualAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};e.IfcBeam=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}};e.IfcBearing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4196446775}};e.IfcBoiler=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBorehole=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3314249567}};e.IfcBuildingElementProxy=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBurner=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcCaissonFoundation=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3999819293}};e.IfcChiller=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcConveyorSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3460952963}};e.IfcCooledBeam=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3693000487}};e.IfcDistributionChamberElement=class extends Na{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Ca{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class ka extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=ka;e.IfcDuctFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricFlowTreatmentDevice=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=24726584}};e.IfcElectricGenerator=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcGeomodel=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2680139844}};e.IfcGeoslice=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1971632696}};e.IfcProtectiveDeviceTrippingUnit=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(ng||(ng={})),(lg=ag||(ag={}))[lg.LOG_LEVEL_DEBUG=0]="LOG_LEVEL_DEBUG",lg[lg.LOG_LEVEL_INFO=1]="LOG_LEVEL_INFO",lg[lg.LOG_LEVEL_WARN=2]="LOG_LEVEL_WARN",lg[lg.LOG_LEVEL_ERROR=3]="LOG_LEVEL_ERROR",lg[lg.LOG_LEVEL_OFF=4]="LOG_LEVEL_OFF","undefined"!=typeof self&&self.crossOriginIsolated)try{cg()}catch(e){Ag()}else Ag();u.vec2(),u.vec3(),u.vec3(),u.vec3();class dg{constructor(e={}){this._dataDir=e.dataDir||""}getProjects(e,t){const s=this._dataDir+"/projects/index.json";m.loadJSON(s,e,t)}getProject(e,t,s){const i=this._dataDir+"/projects/"+e+"/index.json";m.loadJSON(i,t,s)}getMetadata(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/metadata.json";m.loadJSON(r,s,i)}getGeometry(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/geometry.xkt";m.loadArraybuffer(r,s,i)}getObjectInfo(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/props/"+s+".json";m.loadJSON(o,i,r)}getIssues(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/issues.json";m.loadJSON(r,s,i)}getSplitModelManifest(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadJSON(o,i,r)}getSplitModelMetadata(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadJSON(o,i,r)}getSplitModelGeometry(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;m.loadArraybuffer(o,i,r)}}class fg{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class Eg{constructor(e,t,s,i){this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:s,this.viewer=e?e.viewer:i,this._children=[],e&&e._children.push(this),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,t,s){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new fg),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._subIdMap.addItem();i[r]={callback:t,scope:s||this},this._subIdEvents[r]=e;const o=this._events[e];return void 0!==o&&t.call(s||this,o),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}log(e){e="[LOG] "+e,window.console.log(e)}warn(e){e="[WARN] "+e,window.console.warn(e)}error(e){e="[ERROR] "+e,window.console.error(e)}_mutexActivation(e){const t=e.length;for(let s=0;s
Default text
',s.appendChild(this._modal),this._modalVisible=!1,this._modal.style.display="hidden"}show(e){this._modalVisible=!0,this._modal.querySelector(".xeokit-busy-modal-message").innerText=e,this._modal.style.display="block"}hide(){this._modalVisible=!1,this._modal.style.display="none"}destroy(){super.destroy(),this._modal&&(this._modal.parentNode.removeChild(this._modal),this._modal=null)}}const yg=u.vec3();class gg extends Eg{constructor(e,t={}){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.camera;this._modelMementos={},i.eye=[.577,.577,.577],i.look=[0,0,0],i.up=[-1,1,-1],this.bimViewer._modelsExplorer.on("modelLoaded",(e=>{this._saveModelMemento(e)})),this.bimViewer._modelsExplorer.on("modelUnloaded",(e=>{this._destroyModelMemento(e)})),this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.reset(),e.preventDefault()}))}_saveModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;const s=new Hi;s.saveObjects(this.viewer.scene,t,{visible:!0,edges:!0,xrayed:!0,highlighted:!0,selected:!0,clippable:!0,pickable:!0,colorize:!1,opacity:!1}),this._modelMementos[e]=s}_restoreModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;this._modelMementos[e].restoreObjects(this.viewer.scene,t)}_destroyModelMemento(e){delete this._modelMementos[e]}reset(){const e=this.viewer.scene.modelIds;for(var t=0,s=e.length;t{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.fit(),e.preventDefault()}))}fit(){const e=this.viewer.scene,t=e.getAABB(e.visibleObjectIds);this.viewer.cameraFlight.flyTo({aabb:t}),this.viewer.cameraControl.pivotPos=u.getAABB3Center(t,Ig)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class Tg extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.cameraControl,r=t.cameraControlNavModeMediator;i.navMode="orbit",i.followPointer=!0,this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e?(i.followPointer=!0,i.pivoting=!1):i.pivoting=!0})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class _g extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(s.classList.remove("active"),this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class Rg extends Eg{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.selected=!e.entity.selected)}))):(s.classList.remove("active"),void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class Pg extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.scene.on("modelLoaded",(e=>{if(!this._active){const e=this.viewer.metaScene.getObjectIDsByType("IfcSpace");this.viewer.scene.setObjectsCulled(e,!0)}})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e){this._active!==e&&(this._active=e,e?(this._buttonElement.classList.add("active"),this._enterShowSpacesMode(),this.fire("active",this._active)):(this._buttonElement.classList.remove("active"),this._exitShowSpacesMode(),this.fire("active",this._active)))}_enterShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!1)}_exitShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!0)}}class Dg extends Eg{constructor(e,t){super(e)}}const Ng=u.AABB3(),Cg=u.vec3();class Og extends o{constructor(e={}){if(!e.sectionPlanesPlugin)throw"Missing config: sectionPlanesPlugin";super(m.apply({},e)),this._sectionPlanesPlugin=e.sectionPlanesPlugin,this._viewer=this._sectionPlanesPlugin.viewer,this._onSceneSectionPlaneCreated=this._viewer.scene.on("sectionPlaneCreated",(()=>{this._buildMenu()})),this._onSceneSectionPlaneDestroyed=this._viewer.scene.on("sectionPlaneDestroyed",(()=>{this._buildMenu()})),this._buildMenu()}_buildMenu(){const e=this._sectionPlanesPlugin,t=Object.values(e.sectionPlanes),s=[];for(let i=0,r=t.length;i`${e.viewer.localeService.translate("sectionToolContextMenu.slice")||"Slice"} #`+(i+1),doHoverEnter(t){e.hideControl(),e.showControl(r.id)},doHoverLeave(t){e.hideControl()},items:[[{getTitle:e=>r.active?e.viewer.localeService.translate("sectionToolContextMenu.deactivate")||"Disable":e.viewer.localeService.translate("sectionToolContextMenu.activate")||"Enable",doAction:e=>{r.active=!r.active}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.edit")||"Edit",getEnabled:()=>r.active,doAction:t=>{e.hideControl(),e.showControl(r.id);const s=r.pos;Ng.set(this._viewer.scene.aabb),u.getAABB3Center(Ng,Cg),Ng[0]+=s[0]-Cg[0],Ng[1]+=s[1]-Cg[1],Ng[2]+=s[2]-Cg[2],Ng[3]+=s[0]-Cg[0],Ng[4]+=s[1]-Cg[1],Ng[5]+=s[2]-Cg[2],this._viewer.cameraFlight.flyTo({aabb:Ng,fitFOV:65})}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flip")||"Flip",getEnabled:()=>r.active,doAction:e=>{r.flipDir()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.delete")||"Delete",doAction:e=>{r.destroy()}}]]})}this.items=[[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flipSlices")||"Flip Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.flipSections()}}],[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.disableAllSlices")||"Disable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.disableSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.enableAllSlices")||"Enable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.enableSections()}}],s]}destroy(){super.destroy();const e=this._viewer.scene;e.off(this._onSceneSectionPlaneCreated),e.off(this._onSceneSectionPlaneDestroyed)}}class bg extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";if(!t.menuButtonElement)throw"Missing config: menuButtonElement";this._buttonElement=t.buttonElement,this._counterElement=t.counterElement,this._menuButtonElement=t.menuButtonElement,this._menuButtonArrowElement=t.menuButtonArrowElement,this._sectionPlanesPlugin=new hy(this.viewer,{}),this._sectionToolContextMenu=new Og({sectionPlanesPlugin:this._sectionPlanesPlugin,hideOnMouseDown:!1,hideOnAction:!1}),this._sectionPlanesPlugin.setOverviewVisible(!1),this.on("enabled",(e=>{e?(this._buttonElement.classList.remove("disabled"),this._counterElement&&this._counterElement.classList.remove("disabled"),this._menuButtonElement.classList.remove("disabled"),this._menuButtonArrowElement.classList.remove("disabled")):(this._buttonElement.classList.add("disabled"),this._counterElement&&this._counterElement.classList.add("disabled"),this._menuButtonElement.classList.add("disabled"),this._menuButtonArrowElement.classList.add("disabled"))})),this.on("active",(e=>{e?(this._buttonElement.classList.add("active"),this._counterElement&&this._counterElement.classList.add("active"),this._menuButtonElement.classList.add("active"),this._menuButtonArrowElement.classList.add("active")):(this._buttonElement.classList.remove("active"),this._counterElement&&this._counterElement.classList.remove("active"),this._menuButtonElement.classList.remove("active"),this._menuButtonArrowElement.classList.remove("active"))})),this.on("active",(e=>{e||this._sectionPlanesPlugin.hideControl()})),this._buttonElement.addEventListener("click",(e=>{if(!this.getEnabled())return;if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)return;const t=this.getActive();this.setActive(!t),e.preventDefault()})),document.addEventListener("mousedown",(e=>{if(!e.target.classList.contains("xeokit-context-menu-item"))if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)if(e.preventDefault(),this._sectionToolContextMenu.shown)this._sectionToolContextMenu.hide();else{this._sectionToolContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,sectionTool:this};const e=this._menuButtonElement.getBoundingClientRect();this._sectionToolContextMenu.show(e.left,e.bottom+5)}else this._sectionToolContextMenu.hide()})),this._sectionToolContextMenu.on("shown",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-down"),this._menuButtonArrowElement.classList.add("xeokit-arrow-up")})),this._sectionToolContextMenu.on("hidden",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-up"),this._menuButtonArrowElement.classList.add("xeokit-arrow-down")})),this.bimViewer.on("reset",(()=>{this.clear(),this.setActive(!1)})),this.viewer.scene.on("sectionPlaneCreated",(()=>{this._updateSectionPlanesCount()})),this.viewer.scene.on("sectionPlaneDestroyed",(()=>{this._updateSectionPlanesCount()})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive()||!this.getEnabled())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:u.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id)}})),this._updateSectionPlanesCount()}_updateSectionPlanesCount(){this._counterElement&&(this._counterElement.innerText=""+this.getNumSections())}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear(),this._updateSectionPlanesCount()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}enableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!0}}disableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!1}}hideControl(){this._sectionPlanesPlugin.hideControl()}destroy(){this._sectionPlanesPlugin.destroy(),this._sectionToolContextMenu.destroy(),super.destroy()}}class Sg extends Eg{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw"Missing config: navCubeCanvasElement";const s=t.navCubeCanvasElement;this._navCube=new ty(this.viewer,{canvasElement:s,fitVisible:!0,color:"#CFCFCF"}),this._navCube.setVisible(this._active),this.on("active",(e=>{this._navCube.setVisible(e)}))}destroy(){this._navCube.destroy(),super.destroy()}}class wg extends o{constructor(e={}){const t=[[{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadModel")||"Load",getEnabled:e=>!e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.loadModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadModel")||"Unload",getEnabled:e=>e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.unloadModel(e.modelId)}}]];!!e.enableEditModels&&t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.editModel")||"Edit",getEnabled:e=>!0,doAction:e=>{e.bimViewer.editModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.deleteModel")||"Delete",getEnabled:e=>!0,doAction:e=>{e.bimViewer.deleteModel(e.modelId)}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadAllModels")||"Load All",getEnabled:e=>{const t=e.bimViewer,s=t.getModelIds();return t.getLoadedModelIds().length{e.bimViewer.loadAllModels()}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadAllModels")||"Unload All",getEnabled:e=>e.bimViewer.getLoadedModelIds().length>0,doAction:e=>{e.bimViewer.unloadAllModels()}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]),super({hideOnAction:e.hideOnAction,context:e.context,items:t})}}const xg=u.vec3();class Bg{constructor(e){this._server=e}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,s){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,s)}getMetaModel(e,t,s){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,s)}getXKT(e,t,s){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,s)}}class Fg extends Eg{constructor(e,t){if(super(e,t),!t.modelsTabElement)throw"Missing config: modelsTabElement";if(!t.unloadModelsButtonElement)throw"Missing config: unloadModelsButtonElement";if(!t.modelsElement)throw"Missing config: modelsElement";if(this._enableAddModels=!!t.enableEditModels,this._modelsTabElement=t.modelsTabElement,this._loadModelsButtonElement=t.loadModelsButtonElement,this._unloadModelsButtonElement=t.unloadModelsButtonElement,this._addModelButtonElement=t.addModelButtonElement,this._modelsElement=t.modelsElement,this._modelsTabButtonElement=this._modelsTabElement.querySelector(".xeokit-tab-btn"),!this._modelsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._dataSource=new Bg(this.server),this._xktLoader=new eg(this.viewer,{dataSource:this._dataSource}),this._modelsContextMenu=new wg({enableEditModels:t.enableEditModels,hideOnAction:!0}),this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0,this._projectId=null}setObjectColors(e){this._xktLoader.objectDefaults=e}loadProject(e,t,s){this.server.getProject(e,(s=>{this.unloadProject(),this._projectId=e,this._modelsInfo={},this._numModels=0,this._parseProject(s,t),this._numModelsLoaded0&&this._unloadModelsButtonElement.classList.remove("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.remove("disabled")}),(e=>{this.error(e),s&&s(e)}))}_parseProject(e,t){this._buildModelsMenu(e),this._parseViewerConfigs(e),this._parseViewerContent(e,(()=>{this._parseViewerState(e,(()=>{t()}))}))}_buildModelsMenu(e){var t="";const s=e.models||[];this._modelsInfo={},this._numModels=s.length;for(let e=0,i=s.length;e",t+=""+i.name+"",t+=""}this._modelsElement.innerHTML=t;for(let e=0,t=s.length;e{r.checked?this.loadModel(i):this.unloadModel(t.id)})),o.addEventListener("click",(()=>{!!this.viewer.scene.models[i]?this.unloadModel(t.id):this.loadModel(i)})),o.oncontextmenu=e=>{this._modelsContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,modelId:i},this._modelsContextMenu.show(e.pageX,e.pageY),e.preventDefault()}}}_parseViewerConfigs(e){const t=e.viewerConfigs;t&&this.bimViewer.setConfigs(t)}_parseViewerContent(e,t){const s=e.viewerContent;s?this._parseModelsLoaded(s,(()=>{t()})):t()}_parseModelsLoaded(e,t){const s=e.modelsLoaded;s&&0!==s.length?this._loadNextModel(s.slice(0),t):t()}_loadNextModel(e,t){if(0===e.length)return void t();const s=e.pop();this.loadModel(s,(()=>{this._loadNextModel(e,t)}),(()=>{this._loadNextModel(e,t)}))}_parseViewerState(e,t){const s=e.viewerState;s?this.bimViewer.setViewerState(s,t):t()}unloadProject(){if(!this._projectId)return;const e=this.viewer.scene.models;for(var t in e)if(e.hasOwnProperty(t)){e[t].destroy()}this._modelsElement.innerHTML="",this._numModelsLoaded=0,this._loadModelsButtonElement.classList.add("disabled"),this._unloadModelsButtonElement.classList.add("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.add("disabled");const s=this._projectId;this._projectId=null,this.fire("projectUnloaded",{projectId:s})}getLoadedProjectId(){return this._projectId}getModelIds(){return Object.keys(this._modelsInfo)}loadModel(e,t,s){if(!this._projectId){const e="No project currently loaded";return this.error(e),void(s&&s(e))}const i=this._modelsInfo[e];if(!i){const e="Model not in currently loaded project";return this.error(e),void(s&&s(e))}this.bimViewer._busyModal.show(`${this.viewer.localeService.translate("busyModal.loading")||"Loading"} ${i.name}`);this.bimViewer.getConfig("externalMetadata")&&!i.manifest?this.server.getMetadata(this._projectId,e,(r=>{this._loadGeometry(e,i,r,t,s)}),(e=>{this.bimViewer._busyModal.hide(),this.error(e),s&&s(e)})):this._loadGeometry(e,i,null,t,s)}_loadGeometry(e,t,s,i,r){const o=()=>{document.getElementById(""+e).checked=!0,this._numModelsLoaded++,this._unloadModelsButtonElement.classList.remove("disabled"),this._numModelsLoaded{this.bimViewer._busyModal.hide(),this.error(e),r&&r(e)};if(t.manifest){this._dataSource.setProjectId(this._projectId),this._dataSource.setModelId(e);const s=this._xktLoader.load({id:e,manifestSrc:t.manifest,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});s.on("loaded",o),s.on("error",n)}else this.server.getGeometry(this._projectId,e,(i=>{const r=this._xktLoader.load({id:e,metaModelData:s,xkt:i,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});r.on("loaded",o),r.on("error",n)}),n)}_jumpToInitialCamera(){const e=this.viewer,t=e.scene,s=t.getAABB(t.visibleObjectIds),i=u.getAABB3Diag(s),r=u.getAABB3Center(s,xg),o=t.camera;o.perspective.fov;const n=Math.abs(i/Math.tan(45*u.DEGTORAD)),a=u.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=u.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=r,e.cameraControl.planView=!1,e.cameraFlight.jumpTo({look:r,eye:[r[0]-n*a[0],r[1]-n*a[1],r[2]-n*a[2]],up:l,orthoScale:1.1*i})}unloadModel(e){const t=this.viewer.scene.models[e];if(!t)return void this.error("Model not loaded: "+e);t.destroy();document.getElementById(""+e).checked=!1,document.getElementById("span-"+e),this._numModelsLoaded--,this._numModelsLoaded>0?this._unloadModelsButtonElement.classList.remove("disabled"):this._unloadModelsButtonElement.classList.add("disabled"),this._numModelsLoadede.viewer.localeService.translate("treeViewContextMenu.inspectProperties")||"Inspect Properties",getShown:e=>!!e.viewer.metaScene.metaObjects[e.treeViewNode.objectId],doAction:e=>{const t=e.treeViewNode.objectId;e.bimViewer.showObjectProperties(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFit")||"View Fit",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)})),s.setObjectsVisible(i,!0),s.setObjectsHighlighted(i,!0);const r=s.getAABB(i);t.cameraFlight.flyTo({aabb:r,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=u.getAABB3Center(r)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFitAll")||"View Fit All",doAction:function(e){const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.isolate")||"Isolate",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)}));const r=s.getAABB(i);t.cameraControl.pivotPos=u.getAABB3Center(r,Mg),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsVisible(s.visibleObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(i,!0),t.cameraFlight.flyTo({aabb:r},(()=>{}))}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hide")||"Hide",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideOthers")||"Hide Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.visibleObjectIds,!1),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideAll")||"Hide All",getEnabled:function(e){return e.viewer.scene.visibleObjectIds.length>0},doAction:function(e){e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.show")||"Show",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!0,s.xrayed&&(s.pickable=!0),s.xrayed=!1,s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showOthers")||"Shows Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showAll")||"Show All",getEnabled:function(e){const t=e.viewer.scene;return t.numVisibleObjects0},doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xray")||"X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1,s.xrayed=!0,s.visible=!0,s.pickable=e.bimViewer.getConfig("xrayPickable"))}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoXray")||"Undo X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayOthers")||"X-Ray Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayAll")||"X-Ray All",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayNone")||"X-Ray None",getEnabled:function(e){return e.viewer.scene.numXRayedObjects>0},doAction:function(e){const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.select")||"Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!0,s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoSelect")||"Undo Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.selectNone")||"Select None",getEnabled:function(e){return e.viewer.scene.numSelectedObjects>0},doAction:function(e){e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.clearSlices")||"Clear Slices",getEnabled:function(e){return e.bimViewer.getNumSections()>0},doAction:function(e){e.bimViewer.clearSections()}}]]}}class Ug extends Eg{constructor(e,t={}){if(super(e),!t.objectsTabElement)throw"Missing config: objectsTabElement";if(!t.showAllObjectsButtonElement)throw"Missing config: showAllObjectsButtonElement";if(!t.hideAllObjectsButtonElement)throw"Missing config: hideAllObjectsButtonElement";if(!t.objectsElement)throw"Missing config: objectsElement";if(this._objectsTabElement=t.objectsTabElement,this._showAllObjectsButtonElement=t.showAllObjectsButtonElement,this._hideAllObjectsButtonElement=t.hideAllObjectsButtonElement,this._objectsTabButtonElement=this._objectsTabElement.querySelector(".xeokit-tab-btn"),!this._objectsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";const s=t.objectsElement;this._treeView=new Ay(this.viewer,{containerElement:s,hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new Lg(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._objectsTabButtonElement.classList.remove("disabled"),this._showAllObjectsButtonElement.classList.remove("disabled"),this._hideAllObjectsButtonElement.classList.remove("disabled")):(this._objectsTabButtonElement.classList.add("disabled"),this._showAllObjectsButtonElement.classList.add("disabled"),this._hideAllObjectsButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}class Hg extends Eg{constructor(e,t={}){if(super(e),!t.classesTabElement)throw"Missing config: classesTabElement";if(!t.showAllClassesButtonElement)throw"Missing config: showAllClassesButtonElement";if(!t.hideAllClassesButtonElement)throw"Missing config: hideAllClassesButtonElement";if(!t.classesElement)throw"Missing config: classesElement";if(this._classesTabElement=t.classesTabElement,this._showAllClassesButtonElement=t.showAllClassesButtonElement,this._hideAllClassesButtonElement=t.hideAllClassesButtonElement,this._classesTabButtonElement=this._classesTabElement.querySelector(".xeokit-tab-btn"),!this._classesTabButtonElement)throw"Missing DOM element: xeokit-tab-btn";const s=t.classesElement;this._treeView=new Ay(this.viewer,{containerElement:s,hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new Lg(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._classesTabButtonElement.classList.remove("disabled"),this._showAllClassesButtonElement.classList.remove("disabled"),this._hideAllClassesButtonElement.classList.remove("disabled")):(this._classesTabButtonElement.classList.add("disabled"),this._showAllClassesButtonElement.classList.add("disabled"),this._hideAllClassesButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const Gg=u.vec3();class kg extends Eg{constructor(e,t={}){if(super(e),!t.storeysTabElement)throw"Missing config: storeysTabElement";if(!t.showAllStoreysButtonElement)throw"Missing config: showAllStoreysButtonElement";if(!t.hideAllStoreysButtonElement)throw"Missing config: hideAllStoreysButtonElement";if(!t.storeysElement)throw"Missing config: storeysElement";if(this._storeysTabElement=t.storeysTabElement,this._showAllStoreysButtonElement=t.showAllStoreysButtonElement,this._hideAllStoreysButtonElement=t.hideAllStoreysButtonElement,this._storeysTabButtonElement=this._storeysTabElement.querySelector(".xeokit-tab-btn"),!this._storeysTabButtonElement)throw"Missing DOM element: .xeokit-tab-btn";const s=t.storeysElement;this._treeView=new Ay(this.viewer,{containerElement:s,autoAddModels:!1,hierarchy:"storeys",autoExpandDepth:1}),this._treeViewContextMenu=new Lg(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode,pruneEmptyNodes:!0},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{const t=this.bimViewer._modelsExplorer.getModelInfo(e);t&&this._treeView.addModel(e,{rootName:t.name})})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse(),this._treeView.expandToDepth(1)}))}setEnabled(e){e?(this._storeysTabButtonElement.classList.remove("disabled"),this._showAllStoreysButtonElement.classList.remove("disabled"),this._hideAllStoreysButtonElement.classList.remove("disabled")):(this._storeysTabButtonElement.classList.add("disabled"),this._showAllStoreysButtonElement.classList.add("disabled"),this._hideAllStoreysButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];if(!s)return void this.error("selectStorey() - object is not found: '"+e+"'");if("IfcBuildingStorey"!==s.type)return void this.error("selectStorey() - object is not found: '"+e+"'");const i=s.getObjectIDsInSubtree();this._selectObjects(i,t)}_selectObjects(e,t){const s=this.viewer.scene,i=s.getAABB(e);this.viewer.cameraControl.pivotPos=u.getAABB3Center(i,Gg),t?(s.setObjectsXRayed(s.objectIds,!0),s.setObjectsVisible(s.objectIds,!0),s.setObjectsPickable(s.objectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsXRayed(e,!1),s.setObjectsVisible(e,!0),s.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:i},(()=>{setTimeout((function(){s.setObjectsVisible(s.xrayedObjectIds,!1),s.setObjectsXRayed(s.xrayedObjectIds,!1)}),500),t()}))):(s.setObjectsVisible(s.objectIds,!1),s.setObjectsPickable(s.xrayedObjectIds,!0),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:i}))}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const Vg=u.vec3();class jg extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._saveOrthoActive=null,this._buttonElement=t.buttonElement,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&(this.bimViewer._sectionTool.hideControl(),this.setActive(!this.getActive(),(()=>{}))),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!0,(()=>{}))}))}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer._orthoMode.getActive()}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterThreeDMode((()=>{this.fire("active",this._active),t()})):(this._enterThreeDMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitThreeDMode((()=>{this.fire("active",this._active),t()})):(this._exitThreeDMode(),this.fire("active",this._active)))):t&&t()}_enterThreeDMode(e){const t=this.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds),r=u.getAABB3Diag(i),o=u.getAABB3Center(i,Vg),n=Math.abs(r/Math.tan(32.5)),a=s.camera,l=a.yUp?[-1,-1,-1]:[1,1,1],h=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=o,this.bimViewer._navCubeMode.setActive(!0),this.bimViewer._firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer._sectionTool.setEnabled(!0),this.bimViewer._orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e){const t=this.viewer,s=t.scene,i=s.camera,r=s.getAABB(s.visibleObjectIds),o=u.getAABB3Center(r),n=u.getAABB3Diag(r),a=Math.abs(n/Math.tan(45*u.DEGTORAD)),l=1.3*n,h=Vg;h[0]=o[0]+i.worldUp[0]*a,h[1]=o[1]+i.worldUp[1]*a,h[2]=o[2]+i.worldUp[2]*a;const c=u.mulVec3Scalar(i.worldForward,-1,[]);this.bimViewer._sectionTool.setActive(!1),this.bimViewer._firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer._orthoMode.getActive(),this.bimViewer._orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer._navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer._navCubeMode.setActive(!1))}}class Qg extends o{constructor(e,t={}){super(t),this._bimViewer=e,this._buildMenu()}_buildMenu(){const e=[],t=[];this._bimViewer._enablePropertiesInspector&&e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.inspectProperties")||"Inspect Properties",doAction:e=>{const t=e.entity.id;e.bimViewer.showObjectProperties(t)}}),e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showInTree")||"Show in Explorer",doAction:e=>{const t=e.entity.id;e.showObjectInExplorers(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFit")||"View Fit",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity;t.cameraFlight.flyTo({aabb:i.aabb,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=u.getAABB3Center(i.aabb)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hide")||"Hide",getEnabled:e=>e.entity.visible,doAction:e=>{e.entity.visible=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideOthers")||"Hide Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.visibleObjectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.visible=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xray")||"X-Ray",getEnabled:e=>!e.entity.xrayed,doAction:e=>{const t=e.entity;t.xrayed=!0,t.pickable=e.bimViewer.getConfig("xrayPickable")}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayOthers")||"X-Ray Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.objectIds,!0),s.setObjectsXRayed(s.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||s.setObjectsPickable(s.objectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.xrayed=!1,t.pickable=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.select")||"Select",getEnabled:e=>!e.entity.selected,doAction:e=>{e.entity.selected=!0}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.undoSelect")||"Undo Select",getEnabled:e=>e.entity.selected,doAction:e=>{e.entity.selected=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]}}class Wg extends o{constructor(e={}){super({hideOnAction:e.hideOnAction,context:e.context,items:[[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=u.getAABB3Center(i)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene.xrayedObjectIds;e.viewer.scene.setObjectsPickable(t,!0),e.viewer.scene.setObjectsXRayed(t,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.resetView")||"Reset View",doAction:e=>{e.bimViewer.resetView()}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]})}}class zg extends Eg{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e,this._active?this._buttonElement.classList.add("active"):this._buttonElement.classList.remove("active")})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active)))):t&&t()}_enterOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class Kg extends Eg{constructor(e,t={}){if(super(e),!t.propertiesTabElement)throw"Missing config: propertiesTabElement";if(!t.propertiesElement)throw"Missing config: propertiesElement";if(this._metaObject=null,this._propertiesTabElement=t.propertiesTabElement,this._propertiesElement=t.propertiesElement,this._propertiesTabButtonElement=this._propertiesTabElement.querySelector(".xeokit-tab-btn"),!this._propertiesTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{if(this._metaObject){const t=this._metaObject.metaModels;for(let s=0,i=t.length;s{this.clear()})),document.addEventListener("click",this._clickListener=e=>{e.target.matches(".xeokit-accordion .xeokit-accordion-button")&&(e.target.parentElement.classList.contains("active")?e.target.parentElement.classList.remove("active"):e.target.parentElement.classList.add("active"))}),this.clear()}showObjectPropertySets(e){const t=this.viewer.metaScene.metaObjects[e];if(!t)return;const s=t.propertySets;s&&s.length>0?this._setPropertySets(t,s):this._setPropertySets(t),this._metaObject=t}clear(){const e=[],t=this.viewer.localeService.translate("propertiesInspector.noObjectSelectedWarning")||"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.";e.push('
'),e.push(`

${t}

`),e.push("
");const s=e.join("");this._propertiesElement.innerHTML=s}_setPropertySets(e,t){const s=[];if(s.push('
'),e){s.push(''),s.push(``),e.type&&s.push(``),s.push(``),s.push(``);const i=e.attributes;if(i)for(let e in i)s.push(``);if(s.push("
Name:${e.name}
Class:${e.type}
UUID:${e.originalSystemId}
Viewer ID:${e.id}
${Yg(e)}:${i[e]}
"),t&&0!==t.length){s.push("
"),s.push('
');for(let e=0,i=t.length;e0){s.push(`
\n

${i.name}

\n
\n `);for(let e=0,t=r.length;e`)}s.push("
${t.name||t.label}:${t.value}
\n
\n
")}}s.push("
")}else{const e=this.viewer.localeService.translate("propertiesInspector.noPropSetWarning")||"No properties sets found for this object";s.push(`

${e}

`),s.push("")}}else s.push('

No object selected

');this._propertiesElement.innerHTML=s.join("")}setEnabled(e){e?this._propertiesTabButtonElement.classList.remove("disabled"):this._propertiesTabButtonElement.classList.add("disabled")}destroy(){super.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),document.removeEventListener("click",this._clickListener)}}function Yg(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}const Xg=new Float32Array(3);class Zg{constructor(e){if(!e)throw"Parameter expected: cfg";if(!e.viewer)throw"Parameter expected: cfg.viewer";this.viewer=e.viewer,this._maxTreeDepth=e.maxTreeDepth||15,this._root=null,this._needsRebuild=!0,this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const i=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&u.containsAABB3(e.left.aabb,i))return void this._insertEntity(e.left,t,s+1);if(e.right&&u.containsAABB3(e.right.aabb,i))return void this._insertEntity(e.right,t,s+1);const r=e.aabb;Xg[0]=r[3]-r[0],Xg[1]=r[4]-r[1],Xg[2]=r[5]-r[2];let o=0;if(Xg[1]>Xg[o]&&(o=1),Xg[2]>Xg[o]&&(o=2),!e.left){const n=r.slice();if(n[o+3]=(r[o]+r[o+3])/2,e.left={aabb:n},u.containsAABB3(n,i))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const n=r.slice();if(n[o]=(r[o]+r[o+3])/2,e.right={aabb:n},u.containsAABB3(n,i))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class qg extends Eg{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";this._objectsKdTree3=t.objectsKdTree3,this._marquee=u.AABB2(),this._marqueeFrustum=new Mi,this._marqueeFrustumProjMat=u.mat4(),this._marqueeDir=!1;const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._objectsKdTree3.root):s.classList.remove("active")})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}));const i=this.viewer.scene,r=i.canvas.canvas;this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement);const o=this._marqueeElement.style;let n,a,l,h,c,A,p,d;o.position="absolute",o["z-index"]="40000005",o.width="8px",o.height="8px",o.visibility="hidden",o.top="0px",o.left="0px",o["box-shadow"]="0 2px 5px 0 #182A3D;",o.opacity=1,o["pointer-events"]="none";let f=!1,E=!1;r.addEventListener("mousedown",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;const t=this.bimViewer.viewer.scene.input;t.keyDown[t.KEY_CTRL]||i.setObjectsSelected(i.selectedObjectIds,!1),n=e.pageX,a=e.pageY,o.visibility="visible",o.left=`${n}px`,o.top=`${a}px`,o.width="0px",o.height="0px",o.display="block",c=e.offsetX,A=e.offsetY,f=!0,this.viewer.cameraControl.pointerEnabled=!1})),r.addEventListener("mouseup",(e=>{if(!this.getActive()||!this.getEnabled())return;if(!f&&!E)return;if(0!==e.button)return;l=e.pageX,h=e.pageY;const t=Math.abs(l-n),s=Math.abs(h-a);o.width=`${t}px`,o.height=`${s}px`,o.visibility="hidden",f=!1,this.viewer.cameraControl.pointerEnabled=!0,E&&(E=!1),(t>3||s>3)&&this._marqueePick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&this.getEnabled()&&0===e.button&&f&&(o.visibility="hidden",f=!1,E=!0,this.viewer.cameraControl.pointerEnabled=!0)}),!0),r.addEventListener("mousemove",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;if(!f)return;const t=e.pageX,s=e.pageY,i=t-n,r=s-a;o.width=`${Math.abs(i)}px`,o.height=`${Math.abs(r)}px`,o.left=`${Math.min(n,t)}px`,o.top=`${Math.min(a,s)}px`,p=e.offsetX,d=e.offsetY;const l=c{if(i===Mi.INTERSECT&&(i=Li(this._marqueeFrustum,s.aabb)),i!==Mi.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,i=t.length;s{e.preventDefault()},o.oncontextmenu=e=>{e.preventDefault()},n.oncontextmenu=e=>{e.preventDefault()};const l=new ME({localeService:t.localeService,canvasElement:s,keyboardEventsElement:t.keyboardEventsElement,transparent:!1,backgroundColor:[1,1,1],backgroundColorFromAmbientLight:!1,saoEnabled:!0,pbrEnabled:!1,colorTextureEnabled:!0});super(null,t,e,l),this._configs={},this._enableAddModels=!!t.enableEditModels,this._enablePropertiesInspector=!!t.inspectorElement,this.viewer=l,this._objectsKdTree3=new Zg({viewer:l}),this._customizeViewer(),this._initCanvasContextMenus(),i.innerHTML=function(e){return'
\n
\n Models\n
\n
\n \n '+(e.enableEditModels?'':"")+'
\n
\n
\n
\n
\n Objects\n
\n
\n \n \n
\n
\n
\n
\n
\n Classes\n
\n
\n \n \n
\n
\n
\n
\n
\n Storeys\n
\n
\n \n \n
\n
\n
\n
\n
'}(t),o.innerHTML='
\n \x3c!-- Reset button --\x3e\n
\n \n
\n
\n \x3c!-- 3D Mode button --\x3e\n \n \x3c!-- Perspective/Ortho Mode button --\x3e\n \n \x3c!-- Fit button --\x3e\n \n \x3c!-- First Person mode button --\x3e\n \n \x3c!-- Show/hide IFCSpaces --\x3e\n \n
\n \x3c!-- Tools button group --\x3e\n
\n \x3c!-- Hide tool button --\x3e\n \n \x3c!-- Select tool button --\x3e\n \n \x3c!-- Marquee select tool button --\x3e\n \n \x3c!-- section tool button --\x3e\n \n
\n
',this._enablePropertiesInspector&&(r.innerHTML='
\n
\n Properties\n
\n
\n
\n
\n
'),this._explorerElement=i,this._inspectorElement=r,Jg(i),this._enablePropertiesInspector&&Jg(r),this._modelsExplorer=new Fg(this,{modelsTabElement:i.querySelector(".xeokit-modelsTab"),loadModelsButtonElement:i.querySelector(".xeokit-loadAllModels"),unloadModelsButtonElement:i.querySelector(".xeokit-unloadAllModels"),addModelButtonElement:i.querySelector(".xeokit-addModel"),modelsElement:i.querySelector(".xeokit-models"),enableEditModels:this._enableAddModels}),this._objectsExplorer=new Ug(this,{objectsTabElement:i.querySelector(".xeokit-objectsTab"),showAllObjectsButtonElement:i.querySelector(".xeokit-showAllObjects"),hideAllObjectsButtonElement:i.querySelector(".xeokit-hideAllObjects"),objectsElement:i.querySelector(".xeokit-objects")}),this._classesExplorer=new Hg(this,{classesTabElement:i.querySelector(".xeokit-classesTab"),showAllClassesButtonElement:i.querySelector(".xeokit-showAllClasses"),hideAllClassesButtonElement:i.querySelector(".xeokit-hideAllClasses"),classesElement:i.querySelector(".xeokit-classes")}),this._storeysExplorer=new kg(this,{storeysTabElement:i.querySelector(".xeokit-storeysTab"),showAllStoreysButtonElement:i.querySelector(".xeokit-showAllStoreys"),hideAllStoreysButtonElement:i.querySelector(".xeokit-hideAllStoreys"),storeysElement:i.querySelector(".xeokit-storeys")}),this._enablePropertiesInspector&&(this._propertiesInspector=new Kg(this,{propertiesTabElement:r.querySelector(".xeokit-propertiesTab"),propertiesElement:r.querySelector(".xeokit-properties")})),this._resetAction=new gg(this,{buttonElement:o.querySelector(".xeokit-reset"),active:!1}),this._fitAction=new vg(this,{buttonElement:o.querySelector(".xeokit-fit"),active:!1});const h=new function(e){let t=!1;this.setThreeDModeActive=s=>{s?(e._firstPersonMode.setActive(!1),e._marqueeSelectionTool.setEnabled(!0),e.viewer.cameraControl.navMode="orbit"):(e._marqueeSelectionTool.setEnabled(!1),e._marqueeSelectionTool.setActive(!1),e._firstPersonMode.setActive(!1),e.viewer.cameraControl.navMode="planView"),t=s},this.setFirstPersonModeActive=s=>{e.viewer.cameraControl.navMode=s?"firstPerson":t?"orbit":"planView"}}(this);this._threeDMode=new jg(this,{buttonElement:o.querySelector(".xeokit-threeD"),cameraControlNavModeMediator:h,active:!1}),this._orthoMode=new zg(this,{buttonElement:o.querySelector(".xeokit-ortho"),active:!1}),this._firstPersonMode=new Tg(this,{buttonElement:o.querySelector(".xeokit-firstPerson"),cameraControlNavModeMediator:h,active:!1}),this._hideTool=new _g(this,{buttonElement:o.querySelector(".xeokit-hide"),active:!1}),this._selectionTool=new Rg(this,{buttonElement:o.querySelector(".xeokit-select"),active:!1}),this._marqueeSelectionTool=new qg(this,{buttonElement:o.querySelector(".xeokit-marquee"),active:!1,objectsKdTree3:this._objectsKdTree3}),this._showSpacesMode=new Pg(this,{buttonElement:o.querySelector(".xeokit-showSpaces"),active:!1}),this._queryTool=new Dg(this,{active:!1}),this._sectionTool=new bg(this,{buttonElement:o.querySelector(".xeokit-section"),counterElement:o.querySelector(".xeokit-section-counter"),menuButtonElement:o.querySelector(".xeokit-section-menu-button"),menuButtonArrowElement:o.querySelector(".xeokit-section-menu-button-arrow"),active:!1}),this._navCubeMode=new Sg(this,{navCubeCanvasElement:n,active:!0}),this._busyModal=new mg(this,{busyModalBackdropElement:a}),this._threeDMode.setActive(!0),this._firstPersonMode.setActive(!1),this._navCubeMode.setActive(!0),this._modelsExplorer.on("modelLoaded",(e=>{this._modelsExplorer.getNumModelsLoaded()>0&&this.setControlsEnabled(!0),this.fire("modelLoaded",e)})),this._modelsExplorer.on("modelUnloaded",(e=>{0===this._modelsExplorer.getNumModelsLoaded()&&(this.setControlsEnabled(!1),this.openTab("models")),this.fire("modelUnloaded",e)})),this._resetAction.on("reset",(()=>{this.fire("reset",!0)})),this._mutexActivation([this._hideTool,this._selectionTool,this._marqueeSelectionTool,this._sectionTool]),i.querySelector(".xeokit-showAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-loadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this.loadAllModels(),e.preventDefault()})),i.querySelector(".xeokit-unloadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this._modelsExplorer.unloadAllModels(),e.preventDefault()})),this._enableAddModels&&i.querySelector(".xeokit-addModel").addEventListener("click",(e=>{this.fire("addModel",{}),e.preventDefault()})),this._bcfViewpointsPlugin=new Ei(this.viewer,{}),this._fastNavPlugin=new vi(l,{hideEdges:!0,hideSAO:!0,hidePBR:!1,hideColorTexture:!1,hideTransparentObjects:!1,scaleCanvasResolution:!1,scaleCanvasResolutionFactor:.6}),this.viewer.scene.on("rendered",(()=>{const e=this._fastNavPlugin;e.hideEdges=5").firstChild;document.body.appendChild(t),this.viewer.cameraControl.pivotElement=t,e.camera.perspective.near=.01,e.camera.perspective.far=3e3,e.camera.ortho.near=.01,e.camera.ortho.far=2e3;const s=e.sao;s.enabled=!0,s.numSamples=50,s.kernelRadius=200}_initCanvasContextMenus(){this._canvasContextMenu=new Wg(this,{hideOnAction:!0}),this._objectContextMenu=new Qg(this,{hideOnAction:!0}),this.viewer.cameraControl.on("rightClick",(e=>{e.event;const t=this.viewer.scene.pick({canvasPos:e.canvasPos});t&&t.entity.isObject?(this._canvasContextMenu.hide(),this._objectContextMenu.context={viewer:this.viewer,bimViewer:this,showObjectInExplorers:e=>{const t=this.getOpenTab();"objects"!==t&&"classes"!==t&&"storeys"!==t&&this.openTab("objects"),this.showObjectInExplorers(e)},entity:t.entity},this._objectContextMenu.show(e.pagePos[0],e.pagePos[1])):(this._objectContextMenu.hide(),this._canvasContextMenu.context={viewer:this.viewer,bimViewer:this},this._canvasContextMenu.show(e.pagePos[0],e.pagePos[1]))}))}_initConfigs(){this.setConfigs({cameraNear:"0.05",cameraFar:"3000.0",smartPivot:"true",saoEnabled:"true",pbrEnabled:"false",saoBias:"0.5",saoIntensity:"0.15",saoNumSamples:"40",saoKernelRadius:"100",edgesEnabled:!0,xrayContext:!0,xrayPickable:!1,selectedGlowThrough:!0,highlightGlowThrough:!0,backgroundColor:[1,1,1],externalMetadata:!1,dtxEnabled:!1})}setConfigs(e){for(let t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setConfig(t,s)}}setConfig(e,t){function s(e){return!0===e||"true"===e}try{switch(e){case"backgroundColor":const i=t;this.setBackgroundColor(i),this._configs[e]=i;break;case"cameraNear":const r=parseFloat(t);this.viewer.scene.camera.perspective.near=r,this.viewer.scene.camera.ortho.near=r,this._configs[e]=r;break;case"cameraFar":const o=parseFloat(t);this.viewer.scene.camera.perspective.far=o,this._configs[e]=o;break;case"smartPivot":this.viewer.cameraControl.smartPivot=this._configs[e]=s(t);break;case"saoEnabled":this._fastNavPlugin.saoEnabled=this._configs[e]=s(t);break;case"saoBias":this.viewer.scene.sao.bias=parseFloat(t);break;case"saoIntensity":this.viewer.scene.sao.intensity=parseFloat(t);break;case"saoKernelRadius":this.viewer.scene.sao.kernelRadius=this._configs[e]=parseFloat(t);break;case"saoNumSamples":this.viewer.scene.sao.numSamples=this._configs[e]=parseFloat(t);break;case"saoBlur":this.viewer.scene.sao.blur=this._configs[e]=s(t);break;case"edgesEnabled":this._fastNavPlugin.edgesEnabled=this._configs[e]=s(t);break;case"pbrEnabled":this._fastNavPlugin.pbrEnabled=this._configs[e]=s(t);break;case"viewFitFOV":this.viewer.cameraFlight.fitFOV=this._configs[e]=parseFloat(t);break;case"viewFitDuration":this.viewer.cameraFlight.duration=this._configs[e]=parseFloat(t);break;case"perspectiveFOV":this.viewer.camera.perspective.fov=this._configs[e]=parseFloat(t);break;case"excludeUnclassifiedObjects":case"xrayPickable":case"externalMetadata":this._configs[e]=s(t);break;case"xrayContext":this._configs[e]=t;break;case"selectedGlowThrough":const n=this._configs[e]=s(t),a=this.viewer.scene.selectedMaterial;a.glowThrough=n,a.fillAlpha=n?.5:1,a.edgeAlpha=n?.5:1;break;case"highlightGlowThrough":const l=this._configs[e]=s(t),h=this.viewer.scene.highlightMaterial;h.glowThrough=l,h.fillAlpha=l?.5:1,h.edgeAlpha=l?.5:1;break;case"showSpaces":this._configs[e]=s(t),this._showSpacesMode.setActive(t);break;case"dtxEnabled":this._configs[e]=s(t),this.viewer.scene.dtxEnabled=t;break;case"objectColors":this._configs[e]=t,this._modelsExplorer.setObjectColors(t);break;default:this.warn("setConfig() - unsupported configuration: '"+e+"'")}}catch(t){this.error("setConfig() - failed to configure '"+e+"': "+t)}}getConfig(e){return this._configs[e]}getProjectsInfo(e,t){e?this.server.getProjects(e,(e=>{this.error("getProjectsInfo() - "+e),t&&t(e)})):this.error("getProjectsInfo() - Argument expected: 'done'")}getProjectInfo(e,t,s){e?t?this.server.getProject(e,t,(e=>{this.error("getProjectInfo() - "+e),s&&s(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getProjectInfo() - Argument expected: projectId")}getObjectInfo(e,t,s,i,r){e?t?s?i?this.server.getObjectInfo(e,t,s,i,(e=>{r&&r(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getObjectInfo() - Argument expected: objectId"):this.error("getObjectInfo() - Argument expected: modelId"):this.error("getObjectInfo() - Argument expected: projectId")}loadProject(e,t,s){e?this._modelsExplorer.loadProject(e,(()=>{t&&t()}),(e=>{this.error("loadProject() - "+e),s&&s(e)})):this.error("loadProject() - Argument expected: objectId")}unloadProject(){this._modelsExplorer.unloadProject(),this.openTab("models"),this.setControlsEnabled(!1)}getLoadedProjectId(){return this._modelsExplorer.getLoadedProjectId()}getModelIds(){return this._modelsExplorer.getModelIds()}loadModel(e,t,s){e?this._modelsExplorer.loadModel(e,(()=>{t&&t()}),(e=>{this.error("loadModel() - "+e),s&&s(e)})):this.error("loadModel() - Argument expected: modelId")}loadAllModels(e=function(){}){const t=this._modelsExplorer.getModelIds(),s=(e,i)=>{if(e>=t.length)i();else{const r=t[e];this._modelsExplorer.isModelLoaded(r)?s(e+1,i):this._modelsExplorer.loadModel(r,(()=>{s(e+1,i)}),(t=>{this.error("loadAllModels() - "+t),s(e+1,i)}))}};s(0,e)}getLoadedModelIds(){return this._modelsExplorer._getLoadedModelIds()}isModelLoaded(e){if(e)return this._modelsExplorer.isModelLoaded(e);this.error("unloadModel() - Argument expected: modelId")}unloadModel(e){e?this._modelsExplorer.unloadModel(e):this.error("unloadModel() - Argument expected: modelId")}unloadAllModels(){this._modelsExplorer.unloadAllModels()}editModel(e){this.fire("editModel",{modelId:e})}deleteModel(e){this.fire("deleteModel",{modelId:e})}addModel(){this.fire("addModel",{})}setBackgroundColor(e){this.viewer.scene.canvas.backgroundColor=e}setObjectColorSource(e){console.log("BIMViewer.setObjectColorSource() is now deprecated and no longer functional. By default, BIMViewer.getObjectColorSource() will now always return the (formerly) default value of `model`.")}getObjectColorSource(){return"model"}setViewerState(e,t=(()=>{})){e.tabOpen&&this.openTab(e.tabOpen),e.expandObjectsTree&&this._objectsExplorer.expandTreeViewToDepth(e.expandObjectsTree),e.expandClassesTree&&this._classesExplorer.expandTreeViewToDepth(e.expandClassesTree),e.expandStoreysTree&&this._storeysExplorer.expandTreeViewToDepth(e.expandStoreysTree),e.setCamera&&this.setCamera(e.setCamera),this._parseSelectedStorey(e,(()=>{this._parseThreeDMode(e,(()=>{t()}))}))}_parseSelectedStorey(e,t){e.selectedStorey?(this.selectStorey(e.selectedStorey),t()):t()}_parseThreeDMode(e,t){const s=!1!==e.threeDActive;this.set3DEnabled(s,t)}showObjectInExplorers(e){e?(this._objectsExplorer.showNodeInTreeView(e),this._classesExplorer.showNodeInTreeView(e),this._storeysExplorer.showNodeInTreeView(e),this.fire("openExplorer",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}unShowObjectInExplorers(){this._objectsExplorer.unShowNodeInTreeView(),this._classesExplorer.unShowNodeInTreeView(),this._storeysExplorer.unShowNodeInTreeView()}showObjectProperties(e){e?(this._enablePropertiesInspector&&this._propertiesInspector.showObjectPropertySets(e),this.fire("openInspector",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}setObjectsVisible(e,t){this._withObjectsInSubtree(e,(e=>{e.visible=t}))}setAllObjectsVisible(e){e?this.viewer.scene.setObjectsVisible(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsVisible(this.viewer.scene.visibleObjectIds,!1)}setObjectsXRayed(e,t){this._withObjectsInSubtree(e,(e=>{e.xrayed=t}))}setAllObjectsXRayed(e){e?this.viewer.scene.setObjectsXRayed(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsXRayed(this.viewer.scene.xrayedObjectIds,!1)}setObjectsSelected(e,t){this._withObjectsInSubtree(e,(e=>{e.selected=t}))}setAllObjectsSelected(e){e?this.viewer.scene.setObjectsSelected(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsSelected(this.viewer.scene.selectedObjectIds,!1)}_withObjectsInSubtree(e,t){if(e)for(let s=0,i=e.length;s{const s=this.viewer.scene.objects[e.id];s&&t(s)}))}else this.error("Argument expected: objectIds")}flyToObject(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectId");const s=this.viewer,i=s.scene,r=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{i.objects[e.id]&&r.push(e.id)})),0===r.length)return this.error("Object not found in viewer: '"+e+"'"),void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const o=i.getAABB(r);s.cameraFlight.flyTo({aabb:o},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=u.getAABB3Center(o)}viewFitObjects(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectIds");const s=this.viewer,i=s.scene,r=[];for(var o=0,n=e.length;o{i.objects[e.id]&&r.push(e.id)}))}if(0===r.length)return void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const a=i.getAABB(r);s.cameraFlight.flyTo({aabb:a},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=u.getAABB3Center(a)}viewFitAll(e){const t=this.viewer,s=t.scene.getAABB();t.cameraFlight.flyTo({aabb:s},(()=>{e&&e()})),t.cameraControl.pivotPos=u.getAABB3Center(s)}jumpToObject(e){if(!e)return void this.error("jumpToObject() - Argument expected: objectId");const t=this.viewer,s=t.scene,i=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{s.objects[e.id]&&i.push(e.id)})),0===i.length)return void this.error("Object not found in viewer: '"+e+"'");s.setObjectsVisible(i,!0);const r=s.getAABB(i);t.cameraFlight.jumpTo({aabb:r}),t.cameraControl.pivotPos=u.getAABB3Center(r)}setCamera(e){const t=this.viewer.scene.camera;e.eye&&(t.eye=e.eye),e.look&&(t.look=e.look),e.up&&(t.up=e.up)}viewFitModels(e,t){if(!e)return void this.error("viewFitModels() - Argument expected: modelIds");const s=this.viewer,i=s.scene,r=u.AABB3();u.collapseAABB3(r);for(var o=0,n=e.length;o{t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})):(s.cameraFlight.jumpTo({aabb:r}),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)),s.cameraControl.pivotPos=u.getAABB3Center(r)}openTab(e){if(!e)return void this.error("openTab() - Argument expected: tabId");let t;switch(e){case"models":t="xeokit-modelsTab";break;case"objects":t="xeokit-objectsTab";break;case"classes":t="xeokit-classesTab";break;case"storeys":t="xeokit-storeysTab";break;case"properties":t="xeokit-propertiesTab";break;default:return void this.error("openTab() - tab not recognized: '"+e+"'")}this._openTab(this._explorerElement,t)}_openTab(e,t){const s="active";let i=e.querySelectorAll(".xeokit-tab"),r=e.querySelector("."+t);for(let e=0;e-1}const t="active";return e(this._explorerElement.querySelector(".xeokit-modelsTab"),t)?"models":e(this._explorerElement.querySelector(".xeokit-objectsTab"),t)?"objects":e(this._explorerElement.querySelector(".xeokit-classesTab"),t)?"classes":e(this._explorerElement.querySelector(".xeokit-storeysTab"),t)?"storeys":e(this._inspectorElement.querySelector(".xeokit-propertiesTab"),t)?"properties":"none"}set3DEnabled(e,t){this._threeDMode.setActive(e,t)}get3DEnabled(){return this._threeDMode.getActive()}setSpacesShown(e){this._showSpacesMode.setActive(e)}getSpacesShown(){return this._showSpacesMode.getActive()}setOrthoEnabled(e,t){this._orthoMode.setActive(e,t)}getOrthoEnabled(){return this._orthoMode.getActive()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];s?"IfcBuildingStorey"===s.type?this._storeysExplorer.selectStorey(e,t):this.error("selectStorey() - Object is not an IfcBuildingStorey: '"+e+"'"):this.error("selectStorey() - Object is not found: '"+e+"'")}saveBCFViewpoint(e){return this._bcfViewpointsPlugin.getViewpoint(e)}loadBCFViewpoint(e,t){e?(this._orthoMode.setActive("ortho"===this.viewer.camera.projection),this._bcfViewpointsPlugin.setViewpoint(e,t)):this.error("loadBCFViewpoint() - Argument expected: bcfViewpoint")}resetView(){this._resetAction.reset()}setControlsEnabled(e){this._objectsExplorer.setEnabled(e),this._classesExplorer.setEnabled(e),this._storeysExplorer.setEnabled(e),this._resetAction.setEnabled(e),this._fitAction.setEnabled(e),this._threeDMode.setEnabled(e),this._orthoMode.setEnabled(e),this._firstPersonMode.setEnabled(e),this._queryTool.setEnabled(e),this._hideTool.setEnabled(e),this._selectionTool.setEnabled(e),this._marqueeSelectionTool.setEnabled(e),this._showSpacesMode.setEnabled(e),this._sectionTool.setEnabled(e),this._enablePropertiesInspector&&this._propertiesInspector.setEnabled(e)}setKeyboardEnabled(e){this.viewer.scene.input.keyboardEnabled=e}getKeyboardEnabled(){return this.viewer.scene.input.keyboardEnabled}clearSections(){this._sectionTool.clear()}disableSections(){this._sectionTool.disableSections()}enableSections(){this._sectionTool.enableSections()}flipSections(){this._sectionTool.flipSections()}hideSectionEditControl(){this._sectionTool.hideControl()}getNumSections(){return this._sectionTool.getNumSections()}destroy(){this.viewer.destroy(),this._bcfViewpointsPlugin.destroy(),this._canvasContextMenu.destroy(),this._objectContextMenu.destroy()}}export{$g as BIMViewer,Ti as LocaleService,dg as Server}; diff --git a/dist/xeokit-bim-viewer.min.umd.js b/dist/xeokit-bim-viewer.min.umd.js index 74a6a1b7..e279e27d 100644 --- a/dist/xeokit-bim-viewer.min.umd.js +++ b/dist/xeokit-bim-viewer.min.umd.js @@ -1,4 +1,4 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bundle={})}(this,(function(e){"use strict";class t{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const s=new t;class i{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class r{constructor(){this.items=[]}}class o{constructor(e,t,s,i,r){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=i,this.getShown=r,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class n{constructor(e={}){this._id=s.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,i=s.length;e{const s=this._getNextId(),n=new i(s);for(let s=0,i=e.length;s0,h=this._getNextId(),c=s.getTitle||(()=>s.title||""),A=s.doAction||s.callback||(()=>{}),u=s.getEnabled||(()=>!0),p=s.getShown||(()=>!0),d=new o(h,c,A,u,p);if(d.parentMenu=n,a.items.push(d),l){const e=t(r);d.subMenu=e,e.parentItem=d}this._itemList.push(d),this._itemMap[d.id]=d}}return this._menuList.push(n),this._menuMap[n.id]=n,n};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,i=s.length;t'),s.push("
    "),t)for(let e=0,i=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const i=s.join("");document.body.insertAdjacentHTML("beforeend",i);const r=document.querySelector("."+e.id);e.menuElement=r,r.style["border-radius"]="4px",r.style.display="none",r.style["z-index"]=3e5,r.style.background="white",r.style.border="1px solid black",r.style["box-shadow"]="0 4px 5px 0 gray",r.oncontextmenu=e=>{e.preventDefault()};const o=this;let n=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(n&&(o._hideMenu(n.id),n=null));if(n&&n.id!==s.id&&(o._hideMenu(n.id),n=null),!1===t.enabled)return;const i=t.itemElement,r=s.menuElement,a=i.getBoundingClientRect();r.getBoundingClientRect();a.right+200>window.innerWidth?o._showMenu(s.id,a.left-200,a.top-1):o._showMenu(s.id,a.right-5,a.top-1),n=s})),i||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),o._context&&!1!==t.enabled&&(t.doAction&&t.doAction(o._context),this._hideOnAction?o.hide():(o._updateItemsTitles(),o._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(o._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-i),t+r>window.innerWidth&&(t=window.innerWidth-r),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class a{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new t),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=e;const n=this._events[e];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}let l=!0,h=l?Float64Array:Float32Array;const c=new h(16),A=new h(16),u=new h(4),p={setDoublePrecisionEnabled(e){l=e,h=l?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>l,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new h(e||2),vec3:e=>new h(e||3),vec4:e=>new h(e||4),mat3:e=>new h(e||9),mat3ToMat4:(e,t=new h(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new h(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const i=new h(2);for(let r=0,o=e.length;r{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&i|128]}${e[i>>8&255]}-${e[i>>16&255]}${e[i>>24&255]}${e[255&r]}${e[r>>8&255]}${e[r>>16&255]}${e[r>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new h(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],i=e[1],r=e[2],o=t[0],n=t[1],a=t[2];return[i*a-r*n,r*o-s*a,s*n-i*o,0]},cross3Vec3(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=t[0],a=t[1],l=t[2];return s[0]=r*l-o*a,s[1]=o*n-i*l,s[2]=i*a-r*n,s},sqLenVec4:e=>p.dotVec4(e,e),lenVec4:e=>Math.sqrt(p.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>p.dotVec3(e,e),sqLenVec2:e=>p.dotVec2(e,e),lenVec3:e=>Math.sqrt(p.sqLenVec3(e)),distVec3:(()=>{const e=new h(3);return(t,s)=>p.lenVec3(p.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(p.sqLenVec2(e)),distVec2:(()=>{const e=new h(2);return(t,s)=>p.lenVec2(p.subVec2(t,s,e))})(),rcpVec3:(e,t)=>p.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/p.lenVec4(e);return p.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/p.lenVec3(e);return p.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/p.lenVec2(e);return p.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=p.dotVec3(e,t)/Math.sqrt(p.sqLenVec3(e)*p.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new h(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=p.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=p.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=p.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,i=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||p.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>p.m4s(0),setMat4ToOnes:()=>p.m4s(1),diagonalMat4v:e=>new h([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,i)=>p.diagonalMat4v([e,t,s,i]),diagonalMat4s:e=>p.diagonalMat4c(e,e,e,e),identityMat4:(e=new h(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new h(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>p.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=e[3],a=e[4],l=e[5],h=e[6],c=e[7],A=e[8],u=e[9],p=e[10],d=e[11],f=e[12],E=e[13],m=e[14],y=e[15],g=t[0],I=t[1],v=t[2],T=t[3],_=t[4],R=t[5],P=t[6],D=t[7],N=t[8],b=t[9],C=t[10],O=t[11],S=t[12],x=t[13],w=t[14],B=t[15];return s[0]=g*i+I*a+v*A+T*f,s[1]=g*r+I*l+v*u+T*E,s[2]=g*o+I*h+v*p+T*m,s[3]=g*n+I*c+v*d+T*y,s[4]=_*i+R*a+P*A+D*f,s[5]=_*r+R*l+P*u+D*E,s[6]=_*o+R*h+P*p+D*m,s[7]=_*n+R*c+P*d+D*y,s[8]=N*i+b*a+C*A+O*f,s[9]=N*r+b*l+C*u+O*E,s[10]=N*o+b*h+C*p+O*m,s[11]=N*n+b*c+C*d+O*y,s[12]=S*i+x*a+w*A+B*f,s[13]=S*r+x*l+w*u+B*E,s[14]=S*o+x*h+w*p+B*m,s[15]=S*n+x*c+w*d+B*y,s},mulMat3(e,t,s){s||(s=new h(9));const i=e[0],r=e[3],o=e[6],n=e[1],a=e[4],l=e[7],c=e[2],A=e[5],u=e[8],p=t[0],d=t[3],f=t[6],E=t[1],m=t[4],y=t[7],g=t[2],I=t[5],v=t[8];return s[0]=i*p+r*E+o*g,s[3]=i*d+r*m+o*I,s[6]=i*f+r*y+o*v,s[1]=n*p+a*E+l*g,s[4]=n*d+a*m+l*I,s[7]=n*f+a*y+l*v,s[2]=c*p+A*E+u*g,s[5]=c*d+A*m+u*I,s[8]=c*f+A*y+u*v,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=p.vec4()){const i=t[0],r=t[1],o=t[2],n=t[3];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12]*n,s[1]=e[1]*i+e[5]*r+e[9]*o+e[13]*n,s[2]=e[2]*i+e[6]*r+e[10]*o+e[14]*n,s[3]=e[3]*i+e[7]*r+e[11]*o+e[15]*n,s},transposeMat4(e,t){const s=e[4],i=e[14],r=e[8],o=e[13],n=e[12],a=e[9];if(!t||e===t){const t=e[1],l=e[2],h=e[3],c=e[6],A=e[7],u=e[11];return e[1]=s,e[2]=r,e[3]=n,e[4]=t,e[6]=a,e[7]=o,e[8]=l,e[9]=c,e[11]=i,e[12]=h,e[13]=A,e[14]=u,e}return t[0]=e[0],t[1]=s,t[2]=r,t[3]=n,t[4]=e[1],t[5]=e[5],t[6]=a,t[7]=o,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=i,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],n=e[5],a=e[6],l=e[7],h=e[8],c=e[9],A=e[10],u=e[11],p=e[12],d=e[13],f=e[14],E=e[15];return p*c*a*r-h*d*a*r-p*n*A*r+o*d*A*r+h*n*f*r-o*c*f*r-p*c*i*l+h*d*i*l+p*s*A*l-t*d*A*l-h*s*f*l+t*c*f*l+p*n*i*u-o*d*i*u-p*s*a*u+t*d*a*u+o*s*f*u-t*n*f*u-h*n*i*E+o*c*i*E+h*s*a*E-t*c*a*E-o*s*A*E+t*n*A*E},inverseMat4(e,t){t||(t=e);const s=e[0],i=e[1],r=e[2],o=e[3],n=e[4],a=e[5],l=e[6],h=e[7],c=e[8],A=e[9],u=e[10],p=e[11],d=e[12],f=e[13],E=e[14],m=e[15],y=s*a-i*n,g=s*l-r*n,I=s*h-o*n,v=i*l-r*a,T=i*h-o*a,_=r*h-o*l,R=c*f-A*d,P=c*E-u*d,D=c*m-p*d,N=A*E-u*f,b=A*m-p*f,C=u*m-p*E,O=1/(y*C-g*b+I*N+v*D-T*P+_*R);return t[0]=(a*C-l*b+h*N)*O,t[1]=(-i*C+r*b-o*N)*O,t[2]=(f*_-E*T+m*v)*O,t[3]=(-A*_+u*T-p*v)*O,t[4]=(-n*C+l*D-h*P)*O,t[5]=(s*C-r*D+o*P)*O,t[6]=(-d*_+E*I-m*g)*O,t[7]=(c*_-u*I+p*g)*O,t[8]=(n*b-a*D+h*R)*O,t[9]=(-s*b+i*D-o*R)*O,t[10]=(d*T-f*I+m*y)*O,t[11]=(-c*T+A*I-p*y)*O,t[12]=(-n*N+a*P-l*R)*O,t[13]=(s*N-i*P+r*R)*O,t[14]=(-d*v+f*g-E*y)*O,t[15]=(c*v-A*g+u*y)*O,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||p.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||p.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new h(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,p.translationMat4v(e,r))})(),translationMat4s:(e,t)=>p.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>p.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,i){const r=i[3];i[0]+=r*e,i[1]+=r*t,i[2]+=r*s;const o=i[7];i[4]+=o*e,i[5]+=o*t,i[6]+=o*s;const n=i[11];i[8]+=n*e,i[9]+=n*t,i[10]+=n*s;const a=i[15];return i[12]+=a*e,i[13]+=a*t,i[14]+=a*s,i},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const i=p.normalizeVec4([t[0],t[1],t[2],0],[]),r=Math.sin(e),o=Math.cos(e),n=1-o,a=i[0],l=i[1],h=i[2];let c,A,u,d,f,E;return c=a*l,A=l*h,u=h*a,d=a*r,f=l*r,E=h*r,(s=s||p.mat4())[0]=n*a*a+o,s[1]=n*c+E,s[2]=n*u-f,s[3]=0,s[4]=n*c-E,s[5]=n*l*l+o,s[6]=n*A+d,s[7]=0,s[8]=n*u+f,s[9]=n*A-d,s[10]=n*h*h+o,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,i,r)=>p.rotationMat4v(e,[t,s,i],r),scalingMat4v:(e,t=p.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=p.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new h(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,p.scalingMat4v(e,r))})(),scaleMat4c:(e,t,s,i)=>(i[0]*=e,i[4]*=t,i[8]*=s,i[1]*=e,i[5]*=t,i[9]*=s,i[2]*=e,i[6]*=t,i[10]*=s,i[3]*=e,i[7]*=t,i[11]*=s,i),scaleMat4v(e,t){const s=e[0],i=e[1],r=e[2];return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,t},scalingMat4s:e=>p.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=p.mat4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=i+i,l=r+r,h=o+o,c=i*a,A=i*l,u=i*h,d=r*l,f=r*h,E=o*h,m=n*a,y=n*l,g=n*h;return s[0]=1-(d+E),s[1]=A+g,s[2]=u-y,s[3]=0,s[4]=A-g,s[5]=1-(c+E),s[6]=f+m,s[7]=0,s[8]=u+y,s[9]=f-m,s[10]=1-(c+d),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=p.vec4()){const i=p.clamp,r=e[0],o=e[4],n=e[8],a=e[1],l=e[5],h=e[9],c=e[2],A=e[6],u=e[10];return"XYZ"===t?(s[1]=Math.asin(i(n,-1,1)),Math.abs(n)<.99999?(s[0]=Math.atan2(-h,u),s[2]=Math.atan2(-o,r)):(s[0]=Math.atan2(A,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(n,u),s[2]=Math.atan2(a,l)):(s[1]=Math.atan2(-c,r),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(i(A,-1,1)),Math.abs(A)<.99999?(s[1]=Math.atan2(-c,u),s[2]=Math.atan2(-o,l)):(s[1]=0,s[2]=Math.atan2(a,r))):"ZYX"===t?(s[1]=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(s[0]=Math.atan2(A,u),s[2]=Math.atan2(a,r)):(s[0]=0,s[2]=Math.atan2(-o,l))):"YZX"===t?(s[2]=Math.asin(i(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-h,l),s[1]=Math.atan2(-c,r)):(s[0]=0,s[1]=Math.atan2(n,u))):"XZY"===t&&(s[2]=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(A,l),s[1]=Math.atan2(n,r)):(s[0]=Math.atan2(-h,u),s[1]=0)),s},composeMat4:(e,t,s,i=p.mat4())=>(p.quaternionToRotationMat4(t,i),p.scaleMat4v(s,i),p.translateMat4v(e,i),i),decomposeMat4:(()=>{const e=new h(3),t=new h(16);return function(s,i,r,o){e[0]=s[0],e[1]=s[1],e[2]=s[2];let n=p.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const a=p.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=p.lenVec3(e);p.determinantMat4(s)<0&&(n=-n),i[0]=s[12],i[1]=s[13],i[2]=s[14],t.set(s);const h=1/n,c=1/a,A=1/l;return t[0]*=h,t[1]*=h,t[2]*=h,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=A,t[9]*=A,t[10]*=A,p.mat4ToQuaternion(t,r),o[0]=n,o[1]=a,o[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,i){i||(i=p.mat4());const r=e[0],o=e[1],n=e[2],a=s[0],l=s[1],h=s[2],c=t[0],A=t[1],u=t[2];if(r===c&&o===A&&n===u)return p.identityMat4();let d,f,E,m,y,g,I,v,T,_;return d=r-c,f=o-A,E=n-u,_=1/Math.sqrt(d*d+f*f+E*E),d*=_,f*=_,E*=_,m=l*E-h*f,y=h*d-a*E,g=a*f-l*d,_=Math.sqrt(m*m+y*y+g*g),_?(_=1/_,m*=_,y*=_,g*=_):(m=0,y=0,g=0),I=f*g-E*y,v=E*m-d*g,T=d*y-f*m,_=Math.sqrt(I*I+v*v+T*T),_?(_=1/_,I*=_,v*=_,T*=_):(I=0,v=0,T=0),i[0]=m,i[1]=I,i[2]=d,i[3]=0,i[4]=y,i[5]=v,i[6]=f,i[7]=0,i[8]=g,i[9]=T,i[10]=E,i[11]=0,i[12]=-(m*r+y*o+g*n),i[13]=-(I*r+v*o+T*n),i[14]=-(d*r+f*o+E*n),i[15]=1,i},lookAtMat4c:(e,t,s,i,r,o,n,a,l)=>p.lookAtMat4v([e,t,s],[i,r,o],[n,a,l],[]),orthoMat4c(e,t,s,i,r,o,n){n||(n=p.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2/l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=-2/h,n[11]=0,n[12]=-(e+t)/a,n[13]=-(i+s)/l,n[14]=-(o+r)/h,n[15]=1,n},frustumMat4v(e,t,s){s||(s=p.mat4());const i=[e[0],e[1],e[2],0],r=[t[0],t[1],t[2],0];p.addVec4(r,i,c),p.subVec4(r,i,A);const o=2*i[2],n=A[0],a=A[1],l=A[2];return s[0]=o/n,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o/a,s[6]=0,s[7]=0,s[8]=c[0]/n,s[9]=c[1]/a,s[10]=-c[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-o*r[2]/l,s[15]=0,s},frustumMat4(e,t,s,i,r,o,n){n||(n=p.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2*r/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2*r/l,n[6]=0,n[7]=0,n[8]=(t+e)/a,n[9]=(i+s)/l,n[10]=-(o+r)/h,n[11]=-1,n[12]=0,n[13]=0,n[14]=-o*r*2/h,n[15]=0,n},perspectiveMat4(e,t,s,i,r){const o=[],n=[];return o[2]=s,n[2]=i,n[1]=o[2]*Math.tan(e/2),o[1]=-n[1],n[0]=n[1]*t,o[0]=-n[0],p.frustumMat4v(o,n,r)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=p.vec3()){const i=t[0],r=t[1],o=t[2];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12],s[1]=e[1]*i+e[5]*r+e[9]*o+e[13],s[2]=e[2]*i+e[6]*r+e[10]*o+e[14],s},transformPoint4:(e,t,s=p.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const i=s||[],r=t.length;let o,n,a,l;const h=e[0],c=e[1],A=e[2],u=e[3],p=e[4],d=e[5],f=e[6],E=e[7],m=e[8],y=e[9],g=e[10],I=e[11],v=e[12],T=e[13],_=e[14],R=e[15];let P;for(let e=0;e{const e=new h(16),t=new h(16),s=new h(16);return function(i,r,o,n){return this.transformVec3(this.mulMat4(this.inverseMat4(r,e),this.inverseMat4(o,t),s),i,n)}})(),lerpVec3(e,t,s,i,r,o){const n=o||p.vec3(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n},lerpMat4(e,t,s,i,r,o){const n=o||p.mat4(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n[3]=i[3]+a*(r[3]-i[3]),n[4]=i[4]+a*(r[4]-i[4]),n[5]=i[5]+a*(r[5]-i[5]),n[6]=i[6]+a*(r[6]-i[6]),n[7]=i[7]+a*(r[7]-i[7]),n[8]=i[8]+a*(r[8]-i[8]),n[9]=i[9]+a*(r[9]-i[9]),n[10]=i[10]+a*(r[10]-i[10]),n[11]=i[11]+a*(r[11]-i[11]),n[12]=i[12]+a*(r[12]-i[12]),n[13]=i[13]+a*(r[13]-i[13]),n[14]=i[14]+a*(r[14]-i[14]),n[15]=i[15]+a*(r[15]-i[15]),n},flatten(e){const t=[];let s,i,r,o,n;for(s=0,i=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=p.vec4()){const i=e[0]*p.DEGTORAD/2,r=e[1]*p.DEGTORAD/2,o=e[2]*p.DEGTORAD/2,n=Math.cos(i),a=Math.cos(r),l=Math.cos(o),h=Math.sin(i),c=Math.sin(r),A=Math.sin(o);return"XYZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"YXZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"ZXY"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"ZYX"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"YZX"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l-h*c*A):"XZY"===t&&(s[0]=h*a*l-n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l+h*c*A),s},mat4ToQuaternion(e,t=p.vec4()){const s=e[0],i=e[4],r=e[8],o=e[1],n=e[5],a=e[9],l=e[2],h=e[6],c=e[10];let A;const u=s+n+c;return u>0?(A=.5/Math.sqrt(u+1),t[3]=.25/A,t[0]=(h-a)*A,t[1]=(r-l)*A,t[2]=(o-i)*A):s>n&&s>c?(A=2*Math.sqrt(1+s-n-c),t[3]=(h-a)/A,t[0]=.25*A,t[1]=(i+o)/A,t[2]=(r+l)/A):n>c?(A=2*Math.sqrt(1+n-s-c),t[3]=(r-l)/A,t[0]=(i+o)/A,t[1]=.25*A,t[2]=(a+h)/A):(A=2*Math.sqrt(1+c-s-n),t[3]=(o-i)/A,t[0]=(r+l)/A,t[1]=(a+h)/A,t[2]=.25*A),t},vec3PairToQuaternion(e,t,s=p.vec4()){const i=Math.sqrt(p.dotVec3(e,e)*p.dotVec3(t,t));let r=i+p.dotVec3(e,t);return r<1e-8*i?(r=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):p.cross3Vec3(e,t,s),s[3]=r,p.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=p.vec4()){const s=e[3]/2,i=Math.sin(s);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new h(16);return(t,s,i)=>(i=i||p.vec3(),p.quaternionToRotationMat4(t,e),p.mat4ToEuler(e,s,i),i)})(),mulQuaternions(e,t,s=p.vec4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=t[0],l=t[1],h=t[2],c=t[3];return s[0]=n*a+i*c+r*h-o*l,s[1]=n*l+r*c+o*a-i*h,s[2]=n*h+o*c+i*l-r*a,s[3]=n*c-i*a-r*l-o*h,s},vec3ApplyQuaternion(e,t,s=p.vec3()){const i=t[0],r=t[1],o=t[2],n=e[0],a=e[1],l=e[2],h=e[3],c=h*i+a*o-l*r,A=h*r+l*i-n*o,u=h*o+n*r-a*i,d=-n*i-a*r-l*o;return s[0]=c*h+d*-n+A*-l-u*-a,s[1]=A*h+d*-a+u*-n-c*-l,s[2]=u*h+d*-l+c*-a-A*-n,s},quaternionToMat4(e,t){t=p.identityMat4(t);const s=e[0],i=e[1],r=e[2],o=e[3],n=2*s,a=2*i,l=2*r,h=n*o,c=a*o,A=l*o,u=n*s,d=a*s,f=l*s,E=a*i,m=l*i,y=l*r;return t[0]=1-(E+y),t[1]=d+A,t[2]=f-c,t[4]=d-A,t[5]=1-(u+y),t[6]=m+h,t[8]=f+c,t[9]=m-h,t[10]=1-(u+E),t},quaternionToRotationMat4(e,t){const s=e[0],i=e[1],r=e[2],o=e[3],n=s+s,a=i+i,l=r+r,h=s*n,c=s*a,A=s*l,u=i*a,p=i*l,d=r*l,f=o*n,E=o*a,m=o*l;return t[0]=1-(u+d),t[4]=c-m,t[8]=A+E,t[1]=c+m,t[5]=1-(h+d),t[9]=p-f,t[2]=A-E,t[6]=p+f,t[10]=1-(h+u),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=p.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>p.normalizeQuaternion(p.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=p.vec4()){const s=(e=p.normalizeQuaternion(e,u))[3],i=2*Math.acos(s),r=Math.sqrt(1-s*s);return r<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r),t[3]=i,t},AABB3:e=>new h(e||6),AABB2:e=>new h(e||4),OBB3:e=>new h(e||32),OBB2:e=>new h(e||16),Sphere3:(e,t,s,i)=>new h([e,t,s,i]),transformOBB3(e,t,s=t){let i;const r=t.length;let o,n,a;const l=e[0],h=e[1],c=e[2],A=e[3],u=e[4],p=e[5],d=e[6],f=e[7],E=e[8],m=e[9],y=e[10],g=e[11],I=e[12],v=e[13],T=e[14],_=e[15];for(i=0;i{const e=new h(3),t=new h(3),s=new h(3);return i=>(e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5],p.subVec3(t,e,s),Math.abs(p.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new h(3),t=new h(3),s=new h(3);return(i,r)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5];const o=p.subVec3(t,e,s),n=r[0]-i[0],a=i[3]-r[0],l=r[1]-i[1],h=i[4]-r[1],c=r[2]-i[2],A=i[5]-r[2];return o[0]+=n>a?n:a,o[1]+=l>h?l:h,o[2]+=c>A?c:A,Math.abs(p.lenVec3(o))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||p.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||p.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=p.AABB3())=>(e[0]=p.MAX_DOUBLE,e[1]=p.MAX_DOUBLE,e[2]=p.MAX_DOUBLE,e[3]=p.MIN_DOUBLE,e[4]=p.MIN_DOUBLE,e[5]=p.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=p.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new h(3);return(t,s,i)=>{s=s||p.AABB3();let r,o,n,a=p.MAX_DOUBLE,l=p.MAX_DOUBLE,h=p.MAX_DOUBLE,c=p.MIN_DOUBLE,A=p.MIN_DOUBLE,u=p.MIN_DOUBLE;for(let s=0,d=t.length;sc&&(c=r),o>A&&(A=o),n>u&&(u=n);return s[0]=a,s[1]=l,s[2]=h,s[3]=c,s[4]=A,s[5]=u,s}})(),OBB3ToAABB3(e,t=p.AABB3()){let s,i,r,o=p.MAX_DOUBLE,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE,c=p.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToAABB3(e,t=p.AABB3()){let s,i,r,o=p.MAX_DOUBLE,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE,c=p.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToSphere3:(()=>{const e=new h(3);return(t,s)=>{s=s||p.vec4();let i,r=0,o=0,n=0;const a=t.length;for(i=0;ih&&(h=l);return s[3]=h,s}})(),positions3ToSphere3:(()=>{const e=new h(3),t=new h(3);return(s,i)=>{i=i||p.vec4();let r,o=0,n=0,a=0;const l=s.length;let h=0;for(r=0;rh&&(h=A);return i[3]=h,i}})(),OBB3ToSphere3:(()=>{const e=new h(3),t=new h(3);return(s,i)=>{i=i||p.vec4();let r,o=0,n=0,a=0;const l=s.length,h=l/4;for(r=0;rA&&(A=c);return i[3]=A,i}})(),getSphere3Center:(e,t=p.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=p.vec3()){let s=0,i=0,r=0;for(var o=0,n=e.length;o(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>i&&(e[1]=i),e[2]>r&&(e[2]=r),e[3](e[0]=p.MAX_DOUBLE,e[1]=p.MAX_DOUBLE,e[2]=p.MIN_DOUBLE,e[3]=p.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(i=e[0]*s[0],r=e[0]*s[3]):(i=e[0]*s[3],r=e[0]*s[0]),e[1]>0?(i+=e[1]*s[1],r+=e[1]*s[4]):(i+=e[1]*s[4],r+=e[1]*s[1]),e[2]>0?(i+=e[2]*s[2],r+=e[2]*s[5]):(i+=e[2]*s[5],r+=e[2]*s[2]);if(i<=-t&&r<=-t)return-1;return i>=-t&&r>=-t?1:0},OBB3ToAABB2(e,t=p.AABB2()){let s,i,r,o,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE;for(let t=0,c=e.length;tl&&(l=s),i>h&&(h=i);return t[0]=n,t[1]=a,t[2]=l,t[3]=h,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(i-s),tangentQuadraticBezier3:(e,t,s,i,r)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*i*(1-e)-3*e*e*i+3*e*e*r,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,i,r){const o=.5*(s-e),n=.5*(i-t),a=r*r;return(2*t-2*s+o+n)*(r*a)+(-3*t+3*s-2*o-n)*a+o*r+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,i){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,i)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,i,r){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,i)+this.b3p3(e,r)},triangleNormal(e,t,s,i=p.vec3()){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=s[0]-e[0],l=s[1]-e[1],h=s[2]-e[2],c=o*h-n*l,A=n*a-r*h,u=r*l-o*a,d=Math.sqrt(c*c+A*A+u*u);return 0===d?(i[0]=0,i[1]=0,i[2]=0):(i[0]=c/d,i[1]=A/d,i[2]=u/d),i},rayTriangleIntersect:(()=>{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3);return(o,n,a,l,h,c)=>{c=c||p.vec3();const A=p.subVec3(l,a,e),u=p.subVec3(h,a,t),d=p.cross3Vec3(n,u,s),f=p.dotVec3(A,d);if(f<1e-6)return null;const E=p.subVec3(o,a,i),m=p.dotVec3(E,d);if(m<0||m>f)return null;const y=p.cross3Vec3(E,A,r),g=p.dotVec3(n,y);if(g<0||m+g>f)return null;const I=p.dotVec3(u,y)/f;return c[0]=o[0]+I*n[0],c[1]=o[1]+I*n[1],c[2]=o[2]+I*n[2],c}})(),rayPlaneIntersect:(()=>{const e=new h(3),t=new h(3),s=new h(3),i=new h(3);return(r,o,n,a,l,h)=>{h=h||p.vec3(),o=p.normalizeVec3(o,e);const c=p.subVec3(a,n,t),A=p.subVec3(l,n,s),u=p.cross3Vec3(c,A,i);p.normalizeVec3(u,u);const d=-p.dotVec3(n,u),f=-(p.dotVec3(r,u)+d)/p.dotVec3(o,u);return h[0]=r[0]+f*o[0],h[1]=r[1]+f*o[1],h[2]=r[2]+f*o[2],h}})(),cartesianToBarycentric:(()=>{const e=new h(3),t=new h(3),s=new h(3);return(i,r,o,n,a)=>{const l=p.subVec3(n,r,e),h=p.subVec3(o,r,t),c=p.subVec3(i,r,s),A=p.dotVec3(l,l),u=p.dotVec3(l,h),d=p.dotVec3(l,c),f=p.dotVec3(h,h),E=p.dotVec3(h,c),m=A*f-u*u;if(0===m)return null;const y=1/m,g=(f*d-u*E)*y,I=(A*E-u*d)*y;return a[0]=1-g-I,a[1]=I,a[2]=g,a}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,i,r=p.vec3()){const o=e[0],n=e[1],a=e[2];return r[0]=t[0]*o+s[0]*n+i[0]*a,r[1]=t[1]*o+s[1]*n+i[1]*a,r[2]=t[2]*o+s[2]*n+i[2]*a,r},mergeVertices(e,t,s,i){const r={},o=[],n=[],a=t?[]:null,l=s?[]:null,h=[];let c,A,u,p;const d=1e4;let f,E,m=0;for(f=0,E=e.length;f{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3),o=new h(3);return(n,a,l)=>{let h,c;const A=new Array(n.length/3);let u,d,f,E,m,y,g;for(h=0,c=a.length;h{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3),o=new h(3),n=new h(3);return(a,l,h)=>{const c=new Float32Array(a.length);for(let A=0;A>24&255,c=u>>16&255,h=u>>8&255,l=255&u,a=t[s],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+1],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+2],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,u++;return{positions:r,colors:o}},faceToVertexNormals(e,t,s={}){const i=s.smoothNormalsAngleThreshold||20,r={},o=[],n={};let a,l,h,c,A;const u=1e4;let d,f,E,m,y,g;for(f=0,m=e.length;f{const e=new h(4),t=new h(4);return(s,i,r,o,n)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=1,p.transformVec4(s,e,t),o[0]=t[0],o[1]=t[1],o[2]=t[2],e[0]=r[0],e[1]=r[1],e[2]=r[2],p.transformVec3(s,e,t),p.normalizeVec3(t),n[0]=t[0],n[1]=t[1],n[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new h(16),t=new h(16),s=new h(4),i=new h(4),r=new h(4),o=new h(4);return(n,a,l,h,c,A)=>{const u=p.mulMat4(l,a,e),d=p.inverseMat4(u,t),f=n.width,E=n.height,m=(h[0]-f/2)/(f/2),y=-(h[1]-E/2)/(E/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,p.transformVec4(d,s,i),p.mulVec4Scalar(i,1/i[3]),r[0]=m,r[1]=y,r[2]=1,r[3]=1,p.transformVec4(d,r,o),p.mulVec4Scalar(o,1/o[3]),c[0]=o[0],c[1]=o[1],c[2]=o[2],p.subVec3(o,i,A),p.normalizeVec3(A)}})(),canvasPosToLocalRay:(()=>{const e=new h(3),t=new h(3);return(s,i,r,o,n,a,l)=>{p.canvasPosToWorldRay(s,i,r,n,e,t),p.worldRayToLocalRay(o,e,t,a,l)}})(),worldRayToLocalRay:(()=>{const e=new h(16),t=new h(4),s=new h(4);return(i,r,o,n,a)=>{const l=p.inverseMat4(i,e);t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=1,p.transformVec4(l,t,s),n[0]=s[0],n[1]=s[1],n[2]=s[2],p.transformVec3(l,o,a)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,i,r,o){const n=new h(6),a={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:n};let l,c;for(n[0]=n[1]=n[2]=Number.POSITIVE_INFINITY,n[3]=n[4]=n[5]=Number.NEGATIVE_INFINITY,l=0,c=s.length;ln[3]&&(n[3]=r[t]),r[t+1]n[4]&&(n[4]=r[t+1]),r[t+2]n[5]&&(n[5]=r[t+2])}}if(s.length<20||o>10)return a.triangles=s,a.leaf=!0,a;e[0]=n[3]-n[0],e[1]=n[4]-n[1],e[2]=n[5]-n[2];let u=0;e[1]>e[u]&&(u=1),e[2]>e[u]&&(u=2),a.splitDim=u;const p=(n[u]+n[u+3])/2,d=new Array(s.length);let f=0;const E=new Array(s.length);let m=0;for(l=0,c=s.length;l{const i=e.length/3,r=new Array(i);for(let e=0;e=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t},octDecodeVec2s(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t}};p.buildEdgeIndices=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(w=s[C.index1],B=s[C.index2],(!F&&w>65535||B>65535)&&(F=!0),v.push(w),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const d={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var f=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),i=s+e[1],r=s;r{};t=t||i,s=s||i;var r=new XMLHttpRequest;r.overrideMimeType("application/json"),r.open("GET",e,!0),r.addEventListener("load",(function(e){var i=e.target.response;if(200===this.status){var r;try{r=JSON.parse(i)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(r)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(i))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),r.addEventListener("error",(function(e){s(e)}),!1),r.send(null)},loadArraybuffer:function(e,t,s){var i=e=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}},T={sceneId:null,time:null,startTime:null,prevTime:null,deltaTime:null},_=[];let R,P=0,D=0;const N=new function(){this.version="1.0.0",this.scenes={},this._superTypes={},this._addScene=function(e){if(e.id){if(N.scenes[e.id])return void console.error(`[ERROR] Scene ${y.inQuotes(e.id)} already exists`)}else e.id=I.addItem({});N.scenes[e.id]=e;const t=e.ticksPerOcclusionTest,s=e.ticksPerRender;g[e.id]={ticksPerOcclusionTest:t,ticksPerRender:s,renderCountdown:s},d.components.scenes++,e.once("destroyed",(()=>{I.removeItem(e.id),delete N.scenes[e.id],delete g[e.id],d.components.scenes--}))},this.clear=function(){let e;for(const t in N.scenes)N.scenes.hasOwnProperty(t)&&(e=N.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete N.scenes[e.id]))},this.scheduleTask=function(e,t){v.push(e),v.push(t)},this.runTasks=function(e=-1){let t,s,i=(new Date).getTime(),r=0;for(;v.length>0&&(e<0||i0&&R>0){var t=1e3/R;D+=t,_.push(t),_.length>=30&&(D-=_.shift()),d.frame.fps=Math.round(D/_.length)}!function(e){const t=N.runTasks(e+10),s=N.getNumTasks();d.frame.tasksRun=t,d.frame.tasksScheduled=s,d.frame.tasksBudget=10}(e),function(e){for(var t in T.time=e,N.scenes)if(N.scenes.hasOwnProperty(t)){var s=N.scenes[t];T.sceneId=t,T.startTime=s.startTime,T.deltaTime=null!=T.prevTime?T.time-T.prevTime:0,s.fire("tick",T,!0)}T.prevTime=e}(e),function(){const e=N.scenes,t=!1;let s,i,r,o,n;for(n in e)e.hasOwnProperty(n)&&(s=e[n],i=g[n],i||(i=g[n]={}),r=s.ticksPerOcclusionTest,i.ticksPerOcclusionTest!==r&&(i.ticksPerOcclusionTest=r,i.renderCountdown=r),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=r),o=s.ticksPerRender,i.ticksPerRender!==o&&(i.ticksPerRender=o,i.renderCountdown=o),0==--i.renderCountdown&&(s.render(t),i.renderCountdown=o))}(),P=e,void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(b):requestAnimationFrame(b)};void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(b):requestAnimationFrame(b);class C{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof C))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new t),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=e;const n=this._events[e];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+y.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const i=e.sceneDefault,r=e.sceneSingleton,o=e.type,n=e.on,a=!1!==e.recompiles;if(s&&(y.isNumeric(s)||y.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+y.inQuotes(e))}if(!s)if(!0===r){const e=this.scene.types[o];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===i&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+y.inQuotes(s.id));if(o&&!s.isType(o))return void this.error("Expected a "+o+" type or subtype: "+s.type+" "+y.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let h,c,A;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(h=e.subs,c=0,A=h.length;c{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():N.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,i,r,o;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,i=t.subs,r=0,o=i.length;r0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let i=255;if(t){if(e<0?e=0:e>1&&(e=1),i=Math.floor(255*e),s===i)return}else if(i=255,s===i)return;for(let e=0,t=this.meshes.length;e
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const X={WEBGL:!1,SUPPORTED_EXTENSIONS:{}},Z=document.createElement("canvas");if(Z){const e=Z.getContext("webgl",{antialias:!0})||Z.getContext("experimental-webgl",{antialias:!0});X.WEBGL=!!e,X.WEBGL&&(X.ANTIALIAS=e.getContextAttributes().antialias,e.getShaderPrecisionFormat?e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0?X.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?X.FS_MAX_FLOAT_PRECISION="mediump":X.FS_MAX_FLOAT_PRECISION="lowp":X.FS_MAX_FLOAT_PRECISION="mediump",X.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),X.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),X.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),X.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),X.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),X.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),X.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),X.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),X.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),X.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){X.SUPPORTED_EXTENSIONS[e]=!0})))}const q=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class J extends C{constructor(e,t={}){super(e,t),this._backgroundColor=p.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let i=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(i=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{i&&(i=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new Y(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+p.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),i=s.style;i.height="100%",i.width="100%",i.padding="0",i.margin="0",i.background="rgba(0,0,0,0);",i.float="left",i.left="0",i.top="0",i.position="absolute",i.opacity="1.0",i["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0&&"/"===s.charAt(i+1)&&(s=s.substring(0,i)),t.push(s);return t.join("\n")}function ne(e){console.error(e.join("\n"))}class ae{constructor(e,t){this.id=re.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new te(e,e.VERTEX_SHADER,oe(this.source.vertex)),this._fragmentShader=new te(e,e.FRAGMENT_SHADER,oe(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void ne(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void ne(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void ne(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void ne(this.errors);let t,s,i,r,o;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void ne(this.errors);const n=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class he{constructor(e,t){this.scene=e,this.aabb=p.AABB3(),this.origin=p.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const n=s.canvasPos,a=n[0],l=n[1];a+10<0||l+10<0||a-10>i||l-10>r?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[o++]=a,this.pixels[o++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new he(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let i=this._occlusionLayers[s];i||(i=new he(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),i.addMarker(e),this._markersToOcclusionLayersMap[e.id]=i}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// OcclusionTester fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),i.push("}"),i}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new ae(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=i.sectionPlanes;for(let i=0;i{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=p.mat4();return()=>(e&&p.inverseMat4(i.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,i=this._scene,r=i.sao,o=t.drawingBufferWidth,n=t.drawingBufferHeight,a=i.camera.project._state,l=a.near,h=a.far,c=a.matrix,A=this._getInverseProjectMat(),u=Math.random(),d="perspective"===i.camera.projection;pe[0]=o,pe[1]=n,t.viewport(0,0,o,n),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,h),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,c),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,A),t.uniform1i(this._uPerspective,d),t.uniform1f(this._uScale,r.scale*(h/5)),t.uniform1f(this._uIntensity,r.intensity),t.uniform1f(this._uBias,r.bias),t.uniform1f(this._uKernelRadius,r.kernelRadius),t.uniform1f(this._uMinResolution,r.minResolution),t.uniform2fv(this._uViewport,pe),t.uniform1f(this._uRandomSeed,u);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new ae(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const i=new Float32Array([1,1,0,1,0,0,1,0]),r=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),o=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new le(s,s.ARRAY_BUFFER,r,r.length,3,s.STATIC_DRAW),this._uvBuf=new le(s,s.ARRAY_BUFFER,i,i.length,2,s.STATIC_DRAW),this._indicesBuf=new le(s,s.ELEMENT_ARRAY_BUFFER,o,o.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const fe=new Float32Array(ve(17,[0,1])),Ee=new Float32Array(ve(17,[1,0])),me=new Float32Array(function(e,t){const s=[];for(let i=0;i<=e;i++)s.push(Ie(i,t));return s}(17,4)),ye=new Float32Array(2);class ge{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new ae(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),i=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new le(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new le(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new le(e,e.ELEMENT_ARRAY_BUFFER,i,i.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=p.mat4();return()=>(e&&p.inverseMat4(o.camera.projMatrix,t),t)})());const i=this._scene.canvas.gl,r=this._program,o=this._scene,n=i.drawingBufferWidth,a=i.drawingBufferHeight,l=o.camera.project._state,h=l.near,c=l.far;i.viewport(0,0,n,a),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),r.bind(),ye[0]=n,ye[1]=a,i.uniform2fv(this._uViewport,ye),i.uniform1f(this._uCameraNear,h),i.uniform1f(this._uCameraFar,c),i.uniform1f(this._uDepthCutoff,.01),0===s?i.uniform2fv(this._uSampleOffsets,Ee):i.uniform2fv(this._uSampleOffsets,fe),i.uniform1fv(this._uSampleWeights,me);const A=e.getDepthTexture(),u=t.getTexture();r.bindTexture(this._uDepthTexture,A,0),r.bindTexture(this._uOcclusionTexture,u,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function Ie(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function ve(e,t){const s=[];for(let i=0;i<=e;i++)s.push(t[0]*i),s.push(t[1]*i);return s}class Te{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(e=null){if(this._touch(e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}_touch(e=null){let t,s;const i=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=i.drawingBufferWidth,s=i.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;i.deleteTexture(this.buffer.texture),i.deleteFramebuffer(this.buffer.framebuf),i.deleteRenderbuffer(this.buffer.renderbuf)}const r=i.createTexture();let o;i.bindTexture(i.TEXTURE_2D,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e?i.texStorage2D(i.TEXTURE_2D,1,e,t,s):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,s,0,i.RGBA,i.UNSIGNED_BYTE,null),this._hasDepthTexture&&(o=i.createTexture(),i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texImage2D(i.TEXTURE_2D,0,i.DEPTH_COMPONENT32F,t,s,0,i.DEPTH_COMPONENT,i.FLOAT,null));const n=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,n),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_COMPONENT32F,t,s);const a=i.createFramebuffer();if(i.bindFramebuffer(i.FRAMEBUFFER,a),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,r,0),this._hasDepthTexture?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,o,0):i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n),i.bindTexture(i.TEXTURE_2D,null),i.bindRenderbuffer(i.RENDERBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,a),!i.isFramebuffer(a))throw"Invalid framebuffer";i.bindFramebuffer(i.FRAMEBUFFER,null);const l=i.checkFramebufferStatus(i.FRAMEBUFFER);switch(l){case i.FRAMEBUFFER_COMPLETE:break;case i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case i.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:a,renderbuf:n,texture:r,depthTexture:o,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,i=null,r=Uint8Array,o=4){const n=e,a=(this.buffer.height||this.gl.drawingBufferHeight)-t,l=new r(o),h=this.gl;return h.readPixels(n,a,1,1,s||h.RGBA,i||h.UNSIGNED_BYTE,l,0),l}readArray(e=null,t=null,s=Uint8Array,i=4){const r=new s(this.buffer.width*this.buffer.height*i),o=this.gl;return o.readPixels(0,0,this.buffer.width,this.buffer.height,e||o.RGBA,t||o.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,i=t.canvas,r=t.imageData,o=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const n=this.buffer.width,a=this.buffer.height,l=a/2|0,h=4*n,c=new Uint8Array(4*n);for(let e=0;e0)for(i.withSAO=!0,x=0;x0)for(x=0;x0)for(x=0;x0)for(x=0;x0||j>0||U>0||H>0){if(o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):(o.blendEquation(o.FUNC_ADD),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA)),i.backfaces=!1,a||o.depthMask(!1),(U>0||H>0)&&o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),H>0)for(x=0;x0)for(x=0;x0)for(x=0;x0)for(x=0;x0||W>0){if(i.lastProgramId=null,e.highlightMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),W>0)for(x=0;x0)for(x=0;x0||K>0||Q>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),o.enable(o.CULL_FACE),K>0)for(x=0;x0)for(x=0;x0||Z>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),Z>0)for(x=0;x0)for(x=0;x0||J>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),J>0)for(x=0;x0)for(x=0;x0){const t=Math.floor(e/4),s=n.size[0];n.size[1];const i=t%s-Math.floor(s/2),r=Math.floor(t/s)-Math.floor(s/2),o=Math.sqrt(Math.pow(i,2)+Math.pow(r,2));y.push({x:i,y:r,dist:o,result:[d[e+0],d[e+1],d[e+2],d[e+3]]})}let g=null;if(y.length>0){y.sort(((e,t)=>e.dist-t.dist)),y=y[0].result;const e=p[y[3]],t=e.origin,s=e.coordinateScale;g=[y[0]*s[0]+t[0],y[1]*s[1]+t[1],y[2]*s[2]+t[2]]}if(null===f&&null==g)return null;let I=null;return null!==g&&(I=e.camera.projectWorldPos(g)),{worldPos:f,snappedWorldPos:g,snappedCanvasPos:I}},this.addMarker=function(t){this._occlusionTester=this._occlusionTester||new ue(e,v),this._occlusionTester.addMarker(t),e.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){P(),this._occlusionTester.bindRenderBuf(),i.reset(),i.backfaces=!0,i.frontface=!0,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.clearColor(0,0,0,0),o.enable(o.DEPTH_TEST),o.disable(o.CULL_FACE),o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT);for(let e in h)if(h.hasOwnProperty(e)){const t=h[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),this.element.addEventListener("mousemove",this._mouseMoveListener=e=>{this.enabled&&(this._getMouseCanvasPos(e),this.fire("mousemove",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault())}),this.element.addEventListener("wheel",this._mouseWheelListener=(e,t)=>{if(!this.enabled)return;const s=Math.max(-1,Math.min(1,40*-e.deltaY));this.fire("mousewheel",s,!0)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(i=>{e>=i[0]-s&&e<=i[0]+s&&t>=i[1]-s&&t<=i[1]+s&&this.fire("mouseclicked",i,!0)}))}this._eventsBound=!0}}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,i=0;for(;t.offsetParent;)s+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-i}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const Ne=new t({});class be{constructor(e){this.id=Ne.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){Ne.removeItem(this.id)}}class Ce extends C{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new be({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class Oe extends C{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new be({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let i=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(i/=t),i=Math.min(i,120),p.perspectiveMat4(i*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class Se extends C{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new be({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,i=s[2],r=s[3],o=i/r;let n,a,l,h;i>r?(n=-t,a=t,l=t/o,h=-t/o):(n=-t*o,a=t*o,l=t,h=-t),p.orthoMat4c(n,a,h,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class xe extends C{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new be({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){p.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class we extends C{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new be({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy()}}const Be=p.vec3(),Fe=p.vec3(),Me=p.vec3(),Le=p.vec3(),Ue=p.vec3(),He=p.vec3(),Ge=p.vec4(),ke=p.vec4(),Ve=p.vec4(),je=p.mat4(),Qe=p.mat4(),We=p.vec3(),ze=p.vec3(),Ke=p.vec3(),Ye=p.vec3();class Xe extends C{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new be({deviceMatrix:p.mat4(),hasDeviceMatrix:!1,matrix:p.mat4(),normalMatrix:p.mat4(),inverseMatrix:p.mat4()}),this._perspective=new Oe(this),this._ortho=new Se(this),this._frustum=new xe(this),this._customProjection=new we(this),this._project=this._perspective,this._eye=p.vec3([0,0,10]),this._look=p.vec3([0,0,0]),this._up=p.vec3([0,1,0]),this._worldUp=p.vec3([0,1,0]),this._worldRight=p.vec3([1,0,0]),this._worldForward=p.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(p.subVec3(this._eye,this._look,We),p.normalizeVec3(We,ze),p.mulVec3Scalar(ze,1e3,Ke),p.addVec3(this._look,Ke,Ye),t=Ye):t=this._eye,e.hasDeviceMatrix?(p.lookAtMat4v(t,this._look,this._up,Qe),p.mulMat4(e.deviceMatrix,Qe,e.matrix)):p.lookAtMat4v(t,this._look,this._up,e.matrix),p.inverseMat4(this._state.matrix,this._state.inverseMatrix),p.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=p.subVec3(this._eye,this._look,Be);p.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,je),t=p.transformPoint3(je,t,Fe),this.eye=p.addVec3(this._look,t,Me),this.up=p.transformPoint3(je,this._up,Le)}orbitPitch(e){if(this._constrainPitch&&(e=p.dotVec3(this._up,this._worldUp)/p.DEGTORAD)<1)return;let t=p.subVec3(this._eye,this._look,Be);const s=p.cross3Vec3(p.normalizeVec3(t,Fe),p.normalizeVec3(this._up,Me));p.rotationMat4v(.0174532925*e,s,je),t=p.transformPoint3(je,t,Le),this.up=p.transformPoint3(je,this._up,Ue),this.eye=p.addVec3(t,this._look,He)}yaw(e){let t=p.subVec3(this._look,this._eye,Be);p.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,je),t=p.transformPoint3(je,t,Fe),this.look=p.addVec3(t,this._eye,Me),this._gimbalLock&&(this.up=p.transformPoint3(je,this._up,Le))}pitch(e){if(this._constrainPitch&&(e=p.dotVec3(this._up,this._worldUp)/p.DEGTORAD)<1)return;let t=p.subVec3(this._look,this._eye,Be);const s=p.cross3Vec3(p.normalizeVec3(t,Fe),p.normalizeVec3(this._up,Me));p.rotationMat4v(.0174532925*e,s,je),this.up=p.transformPoint3(je,this._up,He),t=p.transformPoint3(je,t,Le),this.look=p.addVec3(t,this._eye,Ue)}pan(e){const t=p.subVec3(this._eye,this._look,Be),s=[0,0,0];let i;if(0!==e[0]){const r=p.cross3Vec3(p.normalizeVec3(t,[]),p.normalizeVec3(this._up,Fe));i=p.mulVec3Scalar(r,e[0]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]}0!==e[1]&&(i=p.mulVec3Scalar(p.normalizeVec3(this._up,Me),e[1]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),0!==e[2]&&(i=p.mulVec3Scalar(p.normalizeVec3(t,Le),e[2]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),this.eye=p.addVec3(this._eye,s,Ue),this.look=p.addVec3(this._look,s,He)}zoom(e){const t=p.subVec3(this._eye,this._look,Be),s=Math.abs(p.lenVec3(t,Fe)),i=Math.abs(s+e);if(i<.5)return;const r=p.normalizeVec3(t,Me);this.eye=p.addVec3(this._look,p.mulVec3Scalar(r,i),Le)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=p.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return p.lenVec3(p.subVec3(this._look,this._eye,Be))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=Ge,s=ke,i=Ve;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,p.mulMat4v4(this.viewMatrix,t,s),p.mulMat4v4(this.projMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1;const r=this.scene.canvas.canvas,o=r.offsetWidth/2,n=r.offsetHeight/2;return[i[0]*o+o,i[1]*n+n]}destroy(){super.destroy(),this._state.destroy()}}class Ze extends C{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class qe extends Ze{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new be({type:"dir",dir:p.vec3([1,1,1]),color:p.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=p.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,i=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],r=[0,1,0];p.lookAtMat4v(i,s,r,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=p.identityMat4()),p.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new Te(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Je extends Ze{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:p.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class $e extends C{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),d.memory.meshes++}destroy(){super.destroy(),d.memory.meshes--}}var et=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(w=s[C.index1],B=s[C.index2],(!F&&w>65535||B>65535)&&(F=!0),v.push(w),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const tt=function(){const e=p.mat4(),t=p.mat4();return function(s,i){i=i||p.mat4();const r=s[0],o=s[1],n=s[2],a=s[3]-r,l=s[4]-o,h=s[5]-n,c=65535;return p.identityMat4(e),p.translationMat4v(s,e),p.identityMat4(t),p.scalingMat4v([a/c,l/c,h/c],t),p.mulMat4(e,t,i),i}}();var st=function(){const e=p.mat4(),t=p.mat4();return function(s,i,r){const o=new Uint16Array(s.length),n=new Float32Array([r[0]!==i[0]?65535/(r[0]-i[0]):0,r[1]!==i[1]?65535/(r[1]-i[1]):0,r[2]!==i[2]?65535/(r[2]-i[2]):0]);let a;for(a=0;a=0?1:-1),t=(1-Math.abs(r))*(o>=0?1:-1);r=e,o=t}return new Int8Array([Math[s](127.5*r+(r<0?-1:0)),Math[i](127.5*o+(o<0?-1:0))])}function ot(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}function nt(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const at={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let i,r;for(i=0;i<3;i++)t[i]=Number.MAX_VALUE,s[i]=-Number.MAX_VALUE;for(i=0;in&&(r=s,n=o),s=rt(e,a,"floor","ceil"),i=ot(s),o=nt(e,a,i),o>n&&(r=s,n=o),s=rt(e,a,"ceil","ceil"),i=ot(s),o=nt(e,a,i),o>n&&(r=s,n=o),t[a]=r[0],t[a+1]=r[1];return t},decompressNormals:function(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t},decompressNormal:function(e,t){let s=e[0],i=e[1];s=(2*s+1)/255,i=(2*i+1)/255;const r=1-Math.abs(s)-Math.abs(i);r<0&&(s=(1-Math.abs(i))*(s>=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t}},lt=d.memory,ht=p.AABB3();class ct extends $e{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new be({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=at.getPositionsBounds(t.positions),i=at.compressPositions(t.positions,e.min,e.max);s.positions=i.quantized,s.positionsDecodeMatrix=i.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=at.getUVBounds(t.uv),i=at.compressUVs(t.uv,e.min,e.max);s.uv=i.quantized,s.uvDecodeMatrix=i.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=at.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),lt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),lt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new le(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),lt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new le(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),lt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new le(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),lt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new le(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),lt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=et(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),lt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=p.buildPickTriangles(e.positions,e.indices,e.compressGeometry),i=s.positions,r=s.colors;this._pickTrianglePositionsBuf=new le(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,4,t.STATIC_DRAW,!0),lt.positions+=this._pickTrianglePositionsBuf.numItems,lt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),at.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=at.getPositionsBounds(e),i=at.compressPositions(e,s.min,s.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),at.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),at.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=p.AABB3()),p.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=p.OBB3()),p.positions3ToAABB3(this._state.positions,ht,this._state.positionsDecodeMatrix),p.AABB3ToOBB3(ht,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),lt.meshes--}}function At(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let i=e.zSize||1;i<0&&(console.error("negative zSize not allowed - will invert"),i*=-1);const r=e.center,o=r?r[0]:0,n=r?r[1]:0,a=r?r[2]:0,l=-t+o,h=-s+n,c=-i+a,A=t+o,u=s+n,p=i+a;return y.apply(e,{positions:[A,u,p,l,u,p,l,h,p,A,h,p,A,u,p,A,h,p,A,h,c,A,u,c,A,u,p,A,u,c,l,u,c,l,u,p,l,u,p,l,u,c,l,h,c,l,h,p,l,h,c,A,h,c,A,h,p,l,h,p,A,h,c,l,h,c,l,u,c,A,u,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class ut extends C{get type(){return"Material"}constructor(e,t={}){super(e,t),d.memory.materials++}destroy(){super.destroy(),d.memory.materials--}}const pt={opaque:0,mask:1,blend:2},dt=["opaque","mask","blend"];class ft extends ut{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new be({type:"PhongMaterial",ambient:p.vec3([1,1,1]),diffuse:p.vec3([1,1,1]),specular:p.vec3([1,1,1]),emissive:p.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=pt[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return dt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const Et={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[.4577854573726654,.529411792755127,.4100345969200134],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class mt extends ut{get type(){return"EmphasisMaterial"}get presets(){return Et}constructor(e,t={}){super(e,t),this._state=new be({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=Et[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Et).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const yt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class gt extends ut{get type(){return"EdgeMaterial"}get presets(){return yt}constructor(e,t={}){super(e,t),this._state=new be({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=yt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(yt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const It={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class vt extends C{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=p.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return It}set units(e){e||(e="meters");It[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=p.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=p.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class Tt extends C{constructor(e,t={}){super(e,t),this._supported=X.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const _t={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class Rt extends ut{get type(){return"PointsMaterial"}get presets(){return _t}constructor(e,t={}){super(e,t),this._state=new be({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=_t[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(_t).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Pt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Dt extends ut{get type(){return"LinesMaterial"}get presets(){return Pt}constructor(e,t={}){super(e,t),this._state=new be({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=Pt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Pt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Nt=p.vec3(),bt=p.vec3(),Ct=p.mat4();class Ot{constructor(){this.normal=p.vec3(),this.offset=0,this.testVertex=p.vec3()}set(e,t,s,i){const r=1/Math.sqrt(e*e+t*t+s*s);this.normal[0]=e*r,this.normal[1]=t*r,this.normal[2]=s*r,this.offset=i*r,this.testVertex[0]=this.normal[0]>=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class St{constructor(){this.planes=[new Ot,new Ot,new Ot,new Ot,new Ot,new Ot]}}function xt(e,t){let s=St.INSIDE;const i=Nt,r=bt;i[0]=t[0],i[1]=t[1],i[2]=t[2],r[0]=t[3],r[1]=t[4],r[2]=t[5];const o=[i,r];for(let t=0;t<6;++t){const i=e.planes[t];if(i.normal[0]*o[i.testVertex[0]][0]+i.normal[1]*o[i.testVertex[1]][1]+i.normal[2]*o[i.testVertex[2]][2]+i.offset<0)return St.OUTSIDE;i.normal[0]*o[1-i.testVertex[0]][0]+i.normal[1]*o[1-i.testVertex[1]][1]+i.normal[2]*o[1-i.testVertex[2]][2]+i.offset<0&&(s=St.INTERSECT)}return s}St.INSIDE=0,St.INTERSECT=1,St.OUTSIDE=2;class wt{constructor(e,t){this.primLODLevels=e,this.entitiesInLOD={},this.primCountInLOD={},this.targetFps=t,this.lodLevelIndex=0,this.consecutiveFramesWithTargetFps=0,this.consecutiveFramesWithoutTargetFps=0}initializeLodState(e){const t=Object.values(e.objects);if(0===t.length)return;const s={},i={};for(let e=0,r=t.length;e=this.primLODLevels[n]);n++);const a=this.primLODLevels[n]||0;a in s||(s[a]=[]),s[a].push(r),a in i||(i[a]=0),i[a]+=r.numPrimitives}this.entitiesInLOD=s,this.primCountInLOD=i}}class Bt{constructor(e,t,s,i){this.id=t.id,this.scene=e,this.sceneModel=t,this.lodState=new wt(s,i),this.lodState.initializeLodState(t)}_increaseLODLevelIndex(){const e=this.lodState;if(e.lodLevelIndex===e.primLODLevels.length)return!1;const t=e.entitiesInLOD[e.primLODLevels[e.lodLevelIndex]]||[];for(let e=0,s=t.length;e0&&(t.consecutiveFramesWithoutTargetFps=0,s=this._increaseLODLevelIndex()):e>t.targetFps+4&&++t.consecutiveFramesWithTargetFps>1&&(t.consecutiveFramesWithTargetFps=0,s=this._decreaseLODLevelIndex()),s}resetLodCulling(){let e=!1,t=!1;do{e|=t=this._decreaseLODLevelIndex()}while(t);return e}}class Ft extends C{constructor(e,t={}){super(e,t),this._scene=e,this._lodLevels=[2e3,600,150,80,20],this._lodManagers={},this._lodManagerList=[],this.enabled=t.enabled,this.targetFPS=t.targetFPS,this._init()}_init(){const e=new Array(4);let t=0,s=-1,i=Date.now(),r=0,o=0,n=o;this._scene.on("rendering",(()=>{if(-1!==s)for(let e=0,t=this._lodManagerList.length;e{i=Date.now(),window.requestAnimationFrame((()=>{t++;const o=Date.now();r=o-i,i=o,e[t%4]=r;let n=0;if(t>4){for(let t=0;t<4;t++)n+=e[t];s=4/n*1e3}}))})),this._scene.camera.on("matrix",(()=>{n=o})),this._scene.on("tick",(()=>{if(o-n>3)for(let e=0,t=this._lodManagerList.length;e=e.minX&&t.maxY>=e.minY&&t.maxZ>=e.minZ},s.boxRayIntersects=function(e,t,s,i,r,o,n){var a=(e.minX-t)*r,l=(e.maxX-t)*r,h=(e.minY-s)*o,c=(e.maxY-s)*o,A=(e.minZ-i)*n,u=(e.maxZ-i)*n,p=Math.min(A,u),d=Math.max(A,u),f=Math.min(h,c),E=Math.max(h,c),m=Math.min(a,l),y=Math.max(a,l),g=Math.max(0,m,f,p);return Math.min(y,E,d)>=g?g:1/0};var v=function(e,t,s,r,o){for(var n,a=[t,s];a.length;)(s=a.pop())-(t=a.pop())<=r||(n=t+Math.ceil((s-t)/r/2)*r,i(e,n,t,s,o),a.push(t,n,n,s))},T=function(e,t){return e.minX-t.minX},_=function(e,t){return e.minY-t.minY},R=function(e,t){return e.minZ-t.minZ},P=function(){function e(e){void 0===e&&(e=16),this.maxEntries=Math.max(e,8),this.minEntries=Math.max(4,Math.ceil(.4*this.maxEntries)),this.clear()}return e.alloc=function(){return this.pool.pop()||new this},e.free=function(e){e.clear(),this.pool.push(e)},e.prototype.searchCustom=function(e,t){var s=this.data,i=[];if(!e(s,A(s)))return i;for(var r=[];s;){for(var o=0,n=s.children.length;o1){for(d=0,f=(c=c[c.length-1]).length;d=t)break;var r=i+1;if(r0;){var i=s-1>>1;if(p[i].dist<=p[s].dist)break;d(s,i),s=i}},m=a;p.length&&p[0].dist=t;a--){l=e.children[a];f(o,l),n+=m(o)}return n},e.prototype.adjustParentBBoxes=function(e,t,s){for(var i=s;i>=0;i--)f(t[i],e)},e.prototype.condense=function(e){for(var t=e.length-1,s=void 0;t>=0;t--)0===e[t].children.length?t>0?((s=e[t-1].children).splice(s.indexOf(e[t]),1),o(e[t])):this.clear():p(e[t])},e.prototype._insert=function(e,t,s){var i=[],r=this.chooseSubtree(e,this.data,t,i);for(r.children.push(e),f(r,e);t>=0&&i[t].children.length>this.maxEntries;)this.split(i,t),t--;this.adjustParentBBoxes(e,i,t)},e.pool=[],e}();s.RBush3D=P},{quickselect:2}],2:[function(e,t,s){!function(e,i){"object"==typeof s&&void 0!==t?t.exports=i():e.quickselect=i()}(this,(function(){function e(s,i,r,o,n){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),A=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/a+A)),Math.min(o,Math.floor(i+(a-l)*c/a+A)),n)}var u=s[i],p=r,d=o;for(t(s,r,i),n(s[o],u)>0&&t(s,r,o);p0;)d--}0===n(s[r],u)?t(s,r,d):t(s,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return et?1:0}return function(t,i,r,o,n){e(t,i,r||0,o||t.length-1,n||s)}}))},{}]},{},[1])(1)}));var Ut=Mt.exports.RBush3D,Ht=function(e){function t(e){var t=0;return e.meshes.forEach((function(e){t+=e.numPrimitives})),t}function s(e,t){var s={pos:{x:0,y:0},left:0,right:e,top:0,bottom:t,dir:0};function i(){(0==s.dir&&s.pos.x+1>=s.right||1==s.dir&&s.pos.y+1>=s.bottom||2==s.dir&&s.pos.x-1<=s.left-1||3==s.dir&&s.pos.y-1<=s.top-1)&&(s.dir=(s.dir+1)%4,0==s.dir&&s.left++,1==s.dir&&s.top++,2==s.dir&&s.right--,3==s.dir&&s.bottom--),0==s.dir&&s.pos.x++,1==s.dir&&s.pos.y++,2==s.dir&&s.pos.x--,3==s.dir&&s.pos.y--}for(var r=[],o=e*t;r.lengthu&&(c.push(A),A=[],u=a),A.push(d),u-=f}}while(pu&&(c.push(p),p=[],u=a),p.push(e),u-=s})),p.length&&c.push(p);var d={};return c.forEach((function(e,t){e.forEach((function(e){d[e.id]=t}))})),{clusters:c,entityIdToClusterIdMapping:d}}(r.cellsX,r.cellsZ,o.maxCellsPerEntity,r.entitiesByCell,r.cellsByEntity,i.maxPolygonsPerCluster),{clusters:{total:n.clusters.length},clusteringResult:n});a+=l.clusters.total,console.log("Total clusters: "+a);var h=[];return l.clusteringResult.clusters.forEach((function(e){e.forEach((function(e){h.push(e.id)}))})),l.orderedEntityIds=h,l}; +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bundle={})}(this,(function(e){"use strict";class t{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const s=new t;class i{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class r{constructor(){this.items=[]}}class o{constructor(e,t,s,i,r){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=i,this.getShown=r,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class n{constructor(e={}){this._id=s.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,i=s.length;e{const s=this._getNextId(),n=new i(s);for(let s=0,i=e.length;s0,h=this._getNextId(),c=s.getTitle||(()=>s.title||""),A=s.doAction||s.callback||(()=>{}),u=s.getEnabled||(()=>!0),p=s.getShown||(()=>!0),d=new o(h,c,A,u,p);if(d.parentMenu=n,a.items.push(d),l){const e=t(r);d.subMenu=e,e.parentItem=d}this._itemList.push(d),this._itemMap[d.id]=d}}return this._menuList.push(n),this._menuMap[n.id]=n,n};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,i=s.length;t'),s.push("
    "),t)for(let e=0,i=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const i=s.join("");document.body.insertAdjacentHTML("beforeend",i);const r=document.querySelector("."+e.id);e.menuElement=r,r.style["border-radius"]="4px",r.style.display="none",r.style["z-index"]=3e5,r.style.background="white",r.style.border="1px solid black",r.style["box-shadow"]="0 4px 5px 0 gray",r.oncontextmenu=e=>{e.preventDefault()};const o=this;let n=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(n&&(o._hideMenu(n.id),n=null));if(n&&n.id!==s.id&&(o._hideMenu(n.id),n=null),!1===t.enabled)return;const i=t.itemElement,r=s.menuElement,a=i.getBoundingClientRect();r.getBoundingClientRect();a.right+200>window.innerWidth?o._showMenu(s.id,a.left-200,a.top-1):o._showMenu(s.id,a.right-5,a.top-1),n=s})),i||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),o._context&&!1!==t.enabled&&(t.doAction&&t.doAction(o._context),this._hideOnAction?o.hide():(o._updateItemsTitles(),o._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(o._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-i),t+r>window.innerWidth&&(t=window.innerWidth-r),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class a{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new t),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=e;const n=this._events[e];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}let l=!0,h=l?Float64Array:Float32Array;const c=new h(16),A=new h(16),u=new h(4),p={setDoublePrecisionEnabled(e){l=e,h=l?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>l,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new h(e||2),vec3:e=>new h(e||3),vec4:e=>new h(e||4),mat3:e=>new h(e||9),mat3ToMat4:(e,t=new h(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new h(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const i=new h(2);for(let r=0,o=e.length;r{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,i=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&i|128]}${e[i>>8&255]}-${e[i>>16&255]}${e[i>>24&255]}${e[255&r]}${e[r>>8&255]}${e[r>>16&255]}${e[r>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new h(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],i=e[1],r=e[2],o=t[0],n=t[1],a=t[2];return[i*a-r*n,r*o-s*a,s*n-i*o,0]},cross3Vec3(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=t[0],a=t[1],l=t[2];return s[0]=r*l-o*a,s[1]=o*n-i*l,s[2]=i*a-r*n,s},sqLenVec4:e=>p.dotVec4(e,e),lenVec4:e=>Math.sqrt(p.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>p.dotVec3(e,e),sqLenVec2:e=>p.dotVec2(e,e),lenVec3:e=>Math.sqrt(p.sqLenVec3(e)),distVec3:(()=>{const e=new h(3);return(t,s)=>p.lenVec3(p.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(p.sqLenVec2(e)),distVec2:(()=>{const e=new h(2);return(t,s)=>p.lenVec2(p.subVec2(t,s,e))})(),rcpVec3:(e,t)=>p.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/p.lenVec4(e);return p.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/p.lenVec3(e);return p.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/p.lenVec2(e);return p.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=p.dotVec3(e,t)/Math.sqrt(p.sqLenVec3(e)*p.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new h(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=p.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=p.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=p.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,i=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||p.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>p.m4s(0),setMat4ToOnes:()=>p.m4s(1),diagonalMat4v:e=>new h([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,i)=>p.diagonalMat4v([e,t,s,i]),diagonalMat4s:e=>p.diagonalMat4c(e,e,e,e),identityMat4:(e=new h(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new h(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>p.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const i=e[0],r=e[1],o=e[2],n=e[3],a=e[4],l=e[5],h=e[6],c=e[7],A=e[8],u=e[9],p=e[10],d=e[11],f=e[12],E=e[13],m=e[14],y=e[15],g=t[0],I=t[1],v=t[2],T=t[3],_=t[4],R=t[5],P=t[6],D=t[7],N=t[8],C=t[9],O=t[10],b=t[11],S=t[12],w=t[13],x=t[14],B=t[15];return s[0]=g*i+I*a+v*A+T*f,s[1]=g*r+I*l+v*u+T*E,s[2]=g*o+I*h+v*p+T*m,s[3]=g*n+I*c+v*d+T*y,s[4]=_*i+R*a+P*A+D*f,s[5]=_*r+R*l+P*u+D*E,s[6]=_*o+R*h+P*p+D*m,s[7]=_*n+R*c+P*d+D*y,s[8]=N*i+C*a+O*A+b*f,s[9]=N*r+C*l+O*u+b*E,s[10]=N*o+C*h+O*p+b*m,s[11]=N*n+C*c+O*d+b*y,s[12]=S*i+w*a+x*A+B*f,s[13]=S*r+w*l+x*u+B*E,s[14]=S*o+w*h+x*p+B*m,s[15]=S*n+w*c+x*d+B*y,s},mulMat3(e,t,s){s||(s=new h(9));const i=e[0],r=e[3],o=e[6],n=e[1],a=e[4],l=e[7],c=e[2],A=e[5],u=e[8],p=t[0],d=t[3],f=t[6],E=t[1],m=t[4],y=t[7],g=t[2],I=t[5],v=t[8];return s[0]=i*p+r*E+o*g,s[3]=i*d+r*m+o*I,s[6]=i*f+r*y+o*v,s[1]=n*p+a*E+l*g,s[4]=n*d+a*m+l*I,s[7]=n*f+a*y+l*v,s[2]=c*p+A*E+u*g,s[5]=c*d+A*m+u*I,s[8]=c*f+A*y+u*v,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=p.vec4()){const i=t[0],r=t[1],o=t[2],n=t[3];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12]*n,s[1]=e[1]*i+e[5]*r+e[9]*o+e[13]*n,s[2]=e[2]*i+e[6]*r+e[10]*o+e[14]*n,s[3]=e[3]*i+e[7]*r+e[11]*o+e[15]*n,s},transposeMat4(e,t){const s=e[4],i=e[14],r=e[8],o=e[13],n=e[12],a=e[9];if(!t||e===t){const t=e[1],l=e[2],h=e[3],c=e[6],A=e[7],u=e[11];return e[1]=s,e[2]=r,e[3]=n,e[4]=t,e[6]=a,e[7]=o,e[8]=l,e[9]=c,e[11]=i,e[12]=h,e[13]=A,e[14]=u,e}return t[0]=e[0],t[1]=s,t[2]=r,t[3]=n,t[4]=e[1],t[5]=e[5],t[6]=a,t[7]=o,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=i,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],n=e[5],a=e[6],l=e[7],h=e[8],c=e[9],A=e[10],u=e[11],p=e[12],d=e[13],f=e[14],E=e[15];return p*c*a*r-h*d*a*r-p*n*A*r+o*d*A*r+h*n*f*r-o*c*f*r-p*c*i*l+h*d*i*l+p*s*A*l-t*d*A*l-h*s*f*l+t*c*f*l+p*n*i*u-o*d*i*u-p*s*a*u+t*d*a*u+o*s*f*u-t*n*f*u-h*n*i*E+o*c*i*E+h*s*a*E-t*c*a*E-o*s*A*E+t*n*A*E},inverseMat4(e,t){t||(t=e);const s=e[0],i=e[1],r=e[2],o=e[3],n=e[4],a=e[5],l=e[6],h=e[7],c=e[8],A=e[9],u=e[10],p=e[11],d=e[12],f=e[13],E=e[14],m=e[15],y=s*a-i*n,g=s*l-r*n,I=s*h-o*n,v=i*l-r*a,T=i*h-o*a,_=r*h-o*l,R=c*f-A*d,P=c*E-u*d,D=c*m-p*d,N=A*E-u*f,C=A*m-p*f,O=u*m-p*E,b=1/(y*O-g*C+I*N+v*D-T*P+_*R);return t[0]=(a*O-l*C+h*N)*b,t[1]=(-i*O+r*C-o*N)*b,t[2]=(f*_-E*T+m*v)*b,t[3]=(-A*_+u*T-p*v)*b,t[4]=(-n*O+l*D-h*P)*b,t[5]=(s*O-r*D+o*P)*b,t[6]=(-d*_+E*I-m*g)*b,t[7]=(c*_-u*I+p*g)*b,t[8]=(n*C-a*D+h*R)*b,t[9]=(-s*C+i*D-o*R)*b,t[10]=(d*T-f*I+m*y)*b,t[11]=(-c*T+A*I-p*y)*b,t[12]=(-n*N+a*P-l*R)*b,t[13]=(s*N-i*P+r*R)*b,t[14]=(-d*v+f*g-E*y)*b,t[15]=(c*v-A*g+u*y)*b,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||p.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||p.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new h(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,p.translationMat4v(e,r))})(),translationMat4s:(e,t)=>p.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>p.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,i){const r=i[3];i[0]+=r*e,i[1]+=r*t,i[2]+=r*s;const o=i[7];i[4]+=o*e,i[5]+=o*t,i[6]+=o*s;const n=i[11];i[8]+=n*e,i[9]+=n*t,i[10]+=n*s;const a=i[15];return i[12]+=a*e,i[13]+=a*t,i[14]+=a*s,i},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const i=p.normalizeVec4([t[0],t[1],t[2],0],[]),r=Math.sin(e),o=Math.cos(e),n=1-o,a=i[0],l=i[1],h=i[2];let c,A,u,d,f,E;return c=a*l,A=l*h,u=h*a,d=a*r,f=l*r,E=h*r,(s=s||p.mat4())[0]=n*a*a+o,s[1]=n*c+E,s[2]=n*u-f,s[3]=0,s[4]=n*c-E,s[5]=n*l*l+o,s[6]=n*A+d,s[7]=0,s[8]=n*u+f,s[9]=n*A-d,s[10]=n*h*h+o,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,i,r)=>p.rotationMat4v(e,[t,s,i],r),scalingMat4v:(e,t=p.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=p.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new h(3);return(t,s,i,r)=>(e[0]=t,e[1]=s,e[2]=i,p.scalingMat4v(e,r))})(),scaleMat4c:(e,t,s,i)=>(i[0]*=e,i[4]*=t,i[8]*=s,i[1]*=e,i[5]*=t,i[9]*=s,i[2]*=e,i[6]*=t,i[10]*=s,i[3]*=e,i[7]*=t,i[11]*=s,i),scaleMat4v(e,t){const s=e[0],i=e[1],r=e[2];return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,t},scalingMat4s:e=>p.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=p.mat4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=i+i,l=r+r,h=o+o,c=i*a,A=i*l,u=i*h,d=r*l,f=r*h,E=o*h,m=n*a,y=n*l,g=n*h;return s[0]=1-(d+E),s[1]=A+g,s[2]=u-y,s[3]=0,s[4]=A-g,s[5]=1-(c+E),s[6]=f+m,s[7]=0,s[8]=u+y,s[9]=f-m,s[10]=1-(c+d),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=p.vec4()){const i=p.clamp,r=e[0],o=e[4],n=e[8],a=e[1],l=e[5],h=e[9],c=e[2],A=e[6],u=e[10];return"XYZ"===t?(s[1]=Math.asin(i(n,-1,1)),Math.abs(n)<.99999?(s[0]=Math.atan2(-h,u),s[2]=Math.atan2(-o,r)):(s[0]=Math.atan2(A,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-i(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(n,u),s[2]=Math.atan2(a,l)):(s[1]=Math.atan2(-c,r),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(i(A,-1,1)),Math.abs(A)<.99999?(s[1]=Math.atan2(-c,u),s[2]=Math.atan2(-o,l)):(s[1]=0,s[2]=Math.atan2(a,r))):"ZYX"===t?(s[1]=Math.asin(-i(c,-1,1)),Math.abs(c)<.99999?(s[0]=Math.atan2(A,u),s[2]=Math.atan2(a,r)):(s[0]=0,s[2]=Math.atan2(-o,l))):"YZX"===t?(s[2]=Math.asin(i(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-h,l),s[1]=Math.atan2(-c,r)):(s[0]=0,s[1]=Math.atan2(n,u))):"XZY"===t&&(s[2]=Math.asin(-i(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(A,l),s[1]=Math.atan2(n,r)):(s[0]=Math.atan2(-h,u),s[1]=0)),s},composeMat4:(e,t,s,i=p.mat4())=>(p.quaternionToRotationMat4(t,i),p.scaleMat4v(s,i),p.translateMat4v(e,i),i),decomposeMat4:(()=>{const e=new h(3),t=new h(16);return function(s,i,r,o){e[0]=s[0],e[1]=s[1],e[2]=s[2];let n=p.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const a=p.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=p.lenVec3(e);p.determinantMat4(s)<0&&(n=-n),i[0]=s[12],i[1]=s[13],i[2]=s[14],t.set(s);const h=1/n,c=1/a,A=1/l;return t[0]*=h,t[1]*=h,t[2]*=h,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=A,t[9]*=A,t[10]*=A,p.mat4ToQuaternion(t,r),o[0]=n,o[1]=a,o[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,i){i||(i=p.mat4());const r=e[0],o=e[1],n=e[2],a=s[0],l=s[1],h=s[2],c=t[0],A=t[1],u=t[2];if(r===c&&o===A&&n===u)return p.identityMat4();let d,f,E,m,y,g,I,v,T,_;return d=r-c,f=o-A,E=n-u,_=1/Math.sqrt(d*d+f*f+E*E),d*=_,f*=_,E*=_,m=l*E-h*f,y=h*d-a*E,g=a*f-l*d,_=Math.sqrt(m*m+y*y+g*g),_?(_=1/_,m*=_,y*=_,g*=_):(m=0,y=0,g=0),I=f*g-E*y,v=E*m-d*g,T=d*y-f*m,_=Math.sqrt(I*I+v*v+T*T),_?(_=1/_,I*=_,v*=_,T*=_):(I=0,v=0,T=0),i[0]=m,i[1]=I,i[2]=d,i[3]=0,i[4]=y,i[5]=v,i[6]=f,i[7]=0,i[8]=g,i[9]=T,i[10]=E,i[11]=0,i[12]=-(m*r+y*o+g*n),i[13]=-(I*r+v*o+T*n),i[14]=-(d*r+f*o+E*n),i[15]=1,i},lookAtMat4c:(e,t,s,i,r,o,n,a,l)=>p.lookAtMat4v([e,t,s],[i,r,o],[n,a,l],[]),orthoMat4c(e,t,s,i,r,o,n){n||(n=p.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2/l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=-2/h,n[11]=0,n[12]=-(e+t)/a,n[13]=-(i+s)/l,n[14]=-(o+r)/h,n[15]=1,n},frustumMat4v(e,t,s){s||(s=p.mat4());const i=[e[0],e[1],e[2],0],r=[t[0],t[1],t[2],0];p.addVec4(r,i,c),p.subVec4(r,i,A);const o=2*i[2],n=A[0],a=A[1],l=A[2];return s[0]=o/n,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=o/a,s[6]=0,s[7]=0,s[8]=c[0]/n,s[9]=c[1]/a,s[10]=-c[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-o*r[2]/l,s[15]=0,s},frustumMat4(e,t,s,i,r,o,n){n||(n=p.mat4());const a=t-e,l=i-s,h=o-r;return n[0]=2*r/a,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=2*r/l,n[6]=0,n[7]=0,n[8]=(t+e)/a,n[9]=(i+s)/l,n[10]=-(o+r)/h,n[11]=-1,n[12]=0,n[13]=0,n[14]=-o*r*2/h,n[15]=0,n},perspectiveMat4(e,t,s,i,r){const o=[],n=[];return o[2]=s,n[2]=i,n[1]=o[2]*Math.tan(e/2),o[1]=-n[1],n[0]=n[1]*t,o[0]=-n[0],p.frustumMat4v(o,n,r)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=p.vec3()){const i=t[0],r=t[1],o=t[2];return s[0]=e[0]*i+e[4]*r+e[8]*o+e[12],s[1]=e[1]*i+e[5]*r+e[9]*o+e[13],s[2]=e[2]*i+e[6]*r+e[10]*o+e[14],s},transformPoint4:(e,t,s=p.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const i=s||[],r=t.length;let o,n,a,l;const h=e[0],c=e[1],A=e[2],u=e[3],p=e[4],d=e[5],f=e[6],E=e[7],m=e[8],y=e[9],g=e[10],I=e[11],v=e[12],T=e[13],_=e[14],R=e[15];let P;for(let e=0;e{const e=new h(16),t=new h(16),s=new h(16);return function(i,r,o,n){return this.transformVec3(this.mulMat4(this.inverseMat4(r,e),this.inverseMat4(o,t),s),i,n)}})(),lerpVec3(e,t,s,i,r,o){const n=o||p.vec3(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n},lerpMat4(e,t,s,i,r,o){const n=o||p.mat4(),a=(e-t)/(s-t);return n[0]=i[0]+a*(r[0]-i[0]),n[1]=i[1]+a*(r[1]-i[1]),n[2]=i[2]+a*(r[2]-i[2]),n[3]=i[3]+a*(r[3]-i[3]),n[4]=i[4]+a*(r[4]-i[4]),n[5]=i[5]+a*(r[5]-i[5]),n[6]=i[6]+a*(r[6]-i[6]),n[7]=i[7]+a*(r[7]-i[7]),n[8]=i[8]+a*(r[8]-i[8]),n[9]=i[9]+a*(r[9]-i[9]),n[10]=i[10]+a*(r[10]-i[10]),n[11]=i[11]+a*(r[11]-i[11]),n[12]=i[12]+a*(r[12]-i[12]),n[13]=i[13]+a*(r[13]-i[13]),n[14]=i[14]+a*(r[14]-i[14]),n[15]=i[15]+a*(r[15]-i[15]),n},flatten(e){const t=[];let s,i,r,o,n;for(s=0,i=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=p.vec4()){const i=e[0]*p.DEGTORAD/2,r=e[1]*p.DEGTORAD/2,o=e[2]*p.DEGTORAD/2,n=Math.cos(i),a=Math.cos(r),l=Math.cos(o),h=Math.sin(i),c=Math.sin(r),A=Math.sin(o);return"XYZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"YXZ"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"ZXY"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l-h*c*A):"ZYX"===t?(s[0]=h*a*l-n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l+h*c*A):"YZX"===t?(s[0]=h*a*l+n*c*A,s[1]=n*c*l+h*a*A,s[2]=n*a*A-h*c*l,s[3]=n*a*l-h*c*A):"XZY"===t&&(s[0]=h*a*l-n*c*A,s[1]=n*c*l-h*a*A,s[2]=n*a*A+h*c*l,s[3]=n*a*l+h*c*A),s},mat4ToQuaternion(e,t=p.vec4()){const s=e[0],i=e[4],r=e[8],o=e[1],n=e[5],a=e[9],l=e[2],h=e[6],c=e[10];let A;const u=s+n+c;return u>0?(A=.5/Math.sqrt(u+1),t[3]=.25/A,t[0]=(h-a)*A,t[1]=(r-l)*A,t[2]=(o-i)*A):s>n&&s>c?(A=2*Math.sqrt(1+s-n-c),t[3]=(h-a)/A,t[0]=.25*A,t[1]=(i+o)/A,t[2]=(r+l)/A):n>c?(A=2*Math.sqrt(1+n-s-c),t[3]=(r-l)/A,t[0]=(i+o)/A,t[1]=.25*A,t[2]=(a+h)/A):(A=2*Math.sqrt(1+c-s-n),t[3]=(o-i)/A,t[0]=(r+l)/A,t[1]=(a+h)/A,t[2]=.25*A),t},vec3PairToQuaternion(e,t,s=p.vec4()){const i=Math.sqrt(p.dotVec3(e,e)*p.dotVec3(t,t));let r=i+p.dotVec3(e,t);return r<1e-8*i?(r=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):p.cross3Vec3(e,t,s),s[3]=r,p.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=p.vec4()){const s=e[3]/2,i=Math.sin(s);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new h(16);return(t,s,i)=>(i=i||p.vec3(),p.quaternionToRotationMat4(t,e),p.mat4ToEuler(e,s,i),i)})(),mulQuaternions(e,t,s=p.vec4()){const i=e[0],r=e[1],o=e[2],n=e[3],a=t[0],l=t[1],h=t[2],c=t[3];return s[0]=n*a+i*c+r*h-o*l,s[1]=n*l+r*c+o*a-i*h,s[2]=n*h+o*c+i*l-r*a,s[3]=n*c-i*a-r*l-o*h,s},vec3ApplyQuaternion(e,t,s=p.vec3()){const i=t[0],r=t[1],o=t[2],n=e[0],a=e[1],l=e[2],h=e[3],c=h*i+a*o-l*r,A=h*r+l*i-n*o,u=h*o+n*r-a*i,d=-n*i-a*r-l*o;return s[0]=c*h+d*-n+A*-l-u*-a,s[1]=A*h+d*-a+u*-n-c*-l,s[2]=u*h+d*-l+c*-a-A*-n,s},quaternionToMat4(e,t){t=p.identityMat4(t);const s=e[0],i=e[1],r=e[2],o=e[3],n=2*s,a=2*i,l=2*r,h=n*o,c=a*o,A=l*o,u=n*s,d=a*s,f=l*s,E=a*i,m=l*i,y=l*r;return t[0]=1-(E+y),t[1]=d+A,t[2]=f-c,t[4]=d-A,t[5]=1-(u+y),t[6]=m+h,t[8]=f+c,t[9]=m-h,t[10]=1-(u+E),t},quaternionToRotationMat4(e,t){const s=e[0],i=e[1],r=e[2],o=e[3],n=s+s,a=i+i,l=r+r,h=s*n,c=s*a,A=s*l,u=i*a,p=i*l,d=r*l,f=o*n,E=o*a,m=o*l;return t[0]=1-(u+d),t[4]=c-m,t[8]=A+E,t[1]=c+m,t[5]=1-(h+d),t[9]=p-f,t[2]=A-E,t[6]=p+f,t[10]=1-(h+u),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=p.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>p.normalizeQuaternion(p.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=p.vec4()){const s=(e=p.normalizeQuaternion(e,u))[3],i=2*Math.acos(s),r=Math.sqrt(1-s*s);return r<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r),t[3]=i,t},AABB3:e=>new h(e||6),AABB2:e=>new h(e||4),OBB3:e=>new h(e||32),OBB2:e=>new h(e||16),Sphere3:(e,t,s,i)=>new h([e,t,s,i]),transformOBB3(e,t,s=t){let i;const r=t.length;let o,n,a;const l=e[0],h=e[1],c=e[2],A=e[3],u=e[4],p=e[5],d=e[6],f=e[7],E=e[8],m=e[9],y=e[10],g=e[11],I=e[12],v=e[13],T=e[14],_=e[15];for(i=0;i{const e=new h(3),t=new h(3),s=new h(3);return i=>(e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5],p.subVec3(t,e,s),Math.abs(p.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new h(3),t=new h(3),s=new h(3);return(i,r)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],t[0]=i[3],t[1]=i[4],t[2]=i[5];const o=p.subVec3(t,e,s),n=r[0]-i[0],a=i[3]-r[0],l=r[1]-i[1],h=i[4]-r[1],c=r[2]-i[2],A=i[5]-r[2];return o[0]+=n>a?n:a,o[1]+=l>h?l:h,o[2]+=c>A?c:A,Math.abs(p.lenVec3(o))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||p.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||p.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=p.AABB3())=>(e[0]=p.MAX_DOUBLE,e[1]=p.MAX_DOUBLE,e[2]=p.MAX_DOUBLE,e[3]=p.MIN_DOUBLE,e[4]=p.MIN_DOUBLE,e[5]=p.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=p.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new h(3);return(t,s,i)=>{s=s||p.AABB3();let r,o,n,a=p.MAX_DOUBLE,l=p.MAX_DOUBLE,h=p.MAX_DOUBLE,c=p.MIN_DOUBLE,A=p.MIN_DOUBLE,u=p.MIN_DOUBLE;for(let s=0,d=t.length;sc&&(c=r),o>A&&(A=o),n>u&&(u=n);return s[0]=a,s[1]=l,s[2]=h,s[3]=c,s[4]=A,s[5]=u,s}})(),OBB3ToAABB3(e,t=p.AABB3()){let s,i,r,o=p.MAX_DOUBLE,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE,c=p.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToAABB3(e,t=p.AABB3()){let s,i,r,o=p.MAX_DOUBLE,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE,c=p.MIN_DOUBLE;for(let t=0,A=e.length;tl&&(l=s),i>h&&(h=i),r>c&&(c=r);return t[0]=o,t[1]=n,t[2]=a,t[3]=l,t[4]=h,t[5]=c,t},points3ToSphere3:(()=>{const e=new h(3);return(t,s)=>{s=s||p.vec4();let i,r=0,o=0,n=0;const a=t.length;for(i=0;ih&&(h=l);return s[3]=h,s}})(),positions3ToSphere3:(()=>{const e=new h(3),t=new h(3);return(s,i)=>{i=i||p.vec4();let r,o=0,n=0,a=0;const l=s.length;let h=0;for(r=0;rh&&(h=A);return i[3]=h,i}})(),OBB3ToSphere3:(()=>{const e=new h(3),t=new h(3);return(s,i)=>{i=i||p.vec4();let r,o=0,n=0,a=0;const l=s.length,h=l/4;for(r=0;rA&&(A=c);return i[3]=A,i}})(),getSphere3Center:(e,t=p.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=p.vec3()){let s=0,i=0,r=0;for(var o=0,n=e.length;o(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>i&&(e[1]=i),e[2]>r&&(e[2]=r),e[3](e[0]=p.MAX_DOUBLE,e[1]=p.MAX_DOUBLE,e[2]=p.MIN_DOUBLE,e[3]=p.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(i=e[0]*s[0],r=e[0]*s[3]):(i=e[0]*s[3],r=e[0]*s[0]),e[1]>0?(i+=e[1]*s[1],r+=e[1]*s[4]):(i+=e[1]*s[4],r+=e[1]*s[1]),e[2]>0?(i+=e[2]*s[2],r+=e[2]*s[5]):(i+=e[2]*s[5],r+=e[2]*s[2]);if(i<=-t&&r<=-t)return-1;return i>=-t&&r>=-t?1:0},OBB3ToAABB2(e,t=p.AABB2()){let s,i,r,o,n=p.MAX_DOUBLE,a=p.MAX_DOUBLE,l=p.MIN_DOUBLE,h=p.MIN_DOUBLE;for(let t=0,c=e.length;tl&&(l=s),i>h&&(h=i);return t[0]=n,t[1]=a,t[2]=l,t[3]=h,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(i-s),tangentQuadraticBezier3:(e,t,s,i,r)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*i*(1-e)-3*e*e*i+3*e*e*r,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,i,r){const o=.5*(s-e),n=.5*(i-t),a=r*r;return(2*t-2*s+o+n)*(r*a)+(-3*t+3*s-2*o-n)*a+o*r+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,i){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,i)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,i,r){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,i)+this.b3p3(e,r)},triangleNormal(e,t,s,i=p.vec3()){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=s[0]-e[0],l=s[1]-e[1],h=s[2]-e[2],c=o*h-n*l,A=n*a-r*h,u=r*l-o*a,d=Math.sqrt(c*c+A*A+u*u);return 0===d?(i[0]=0,i[1]=0,i[2]=0):(i[0]=c/d,i[1]=A/d,i[2]=u/d),i},rayTriangleIntersect:(()=>{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3);return(o,n,a,l,h,c)=>{c=c||p.vec3();const A=p.subVec3(l,a,e),u=p.subVec3(h,a,t),d=p.cross3Vec3(n,u,s),f=p.dotVec3(A,d);if(f<1e-6)return null;const E=p.subVec3(o,a,i),m=p.dotVec3(E,d);if(m<0||m>f)return null;const y=p.cross3Vec3(E,A,r),g=p.dotVec3(n,y);if(g<0||m+g>f)return null;const I=p.dotVec3(u,y)/f;return c[0]=o[0]+I*n[0],c[1]=o[1]+I*n[1],c[2]=o[2]+I*n[2],c}})(),rayPlaneIntersect:(()=>{const e=new h(3),t=new h(3),s=new h(3),i=new h(3);return(r,o,n,a,l,h)=>{h=h||p.vec3(),o=p.normalizeVec3(o,e);const c=p.subVec3(a,n,t),A=p.subVec3(l,n,s),u=p.cross3Vec3(c,A,i);p.normalizeVec3(u,u);const d=-p.dotVec3(n,u),f=-(p.dotVec3(r,u)+d)/p.dotVec3(o,u);return h[0]=r[0]+f*o[0],h[1]=r[1]+f*o[1],h[2]=r[2]+f*o[2],h}})(),cartesianToBarycentric:(()=>{const e=new h(3),t=new h(3),s=new h(3);return(i,r,o,n,a)=>{const l=p.subVec3(n,r,e),h=p.subVec3(o,r,t),c=p.subVec3(i,r,s),A=p.dotVec3(l,l),u=p.dotVec3(l,h),d=p.dotVec3(l,c),f=p.dotVec3(h,h),E=p.dotVec3(h,c),m=A*f-u*u;if(0===m)return null;const y=1/m,g=(f*d-u*E)*y,I=(A*E-u*d)*y;return a[0]=1-g-I,a[1]=I,a[2]=g,a}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,i,r=p.vec3()){const o=e[0],n=e[1],a=e[2];return r[0]=t[0]*o+s[0]*n+i[0]*a,r[1]=t[1]*o+s[1]*n+i[1]*a,r[2]=t[2]*o+s[2]*n+i[2]*a,r},mergeVertices(e,t,s,i){const r={},o=[],n=[],a=t?[]:null,l=s?[]:null,h=[];let c,A,u,p;const d=1e4;let f,E,m=0;for(f=0,E=e.length;f{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3),o=new h(3);return(n,a,l)=>{let h,c;const A=new Array(n.length/3);let u,d,f,E,m,y,g;for(h=0,c=a.length;h{const e=new h(3),t=new h(3),s=new h(3),i=new h(3),r=new h(3),o=new h(3),n=new h(3);return(a,l,h)=>{const c=new Float32Array(a.length);for(let A=0;A>24&255,c=u>>16&255,h=u>>8&255,l=255&u,a=t[s],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+1],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,a=t[s+2],n=3*a,r[p++]=e[n],r[p++]=e[n+1],r[p++]=e[n+2],o[d++]=l,o[d++]=h,o[d++]=c,o[d++]=A,u++;return{positions:r,colors:o}},faceToVertexNormals(e,t,s={}){const i=s.smoothNormalsAngleThreshold||20,r={},o=[],n={};let a,l,h,c,A;const u=1e4;let d,f,E,m,y,g;for(f=0,m=e.length;f{const e=new h(4),t=new h(4);return(s,i,r,o,n)=>{e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=1,p.transformVec4(s,e,t),o[0]=t[0],o[1]=t[1],o[2]=t[2],e[0]=r[0],e[1]=r[1],e[2]=r[2],p.transformVec3(s,e,t),p.normalizeVec3(t),n[0]=t[0],n[1]=t[1],n[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new h(16),t=new h(16),s=new h(4),i=new h(4),r=new h(4),o=new h(4);return(n,a,l,h,c,A)=>{const u=p.mulMat4(l,a,e),d=p.inverseMat4(u,t),f=n.width,E=n.height,m=(h[0]-f/2)/(f/2),y=-(h[1]-E/2)/(E/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,p.transformVec4(d,s,i),p.mulVec4Scalar(i,1/i[3]),r[0]=m,r[1]=y,r[2]=1,r[3]=1,p.transformVec4(d,r,o),p.mulVec4Scalar(o,1/o[3]),c[0]=o[0],c[1]=o[1],c[2]=o[2],p.subVec3(o,i,A),p.normalizeVec3(A)}})(),canvasPosToLocalRay:(()=>{const e=new h(3),t=new h(3);return(s,i,r,o,n,a,l)=>{p.canvasPosToWorldRay(s,i,r,n,e,t),p.worldRayToLocalRay(o,e,t,a,l)}})(),worldRayToLocalRay:(()=>{const e=new h(16),t=new h(4),s=new h(4);return(i,r,o,n,a)=>{const l=p.inverseMat4(i,e);t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=1,p.transformVec4(l,t,s),n[0]=s[0],n[1]=s[1],n[2]=s[2],p.transformVec3(l,o,a)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,i,r,o){const n=new h(6),a={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:n};let l,c;for(n[0]=n[1]=n[2]=Number.POSITIVE_INFINITY,n[3]=n[4]=n[5]=Number.NEGATIVE_INFINITY,l=0,c=s.length;ln[3]&&(n[3]=r[t]),r[t+1]n[4]&&(n[4]=r[t+1]),r[t+2]n[5]&&(n[5]=r[t+2])}}if(s.length<20||o>10)return a.triangles=s,a.leaf=!0,a;e[0]=n[3]-n[0],e[1]=n[4]-n[1],e[2]=n[5]-n[2];let u=0;e[1]>e[u]&&(u=1),e[2]>e[u]&&(u=2),a.splitDim=u;const p=(n[u]+n[u+3])/2,d=new Array(s.length);let f=0;const E=new Array(s.length);let m=0;for(l=0,c=s.length;l{const i=e.length/3,r=new Array(i);for(let e=0;e=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t},octDecodeVec2s(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t}};p.buildEdgeIndices=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(x=s[O.index1],B=s[O.index2],(!F&&x>65535||B>65535)&&(F=!0),v.push(x),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const d={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var f=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),i=s+e[1],r=s;r{};t=t||i,s=s||i;var r=new XMLHttpRequest;r.overrideMimeType("application/json"),r.open("GET",e,!0),r.addEventListener("load",(function(e){var i=e.target.response;if(200===this.status){var r;try{r=JSON.parse(i)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(r)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(i))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),r.addEventListener("error",(function(e){s(e)}),!1),r.send(null)},loadArraybuffer:function(e,t,s){var i=e=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}},T={sceneId:null,time:null,startTime:null,prevTime:null,deltaTime:null},_=[];let R,P=0,D=0;const N=new function(){this.version="1.0.0",this.scenes={},this._superTypes={},this._addScene=function(e){if(e.id){if(N.scenes[e.id])return void console.error(`[ERROR] Scene ${y.inQuotes(e.id)} already exists`)}else e.id=I.addItem({});N.scenes[e.id]=e;const t=e.ticksPerOcclusionTest,s=e.ticksPerRender;g[e.id]={ticksPerOcclusionTest:t,ticksPerRender:s,renderCountdown:s},d.components.scenes++,e.once("destroyed",(()=>{I.removeItem(e.id),delete N.scenes[e.id],delete g[e.id],d.components.scenes--}))},this.clear=function(){let e;for(const t in N.scenes)N.scenes.hasOwnProperty(t)&&(e=N.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete N.scenes[e.id]))},this.scheduleTask=function(e,t){v.push(e),v.push(t)},this.runTasks=function(e=-1){let t,s,i=(new Date).getTime(),r=0;for(;v.length>0&&(e<0||i0&&R>0){var t=1e3/R;D+=t,_.push(t),_.length>=30&&(D-=_.shift()),d.frame.fps=Math.round(D/_.length)}!function(e){const t=N.runTasks(e+10),s=N.getNumTasks();d.frame.tasksRun=t,d.frame.tasksScheduled=s,d.frame.tasksBudget=10}(e),function(e){for(var t in T.time=e,N.scenes)if(N.scenes.hasOwnProperty(t)){var s=N.scenes[t];T.sceneId=t,T.startTime=s.startTime,T.deltaTime=null!=T.prevTime?T.time-T.prevTime:0,s.fire("tick",T,!0)}T.prevTime=e}(e),function(){const e=N.scenes,t=!1;let s,i,r,o,n;for(n in e)e.hasOwnProperty(n)&&(s=e[n],i=g[n],i||(i=g[n]={}),r=s.ticksPerOcclusionTest,i.ticksPerOcclusionTest!==r&&(i.ticksPerOcclusionTest=r,i.renderCountdown=r),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=r),o=s.ticksPerRender,i.ticksPerRender!==o&&(i.ticksPerRender=o,i.renderCountdown=o),0==--i.renderCountdown&&(s.render(t),i.renderCountdown=o))}(),P=e,void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(C):requestAnimationFrame(C)};void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(C):requestAnimationFrame(C);class O{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof O))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,s,i){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new t),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);const o=this._subIdMap.addItem();r[o]={callback:s,scope:i||this},this._subIdEvents[o]=e;const n=this._events[e];return void 0!==n&&s.call(i||this,n),o}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+y.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const i=e.sceneDefault,r=e.sceneSingleton,o=e.type,n=e.on,a=!1!==e.recompiles;if(s&&(y.isNumeric(s)||y.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+y.inQuotes(e))}if(!s)if(!0===r){const e=this.scene.types[o];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===i&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+y.inQuotes(s.id));if(o&&!s.isType(o))return void this.error("Expected a "+o+" type or subtype: "+s.type+" "+y.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let h,c,A;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(h=e.subs,c=0,A=h.length;c{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():N.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,i,r,o;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,i=t.subs,r=0,o=i.length;r0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let i=255;if(t){if(e<0?e=0:e>1&&(e=1),i=Math.floor(255*e),s===i)return}else if(i=255,s===i)return;for(let e=0,t=this.meshes.length;e
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const X=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class Z extends O{constructor(e,t={}){super(e,t),this._backgroundColor=p.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let i=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(i=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{i&&(i=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new Y(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+p.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),i=s.style;i.height="100%",i.width="100%",i.padding="0",i.margin="0",i.background="rgba(0,0,0,0);",i.float="left",i.left="0",i.top="0",i.position="absolute",i.opacity="1.0",i["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?J.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?J.FS_MAX_FLOAT_PRECISION="mediump":J.FS_MAX_FLOAT_PRECISION="lowp":J.FS_MAX_FLOAT_PRECISION="mediump",J.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),J.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),J.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),J.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),J.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),J.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),J.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),J.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),J.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),J.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){J.SUPPORTED_EXTENSIONS[e]=!0})))}class ee{constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._canvasPos=new Int16Array([0,0]),this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class te{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),i=[];for(let e=0;e0&&"/"===s.charAt(i+1)&&(s=s.substring(0,i)),t.push(s);return t.join("\n")}function ne(e){console.error(e.join("\n"))}class ae{constructor(e,t){this.id=re.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new te(e,e.VERTEX_SHADER,oe(this.source.vertex)),this._fragmentShader=new te(e,e.FRAGMENT_SHADER,oe(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void ne(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void ne(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void ne(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void ne(this.errors);let t,s,i,r,o;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void ne(this.errors);const n=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class he{constructor(e,t){this.scene=e,this.aabb=p.AABB3(),this.origin=p.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const n=s.canvasPos,a=n[0],l=n[1];a+10<0||l+10<0||a-10>i||l-10>r?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[o++]=a,this.pixels[o++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new he(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let i=this._occlusionLayers[s];i||(i=new he(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),i.addMarker(e),this._markersToOcclusionLayersMap[e.id]=i}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// OcclusionTester fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),i.push("}"),i}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new ae(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=i.sectionPlanes;for(let i=0;i{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=p.mat4();return()=>(e&&p.inverseMat4(i.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,i=this._scene,r=i.sao,o=t.drawingBufferWidth,n=t.drawingBufferHeight,a=i.camera.project._state,l=a.near,h=a.far,c=a.matrix,A=this._getInverseProjectMat(),u=Math.random(),d="perspective"===i.camera.projection;pe[0]=o,pe[1]=n,t.viewport(0,0,o,n),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,h),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,c),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,A),t.uniform1i(this._uPerspective,d),t.uniform1f(this._uScale,r.scale*(h/5)),t.uniform1f(this._uIntensity,r.intensity),t.uniform1f(this._uBias,r.bias),t.uniform1f(this._uKernelRadius,r.kernelRadius),t.uniform1f(this._uMinResolution,r.minResolution),t.uniform2fv(this._uViewport,pe),t.uniform1f(this._uRandomSeed,u);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new ae(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const i=new Float32Array([1,1,0,1,0,0,1,0]),r=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),o=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new le(s,s.ARRAY_BUFFER,r,r.length,3,s.STATIC_DRAW),this._uvBuf=new le(s,s.ARRAY_BUFFER,i,i.length,2,s.STATIC_DRAW),this._indicesBuf=new le(s,s.ELEMENT_ARRAY_BUFFER,o,o.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const fe=new Float32Array(ve(17,[0,1])),Ee=new Float32Array(ve(17,[1,0])),me=new Float32Array(function(e,t){const s=[];for(let i=0;i<=e;i++)s.push(Ie(i,t));return s}(17,4)),ye=new Float32Array(2);class ge{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new ae(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),i=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new le(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new le(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new le(e,e.ELEMENT_ARRAY_BUFFER,i,i.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=p.mat4();return()=>(e&&p.inverseMat4(o.camera.projMatrix,t),t)})());const i=this._scene.canvas.gl,r=this._program,o=this._scene,n=i.drawingBufferWidth,a=i.drawingBufferHeight,l=o.camera.project._state,h=l.near,c=l.far;i.viewport(0,0,n,a),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),r.bind(),ye[0]=n,ye[1]=a,i.uniform2fv(this._uViewport,ye),i.uniform1f(this._uCameraNear,h),i.uniform1f(this._uCameraFar,c),i.uniform1f(this._uDepthCutoff,.01),0===s?i.uniform2fv(this._uSampleOffsets,Ee):i.uniform2fv(this._uSampleOffsets,fe),i.uniform1fv(this._uSampleWeights,me);const A=e.getDepthTexture(),u=t.getTexture();r.bindTexture(this._uDepthTexture,A,0),r.bindTexture(this._uOcclusionTexture,u,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function Ie(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function ve(e,t){const s=[];for(let i=0;i<=e;i++)s.push(t[0]*i),s.push(t[1]*i);return s}class Te{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(e=null){if(this._touch(e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}_touch(e=null){let t,s;const i=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=i.drawingBufferWidth,s=i.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;i.deleteTexture(this.buffer.texture),i.deleteFramebuffer(this.buffer.framebuf),i.deleteRenderbuffer(this.buffer.renderbuf)}const r=i.createTexture();let o;i.bindTexture(i.TEXTURE_2D,r),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e?i.texStorage2D(i.TEXTURE_2D,1,e,t,s):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,s,0,i.RGBA,i.UNSIGNED_BYTE,null),this._hasDepthTexture&&(o=i.createTexture(),i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texImage2D(i.TEXTURE_2D,0,i.DEPTH_COMPONENT32F,t,s,0,i.DEPTH_COMPONENT,i.FLOAT,null));const n=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,n),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_COMPONENT32F,t,s);const a=i.createFramebuffer();if(i.bindFramebuffer(i.FRAMEBUFFER,a),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,r,0),this._hasDepthTexture?i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,o,0):i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n),i.bindTexture(i.TEXTURE_2D,null),i.bindRenderbuffer(i.RENDERBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.FRAMEBUFFER,a),!i.isFramebuffer(a))throw"Invalid framebuffer";i.bindFramebuffer(i.FRAMEBUFFER,null);const l=i.checkFramebufferStatus(i.FRAMEBUFFER);switch(l){case i.FRAMEBUFFER_COMPLETE:break;case i.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case i.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case i.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:a,renderbuf:n,texture:r,depthTexture:o,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,i=null,r=Uint8Array,o=4){const n=e,a=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,l=new r(o),h=this.gl;return h.readPixels(n,a,1,1,s||h.RGBA,i||h.UNSIGNED_BYTE,l,0),l}readArray(e=null,t=null,s=Uint8Array,i=4){const r=new s(this.buffer.width*this.buffer.height*i),o=this.gl;return o.readPixels(0,0,this.buffer.width,this.buffer.height,e||o.RGBA,t||o.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,i=t.canvas,r=t.imageData,o=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const n=this.buffer.width,a=this.buffer.height,l=a/2|0,h=4*n,c=new Uint8Array(4*n);for(let e=0;e0)for(i.withSAO=!0,w=0;w0)for(w=0;w0)for(w=0;w0)for(w=0;w0||j>0||U>0||H>0){if(o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):(o.blendEquation(o.FUNC_ADD),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA)),i.backfaces=!1,a||o.depthMask(!1),(U>0||H>0)&&o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),H>0)for(w=0;w0)for(w=0;w0)for(w=0;w0)for(w=0;w0||W>0){if(i.lastProgramId=null,e.highlightMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),W>0)for(w=0;w0)for(w=0;w0||K>0||Q>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),o.enable(o.CULL_FACE),K>0)for(w=0;w0)for(w=0;w0||X>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),X>0)for(w=0;w0)for(w=0;w0||q>0){if(i.lastProgramId=null,e.selectedMaterial.glowThrough&&o.clear(o.DEPTH_BUFFER_BIT),o.enable(o.CULL_FACE),o.enable(o.BLEND),n?(o.blendEquation(o.FUNC_ADD),o.blendFuncSeparate(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA,o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),q>0)for(w=0;w0)for(w=0;w0){const t=Math.floor(e/4),s=a.size[0],i=t%s-Math.floor(s/2),o=Math.floor(t/s)-Math.floor(s/2),l=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));m.push({x:i,y:o,dist:l,isVertex:r&&n?p[e+3]>u.length/2:r,result:[p[e+0],p[e+1],p[e+2],p[e+3]]})}let y=null,g=null;if(m.length>0){m.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),g=m[0].isVertex?"vertex":"edge",m=m[0].result;const e=u[m[3]],t=e.origin,s=e.coordinateScale;y=[m[0]*s[0]+t[0],m[1]*s[1]+t[1],m[2]*s[2]+t[2]]}if(null===d&&null==y)return null;let I=null;return null!==y&&(I=e.camera.projectWorldPos(y)),{snapType:g,snappedToVertex:"vertex"===g,snappedToEdge:"edge"===g,worldPos:d,snappedWorldPos:y,snappedCanvasPos:I}},this.addMarker=function(t){this._occlusionTester=this._occlusionTester||new ue(e,v),this._occlusionTester.addMarker(t),e.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){P(),this._occlusionTester.bindRenderBuf(),i.reset(),i.backfaces=!0,i.frontface=!0,o.viewport(0,0,o.drawingBufferWidth,o.drawingBufferHeight),o.clearColor(0,0,0,0),o.enable(o.DEPTH_TEST),o.disable(o.CULL_FACE),o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT);for(let e in h)if(h.hasOwnProperty(e)){const t=h[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),this.element.addEventListener("mousemove",this._mouseMoveListener=e=>{this.enabled&&(this._getMouseCanvasPos(e),this.fire("mousemove",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault())}),this.element.addEventListener("wheel",this._mouseWheelListener=(e,t)=>{if(!this.enabled)return;const s=Math.max(-1,Math.min(1,40*-e.deltaY));this.fire("mousewheel",s,!0)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(i=>{e>=i[0]-s&&e<=i[0]+s&&t>=i[1]-s&&t<=i[1]+s&&this.fire("mouseclicked",i,!0)}))}this._eventsBound=!0}}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,i=0;for(;t.offsetParent;)s+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-i}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const Ne=new t({});class Ce{constructor(e){this.id=Ne.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){Ne.removeItem(this.id)}}class Oe extends O{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new Ce({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class be extends O{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ce({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let i=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(i/=t),i=Math.min(i,120),p.perspectiveMat4(i*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class Se extends O{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ce({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,i=s[2],r=s[3],o=i/r;let n,a,l,h;i>r?(n=-t,a=t,l=t/o,h=-t/o):(n=-t*o,a=t*o,l=t,h=-t),p.orthoMat4c(n,a,h,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class we extends O{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ce({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){p.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class xe extends O{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new Ce({matrix:p.mat4(),inverseMatrix:p.mat4(),transposedMatrix:p.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(p.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(p.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,i,r){const o=this.scene.canvas.canvas,n=o.offsetWidth/2,a=o.offsetHeight/2;return s[0]=(e[0]-n)/n,s[1]=(e[1]-a)/a,s[2]=t,s[3]=1,p.mulMat4v4(this.inverseMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1,p.mulMat4v4(this.camera.inverseViewMatrix,i,r),r}destroy(){super.destroy(),this._state.destroy()}}const Be=p.vec3(),Fe=p.vec3(),Me=p.vec3(),Le=p.vec3(),Ue=p.vec3(),He=p.vec3(),Ge=p.vec4(),ke=p.vec4(),Ve=p.vec4(),je=p.mat4(),Qe=p.mat4(),We=p.vec3(),ze=p.vec3(),Ke=p.vec3(),Ye=p.vec3();class Xe extends O{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new Ce({deviceMatrix:p.mat4(),hasDeviceMatrix:!1,matrix:p.mat4(),normalMatrix:p.mat4(),inverseMatrix:p.mat4()}),this._perspective=new be(this),this._ortho=new Se(this),this._frustum=new we(this),this._customProjection=new xe(this),this._project=this._perspective,this._eye=p.vec3([0,0,10]),this._look=p.vec3([0,0,0]),this._up=p.vec3([0,1,0]),this._worldUp=p.vec3([0,1,0]),this._worldRight=p.vec3([1,0,0]),this._worldForward=p.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(p.subVec3(this._eye,this._look,We),p.normalizeVec3(We,ze),p.mulVec3Scalar(ze,1e3,Ke),p.addVec3(this._look,Ke,Ye),t=Ye):t=this._eye,e.hasDeviceMatrix?(p.lookAtMat4v(t,this._look,this._up,Qe),p.mulMat4(e.deviceMatrix,Qe,e.matrix)):p.lookAtMat4v(t,this._look,this._up,e.matrix),p.inverseMat4(this._state.matrix,this._state.inverseMatrix),p.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=p.subVec3(this._eye,this._look,Be);p.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,je),t=p.transformPoint3(je,t,Fe),this.eye=p.addVec3(this._look,t,Me),this.up=p.transformPoint3(je,this._up,Le)}orbitPitch(e){if(this._constrainPitch&&(e=p.dotVec3(this._up,this._worldUp)/p.DEGTORAD)<1)return;let t=p.subVec3(this._eye,this._look,Be);const s=p.cross3Vec3(p.normalizeVec3(t,Fe),p.normalizeVec3(this._up,Me));p.rotationMat4v(.0174532925*e,s,je),t=p.transformPoint3(je,t,Le),this.up=p.transformPoint3(je,this._up,Ue),this.eye=p.addVec3(t,this._look,He)}yaw(e){let t=p.subVec3(this._look,this._eye,Be);p.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,je),t=p.transformPoint3(je,t,Fe),this.look=p.addVec3(t,this._eye,Me),this._gimbalLock&&(this.up=p.transformPoint3(je,this._up,Le))}pitch(e){if(this._constrainPitch&&(e=p.dotVec3(this._up,this._worldUp)/p.DEGTORAD)<1)return;let t=p.subVec3(this._look,this._eye,Be);const s=p.cross3Vec3(p.normalizeVec3(t,Fe),p.normalizeVec3(this._up,Me));p.rotationMat4v(.0174532925*e,s,je),this.up=p.transformPoint3(je,this._up,He),t=p.transformPoint3(je,t,Le),this.look=p.addVec3(t,this._eye,Ue)}pan(e){const t=p.subVec3(this._eye,this._look,Be),s=[0,0,0];let i;if(0!==e[0]){const r=p.cross3Vec3(p.normalizeVec3(t,[]),p.normalizeVec3(this._up,Fe));i=p.mulVec3Scalar(r,e[0]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]}0!==e[1]&&(i=p.mulVec3Scalar(p.normalizeVec3(this._up,Me),e[1]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),0!==e[2]&&(i=p.mulVec3Scalar(p.normalizeVec3(t,Le),e[2]),s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]),this.eye=p.addVec3(this._eye,s,Ue),this.look=p.addVec3(this._look,s,He)}zoom(e){const t=p.subVec3(this._eye,this._look,Be),s=Math.abs(p.lenVec3(t,Fe)),i=Math.abs(s+e);if(i<.5)return;const r=p.normalizeVec3(t,Me);this.eye=p.addVec3(this._look,p.mulVec3Scalar(r,i),Le)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=p.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return p.lenVec3(p.subVec3(this._look,this._eye,Be))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=Ge,s=ke,i=Ve;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,p.mulMat4v4(this.viewMatrix,t,s),p.mulMat4v4(this.projMatrix,s,i),p.mulVec3Scalar(i,1/i[3]),i[3]=1,i[1]*=-1;const r=this.scene.canvas.canvas,o=r.offsetWidth/2,n=r.offsetHeight/2;return[i[0]*o+o,i[1]*n+n]}destroy(){super.destroy(),this._state.destroy()}}class Ze extends O{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class qe extends Ze{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new Ce({type:"dir",dir:p.vec3([1,1,1]),color:p.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=p.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,i=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],r=[0,1,0];p.lookAtMat4v(i,s,r,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=p.identityMat4()),p.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new Te(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Je extends Ze{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:p.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class $e extends O{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),d.memory.meshes++}destroy(){super.destroy(),d.memory.meshes--}}var et=function(){const e=[],t=[],s=[],i=[],r=[];let o=0;const n=new Uint16Array(3),a=new Uint16Array(3),l=new Uint16Array(3),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3();return function(m,y,g,I){!function(r,o){const n={};let a,l,h,c;const A=Math.pow(10,4);let u,p,d=0;for(u=0,p=r.length;uT)||(x=s[O.index1],B=s[O.index2],(!F&&x>65535||B>65535)&&(F=!0),v.push(x),v.push(B));return F?new Uint32Array(v):new Uint16Array(v)}}();const tt=function(){const e=p.mat4(),t=p.mat4();return function(s,i){i=i||p.mat4();const r=s[0],o=s[1],n=s[2],a=s[3]-r,l=s[4]-o,h=s[5]-n,c=65535;return p.identityMat4(e),p.translationMat4v(s,e),p.identityMat4(t),p.scalingMat4v([a/c,l/c,h/c],t),p.mulMat4(e,t,i),i}}();var st=function(){const e=p.mat4(),t=p.mat4();return function(s,i,r){const o=new Uint16Array(s.length),n=new Float32Array([r[0]!==i[0]?65535/(r[0]-i[0]):0,r[1]!==i[1]?65535/(r[1]-i[1]):0,r[2]!==i[2]?65535/(r[2]-i[2]):0]);let a;for(a=0;a=0?1:-1),t=(1-Math.abs(r))*(o>=0?1:-1);r=e,o=t}return new Int8Array([Math[s](127.5*r+(r<0?-1:0)),Math[i](127.5*o+(o<0?-1:0))])}function ot(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}function nt(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const at={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let i,r;for(i=0;i<3;i++)t[i]=Number.MAX_VALUE,s[i]=-Number.MAX_VALUE;for(i=0;in&&(r=s,n=o),s=rt(e,a,"floor","ceil"),i=ot(s),o=nt(e,a,i),o>n&&(r=s,n=o),s=rt(e,a,"ceil","ceil"),i=ot(s),o=nt(e,a,i),o>n&&(r=s,n=o),t[a]=r[0],t[a+1]=r[1];return t},decompressNormals:function(e,t){for(let s=0,i=0,r=e.length;s=0?1:-1),o=(1-Math.abs(r))*(o>=0?1:-1));const a=Math.sqrt(r*r+o*o+n*n);t[i+0]=r/a,t[i+1]=o/a,t[i+2]=n/a,i+=3}return t},decompressNormal:function(e,t){let s=e[0],i=e[1];s=(2*s+1)/255,i=(2*i+1)/255;const r=1-Math.abs(s)-Math.abs(i);r<0&&(s=(1-Math.abs(i))*(s>=0?1:-1),i=(1-Math.abs(s))*(i>=0?1:-1));const o=Math.sqrt(s*s+i*i+r*r);return t[0]=s/o,t[1]=i/o,t[2]=r/o,t}},lt=d.memory,ht=p.AABB3();class ct extends $e{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ce({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=at.getPositionsBounds(t.positions),i=at.compressPositions(t.positions,e.min,e.max);s.positions=i.quantized,s.positionsDecodeMatrix=i.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=at.getUVBounds(t.uv),i=at.compressUVs(t.uv,e.min,e.max);s.uv=i.quantized,s.uvDecodeMatrix=i.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=at.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),lt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),lt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new le(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),lt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new le(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),lt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new le(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),lt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new le(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),lt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=et(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),lt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=p.buildPickTriangles(e.positions,e.indices,e.compressGeometry),i=s.positions,r=s.colors;this._pickTrianglePositionsBuf=new le(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,4,t.STATIC_DRAW,!0),lt.positions+=this._pickTrianglePositionsBuf.numItems,lt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),at.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=at.getPositionsBounds(e),i=at.compressPositions(e,s.min,s.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),at.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),at.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=p.AABB3()),p.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=p.OBB3()),p.positions3ToAABB3(this._state.positions,ht,this._state.positionsDecodeMatrix),p.AABB3ToOBB3(ht,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),lt.meshes--}}function At(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let i=e.zSize||1;i<0&&(console.error("negative zSize not allowed - will invert"),i*=-1);const r=e.center,o=r?r[0]:0,n=r?r[1]:0,a=r?r[2]:0,l=-t+o,h=-s+n,c=-i+a,A=t+o,u=s+n,p=i+a;return y.apply(e,{positions:[A,u,p,l,u,p,l,h,p,A,h,p,A,u,p,A,h,p,A,h,c,A,u,c,A,u,p,A,u,c,l,u,c,l,u,p,l,u,p,l,u,c,l,h,c,l,h,p,l,h,c,A,h,c,A,h,p,l,h,p,A,h,c,l,h,c,l,u,c,A,u,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class ut extends O{get type(){return"Material"}constructor(e,t={}){super(e,t),d.memory.materials++}destroy(){super.destroy(),d.memory.materials--}}const pt={opaque:0,mask:1,blend:2},dt=["opaque","mask","blend"];class ft extends ut{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new Ce({type:"PhongMaterial",ambient:p.vec3([1,1,1]),diffuse:p.vec3([1,1,1]),specular:p.vec3([1,1,1]),emissive:p.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=pt[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return dt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const Et={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[.4577854573726654,.529411792755127,.4100345969200134],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class mt extends ut{get type(){return"EmphasisMaterial"}get presets(){return Et}constructor(e,t={}){super(e,t),this._state=new Ce({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=Et[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Et).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const yt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class gt extends ut{get type(){return"EdgeMaterial"}get presets(){return yt}constructor(e,t={}){super(e,t),this._state=new Ce({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=yt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(yt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const It={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class vt extends O{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=p.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return It}set units(e){e||(e="meters");It[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=p.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=p.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class Tt extends O{constructor(e,t={}){super(e,t),this._supported=J.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const _t={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class Rt extends ut{get type(){return"PointsMaterial"}get presets(){return _t}constructor(e,t={}){super(e,t),this._state=new Ce({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=_t[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(_t).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Pt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Dt extends ut{get type(){return"LinesMaterial"}get presets(){return Pt}constructor(e,t={}){super(e,t),this._state=new Ce({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=Pt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Pt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}const Nt={IfcWall:!0,IfcSlab:!0,IfcFloor:!0,IfcRoof:!0,IfcSpace:!0,IfcBeam:!0,IfcStair:!0,IfcPlate:!0};class Ct{constructor(e,t){this.primLODLevels=e,this.entitiesInLOD={},this.primCountInLOD={},this.targetFps=t,this.lodLevelIndex=0,this.consecutiveFramesWithTargetFps=0,this.consecutiveFramesWithoutTargetFps=0}initializeLodState(e){const t=Object.values(e.objects);if(0===t.length)return;const s=e.scene.viewer.metaScene,i={},r={};for(let e=0,o=t.length;e=this.primLODLevels[c]);c++);const A=this.primLODLevels[c]||0;A in i||(i[A]=[]),i[A].push(o),A in r||(r[A]=0),r[A]+=o.numPrimitives}this.entitiesInLOD=i,this.primCountInLOD=r}}class Ot{constructor(e,t,s,i){this.id=t.id,this.scene=e,this.sceneModel=t,this.lodState=new Ct(s,i),this.lodState.initializeLodState(t)}_increaseLODLevelIndex(){const e=this.lodState;if(e.lodLevelIndex===e.primLODLevels.length)return!1;const t=e.entitiesInLOD[e.primLODLevels[e.lodLevelIndex]]||[];for(let e=0,s=t.length;e5&&(t.consecutiveFramesWithoutTargetFps=0,s=this._increaseLODLevelIndex()):e>t.targetFps+4&&++t.consecutiveFramesWithTargetFps>5&&(t.consecutiveFramesWithTargetFps=0,s=this._decreaseLODLevelIndex()),s}resetLodCulling(){let e=!1,t=!1;do{e|=t=this._decreaseLODLevelIndex()}while(t);return e}}class bt extends O{constructor(e,t={}){super(e,t),this._scene=e,this._lodLevels=[2e3,600,150,80,20],this._lodManagers={},this._lodManagerList=[],this.enabled=t.enabled,this.targetFPS=t.targetFPS,this._init()}_init(){const e=new Array(4);let t=0,s=-1,i=Date.now(),r=0,o=0,n=o;this._scene.on("rendering",(()=>{if(-1!==s)for(let e=0,t=this._lodManagerList.length;e{i=Date.now(),window.requestAnimationFrame((()=>{t++;const o=Date.now();r=o-i,i=o,e[t%4]=r;let n=0;if(t>4){for(let t=0;t<4;t++)n+=e[t];s=4/n*1e3}}))})),this._scene.camera.on("matrix",(()=>{n=o})),this._scene.on("tick",(()=>{if(o-n>3)for(let e=0,t=this._lodManagerList.length;e=e.minX&&t.maxY>=e.minY&&t.maxZ>=e.minZ},s.boxRayIntersects=function(e,t,s,i,r,o,n){var a=(e.minX-t)*r,l=(e.maxX-t)*r,h=(e.minY-s)*o,c=(e.maxY-s)*o,A=(e.minZ-i)*n,u=(e.maxZ-i)*n,p=Math.min(A,u),d=Math.max(A,u),f=Math.min(h,c),E=Math.max(h,c),m=Math.min(a,l),y=Math.max(a,l),g=Math.max(0,m,f,p);return Math.min(y,E,d)>=g?g:1/0};var v=function(e,t,s,r,o){for(var n,a=[t,s];a.length;)(s=a.pop())-(t=a.pop())<=r||(n=t+Math.ceil((s-t)/r/2)*r,i(e,n,t,s,o),a.push(t,n,n,s))},T=function(e,t){return e.minX-t.minX},_=function(e,t){return e.minY-t.minY},R=function(e,t){return e.minZ-t.minZ},P=function(){function e(e){void 0===e&&(e=16),this.maxEntries=Math.max(e,8),this.minEntries=Math.max(4,Math.ceil(.4*this.maxEntries)),this.clear()}return e.alloc=function(){return this.pool.pop()||new this},e.free=function(e){e.clear(),this.pool.push(e)},e.prototype.searchCustom=function(e,t){var s=this.data,i=[];if(!e(s,A(s)))return i;for(var r=[];s;){for(var o=0,n=s.children.length;o1){for(d=0,f=(c=c[c.length-1]).length;d=t)break;var r=i+1;if(r0;){var i=s-1>>1;if(p[i].dist<=p[s].dist)break;d(s,i),s=i}},m=a;p.length&&p[0].dist=t;a--){l=e.children[a];f(o,l),n+=m(o)}return n},e.prototype.adjustParentBBoxes=function(e,t,s){for(var i=s;i>=0;i--)f(t[i],e)},e.prototype.condense=function(e){for(var t=e.length-1,s=void 0;t>=0;t--)0===e[t].children.length?t>0?((s=e[t-1].children).splice(s.indexOf(e[t]),1),o(e[t])):this.clear():p(e[t])},e.prototype._insert=function(e,t,s){var i=[],r=this.chooseSubtree(e,this.data,t,i);for(r.children.push(e),f(r,e);t>=0&&i[t].children.length>this.maxEntries;)this.split(i,t),t--;this.adjustParentBBoxes(e,i,t)},e.pool=[],e}();s.RBush3D=P},{quickselect:2}],2:[function(e,t,s){!function(e,i){"object"==typeof s&&void 0!==t?t.exports=i():e.quickselect=i()}(this,(function(){function e(s,i,r,o,n){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),A=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/a+A)),Math.min(o,Math.floor(i+(a-l)*c/a+A)),n)}var u=s[i],p=r,d=o;for(t(s,r,i),n(s[o],u)>0&&t(s,r,o);p0;)d--}0===n(s[r],u)?t(s,r,d):t(s,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return et?1:0}return function(t,i,r,o,n){e(t,i,r||0,o||t.length-1,n||s)}}))},{}]},{},[1])(1)}));var xt=St.exports.RBush3D,Bt=function(e){function t(e){var t=0;return e.meshes.forEach((function(e){t+=e.numPrimitives})),t}function s(e,t){var s={pos:{x:0,y:0},left:0,right:e,top:0,bottom:t,dir:0};function i(){(0==s.dir&&s.pos.x+1>=s.right||1==s.dir&&s.pos.y+1>=s.bottom||2==s.dir&&s.pos.x-1<=s.left-1||3==s.dir&&s.pos.y-1<=s.top-1)&&(s.dir=(s.dir+1)%4,0==s.dir&&s.left++,1==s.dir&&s.top++,2==s.dir&&s.right--,3==s.dir&&s.bottom--),0==s.dir&&s.pos.x++,1==s.dir&&s.pos.y++,2==s.dir&&s.pos.x--,3==s.dir&&s.pos.y--}for(var r=[],o=e*t;r.lengthu&&(c.push(A),A=[],u=a),A.push(d),u-=f}}while(pu&&(c.push(p),p=[],u=a),p.push(e),u-=s})),p.length&&c.push(p);var d={};return c.forEach((function(e,t){e.forEach((function(e){d[e.id]=t}))})),{clusters:c,entityIdToClusterIdMapping:d}}(r.cellsX,r.cellsZ,o.maxCellsPerEntity,r.entitiesByCell,r.cellsByEntity,i.maxPolygonsPerCluster),{clusters:{total:n.clusters.length},clusteringResult:n});a+=l.clusters.total,console.log("Total clusters: "+a);var h=[];return l.clusteringResult.clusters.forEach((function(e){e.forEach((function(e){h.push(e.id)}))})),l.orderedEntityIds=h,l}; /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT @@ -7,7 +7,7 @@ * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT */ -function Gt(e,t){t.length;const s=e.length,i=[],r=[],o=e=>{for(let s=0,i=e.meshIds.length;s{const s=t[e];let i,r;if(s.positionsCompressed){const e=at.getPositionsBounds(s.positionsCompressed);i=at.decompressPosition(e.min,s.positionsDecodeMatrix,[]),r=at.decompressPosition(e.max,s.positionsDecodeMatrix,[])}else{const e=at.getPositionsBounds(s.positions);i=e.min,r=e.max}i[0]+=s.origin[0],i[1]+=s.origin[1],i[2]+=s.origin[2],r[0]+=s.origin[0],r[1]+=s.origin[1],r[2]+=s.origin[2],p.expandAABB3Point3(a,i),p.expandAABB3Point3(a,r),l+=s.numPrimitives})),i[n]={aabb:a,numPrimitives:l,entityId:s.id}}let n,a=[],l={};if(Object.keys(i).length>0){n=function(e){const t=[];for(let s=0,i=e.length;s{s=Math.max(s,e.entity.id)}));const i=new Array(s+1);t.forEach((t=>{i[t.entity.id]=e.objects[t.entity.xeokitId]})),this._internalNodesList=i,this._lastVisibleFrameOfNodes=new Array(i.length),this._lastVisibleFrameOfNodes.fill(0)}_searchVisibleNodesWithFrustumCulling(){return this._aabbTree.searchCustom(((e,t)=>this._aabbIntersectsCameraFrustum(e,t)),(e=>this._aabbContainedInCameraFrustum(e)))}_markVisibleFrameOfVisibleNodes(e,t){const s=this._lastVisibleFrameOfNodes;for(let i=0,r=e.length;ithis._frustumProps.CAM_FACTOR_1?(s|=n<0?64:128,s&=-17):s&=-33;const a=Wt(p.dotVec3(r,this._frustumProps.up),o);Math.abs(a)>this._frustumProps.CAM_FACTOR_2?(s|=a<0?1024:2048,s&=-257):s&=-513}return 4&s&&8&s&&(s|=4096),64&s&&128&s&&(s|=8192),1024&s&&2048&s&&(s|=16384),e._check=s,s}}class Yt{constructor(e,t){this.sceneModel=t,this.entities=[],this.meshes=[],this.finalized=!1}addEntity(e){if(this.finalized)throw"Already finalized";this.entities.push(e)}addMesh(e){if(this.finalized)throw"Already finalized";this.meshes.push(e)}finalize(e){if(this.finalized)throw"Already finalized";this.finalized=!0,this.VFCState=new Kt,this.VFCState.initializeVFCState(this.entities,this.meshes),this.VFCState.finalize(this.sceneModel,e),this._onSceneRendering=this.sceneModel.scene.on("rendering",(()=>this.applyViewFrustumCulling.call(this)))}applyViewFrustumCulling(){this.finalized&&this.VFCState.applyViewFrustumCulling(this.sceneModel)}destroy(){this.finalized&&this.sceneModel.off(this._onSceneRendering)}}class Xt extends C{constructor(e,t={}){super(e,t),this._scene=e,this._vfcManagers={},this._vfcManagerList=[],this.enabled=t.enabled,this._init()}_init(){this._scene.on("rendering",(()=>{for(let e=0,t=this._vfcManagerList.length;e{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new Pe(this,{transparent:i,alphaDepthMask:r}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1;let e=null;this.getHash=function(){if(e)return e;const t=this.sectionPlanes;if(0===t.length)return this.hash=";";const s=[];for(let e=0,i=t.length;e0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),i=null,s=null},this.removeLight=function(e){for(let t=0,r=this.lights.length;t{this._renderer.imageDirty()})),this.lod=new Ft(this,{enabled:t.lodEnabled}),this.vfc=new Xt(this,{enabled:t.vfcEnabled})}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+y.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=p.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const i=this.types[s];i&&(delete i[t],y.isEmptyObject(i)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_objectHighlightedUpdated(e,t=!0){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null,t&&this.fire("objectHighlighted",e,!0)}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&N.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,i=this._clearEachPass;let r,o;for(r=0;rr&&(r=e[3]),e[4]>o&&(o=e[4]),e[5]>n&&(n=e[5]),h=!0}h||(t=-100,s=-100,i=-100,r=100,o=100,n=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=i,this._aabb[3]=r,this._aabb[4]=o,this._aabb[5]=n,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Zt(this,s));const i=e.excludeEntities||e.exclude;return i&&(e.excludeEntityIds=Zt(this,i)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=this._renderer.pick(e,t))?(t.entity&&t.entity.fire&&t.entity.fire("picked",t),t):void 0}snapPick(e){return this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapMode||"vertex")}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]o&&(o=l[3]),l[4]>n&&(n=l[4]),l[5]>a&&(a=l[5]),t=!0}})),t){const e=p.AABB3();return e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=n,e[5]=a,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){y.isString(e)&&(e=[e]);let s=!1;for(let i=0,r=e.length;i0,l=!!r.compressGeometry,h=[];h.push("#version 300 es"),h.push("// Lambertian drawing vertex shader"),h.push("in vec3 position;"),h.push("uniform mat4 modelMatrix;"),h.push("uniform mat4 viewMatrix;"),h.push("uniform mat4 projMatrix;"),h.push("uniform vec4 colorize;"),h.push("uniform vec3 offset;"),l&&h.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(h.push("uniform float logDepthBufFC;"),h.push("out float vFragDepth;"),h.push("bool isPerspectiveMatrix(mat4 m) {"),h.push(" return (m[2][3] == - 1.0);"),h.push("}"),h.push("out float isPerspective;"));a&&h.push("out vec4 vWorldPosition;");if(h.push("uniform vec4 lightAmbient;"),h.push("uniform vec4 materialColor;"),h.push("uniform vec3 materialEmissive;"),r.normalsBuf){h.push("in vec3 normal;"),h.push("uniform mat4 modelNormalMatrix;"),h.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=i.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),h.push(" }"),h.push(" return normalize(v);"),h.push("}"))}h.push("out vec4 vColor;"),"points"===r.primitiveName&&h.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(h.push("void billboard(inout mat4 mat) {"),h.push(" mat[0][0] = 1.0;"),h.push(" mat[0][1] = 0.0;"),h.push(" mat[0][2] = 0.0;"),"spherical"===o&&(h.push(" mat[1][0] = 0.0;"),h.push(" mat[1][1] = 1.0;"),h.push(" mat[1][2] = 0.0;")),h.push(" mat[2][0] = 0.0;"),h.push(" mat[2][1] = 0.0;"),h.push(" mat[2][2] =1.0;"),h.push("}"));h.push("void main(void) {"),h.push("vec4 localPosition = vec4(position, 1.0); "),h.push("vec4 worldPosition;"),l&&h.push("localPosition = positionsDecodeMatrix * localPosition;");r.normalsBuf&&(l?h.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):h.push("vec4 localNormal = vec4(normal, 0.0); "),h.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),h.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));h.push("mat4 viewMatrix2 = viewMatrix;"),h.push("mat4 modelMatrix2 = modelMatrix;"),n&&h.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===o||"cylindrical"===o?(h.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),h.push("billboard(modelMatrix2);"),h.push("billboard(viewMatrix2);"),h.push("billboard(modelViewMatrix);"),r.normalsBuf&&(h.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),h.push("billboard(modelNormalMatrix2);"),h.push("billboard(viewNormalMatrix2);"),h.push("billboard(modelViewNormalMatrix);")),h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r.normalsBuf&&h.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(h.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),h.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),h.push("float lambertian = 1.0;"),r.normalsBuf)for(let e=0,t=i.lights.length;e0,o=t.gammaOutput,n=[];n.push("#version 300 es"),n.push("// Lambertian drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"));if(r){n.push("in vec4 vWorldPosition;"),n.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),n.push("}")}"points"===i.primitiveName&&(n.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),n.push("float r = dot(cxy, cxy);"),n.push("if (r > 1.0) {"),n.push(" discard;"),n.push("}"));t.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");o?n.push("outColor = linearToGamma(vColor, gammaFactor);"):n.push("outColor = vColor;");return n.push("}"),n}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,i=t._sectionPlanesState,r=e._geometry._state,o=t._lightsState;let n;const a=s.billboard,l=s.background,h=s.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),A=Rs(e),u=i.sectionPlanes.length>0,p=_s(e),d=!!r.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),d&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),u&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));o.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(A){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=o.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}c&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),d&&f.push("uniform mat3 uvDecodeMatrix;"));r.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===r.primitiveName&&f.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===a&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(p){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=o.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=o.lights.length;e0,l=Rs(e),h=i.uvBuf,c="PhongMaterial"===n.type,A="MetallicMaterial"===n.type,u="SpecularMaterial"===n.type,p=_s(e);t.gammaInput;const d=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));p&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),d&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(a){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var E=0;E0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),o.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),c&&((o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = "+Ts[o.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(A||u)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),o.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+Ts[o.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),i.colors&&f.push("in vec4 vColor;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(o.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));n.ambient&&f.push("uniform vec3 materialAmbient;");n.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==n.alpha&&null!==n.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");n.emissive&&f.push("uniform vec3 materialEmissive;");n.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==n.glossiness&&null!==n.glossiness&&f.push("uniform float materialGlossiness;");void 0!==n.shininess&&null!==n.shininess&&f.push("uniform float materialShininess;");n.specular&&f.push("uniform vec3 materialSpecular;");void 0!==n.metallic&&null!==n.metallic&&f.push("uniform float materialMetallic;");void 0!==n.roughness&&null!==n.roughness&&f.push("uniform float materialRoughness;");void 0!==n.specularF0&&null!==n.specularF0&&f.push("uniform float materialSpecularF0;");h&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));h&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));h&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));h&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&h&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&h&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&h&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));h&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));h&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&h&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&h&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&h&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=o.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===i.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),n.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");n.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):n.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");i.colors&&f.push("diffuseColor *= vColor.rgb;");n.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");n.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==n.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");i.colors&&f.push("alpha *= vColor.a;");void 0!==n.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==n.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==n.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==n.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));h&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+Ts[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));h&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+Ts[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));h&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+Ts[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));h&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+Ts[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));h&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));h&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(o.lights.length>0||o.lightMaps.length>0||o.reflectionMaps.length>0)){h&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),h&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),h&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),h&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),h&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),h&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),h&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),c&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),u&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),A&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),o.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),c&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(u||A)&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=o.lights.length;e0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),r.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,A=o.sectionPlanes.length;c0&&r.lightMaps[0].texture&&this._uLightMap&&(a.bindTexture(this._uLightMap,r.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),r.reflectionMaps.length>0&&r.reflectionMaps[0].texture&&this._uReflectionMap&&(a.bindTexture(this._uReflectionMap,r.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class Cs{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,i=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),r=t._sectionPlanesState.sectionPlanes.length>0,o=!!e._geometry._state.compressGeometry,n=e._state.billboard,a=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),o&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));r&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),i){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===n||"cylindrical"===n)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===n&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),o&&l.push("localPosition = positionsDecodeMatrix * localPosition;");i&&(o?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),a&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===n||"cylindrical"===n?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),i&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),i)for(let e=0,t=s.lights.length;e0,o=[];o.push("#version 300 es"),o.push("// Lambertian drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}"points"===e._geometry._state.primitiveName&&(o.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),o.push("float r = dot(cxy, cxy);"),o.push("if (r > 1.0) {"),o.push(" discard;"),o.push("}"));t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const Os=new t({}),Ss=p.vec3(),xs=function(e,t){this.id=Os.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Cs(t),this._allocate(t)},ws={};xs.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ws[t];return s||(s=new xs(t,e),ws[t]=s,d.memory.programs++),s._useCount++,s},xs.prototype.put=function(){0==--this._useCount&&(Os.removeItem(this.id),this._program&&this._program.destroy(),delete ws[this._hash],d.memory.programs--)},xs.prototype.webglContextRestored=function(){this._program=null},xs.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl,n=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,a=t._state,l=t._geometry._state,h=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,h?e.getRTCViewMatrix(a.originHash,h):r.viewMatrix),o.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Edges drawing vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec4 edgeColor;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));s&&n.push("out vec4 vWorldPosition;");n.push("out vec4 vColor;"),("spherical"===r||"cylindrical"===r)&&(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n.push("vColor = edgeColor;"),s&&n.push("vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,i=e.scene.gammaOutput,r=s.sectionPlanes.length>0,o=[];o.push("#version 300 es"),o.push("// Edges drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const Fs=new t({}),Ms=p.vec3(),Ls=function(e,t){this.id=Fs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Bs(t),this._allocate(t)},Us={};Ls.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Us[t];return s||(s=new Ls(t,e),Us[t]=s,d.memory.programs++),s._useCount++,s},Ls.prototype.put=function(){0==--this._useCount&&(Fs.removeItem(this.id),this._program&&this._program.destroy(),delete Us[this._hash],d.memory.programs--)},Ls.prototype.webglContextRestored=function(){this._program=null},Ls.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl;let n;const a=t._state,l=t._geometry,h=l._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(a.originHash,c):r.viewMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh picking vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("out vec4 vViewPosition;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==r&&"cylindrical"!==r||(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"));n.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(r.push("uniform vec4 pickColor;"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = pickColor; "),r.push("}"),r}(e)}}const Gs=p.vec3(),ks=function(e,t){this._hash=e,this._shaderSource=new Hs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Vs={};ks.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=Vs[t];if(!s){if(s=new ks(t,e),s.errors)return console.log(s.errors.join("\n")),null;Vs[t]=s,d.memory.programs++}return s._useCount++,s},ks.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Vs[this._hash],d.memory.programs--)},ks.prototype.webglContextRestored=function(){this._program=null},ks.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCPickViewMatrix(r.originHash,a):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t>24&255,c=l>>16&255,A=l>>8&255,u=255&l;i.uniform4f(this._uPickColor,u/255,A/255,c/255,h/255),n.indicesBuf?(i.drawElements(n.primitive,n.indicesBuf.numItems,n.indicesBuf.itemType,0),e.drawElements++):n.positions&&i.drawArrays(i.TRIANGLES,0,n.positions.numItems)},ks.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ae(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,i=!!e._geometry._state.compressGeometry;e._state.billboard,e._state.stationary;const r=[];r.push("#version 300 es"),r.push("// Surface picking vertex shader"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform vec3 offset;"),s&&(r.push("uniform bool clippable;"),r.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;"));r.push("out vec4 vColor;"),i&&r.push("uniform mat4 positionsDecodeMatrix;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),i&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push(" vec4 worldPosition = modelMatrix * localPosition; "),r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&r.push(" vWorldPosition = worldPosition;");r.push(" vColor = color;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return r.push("gl_Position = clipPos;"),r.push("}"),r}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Surface picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),r.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = vColor;"),r.push("}"),r}(e)}}const Qs=p.vec3(),Ws=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new js(t),this._allocate(t)},zs={};Ws.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=zs[t];if(!s){if(s=new Ws(t,e),s.errors)return console.log(s.errors.join("\n")),null;zs[t]=s,d.memory.programs++}return s._useCount++,s},Ws.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete zs[this._hash],d.memory.programs--)},Ws.prototype.webglContextRestored=function(){this._program=null},Ws.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry,a=t._geometry._state,l=t.origin,h=o.backfaces,c=o.frontface,A=s.camera.project,u=n._getPickTrianglePositions(),p=n._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(A.far+1)/Math.LN2);i.uniform1f(this._uLogDepthBufFC,e)}if(i.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(r.originHash,l):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh occlusion vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push("}"),r}(e)}}const Ys=p.vec3(),Xs=function(e,t){this._hash=e,this._shaderSource=new Ks(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Zs={};Xs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Zs[t];if(!s){if(s=new Xs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Zs[t]=s,d.memory.programs++}return s._useCount++,s},Xs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Zs[this._hash],d.memory.programs--)},Xs.prototype.webglContextRestored=function(){this._program=null},Xs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._material._state,o=t._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){const t=r.backfaces;e.backfaces!==t&&(t?i.disable(i.CULL_FACE):i.enable(i.CULL_FACE),e.backfaces=t);const s=r.frontface;e.frontface!==s&&(s?i.frontFace(i.CCW):i.frontFace(i.CW),e.frontface=s),this._lastMaterialId=r.id}const l=s.camera;if(i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCViewMatrix(o.originHash,a):l.viewMatrix),o.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,i=[];i.push("// Mesh shadow vertex shader"),i.push("in vec3 position;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 shadowViewMatrix;"),i.push("uniform mat4 shadowProjMatrix;"),i.push("uniform vec3 offset;"),s&&i.push("uniform mat4 positionsDecodeMatrix;");t&&i.push("out vec4 vWorldPosition;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),i.push("vec4 worldPosition;"),s&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push("worldPosition = modelMatrix * localPosition;"),i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&i.push("vWorldPosition = worldPosition;");return i.push(" gl_Position = shadowProjMatrix * viewPosition;"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("// Mesh shadow fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}return r.push("outColor = encodeFloat(gl_FragCoord.z);"),r.push("}"),r}(e)}}const Js=function(e,t){this._hash=e,this._shaderSource=new qs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},$s={};Js.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let i=$s[s];if(!i){if(i=new Js(s,e),i.errors)return console.log(i.errors.join("\n")),null;$s[s]=i,d.memory.programs++}return i._useCount++,i},Js.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete $s[this._hash],d.memory.programs--)},Js.prototype.webglContextRestored=function(){this._program=null},Js.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,i=t._material._state,r=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const r=i.frontface;e.frontface!==r&&(r?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=r),e.lineWidth!==i.lineWidth&&(s.lineWidth(i.lineWidth),e.lineWidth=i.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,i.pointSize),this._lastMaterialId=i.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),r.combineGeometry){const i=t.vertexBufs;i.id!==this._lastVertexBufsId&&(i.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=i.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),r.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,r.positionsDecodeMatrix),r.combineGeometry?r.indicesBufCombined&&(r.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(r.positionsBuf,r.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),r.indicesBuf&&(r.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=r.id),r.combineGeometry?r.indicesBufCombined&&(s.drawElements(r.primitive,r.indicesBufCombined.numItems,r.indicesBufCombined.itemType,0),e.drawElements++):r.indicesBuf?(s.drawElements(r.primitive,r.indicesBuf.numItems,r.indicesBuf.itemType,0),e.drawElements++):r.positions&&(s.drawArrays(s.TRIANGLES,0,r.positions.numItems),e.drawArrays++)},Js.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ae(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uShadowViewMatrix=i.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=i.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,r,o,n;for(let a=0,l=this._uSectionPlanes.length;a0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const ui=function(){const e=p.vec3(),t=p.vec3(),s=p.vec3(),i=p.vec3(),r=p.vec3(),o=p.vec3(),n=p.vec4(),a=p.vec3(),l=p.vec3(),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3(),m=p.vec4(),y=p.vec4(),g=p.vec4(),I=p.vec3(),v=p.vec3(),T=p.vec3(),_=p.vec3(),R=p.vec3(),P=p.vec3(),D=p.vec3(),N=p.vec3(),b=p.vec3(),C=p.vec3(),O=p.vec3();return function(x,w,B,F){var M=F.primIndex;if(null!=M&&M>-1){const G=x.geometry._state,k=x.scene,V=k.camera,j=k.canvas;if("triangles"===G.primitiveName){F.primitive="triangle";const k=M,Q=G.indices,W=G.positions;let z,K,Y;if(Q){var L=Q[k+0],U=Q[k+1],H=Q[k+2];o[0]=L,o[1]=U,o[2]=H,F.indices=o,z=3*L,K=3*U,Y=3*H}else z=3*k,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],i[0]=W[K+0],i[1]=W[K+1],i[2]=W[K+2],r[0]=W[Y+0],r[1]=W[Y+1],r[2]=W[Y+2],G.compressGeometry){const e=G.positionsDecodeMatrix;e&&(at.decompressPosition(s,e,s),at.decompressPosition(i,e,i),at.decompressPosition(r,e,r))}F.canvasPos?p.canvasPosToLocalRay(j.canvas,x.origin?S(w,x.origin):w,B,x.worldMatrix,F.canvasPos,e,t):F.origin&&F.direction&&p.worldRayToLocalRay(x.worldMatrix,F.origin,F.direction,e,t),p.normalizeVec3(t),p.rayPlaneIntersect(e,t,s,i,r,n),F.localPos=n,F.position=n,m[0]=n[0],m[1]=n[1],m[2]=n[2],m[3]=1,p.transformVec4(x.worldMatrix,m,y),a[0]=y[0],a[1]=y[1],a[2]=y[2],F.canvasPos&&x.origin&&(a[0]+=x.origin[0],a[1]+=x.origin[1],a[2]+=x.origin[2]),F.worldPos=a,p.transformVec4(V.matrix,y,g),l[0]=g[0],l[1]=g[1],l[2]=g[2],F.viewPos=l,p.cartesianToBarycentric(n,s,i,r,h),F.bary=h;const X=G.normals;if(X){if(G.compressGeometry){const e=3*L,t=3*U,s=3*H;at.decompressNormal(X.subarray(e,e+2),c),at.decompressNormal(X.subarray(t,t+2),A),at.decompressNormal(X.subarray(s,s+2),u)}else c[0]=X[z],c[1]=X[z+1],c[2]=X[z+2],A[0]=X[K],A[1]=X[K+1],A[2]=X[K+2],u[0]=X[Y],u[1]=X[Y+1],u[2]=X[Y+2];const e=p.addVec3(p.addVec3(p.mulVec3Scalar(c,h[0],I),p.mulVec3Scalar(A,h[1],v),T),p.mulVec3Scalar(u,h[2],_),R);F.worldNormal=p.normalizeVec3(p.transformVec3(x.worldNormalMatrix,e,P))}const Z=G.uv;if(Z){if(d[0]=Z[2*L],d[1]=Z[2*L+1],f[0]=Z[2*U],f[1]=Z[2*U+1],E[0]=Z[2*H],E[1]=Z[2*H+1],G.compressGeometry){const e=G.uvDecodeMatrix;e&&(at.decompressUV(d,e,d),at.decompressUV(f,e,f),at.decompressUV(E,e,E))}F.uv=p.addVec3(p.addVec3(p.mulVec2Scalar(d,h[0],D),p.mulVec2Scalar(f,h[1],N),b),p.mulVec2Scalar(E,h[2],C),O)}}}}}();function pi(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let i=e.height||1;i<0&&(console.error("negative height not allowed - will invert"),i*=-1);let r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<3&&(r=3);let o=e.heightSegments||1;o<0&&(console.error("negative heightSegments not allowed - will invert"),o*=-1),o<1&&(o=1);const n=!!e.openEnded;let a=e.center;const l=a?a[0]:0,h=a?a[1]:0,c=a?a[2]:0,A=i/2,u=i/o,p=2*Math.PI/r,d=1/r,f=(t-s)/o,E=[],m=[],g=[],I=[];let v,T,_,R,P,D,N,b,C,O,S;const x=(90-180*Math.atan(i/(s-t))/Math.PI)/90;for(v=0;v<=o;v++)for(P=t-v*f,D=A-v*u,T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),m.push(P*_),m.push(x),m.push(P*R),g.push(T*d),g.push(1*v/o),E.push(P*_+l),E.push(D+h),E.push(P*R+c);for(v=0;v0){for(C=E.length/3,m.push(0),m.push(1),m.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),O=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,m.push(t*_),m.push(1),m.push(t*R),g.push(O),g.push(S),E.push(t*_+l),E.push(A+h),E.push(t*R+c);for(T=0;T0){for(C=E.length/3,m.push(0),m.push(-1),m.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(0-A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),O=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,m.push(s*_),m.push(-1),m.push(s*R),g.push(O),g.push(S),E.push(s*_+l),E.push(0-A+h),E.push(s*R+c);for(T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,i=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const o=Di(s,this.wrapS);o&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,o);const n=Di(s,this.wrapT);if(n&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,n),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=Di(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}r?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Oi(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Oi(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Di(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Di(s,this.magFilter)));const a=Di(s,this.format,this.encoding),l=Di(s,this.type),h=Ci(s,this.internalFormat,a,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,i,h,e[0].width,e[0].height);for(let t=0,i=e.length;t>t;return e+1}class Bi extends C{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new be({texture:new bi({gl:this.scene.canvas.gl}),matrix:p.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=p.vec2([0,0]),this._scale=p.vec2([1,1]),this._rotate=p.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),d.memory.textures++}_checkMinFilter(e){return(e=e||as)!==rs&&e!==os&&e!==as&&e!==is&&e!==ss&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=as),e}_checkMagFilter(e){return(e=e||rs)!==rs&&e!==ts&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=rs),e}_checkWrapS(e){return(e=e||Jt)!==$t&&e!==es&&e!==Jt&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=Jt),e}_checkWrapT(e){return(e=e||Jt)!==$t&&e!==es&&e!==Jt&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=Jt),e}_checkFlipY(e){return!!e}_checkEncoding(e){return(e=e||gs)!==gs&&e!==Is&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=gs),e}_webglContextRestored(){this._state.texture=new bi({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=p.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=p.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?p.mulMat4(t,s):s),0!==this._rotate&&(s=p.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?p.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=Si(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=Si(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),d.memory.textures--}}const Fi=d.memory,Mi=p.AABB3();class Li extends $e{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new be({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=p.OBB3();const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var r;if(t.positionsDecodeMatrix);else{const e=at.getPositionsBounds(t.positions),o=at.compressPositions(t.positions,e.min,e.max);r=o.quantized,s.positionsDecodeMatrix=o.decodeMatrix,s.positionsBuf=new le(i,i.ARRAY_BUFFER,r,r.length,3,i.STATIC_DRAW),Fi.positions+=s.positionsBuf.numItems,p.positions3ToAABB3(t.positions,this._aabb),p.positions3ToAABB3(r,Mi,s.positionsDecodeMatrix),p.AABB3ToOBB3(Mi,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new le(i,i.ARRAY_BUFFER,e,e.length,4,i.STATIC_DRAW),Fi.colors+=s.colorsBuf.numItems}if(t.uv){const e=at.getUVBounds(t.uv),r=at.compressUVs(t.uv,e.min,e.max),o=r.quantized;s.uvDecodeMatrix=r.decodeMatrix,s.uvBuf=new le(i,i.ARRAY_BUFFER,o,o.length,2,i.STATIC_DRAW),Fi.uvs+=s.uvBuf.numItems}if(t.normals){const e=at.compressNormals(t.normals);let r=s.compressGeometry;s.normalsBuf=new le(i,i.ARRAY_BUFFER,e,e.length,3,i.STATIC_DRAW,r),Fi.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,e,e.length,1,i.STATIC_DRAW),Fi.indices+=s.indicesBuf.numItems;const o=et(r,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,o,o.length,1,i.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),Fi.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),Fi.meshes--}}var Ui={};function Hi(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let i=e.xSegments||1;i<0&&(console.error("negative xSegments not allowed - will invert"),i*=-1),i<1&&(i=1);let r=e.xSegments||1;r<0&&(console.error("negative zSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const o=e.center,n=o?o[0]:0,a=o?o[1]:0,l=o?o[2]:0,h=t/2,c=s/2,A=Math.floor(i)||1,u=Math.floor(r)||1,p=A+1,d=u+1,f=t/A,E=s/u,m=new Float32Array(p*d*3),g=new Float32Array(p*d*3),I=new Float32Array(p*d*2);let v,T,_,R,P,D,N,b=0,C=0;for(v=0;v65535?Uint32Array:Uint16Array)(A*u*6);for(v=0;v360&&(o=360);const n=e.center;let a=n?n[0]:0,l=n?n[1]:0;const h=n?n[2]:0,c=[],A=[],u=[],d=[];let f,E,m,g,I,v,T,_,R,P,D,N;for(_=0;_<=r;_++)for(T=0;T<=i;T++)f=T/i*o,E=.785398+_/r*Math.PI*2,a=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(E))*Math.cos(f),g=(t+s*Math.cos(E))*Math.sin(f),I=s*Math.sin(E),c.push(m+a),c.push(g+l),c.push(I+h),u.push(1-T/i),u.push(_/r),v=p.normalizeVec3(p.subVec3([m,g,I],[a,l,h],[]),[]),A.push(v[0]),A.push(v[1]),A.push(v[2]);for(_=1;_<=r;_++)for(T=1;T<=i;T++)R=(i+1)*_+T-1,P=(i+1)*(_-1)+T-1,D=(i+1)*(_-1)+T,N=(i+1)*_+T,d.push(R),d.push(P),d.push(D),d.push(D),d.push(N),d.push(R);return y.apply(e,{positions:c,normals:A,uv:u,indices:d})}Ui.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},Ui.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(Ui.parse._buffToStr(e));window.location.href=s},Ui.clone=function(e){return JSON.parse(JSON.stringify(e))},Ui.bin={},Ui.bin.f=new Float32Array(1),Ui.bin.fb=new Uint8Array(Ui.bin.f.buffer),Ui.bin.rf=function(e,t){for(var s=Ui.bin.f,i=Ui.bin.fb,r=0;r<4;r++)i[r]=e[t+r];return s[0]},Ui.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},Ui.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},Ui.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},Ui.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},Ui.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},Ui.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},Ui.parse={},Ui.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",i=0;ir&&(r=l),ho&&(o=h),cn&&(n=c)}return{min:{x:t,y:s,z:i},max:{x:r,y:o,z:n}}};class ki extends C{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=p.vec3(t.pos||[0,0,0]),this._up=p.vec3(t.up||[0,1,0]),this._normal=p.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=p.vec3(),this._rtcPos=p.vec3(),this._imageSize=p.vec2(),this._texture=new Bi(this),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new Pi(this,{matrix:p.inverseMat4(p.lookAtMat4v(this._pos,p.subVec3(this._pos,this._normal,p.mat4()),this._up,p.mat4())),children:[this._bitmapMesh=new Ai(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new ct(this,Hi({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new ft(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height*e,1,this._height]}}class Vi extends C{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],this._origin=p.vec3(t.origin||[0,0,0]),t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;ed.has(e.id)||E.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let i,r=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(i=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,i=Math.round(255*i).toString(16).padStart(2,"0"),r=i+r):d.has(s.id)&&(i=Math.round(255*s.opacity).toString(16).padStart(2,"0"),r=i+r),e[r]||(e[r]=[]);const o=s.id,n=s.originalSystemId,a={ifc_guid:n,originating_system:this.originatingSystem};return n!==o&&(a.authoring_tool_id=o),e[r].push(a),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));o.components.coloring=y;const g=t.objectIds,I=t.visibleObjects,v=t.visibleObjectIds,T=g.filter((e=>!I[e])),_=t.selectedObjectIds;return e.defaultInvisible||v.length{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(r++),s.push(r++))})),new Vi(i,{positions:t,indices:s,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let o=Xi(e.location,Qi),n=Xi(e.normal,Wi),a=Xi(e.up,zi),l=e.height||1;t&&s&&o&&n&&a&&(r.yUp&&(o=qi(o),n=qi(n),a=qi(a)),new ki(i,{src:s,type:t,pos:o,normal:n,up:a,clippable:!1,collidable:!0,height:l}))})),a&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const r=e.components.visibility.view_setup_hints;r&&(!1===r.spaces_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!1),!1===r.openings_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!1),r.space_boundaries_visible)}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,i=0,r=!1;8===s.length&&(i=parseInt(s.substring(0,2),16)/256,i<=1&&i>=.95&&(i=1),s=s.substring(2),r=!0);const o=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=o,r&&(e.opacity=i)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let a,h,c,A;if(e.perspective_camera?(a=Xi(e.perspective_camera.camera_view_point,ji),h=Xi(e.perspective_camera.camera_direction,ji),c=Xi(e.perspective_camera.camera_up_vector,ji),r.perspective.fov=e.perspective_camera.field_of_view,A="perspective"):(a=Xi(e.orthogonal_camera.camera_view_point,ji),h=Xi(e.orthogonal_camera.camera_direction,ji),c=Xi(e.orthogonal_camera.camera_up_vector,ji),r.ortho.scale=e.orthogonal_camera.view_to_world_scale,A="ortho"),p.subVec3(a,l),r.yUp&&(a=qi(a),h=qi(h),c=qi(c)),o){const e=i.pick({pickSurface:!0,origin:a,direction:h});h=e?e.worldPos:p.addVec3(a,h,ji)}else h=p.addVec3(a,h,ji);n?(r.eye=a,r.look=h,r.up=c,r.projection=A):s.cameraFlight.flyTo({eye:a,look:h,up:c,duration:t.duration,projection:A})}}_withBCFComponent(e,t,s){const i=this.viewer,r=i.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const o=t.authoring_tool_id,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}}if(t.ifc_guid){const o=t.ifc_guid,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}Object.keys(r.models).forEach((t=>{const n=p.globalizeObjectId(t,o),a=r.objects[n];if(a)s(a);else if(e.updateCompositeObjects){i.metaScene.metaObjects[n]&&r.withObjects(i.metaScene.getObjectIDsInSubtree(n),s)}}))}}destroy(){super.destroy()}}function Yi(e){return{x:e[0],y:e[1],z:e[2]}}function Xi(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function Zi(e){return new Float64Array([e[0],-e[2],e[1]])}function qi(e){return new Float64Array([e[0],e[2],-e[1]])}p.vec3();class Ji{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const i=$i(e,s);return i?t?er(i,t):i:null}translatePlurals(e,t,s){const i=this._messages[this._locale];if(!i)return null;let r=$i(e,i);return r=0===(t=parseInt(""+t,10))?r.zero:t>1?r.other:r.one,r?(r=er(r,[t]),s&&(r=er(r,s)),r):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];if(i)for(const e in i)if(i.hasOwnProperty(e)){i[e].callback(t)}}on(e,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new t),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._eventSubIDMap.addItem();i[r]={callback:s},this._eventSubEvents[r]=e;const o=this._events[e];return void 0!==o&&s(o),r}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function $i(e,t){if(t[e])return t[e];const s=e.split(".");let i=t;for(let e=0,t=s.length;i&&e=1;e>1&&(e=1);const s=this.easing?nr._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(p.subVec3(i.eye,i.look,or),i.eye=p.lerpVec3(s,0,1,this._eye1,this._eye2,ir),i.look=p.subVec3(ir,or,sr)):this._flyingLook&&(i.look=p.lerpVec3(s,0,1,this._look1,this._look2,sr),i.up=p.lerpVec3(s,0,1,this._up1,this._up2,rr)):this._flyingEyeLookUp&&(i.eye=p.lerpVec3(s,0,1,this._eye1,this._eye2,ir),i.look=p.lerpVec3(s,0,1,this._look1,this._look2,sr),i.up=p.lerpVec3(s,0,1,this._up1,this._up2,rr)),this._projection2){const t="ortho"===this._projection2?nr._easeOutExpo(e,0,1,1):nr._easeInCubic(e,0,1,1);i.customProjection.matrix=p.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();N.scheduleTask(this._update,this)}static _ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}static _easeInCubic(e,t,s,i){return s*(e/=i)*e*e+t}static _easeOutExpo(e,t,s,i){return s*(1-Math.pow(2,-10*e/i))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class ar extends C{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new nr(this),this._t=0,this.state=ar.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const i=performance.now(),r=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==r)switch(this.state){case ar.SCRUBBING:return;case ar.PLAYING:if(this._t+=this._playingRate*r,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=ar.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case ar.PLAYING_TO:s=this._t+this._playingRate*r*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=ar.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=ar.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=ar.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const i=s.frames[e];i?(this.state=ar.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=ar.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=ar.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=ar.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}ar.STOPPED=0,ar.SCRUBBING=1,ar.PLAYING=2,ar.PLAYING_TO=3,p.vec3(),p.vec3(),p.vec3(),p.vec3([0,-1,0]),p.vec4([0,0,0,1]);const lr=p.vec3();class hr{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?y.apply(s,{}):null;const i=!s||s.visible,r=!s||s.edges,o=!s||s.xrayed,n=!s||s.highlighted,a=!s||s.selected,l=!s||s.clippable,h=!s||s.pickable,c=!s||s.colorize,A=!s||s.opacity,u=t.metaObjects,p=e.objects;for(let e=0,t=u.length;e0){const n=t._sectionPlanesState.sectionPlanes,a=r*o,l=i.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.sectionPlanes.length;t0&&d.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,d.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),d.lightMaps.length>0&&d.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,d.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),this._withSAO){const t=n.sao;if(t.possible){const s=a.drawingBufferWidth,i=a.drawingBufferHeight;Er[0]=s,Er[1]=i,Er[2]=t.blendCutoff,Er[3]=t.blendFactor,a.uniform4fv(this._uSAOParams,Er),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++}}if(i){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===pr[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=n.xrayMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===pr[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=n.highlightMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===pr[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=n.selectedMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else a.uniform4fv(this._uColor,this._edges?fr:dr)}this._draw({state:l,frameCtx:e,incrementDrawState:r}),a.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,d.memory.programs--}}class vr extends Ir{constructor(e,t,{instancing:s=!1,edges:i=!1}={}){super(e,t,{instancing:s,edges:i})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=i.pickElementsCount||s.indicesBuf.numItems,o=i.pickElementsOffset?i.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,o),r&&i.drawElements++}}}class Tr extends vr{constructor(e,t){super(e,t,{instancing:!1,edges:!0})}}class _r extends Ir{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++)}}class Rr extends _r{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Pr extends Ir{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),r&&i.drawArrays++}}class Dr extends Ir{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArraysInstanced(t.POINTS,0,s.positionsBuf.numItems,s.numInstances),r&&i.drawArrays++}}class Nr extends Ir{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),r&&i.drawElements++}}class br extends Ir{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElementsInstanced(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++}}class Cr extends vr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r;const o=[];o.push("#version 300 es"),o.push("// Triangles batching draw vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class Or extends vr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching flat-shading draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching silhouette fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = vColor;"),o.push("}"),o}}class xr extends Tr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class wr extends Tr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class Br extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class Fr extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Mr extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class Lr extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Ur extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching depth fragment shader"),i.push("precision highp float;"),i.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}}class Hr extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Gr extends vr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class kr extends vr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Triangles batching quality draw vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),o.push("vFragDepth = 1.0 + clipPos.w;")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Triangles batching quality draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),n.push("uniform sampler2D uAOMap;"),n.push("in vec4 vViewPosition;"),n.push("in vec3 vViewNormal;"),n.push("in vec4 vColor;"),n.push("in vec2 vUV;"),n.push("in vec2 vMetallicRoughness;"),i.lightMaps.length>0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick flat normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class jr extends vr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,i=e._sectionPlanesState,r=i.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching color texture fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),r){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=i.sectionPlanes.length;e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=i.sectionPlanes.length;e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const Kr=p.mat4(),Yr=p.mat4();function Xr(e,t,s){const i=e.length,r=new Uint16Array(i),o=t[0],n=t[1],a=t[2],l=t[3]-o,h=t[4]-n,c=t[5]-a,A=65525,u=A/l,d=A/h,f=A/c,E=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1),i=e,r=t}return new Int8Array([Math[t](127.5*i+(i<0?-1:0)),Math[s](127.5*r+(r<0?-1:0))])}function Jr(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}const $r=p.vec3(),eo=p.vec3(),to=p.vec3(),so=p.vec3(),io=p.vec3(),ro=p.mat4();class oo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=$r;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=eo;if(l){const e=to;p.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,ro),m=so,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform1i(this._uSolid,t.solid),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),s.push("uniform bool solid;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const no=p.vec3(),ao=p.vec3(),lo=p.vec3(),ho=p.vec3(),co=p.vec3(),Ao=p.mat4();class uo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=no;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=ao;if(l){const e=lo;p.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,Ao),m=ho,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class po{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new oo(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new uo(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const fo={};const Eo=p.mat4(),mo=p.mat4(),yo=p.vec4([0,0,0,1]),go=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();const Io=p.vec3(),vo=p.vec3(),To=p.vec3(),_o=p.vec3(),Ro=p.vec3(),Po=p.vec3(),Do=p.vec3();class No{constructor(e){console.info("Creating TrianglesBatchingLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=Wr[t];return s||(s=new Qr(e),Wr[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Wr[t],s._destroy()}))),s}(e.model.scene),this._snapBatchingRenderers=function(e){const t=e.id;let s=fo[t];return s||(s=new po(e),fo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete fo[t],s._destroy()}))),s}(e.model.scene),this._buffer=new zr(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new be({origin:p.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=p.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=p.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.aabb=p.collapseAABB3(),this.solid=!!e.solid}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)for(let e=0,t=r.length;e0){const e=Eo;E?p.inverseMat4(p.transposeMat4(E,mo),e):p.identityMat4(e,e),function(e,t,s,i,r){function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let n,a,l,h,c,A,u=new Float32Array([0,0,0,0]),d=new Float32Array([0,0,0,0]);for(A=0;Ac&&(l=n,c=h),n=qr(d,"floor","ceil"),a=Jr(n),h=o(d,a),h>c&&(l=n,c=h),n=qr(d,"ceil","ceil"),a=Jr(n),h=o(d,a),h>c&&(l=n,c=h),i[r+A+0]=l[0],i[r+A+1]=l[1],i[r+A+2]=0}(e,i,i.length,I.normals,I.normals.length)}if(a)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0)for(let e=0,t=n.length;e0){const i=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):Xr(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=p.mat4());if(e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const i=new Int8Array(s.normals);let r=!0;e.normalsBuf=new le(t,t.ARRAY_BUFFER,i,s.normals.length,3,t.STATIC_DRAW,r)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.uv.length>0)if(e.uvDecodeMatrix){let i=!1;e.uvBuf=new le(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,i)}else{const i=at.getUVBounds(s.uv),r=at.compressUVs(s.uv,i.min,i.max),o=r.quantized;let n=!1;e.uvDecodeMatrix=p.mat3(r.decodeMatrix),e.uvBuf=new le(t,t.ARRAY_BUFFER,o,o.length,2,t.STATIC_DRAW,n)}if(s.metallicRoughness.length>0){const i=new Uint8Array(s.metallicRoughness);let r=!1;e.metallicRoughnessBuf=new le(t,t.ARRAY_BUFFER,i,s.metallicRoughness.length,2,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i),o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new le(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const i=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,i=this._portions[s],r=4*i.vertsBaseIndex,o=4*i.numVerts,n=this._scratchMemory.getUInt8Array(o),a=t[0],l=t[1],h=t[2],c=t[3];for(let e=0;ey)&&(y=e,i.set(g),r&&p.triangleNormal(d,f,E,r),m=!0)}}return m&&r&&(p.transformVec3(this.model.worldNormalMatrix,r,r),p.normalizeVec3(r)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class bo extends _r{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r,o,n;const a=[];for(a.push("#version 300 es"),a.push("// Instancing geometry drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec2 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;"),r=0,o=s.lights.length;r= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),a.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),r=0,o=s.lights.length;r0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class Co extends _r{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let i,r;const o=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),o){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}for(n.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),n.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),n.push("float lambertian = 1.0;"),n.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),n.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),n.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=s.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing fill fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class So extends Rr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class xo extends Rr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class wo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class Bo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Fo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class Mo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Lo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry depth drawing fragment shader"),o.push("precision highp float;"),o.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),o.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),o.push("}"),o}}class Uo extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Ho extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}const Go={3e3:"linearToLinear",3001:"sRGBToLinear"};class ko extends _r{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Instancing geometry quality drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push(" worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),o.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("vFragDepth = 1.0 + clipPos.w;"),o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Instancing geometry quality drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),n.push("#define PI 3.14159265359"),n.push("#define RECIPROCAL_PI 0.31830988618"),n.push("#define RECIPROCAL_PI2 0.15915494"),n.push("#define EPSILON 1e-6"),n.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),n.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),n.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),n.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),n.push(" return normalize(surf_norm );"),n.push(" }"),n.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),n.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),n.push(" vec2 st0 = dFdx( uv.st );"),n.push(" vec2 st1 = dFdy( uv.st );"),n.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),n.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),n.push(" vec3 N = normalize( surf_norm );"),n.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),n.push(" mat3 tsn = mat3( S, T, N );"),n.push(" return normalize( tsn * mapN );"),n.push("}"),n.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),n.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),n.push("}"),n.push("struct IncidentLight {"),n.push(" vec3 color;"),n.push(" vec3 direction;"),n.push("};"),n.push("struct ReflectedLight {"),n.push(" vec3 diffuse;"),n.push(" vec3 specular;"),n.push("};"),n.push("struct Geometry {"),n.push(" vec3 position;"),n.push(" vec3 viewNormal;"),n.push(" vec3 worldNormal;"),n.push(" vec3 viewEyeDir;"),n.push("};"),n.push("struct Material {"),n.push(" vec3 diffuseColor;"),n.push(" float specularRoughness;"),n.push(" vec3 specularColor;"),n.push(" float shine;"),n.push("};"),n.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),n.push(" float r = ggxRoughness + 0.0001;"),n.push(" return (2.0 / (r * r) - 2.0);"),n.push("}"),n.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),n.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),n.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),n.push("}"),i.reflectionMaps.length>0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = "+Go[i.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = "+Go[i.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}}class jo extends _r{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState;let r,o;const n=s.sectionPlanes.length>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),n){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),r=0,o=i.lights.length;r0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,n=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const $o=p.vec3(),en=p.vec3(),tn=p.vec3(),sn=p.vec3(),rn=p.vec3(),on=p.mat4();class nn{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix,f=$o;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=en;if(l){const e=p.transformPoint3(c,l,tn);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,on),m=sn,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uViewMatrix,!1,E),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class an{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Jo(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new nn(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const ln={};const hn=new Uint8Array(4),cn=new Float32Array(1),An=p.vec4([0,0,0,1]),un=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const pn=new Float32Array(3),dn=p.vec3(),fn=p.vec3(),En=p.vec3(),mn=p.vec3(),yn=p.vec3(),gn=p.vec3(),In=p.vec3();class vn{constructor(e){console.info("Creating TrianglesInstancingLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._instancingRenderers=function(e){const t=e.id;let s=Wo[t];return s||(s=new Qo(e),Wo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Wo[t],s._destroy()}))),s}(e.model.scene),this._snapInstancingRenderers=function(e){const t=e.id;let s=ln[t];return s||(s=new an(e),ln[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete ln[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new be({numInstances:0,obb:p.OBB3(),origin:p.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.aabb=p.collapseAABB3(),this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}createPortion(e){const t=e.color,s=e.metallic,i=e.roughness,r=null!==e.opacity&&void 0!==e.opacity?e.opacity:255,o=e.meshMatrix,n=e.aabb,a=e.pickColor;if(this._finalized)throw"Already finalized";const l=t[0],h=t[1],c=t[2];if(this._colors.push(l),this._colors.push(h),this._colors.push(c),this._colors.push(r),this._metallicRoughness.push(null!=s?s:0),this._metallicRoughness.push(null!=i?i:255),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(o[0]),this._modelMatrixCol0.push(o[4]),this._modelMatrixCol0.push(o[8]),this._modelMatrixCol0.push(o[12]),this._modelMatrixCol1.push(o[1]),this._modelMatrixCol1.push(o[5]),this._modelMatrixCol1.push(o[9]),this._modelMatrixCol1.push(o[13]),this._modelMatrixCol2.push(o[2]),this._modelMatrixCol2.push(o[6]),this._modelMatrixCol2.push(o[10]),this._modelMatrixCol2.push(o[14]),this._state.geometry.normals){let e=p.transposeMat4(o,p.mat4()),t=p.inverseMat4(e);this._modelNormalMatrixCol0.push(t[0]),this._modelNormalMatrixCol0.push(t[4]),this._modelNormalMatrixCol0.push(t[8]),this._modelNormalMatrixCol0.push(t[12]),this._modelNormalMatrixCol1.push(t[1]),this._modelNormalMatrixCol1.push(t[5]),this._modelNormalMatrixCol1.push(t[9]),this._modelNormalMatrixCol1.push(t[13]),this._modelNormalMatrixCol2.push(t[2]),this._modelNormalMatrixCol2.push(t[6]),this._modelNormalMatrixCol2.push(t[10]),this._modelNormalMatrixCol2.push(t[14])}this._pickColors.push(a[0]),this._pickColors.push(a[1]),this._pickColors.push(a[2]),this._pickColors.push(a[3]);const A=this._state.geometry.positionsCompressed.length,u=this._state.geometry.positionsCompressed,d=this._state.geometry.positionsDecodeMatrix;for(let e=0;e0){let t=!1;e.colorsBuf=new le(i,i.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,i.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new le(i,i.ARRAY_BUFFER,t,this._metallicRoughness.length,2,i.STATIC_DRAW,s)}if(o>0){let t=!1;e.flagsBuf=new le(i,i.ARRAY_BUFFER,new Float32Array(o),o,1,i.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,i.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new le(i,i.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,i.STATIC_DRAW,s),e.positionsDecodeMatrix=p.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),r=!1;e.colorsBuf=new le(i,i.ARRAY_BUFFER,s,s.length,4,i.STATIC_DRAW,r)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new le(i,i.ARRAY_BUFFER,s,s.length,2,i.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,i.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,i.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelMatrixCol1Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelMatrixCol2Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new le(i,i.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,i.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";hn[0]=t[0],hn[1]=t[1],hn[2]=t[2],hn[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(hn,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?pr.NOT_RENDERED:s?pr.COLOR_TRANSPARENT:pr.COLOR_OPAQUE,A=!i||h?pr.NOT_RENDERED:n?pr.SILHOUETTE_SELECTED:o?pr.SILHOUETTE_HIGHLIGHTED:r?pr.SILHOUETTE_XRAYED:pr.NOT_RENDERED;let u=0;u=!i||h?pr.NOT_RENDERED:n?pr.EDGES_SELECTED:o?pr.EDGES_HIGHLIGHTED:r?pr.EDGES_XRAYED:a?s?pr.EDGES_COLOR_TRANSPARENT:pr.EDGES_COLOR_OPAQUE:pr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?pr.PICK:pr.NOT_RENDERED)<<12,p|=(t&U?1:0)<<16,cn[0]=p,this._state.flagsBuf&&this._state.flagsBuf.setData(cn,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(pn[0]=t[0],pn[1]=t[1],pn[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(pn,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,i=s.geometry,r=this._portions[e];if(!r)return void this.model.error("portion not found: "+e);const o=i.quantizedPositions,n=s.origin,a=r.offset,l=n[0]+a[0],h=n[1]+a[1],c=n[2]+a[2],A=An,u=r.matrix,d=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=o.length;eg)&&(g=e,i.set(I),r&&p.triangleNormal(f,E,m,r),y=!0)}}return y&&r&&(p.transformVec3(a.normalMatrix,r,r),p.transformVec3(this.model.worldNormalMatrix,r,r),p.normalizeVec3(r)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class Tn extends Nr{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class _n extends Nr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class Rn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Tn(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new _n(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const Pn={};class Dn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}const Nn=p.vec4([0,0,0,1]),bn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();class Cn{constructor(e){this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=Pn[t];return s||(s=new Rn(e),Pn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Pn[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new Dn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new be({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:p.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=p.vec3(e.origin)),this.aabb=p.collapseAABB3()}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=Xr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.colors.length>0){const i=s.colors.length/4,r=new Float32Array(i);let o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2],h=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Lines instancing color fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return this._withSAO?(o.push(" float viewportWidth = uSAOParams[0];"),o.push(" float viewportHeight = uSAOParams[1];"),o.push(" float blendCutoff = uSAOParams[2];"),o.push(" float blendFactor = uSAOParams[3];"),o.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),o.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),o.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):o.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class Sn extends br{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class xn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new On(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Sn(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const wn={};const Bn=new Uint8Array(4),Fn=new Float32Array(1),Mn=p.vec4([0,0,0,1]),Ln=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const Un=new Float32Array(3);class Hn{constructor(e){this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._linesInstancingRenderers=function(e){const t=e.id;let s=wn[t];return s||(s=new xn(e),wn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete wn[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new be({obb:p.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],e.origin&&(this._state.origin=p.vec3(e.origin)),this._finalized=!1,this.aabb=p.collapseAABB3()}createPortion(e){const t=e.color,s=e.opacity,i=e.meshMatrix,r=e.aabb;if(this._finalized)throw"Already finalized";const o=t[0],n=t[1],a=t[2];t[3],this._colors.push(o),this._colors.push(n),this._colors.push(a),this._colors.push(s),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(i[0]),this._modelMatrixCol0.push(i[4]),this._modelMatrixCol0.push(i[8]),this._modelMatrixCol0.push(i[12]),this._modelMatrixCol1.push(i[1]),this._modelMatrixCol1.push(i[5]),this._modelMatrixCol1.push(i[9]),this._modelMatrixCol1.push(i[13]),this._modelMatrixCol2.push(i[2]),this._modelMatrixCol2.push(i[6]),this._modelMatrixCol2.push(i[10]),this._modelMatrixCol2.push(i[14]),p.collapseAABB3(r);const l=this._state.obb,h=l.length;for(let e=0;e0){let t=!1;this._state.colorsBuf=new le(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(s>0){let t=!1;this._state.flagsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(s),s,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Bn[0]=t[0],Bn[1]=t[1],Bn[2]=t[2],Bn[3]=t[3],this._state.colorsBuf.setData(Bn,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?pr.NOT_RENDERED:s?pr.COLOR_TRANSPARENT:pr.COLOR_OPAQUE,A=!i||h?pr.NOT_RENDERED:n?pr.SILHOUETTE_SELECTED:o?pr.SILHOUETTE_HIGHLIGHTED:r?pr.SILHOUETTE_XRAYED:pr.NOT_RENDERED;let u=0;u=!i||h?pr.NOT_RENDERED:n?pr.EDGES_SELECTED:o?pr.EDGES_HIGHLIGHTED:r?pr.EDGES_XRAYED:a?s?pr.EDGES_COLOR_TRANSPARENT:pr.EDGES_COLOR_OPAQUE:pr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?pr.PICK:pr.NOT_RENDERED)<<12,p|=(t&U?255:0)<<16,Fn[0]=p,this._state.flagsBuf.setData(Fn,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Un[0]=t[0],Un[1]=t[1],Un[2]=t[2],this._state.offsetsBuf.setData(Un,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Gn extends Pr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial,i=[];return i.push("#version 300 es"),i.push("// Points batching color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class kn extends Pr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform vec4 color;"),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points batching silhouette vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = color;"),o.push("}"),o}}class Vn extends Pr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class jn extends Pr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batched pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batched pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Qn extends Pr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push(" gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),i.push("}"),i}}class Wn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Gn(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new kn(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Vn(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new jn(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Qn(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const zn={};class Kn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}const Yn=p.vec4(),Xn=p.vec4(),Zn=p.vec4([0,0,0,1]),qn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();class Jn{constructor(e){this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._pointsBatchingRenderers=function(e){const t=e.id;let s=zn[t];return s||(s=new Wn(e),zn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete zn[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Kn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new be({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:p.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=p.vec3(e.origin)),this.aabb=p.collapseAABB3()}canCreatePortion(e){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts}createPortion(e){if(this._finalized)throw"Already finalized";const t=e.positions,s=e.positionsCompressed,i=e.color,r=e.colorsCompressed,o=e.colors,n=e.meshMatrix,a=e.worldAABB,l=e.pickColor,h=this._buffer,c=h.positions.length/3;let A;if(this._preCompressedPositionsExpected){if(!s)throw"positionsCompressed expected";for(let e=0,t=s.length;e0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=Xr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i);let o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new le(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class ea extends Dr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 color;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),i.push("uniform vec4 silhouetteColor;"),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class ta extends Dr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick mesh fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class sa extends Dr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push(" vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class ia extends Dr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 color;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class ra extends Dr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points instancing depth vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return o.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class oa extends Dr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }"),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class na{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new $n(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new ea(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ra(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ta(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new sa(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new ia(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new oa(this._scene)),this._shadowRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy()}}const aa={};const la=new Uint8Array(4),ha=new Float32Array(1),ca=p.vec4([0,0,0,1]),Aa=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const ua=new Float32Array(3);class pa{constructor(e){this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._pointsInstancingRenderers=function(e){const t=e.id;let s=aa[t];return s||(s=new na(e),aa[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete aa[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new be({obb:p.OBB3(),numInstances:0,origin:e.origin?p.vec3(e.origin):null,geometry:e.geometry,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._finalized=!1,this.aabb=p.collapseAABB3()}createPortion(e){const t=e.meshMatrix,s=e.aabb,i=e.pickColor;if(this._finalized)throw"Already finalized";this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(t[0]),this._modelMatrixCol0.push(t[4]),this._modelMatrixCol0.push(t[8]),this._modelMatrixCol0.push(t[12]),this._modelMatrixCol1.push(t[1]),this._modelMatrixCol1.push(t[5]),this._modelMatrixCol1.push(t[9]),this._modelMatrixCol1.push(t[13]),this._modelMatrixCol2.push(t[2]),this._modelMatrixCol2.push(t[6]),this._modelMatrixCol2.push(t[10]),this._modelMatrixCol2.push(t[14]),this._pickColors.push(i[0]),this._pickColors.push(i[1]),this._pickColors.push(i[2]),this._pickColors.push(i[3]),p.collapseAABB3(s);const r=this._state.obb,o=r.length;for(let e=0;e0){let s=!1;this._state.flagsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,s)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;this._state.pickColorsBuf=new le(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";la[0]=t[0],la[1]=t[1],la[2]=t[2],this._state.colorsBuf.setData(la,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?pr.NOT_RENDERED:s?pr.COLOR_TRANSPARENT:pr.COLOR_OPAQUE,A=!i||h?pr.NOT_RENDERED:n?pr.SILHOUETTE_SELECTED:o?pr.SILHOUETTE_HIGHLIGHTED:r?pr.SILHOUETTE_XRAYED:pr.NOT_RENDERED;let u=0;u=!i||h?pr.NOT_RENDERED:n?pr.EDGES_SELECTED:o?pr.EDGES_HIGHLIGHTED:r?pr.EDGES_XRAYED:a?s?pr.EDGES_COLOR_TRANSPARENT:pr.EDGES_COLOR_OPAQUE:pr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?pr.PICK:pr.NOT_RENDERED)<<12,p|=(t&U?255:0)<<16,ha[0]=p,this._state.flagsBuf.setData(ha,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(ua[0]=t[0],ua[1]=t[1],ua[2]=t[2],this._state.offsetsBuf.setData(ua,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.occlusionRenderer&&this._pointsInstancingRenderers.occlusionRenderer.drawLayer(t,this,pr.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickMeshRenderer&&this._pointsInstancingRenderers.pickMeshRenderer.drawLayer(t,this,pr.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickDepthRenderer&&this._pointsInstancingRenderers.pickDepthRenderer.drawLayer(t,this,pr.PICK)}drawPickNormals(e,t){}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}class da{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class fa{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const Ea={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};const ma=new class{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==ya[e])return void ya[e].push({onLoad:t,onProgress:s,onError:i});ya[e]=[],ya[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),n=this.mimeType,a=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=ya[e],i=t.body.getReader(),r=t.headers.get("Content-Length"),o=r?parseInt(r):0,n=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then((({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:n,loaded:a,total:o});for(let e=0,t=s.length;e{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,n)));case"json":return e.json();default:if(void 0===n)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(n),s=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(s);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{Ea.add(e,t);const s=ya[e];delete ya[e];for(let e=0,i=s.length;e{const s=ya[e];if(void 0===s)throw this.manager.itemError(e),t;delete ya[e];for(let e=0,i=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Ia{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let va=0;class Ta{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new Ia,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const i=e.capabilities;this._workerConfig={astcSupported:i.astcSupported,etc1Supported:i.etc1Supported,etc2Supported:i.etc2Supported,dxtSupported:i.dxtSupported,bptcSupported:i.bptcSupported,pvrtcSupported:i.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new ga;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new ga;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const i=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,i]).then((([e,t])=>{const s=Ta.BasisWorker.toString(),i=["/* constants */","let _EngineFormat = "+JSON.stringify(Ta.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Ta.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Ta.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([i])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),va>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),va++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((i,r)=>{const o=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:o},e))).then((e=>{const s=e.data,{mipmaps:o,width:n,height:a,format:l,type:h,error:c,dfdTransferFn:A,dfdFlags:u}=s;if("error"===h)return r(c);t.setCompressedData({mipmaps:o,props:{format:l,minFilter:1===o.length?rs:ns,magFilter:1===o.length?rs:ns,encoding:2===A?Is:gs,premultiplyAlpha:!!(1&u)}}),i()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),va--}}Ta.BasisFormat={ETC1S:0,UASTC_4x4:1},Ta.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Ta.EngineFormat={RGBAFormat:ls,RGBA_ASTC_4x4_Format:ms,RGBA_BPTC_Format:ys,RGBA_ETC2_EAC_Format:Es,RGBA_PVRTC_4BPPV1_Format:ds,RGBA_S3TC_DXT5_Format:us,RGB_ETC1_Format:36196,RGB_ETC2_Format:fs,RGB_PVRTC_4BPPV1_Format:ps,RGB_S3TC_DXT1_Format:hs},Ta.BasisWorker=function(){let e,t,s;const i=_EngineFormat,r=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",(function(n){const c=n.data;switch(c.type){case"init":e=c.config,A=c.transcoderBinary,t=new Promise((e=>{s={wasmBinary:A,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:n,hasAlpha:A,mipmaps:u,format:p,dfdTransferFn:d,dfdFlags:f}=function(t){const n=new s.KTX2File(new Uint8Array(t));function c(){n.close(),n.delete()}if(!n.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const A=n.isUASTC()?o.UASTC_4x4:o.ETC1S,u=n.getWidth(),p=n.getHeight(),d=n.getLevels(),f=n.getHasAlpha(),E=n.getDFDTransferFunc(),m=n.getDFDFlags(),{transcoderFormat:y,engineFormat:g}=function(t,s,n,c){let A,u;const p=t===o.ETC1S?a:l;for(let i=0;i{for(let s=0,i=e.meshIds.length;s{const s=t[e];let i,r;if(s.positionsCompressed){const e=at.getPositionsBounds(s.positionsCompressed);i=at.decompressPosition(e.min,s.positionsDecodeMatrix,[]),r=at.decompressPosition(e.max,s.positionsDecodeMatrix,[])}else{const e=at.getPositionsBounds(s.positions);i=e.min,r=e.max}i[0]+=s.origin[0],i[1]+=s.origin[1],i[2]+=s.origin[2],r[0]+=s.origin[0],r[1]+=s.origin[1],r[2]+=s.origin[2],p.expandAABB3Point3(a,i),p.expandAABB3Point3(a,r),l+=s.numPrimitives})),i[n]={aabb:a,numPrimitives:l,entityId:s.id}}let n,a=[],l={};if(Object.keys(i).length>0){n=function(e){const t=[];for(let s=0,i=e.length;s{s=Math.max(s,e.entity.id)}));const i=new Array(s+1);t.forEach((t=>{i[t.entity.id]=e.objects[t.entity.xeokitId]})),this._internalNodesList=i,this._lastVisibleFrameOfNodes=new Array(i.length),this._lastVisibleFrameOfNodes.fill(0)}_searchVisibleNodesWithFrustumCulling(){return this._aabbTree.searchCustom(((e,t)=>this._aabbIntersectsCameraFrustum(e,t)),(e=>this._aabbContainedInCameraFrustum(e)))}_markVisibleFrameOfVisibleNodes(e,t){const s=this._lastVisibleFrameOfNodes;for(let i=0,r=e.length;ithis._frustumProps.CAM_FACTOR_1?(s|=n<0?64:128,s&=-17):s&=-33;const a=Gt(p.dotVec3(r,this._frustumProps.up),o);Math.abs(a)>this._frustumProps.CAM_FACTOR_2?(s|=a<0?1024:2048,s&=-257):s&=-513}return 4&s&&8&s&&(s|=4096),64&s&&128&s&&(s|=8192),1024&s&&2048&s&&(s|=16384),e._check=s,s}}class jt{constructor(e,t){this.sceneModel=t,this.entities=[],this.meshes=[],this.finalized=!1}addEntity(e){if(this.finalized)throw"Already finalized";this.entities.push(e)}addMesh(e){if(this.finalized)throw"Already finalized";this.meshes.push(e)}finalize(e){if(this.finalized)throw"Already finalized";this.finalized=!0,this.VFCState=new Vt,this.VFCState.initializeVFCState(this.entities,this.meshes),this.VFCState.finalize(this.sceneModel,e),this._onSceneRendering=this.sceneModel.scene.on("rendering",(()=>this.applyViewFrustumCulling.call(this)))}applyViewFrustumCulling(){this.finalized&&this.VFCState.applyViewFrustumCulling(this.sceneModel)}destroy(){this.finalized&&this.sceneModel.off(this._onSceneRendering)}}class Qt extends O{constructor(e,t={}){super(e,t),this._scene=e,this._vfcManagers={},this._vfcManagerList=[],this.enabled=t.enabled,this._init()}_init(){this._scene.on("rendering",(()=>{for(let e=0,t=this._vfcManagerList.length;e{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new Pe(this,{transparent:i,alphaDepthMask:r}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1;let e=null;this.getHash=function(){if(e)return e;const t=this.sectionPlanes;if(0===t.length)return this.hash=";";const s=[];for(let e=0,i=t.length;e0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),i=null,s=null},this.removeLight=function(e){for(let t=0,r=this.lights.length;t{this._renderer.imageDirty()})),this.lod=new bt(this,{enabled:t.lodEnabled}),this.vfc=new Qt(this,{enabled:t.vfcEnabled})}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+y.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=p.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const i=this.types[s];i&&(delete i[t],y.isEmptyObject(i)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_objectHighlightedUpdated(e,t=!0){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null,t&&this.fire("objectHighlighted",e,!0)}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&N.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,i=this._clearEachPass;let r,o;for(r=0;rr&&(r=e[3]),e[4]>o&&(o=e[4]),e[5]>n&&(n=e[5]),h=!0}h||(t=-100,s=-100,i=-100,r=100,o=100,n=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=i,this._aabb[3]=r,this._aabb[4]=o,this._aabb[5]=n,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Wt(this,s));const i=e.excludeEntities||e.exclude;return i&&(e.excludeEntityIds=Wt(this,i)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=this._renderer.pick(e,t))?(t.entity&&t.entity.fire&&t.entity.fire("picked",t),t):void 0}snapPick(e){return this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]o&&(o=l[3]),l[4]>n&&(n=l[4]),l[5]>a&&(a=l[5]),t=!0}})),t){const e=p.AABB3();return e[0]=s,e[1]=i,e[2]=r,e[3]=o,e[4]=n,e[5]=a,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){y.isString(e)&&(e=[e]);let s=!1;for(let i=0,r=e.length;i0,l=!!r.compressGeometry,h=[];h.push("#version 300 es"),h.push("// Lambertian drawing vertex shader"),h.push("in vec3 position;"),h.push("uniform mat4 modelMatrix;"),h.push("uniform mat4 viewMatrix;"),h.push("uniform mat4 projMatrix;"),h.push("uniform vec4 colorize;"),h.push("uniform vec3 offset;"),l&&h.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(h.push("uniform float logDepthBufFC;"),h.push("out float vFragDepth;"),h.push("bool isPerspectiveMatrix(mat4 m) {"),h.push(" return (m[2][3] == - 1.0);"),h.push("}"),h.push("out float isPerspective;"));a&&h.push("out vec4 vWorldPosition;");if(h.push("uniform vec4 lightAmbient;"),h.push("uniform vec4 materialColor;"),h.push("uniform vec3 materialEmissive;"),r.normalsBuf){h.push("in vec3 normal;"),h.push("uniform mat4 modelNormalMatrix;"),h.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=i.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),h.push(" }"),h.push(" return normalize(v);"),h.push("}"))}h.push("out vec4 vColor;"),"points"===r.primitiveName&&h.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(h.push("void billboard(inout mat4 mat) {"),h.push(" mat[0][0] = 1.0;"),h.push(" mat[0][1] = 0.0;"),h.push(" mat[0][2] = 0.0;"),"spherical"===o&&(h.push(" mat[1][0] = 0.0;"),h.push(" mat[1][1] = 1.0;"),h.push(" mat[1][2] = 0.0;")),h.push(" mat[2][0] = 0.0;"),h.push(" mat[2][1] = 0.0;"),h.push(" mat[2][2] =1.0;"),h.push("}"));h.push("void main(void) {"),h.push("vec4 localPosition = vec4(position, 1.0); "),h.push("vec4 worldPosition;"),l&&h.push("localPosition = positionsDecodeMatrix * localPosition;");r.normalsBuf&&(l?h.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):h.push("vec4 localNormal = vec4(normal, 0.0); "),h.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),h.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));h.push("mat4 viewMatrix2 = viewMatrix;"),h.push("mat4 modelMatrix2 = modelMatrix;"),n&&h.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===o||"cylindrical"===o?(h.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),h.push("billboard(modelMatrix2);"),h.push("billboard(viewMatrix2);"),h.push("billboard(modelViewMatrix);"),r.normalsBuf&&(h.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),h.push("billboard(modelNormalMatrix2);"),h.push("billboard(viewNormalMatrix2);"),h.push("billboard(modelViewNormalMatrix);")),h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(h.push("worldPosition = modelMatrix2 * localPosition;"),h.push("worldPosition.xyz = worldPosition.xyz + offset;"),h.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r.normalsBuf&&h.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(h.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),h.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),h.push("float lambertian = 1.0;"),r.normalsBuf)for(let e=0,t=i.lights.length;e0,o=t.gammaOutput,n=[];n.push("#version 300 es"),n.push("// Lambertian drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"));if(r){n.push("in vec4 vWorldPosition;"),n.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),n.push("}")}"points"===i.primitiveName&&(n.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),n.push("float r = dot(cxy, cxy);"),n.push("if (r > 1.0) {"),n.push(" discard;"),n.push("}"));t.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");o?n.push("outColor = linearToGamma(vColor, gammaFactor);"):n.push("outColor = vColor;");return n.push("}"),n}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,i=t._sectionPlanesState,r=e._geometry._state,o=t._lightsState;let n;const a=s.billboard,l=s.background,h=s.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),A=gs(e),u=i.sectionPlanes.length>0,p=ys(e),d=!!r.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),d&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),u&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));o.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(A){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=o.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}c&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),d&&f.push("uniform mat3 uvDecodeMatrix;"));r.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===r.primitiveName&&f.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===a&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(p){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=o.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=o.lights.length;e0,l=gs(e),h=i.uvBuf,c="PhongMaterial"===n.type,A="MetallicMaterial"===n.type,u="SpecularMaterial"===n.type,p=ys(e);t.gammaInput;const d=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));p&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),d&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(a){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var E=0;E0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),o.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),c&&((o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = "+ms[o.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(A||u)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),o.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+ms[o.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(o.lightMaps.length>0||o.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),o.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),o.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),i.colors&&f.push("in vec4 vColor;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(o.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));n.ambient&&f.push("uniform vec3 materialAmbient;");n.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==n.alpha&&null!==n.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");n.emissive&&f.push("uniform vec3 materialEmissive;");n.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==n.glossiness&&null!==n.glossiness&&f.push("uniform float materialGlossiness;");void 0!==n.shininess&&null!==n.shininess&&f.push("uniform float materialShininess;");n.specular&&f.push("uniform vec3 materialSpecular;");void 0!==n.metallic&&null!==n.metallic&&f.push("uniform float materialMetallic;");void 0!==n.roughness&&null!==n.roughness&&f.push("uniform float materialRoughness;");void 0!==n.specularF0&&null!==n.specularF0&&f.push("uniform float materialSpecularF0;");h&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));h&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));h&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));h&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&h&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&h&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&h&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));h&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));h&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&h&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&h&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&h&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=o.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===i.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),n.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");n.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):n.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");i.colors&&f.push("diffuseColor *= vColor.rgb;");n.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");n.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==n.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");i.colors&&f.push("alpha *= vColor.a;");void 0!==n.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==n.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==n.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==n.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");h&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));h&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+ms[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));h&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+ms[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));h&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+ms[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));h&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+ms[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));h&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));h&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(o.lights.length>0||o.lightMaps.length>0||o.reflectionMaps.length>0)){h&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),h&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),h&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),h&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),h&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),h&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),h&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),c&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),u&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),A&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),o.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),c&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(u||A)&&(o.lightMaps.length>0||o.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=o.lights.length;e0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),r.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,A=o.sectionPlanes.length;c0&&r.lightMaps[0].texture&&this._uLightMap&&(a.bindTexture(this._uLightMap,r.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),r.reflectionMaps.length>0&&r.reflectionMaps[0].texture&&this._uReflectionMap&&(a.bindTexture(this._uReflectionMap,r.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class Rs{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,i=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),r=t._sectionPlanesState.sectionPlanes.length>0,o=!!e._geometry._state.compressGeometry,n=e._state.billboard,a=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),o&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));r&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),i){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===n||"cylindrical"===n)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===n&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),o&&l.push("localPosition = positionsDecodeMatrix * localPosition;");i&&(o?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),a&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===n||"cylindrical"===n?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),i&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),i)for(let e=0,t=s.lights.length;e0,o=[];o.push("#version 300 es"),o.push("// Lambertian drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}"points"===e._geometry._state.primitiveName&&(o.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),o.push("float r = dot(cxy, cxy);"),o.push("if (r > 1.0) {"),o.push(" discard;"),o.push("}"));t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const Ps=new t({}),Ds=p.vec3(),Ns=function(e,t){this.id=Ps.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Rs(t),this._allocate(t)},Cs={};Ns.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Cs[t];return s||(s=new Ns(t,e),Cs[t]=s,d.memory.programs++),s._useCount++,s},Ns.prototype.put=function(){0==--this._useCount&&(Ps.removeItem(this.id),this._program&&this._program.destroy(),delete Cs[this._hash],d.memory.programs--)},Ns.prototype.webglContextRestored=function(){this._program=null},Ns.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl,n=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,a=t._state,l=t._geometry._state,h=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,h?e.getRTCViewMatrix(a.originHash,h):r.viewMatrix),o.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Edges drawing vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec4 edgeColor;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));s&&n.push("out vec4 vWorldPosition;");n.push("out vec4 vColor;"),("spherical"===r||"cylindrical"===r)&&(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n.push("vColor = edgeColor;"),s&&n.push("vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,i=e.scene.gammaOutput,r=s.sectionPlanes.length>0,o=[];o.push("#version 300 es"),o.push("// Edges drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),t.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;"));i&&(o.push("uniform float gammaFactor;"),o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}"));if(r){o.push("in vec4 vWorldPosition;"),o.push("uniform bool clippable;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { discard; }"),o.push("}")}t.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");i?o.push("outColor = linearToGamma(vColor, gammaFactor);"):o.push("outColor = vColor;");return o.push("}"),o}(e)}}const bs=new t({}),Ss=p.vec3(),ws=function(e,t){this.id=bs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Os(t),this._allocate(t)},xs={};ws.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=xs[t];return s||(s=new ws(t,e),xs[t]=s,d.memory.programs++),s._useCount++,s},ws.prototype.put=function(){0==--this._useCount&&(bs.removeItem(this.id),this._program&&this._program.destroy(),delete xs[this._hash],d.memory.programs--)},ws.prototype.webglContextRestored=function(){this._program=null},ws.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const i=this._scene,r=i.camera,o=i.canvas.gl;let n;const a=t._state,l=t._geometry,h=l._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(a.originHash,c):r.viewMatrix),a.clippable){const e=i._sectionPlanesState.sectionPlanes.length;if(e>0){const s=i._sectionPlanesState.sectionPlanes,r=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh picking vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("out vec4 vViewPosition;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("uniform vec2 pickClipPos;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy -= pickClipPos;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==r&&"cylindrical"!==r||(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"));n.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(r.push("uniform vec4 pickColor;"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = pickColor; "),r.push("}"),r}(e)}}const Fs=p.vec3(),Ms=function(e,t){this._hash=e,this._shaderSource=new Bs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ls={};Ms.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=Ls[t];if(!s){if(s=new Ms(t,e),s.errors)return console.log(s.errors.join("\n")),null;Ls[t]=s,d.memory.programs++}return s._useCount++,s},Ms.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ls[this._hash],d.memory.programs--)},Ms.prototype.webglContextRestored=function(){this._program=null},Ms.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCPickViewMatrix(r.originHash,a):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t>24&255,c=l>>16&255,A=l>>8&255,u=255&l;i.uniform4f(this._uPickColor,u/255,A/255,c/255,h/255),i.uniform2fv(this._uPickClipPos,e.pickClipPos),n.indicesBuf?(i.drawElements(n.primitive,n.indicesBuf.numItems,n.indicesBuf.itemType,0),e.drawElements++):n.positions&&i.drawArrays(i.TRIANGLES,0,n.positions.numItems)},Ms.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ae(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uViewMatrix=i.getLocation("viewMatrix"),this._uProjMatrix=i.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,i=!!e._geometry._state.compressGeometry,r=[];r.push("#version 300 es"),r.push("// Surface picking vertex shader"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform vec3 offset;"),s&&(r.push("uniform bool clippable;"),r.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;"));r.push("uniform vec2 pickClipPos;"),r.push("vec4 remapClipPos(vec4 clipPos) {"),r.push(" clipPos.xy /= clipPos.w;"),r.push(" clipPos.xy -= pickClipPos;"),r.push(" clipPos.xy *= clipPos.w;"),r.push(" return clipPos;"),r.push("}"),r.push("out vec4 vColor;"),i&&r.push("uniform mat4 positionsDecodeMatrix;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),i&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push(" vec4 worldPosition = modelMatrix * localPosition; "),r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&r.push(" vWorldPosition = worldPosition;");r.push(" vColor = color;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return r.push("gl_Position = remapClipPos(clipPos);"),r.push("}"),r}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Surface picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),r.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push(" outColor = vColor;"),r.push("}"),r}(e)}}const Hs=p.vec3(),Gs=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Us(t),this._allocate(t)},ks={};Gs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ks[t];if(!s){if(s=new Gs(t,e),s.errors)return console.log(s.errors.join("\n")),null;ks[t]=s,d.memory.programs++}return s._useCount++,s},Gs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete ks[this._hash],d.memory.programs--)},Gs.prototype.webglContextRestored=function(){this._program=null},Gs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._state,o=t._material._state,n=t._geometry,a=t._geometry._state,l=t.origin,h=o.backfaces,c=o.frontface,A=s.camera.project,u=n._getPickTrianglePositions(),p=n._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(A.far+1)/Math.LN2);i.uniform1f(this._uLogDepthBufFC,e)}if(i.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(r.originHash,l):e.pickViewMatrix),r.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,i=!!e._geometry._state.compressGeometry,r=e._state.billboard,o=e._state.stationary,n=[];n.push("#version 300 es"),n.push("// Mesh occlusion vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform vec3 offset;"),i&&n.push("uniform mat4 positionsDecodeMatrix;");s&&n.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"));"spherical"!==r&&"cylindrical"!==r||(n.push("void billboard(inout mat4 mat) {"),n.push(" mat[0][0] = 1.0;"),n.push(" mat[0][1] = 0.0;"),n.push(" mat[0][2] = 0.0;"),"spherical"===r&&(n.push(" mat[1][0] = 0.0;"),n.push(" mat[1][1] = 1.0;"),n.push(" mat[1][2] = 0.0;")),n.push(" mat[2][0] = 0.0;"),n.push(" mat[2][1] = 0.0;"),n.push(" mat[2][2] =1.0;"),n.push("}"));n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),i&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("mat4 viewMatrix2 = viewMatrix;"),n.push("mat4 modelMatrix2 = modelMatrix;"),o&&n.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(n.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),n.push("billboard(modelMatrix2);"),n.push("billboard(viewMatrix2);"),n.push("billboard(modelViewMatrix);"),n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(n.push("worldPosition = modelMatrix2 * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&n.push(" vWorldPosition = worldPosition;");n.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return n.push("gl_Position = clipPos;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];r.push("#version 300 es"),r.push("// Mesh occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));if(i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return r.push("}"),r}(e)}}const js=p.vec3(),Qs=function(e,t){this._hash=e,this._shaderSource=new Vs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ws={};Qs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Ws[t];if(!s){if(s=new Qs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Ws[t]=s,d.memory.programs++}return s._useCount++,s},Qs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ws[this._hash],d.memory.programs--)},Qs.prototype.webglContextRestored=function(){this._program=null},Qs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,i=s.canvas.gl,r=t._material._state,o=t._state,n=t._geometry._state,a=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){const t=r.backfaces;e.backfaces!==t&&(t?i.disable(i.CULL_FACE):i.enable(i.CULL_FACE),e.backfaces=t);const s=r.frontface;e.frontface!==s&&(s?i.frontFace(i.CCW):i.frontFace(i.CW),e.frontface=s),this._lastMaterialId=r.id}const l=s.camera;if(i.uniformMatrix4fv(this._uViewMatrix,!1,a?e.getRTCViewMatrix(o.originHash,a):l.viewMatrix),o.clippable){const e=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,o=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,i=[];i.push("// Mesh shadow vertex shader"),i.push("in vec3 position;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 shadowViewMatrix;"),i.push("uniform mat4 shadowProjMatrix;"),i.push("uniform vec3 offset;"),s&&i.push("uniform mat4 positionsDecodeMatrix;");t&&i.push("out vec4 vWorldPosition;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),i.push("vec4 worldPosition;"),s&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push("worldPosition = modelMatrix * localPosition;"),i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&i.push("vWorldPosition = worldPosition;");return i.push(" gl_Position = shadowProjMatrix * viewPosition;"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("// Mesh shadow fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),i){r.push("uniform bool clippable;"),r.push("in vec4 vWorldPosition;");for(var o=0;o 0.0) { discard; }"),r.push("}")}return r.push("outColor = encodeFloat(gl_FragCoord.z);"),r.push("}"),r}(e)}}const Ks=function(e,t){this._hash=e,this._shaderSource=new zs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ys={};Ks.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let i=Ys[s];if(!i){if(i=new Ks(s,e),i.errors)return console.log(i.errors.join("\n")),null;Ys[s]=i,d.memory.programs++}return i._useCount++,i},Ks.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ys[this._hash],d.memory.programs--)},Ks.prototype.webglContextRestored=function(){this._program=null},Ks.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,i=t._material._state,r=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const r=i.frontface;e.frontface!==r&&(r?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=r),e.lineWidth!==i.lineWidth&&(s.lineWidth(i.lineWidth),e.lineWidth=i.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,i.pointSize),this._lastMaterialId=i.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),r.combineGeometry){const i=t.vertexBufs;i.id!==this._lastVertexBufsId&&(i.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=i.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),r.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,r.positionsDecodeMatrix),r.combineGeometry?r.indicesBufCombined&&(r.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(r.positionsBuf,r.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),r.indicesBuf&&(r.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=r.id),r.combineGeometry?r.indicesBufCombined&&(s.drawElements(r.primitive,r.indicesBufCombined.numItems,r.indicesBufCombined.itemType,0),e.drawElements++):r.indicesBuf?(s.drawElements(r.primitive,r.indicesBuf.numItems,r.indicesBuf.itemType,0),e.drawElements++):r.positions&&(s.drawArrays(s.TRIANGLES,0,r.positions.numItems),e.drawArrays++)},Ks.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new ae(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uPositionsDecodeMatrix=i.getLocation("positionsDecodeMatrix"),this._uModelMatrix=i.getLocation("modelMatrix"),this._uShadowViewMatrix=i.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=i.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,r,o,n;for(let a=0,l=this._uSectionPlanes.length;a0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const ai=function(){const e=p.vec3(),t=p.vec3(),s=p.vec3(),i=p.vec3(),r=p.vec3(),o=p.vec3(),n=p.vec4(),a=p.vec3(),l=p.vec3(),h=p.vec3(),c=p.vec3(),A=p.vec3(),u=p.vec3(),d=p.vec3(),f=p.vec3(),E=p.vec3(),m=p.vec4(),y=p.vec4(),g=p.vec4(),I=p.vec3(),v=p.vec3(),T=p.vec3(),_=p.vec3(),R=p.vec3(),P=p.vec3(),D=p.vec3(),N=p.vec3(),C=p.vec3(),O=p.vec3(),b=p.vec3();return function(w,x,B,F){var M=F.primIndex;if(null!=M&&M>-1){const G=w.geometry._state,k=w.scene,V=k.camera,j=k.canvas;if("triangles"===G.primitiveName){F.primitive="triangle";const k=M,Q=G.indices,W=G.positions;let z,K,Y;if(Q){var L=Q[k+0],U=Q[k+1],H=Q[k+2];o[0]=L,o[1]=U,o[2]=H,F.indices=o,z=3*L,K=3*U,Y=3*H}else z=3*k,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],i[0]=W[K+0],i[1]=W[K+1],i[2]=W[K+2],r[0]=W[Y+0],r[1]=W[Y+1],r[2]=W[Y+2],G.compressGeometry){const e=G.positionsDecodeMatrix;e&&(at.decompressPosition(s,e,s),at.decompressPosition(i,e,i),at.decompressPosition(r,e,r))}F.canvasPos?p.canvasPosToLocalRay(j.canvas,w.origin?S(x,w.origin):x,B,w.worldMatrix,F.canvasPos,e,t):F.origin&&F.direction&&p.worldRayToLocalRay(w.worldMatrix,F.origin,F.direction,e,t),p.normalizeVec3(t),p.rayPlaneIntersect(e,t,s,i,r,n),F.localPos=n,F.position=n,m[0]=n[0],m[1]=n[1],m[2]=n[2],m[3]=1,p.transformVec4(w.worldMatrix,m,y),a[0]=y[0],a[1]=y[1],a[2]=y[2],F.canvasPos&&w.origin&&(a[0]+=w.origin[0],a[1]+=w.origin[1],a[2]+=w.origin[2]),F.worldPos=a,p.transformVec4(V.matrix,y,g),l[0]=g[0],l[1]=g[1],l[2]=g[2],F.viewPos=l,p.cartesianToBarycentric(n,s,i,r,h),F.bary=h;const X=G.normals;if(X){if(G.compressGeometry){const e=3*L,t=3*U,s=3*H;at.decompressNormal(X.subarray(e,e+2),c),at.decompressNormal(X.subarray(t,t+2),A),at.decompressNormal(X.subarray(s,s+2),u)}else c[0]=X[z],c[1]=X[z+1],c[2]=X[z+2],A[0]=X[K],A[1]=X[K+1],A[2]=X[K+2],u[0]=X[Y],u[1]=X[Y+1],u[2]=X[Y+2];const e=p.addVec3(p.addVec3(p.mulVec3Scalar(c,h[0],I),p.mulVec3Scalar(A,h[1],v),T),p.mulVec3Scalar(u,h[2],_),R);F.worldNormal=p.normalizeVec3(p.transformVec3(w.worldNormalMatrix,e,P))}const Z=G.uv;if(Z){if(d[0]=Z[2*L],d[1]=Z[2*L+1],f[0]=Z[2*U],f[1]=Z[2*U+1],E[0]=Z[2*H],E[1]=Z[2*H+1],G.compressGeometry){const e=G.uvDecodeMatrix;e&&(at.decompressUV(d,e,d),at.decompressUV(f,e,f),at.decompressUV(E,e,E))}F.uv=p.addVec3(p.addVec3(p.mulVec2Scalar(d,h[0],D),p.mulVec2Scalar(f,h[1],N),C),p.mulVec2Scalar(E,h[2],O),b)}}}}}();function li(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let i=e.height||1;i<0&&(console.error("negative height not allowed - will invert"),i*=-1);let r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<3&&(r=3);let o=e.heightSegments||1;o<0&&(console.error("negative heightSegments not allowed - will invert"),o*=-1),o<1&&(o=1);const n=!!e.openEnded;let a=e.center;const l=a?a[0]:0,h=a?a[1]:0,c=a?a[2]:0,A=i/2,u=i/o,p=2*Math.PI/r,d=1/r,f=(t-s)/o,E=[],m=[],g=[],I=[];let v,T,_,R,P,D,N,C,O,b,S;const w=(90-180*Math.atan(i/(s-t))/Math.PI)/90;for(v=0;v<=o;v++)for(P=t-v*f,D=A-v*u,T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),m.push(P*_),m.push(w),m.push(P*R),g.push(T*d),g.push(1*v/o),E.push(P*_+l),E.push(D+h),E.push(P*R+c);for(v=0;v0){for(O=E.length/3,m.push(0),m.push(1),m.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),b=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,m.push(t*_),m.push(1),m.push(t*R),g.push(b),g.push(S),E.push(t*_+l),E.push(A+h),E.push(t*R+c);for(T=0;T0){for(O=E.length/3,m.push(0),m.push(-1),m.push(0),g.push(.5),g.push(.5),E.push(0+l),E.push(0-A+h),E.push(0+c),T=0;T<=r;T++)_=Math.sin(T*p),R=Math.cos(T*p),b=.5*Math.sin(T*p)+.5,S=.5*Math.cos(T*p)+.5,m.push(s*_),m.push(-1),m.push(s*R),g.push(b),g.push(S),E.push(s*_+l),E.push(0-A+h),E.push(s*R+c);for(T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,i=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const o=vi(s,this.wrapS);o&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,o);const n=vi(s,this.wrapT);if(n&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,n),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=vi(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}r?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Pi(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Pi(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,vi(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,vi(s,this.magFilter)));const a=vi(s,this.format,this.encoding),l=vi(s,this.type),h=Ri(s,this.internalFormat,a,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,i,h,e[0].width,e[0].height);for(let t=0,i=e.length;t>t;return e+1}class Oi extends O{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new Ce({texture:new _i({gl:this.scene.canvas.gl}),matrix:p.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=p.vec2([0,0]),this._scale=p.vec2([1,1]),this._rotate=p.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),d.memory.textures++}_checkMinFilter(e){return(e=e||ss)!==$t&&e!==es&&e!==ss&&e!==Jt&&e!==qt&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=ss),e}_checkMagFilter(e){return(e=e||$t)!==$t&&e!==Zt&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=$t),e}_checkWrapS(e){return(e=e||Kt)!==Yt&&e!==Xt&&e!==Kt&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=Kt),e}_checkWrapT(e){return(e=e||Kt)!==Yt&&e!==Xt&&e!==Kt&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=Kt),e}_checkFlipY(e){return!!e}_checkEncoding(e){return(e=e||ds)!==ds&&e!==fs&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=ds),e}_webglContextRestored(){this._state.texture=new _i({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=p.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=p.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?p.mulMat4(t,s):s),0!==this._rotate&&(s=p.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?p.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=Di(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=Di(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),d.memory.textures--}}const bi=d.memory,Si=p.AABB3();class wi extends $e{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new Ce({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=p.OBB3();const s=this._state,i=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=i.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=i.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=i.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=i.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=i.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=i.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=i.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=i.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var r;if(t.positionsDecodeMatrix);else{const e=at.getPositionsBounds(t.positions),o=at.compressPositions(t.positions,e.min,e.max);r=o.quantized,s.positionsDecodeMatrix=o.decodeMatrix,s.positionsBuf=new le(i,i.ARRAY_BUFFER,r,r.length,3,i.STATIC_DRAW),bi.positions+=s.positionsBuf.numItems,p.positions3ToAABB3(t.positions,this._aabb),p.positions3ToAABB3(r,Si,s.positionsDecodeMatrix),p.AABB3ToOBB3(Si,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new le(i,i.ARRAY_BUFFER,e,e.length,4,i.STATIC_DRAW),bi.colors+=s.colorsBuf.numItems}if(t.uv){const e=at.getUVBounds(t.uv),r=at.compressUVs(t.uv,e.min,e.max),o=r.quantized;s.uvDecodeMatrix=r.decodeMatrix,s.uvBuf=new le(i,i.ARRAY_BUFFER,o,o.length,2,i.STATIC_DRAW),bi.uvs+=s.uvBuf.numItems}if(t.normals){const e=at.compressNormals(t.normals);let r=s.compressGeometry;s.normalsBuf=new le(i,i.ARRAY_BUFFER,e,e.length,3,i.STATIC_DRAW,r),bi.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,e,e.length,1,i.STATIC_DRAW),bi.indices+=s.indicesBuf.numItems;const o=et(r,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,o,o.length,1,i.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),bi.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),bi.meshes--}}var xi={};function Bi(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let i=e.xSegments||1;i<0&&(console.error("negative xSegments not allowed - will invert"),i*=-1),i<1&&(i=1);let r=e.xSegments||1;r<0&&(console.error("negative zSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const o=e.center,n=o?o[0]:0,a=o?o[1]:0,l=o?o[2]:0,h=t/2,c=s/2,A=Math.floor(i)||1,u=Math.floor(r)||1,p=A+1,d=u+1,f=t/A,E=s/u,m=new Float32Array(p*d*3),g=new Float32Array(p*d*3),I=new Float32Array(p*d*2);let v,T,_,R,P,D,N,C=0,O=0;for(v=0;v65535?Uint32Array:Uint16Array)(A*u*6);for(v=0;v360&&(o=360);const n=e.center;let a=n?n[0]:0,l=n?n[1]:0;const h=n?n[2]:0,c=[],A=[],u=[],d=[];let f,E,m,g,I,v,T,_,R,P,D,N;for(_=0;_<=r;_++)for(T=0;T<=i;T++)f=T/i*o,E=.785398+_/r*Math.PI*2,a=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(E))*Math.cos(f),g=(t+s*Math.cos(E))*Math.sin(f),I=s*Math.sin(E),c.push(m+a),c.push(g+l),c.push(I+h),u.push(1-T/i),u.push(_/r),v=p.normalizeVec3(p.subVec3([m,g,I],[a,l,h],[]),[]),A.push(v[0]),A.push(v[1]),A.push(v[2]);for(_=1;_<=r;_++)for(T=1;T<=i;T++)R=(i+1)*_+T-1,P=(i+1)*(_-1)+T-1,D=(i+1)*(_-1)+T,N=(i+1)*_+T,d.push(R),d.push(P),d.push(D),d.push(D),d.push(N),d.push(R);return y.apply(e,{positions:c,normals:A,uv:u,indices:d})}xi.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},xi.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(xi.parse._buffToStr(e));window.location.href=s},xi.clone=function(e){return JSON.parse(JSON.stringify(e))},xi.bin={},xi.bin.f=new Float32Array(1),xi.bin.fb=new Uint8Array(xi.bin.f.buffer),xi.bin.rf=function(e,t){for(var s=xi.bin.f,i=xi.bin.fb,r=0;r<4;r++)i[r]=e[t+r];return s[0]},xi.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},xi.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},xi.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},xi.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},xi.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},xi.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},xi.parse={},xi.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",i=0;ir&&(r=l),ho&&(o=h),cn&&(n=c)}return{min:{x:t,y:s,z:i},max:{x:r,y:o,z:n}}};class Mi extends O{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=p.vec3(t.pos||[0,0,0]),this._up=p.vec3(t.up||[0,1,0]),this._normal=p.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=p.vec3(),this._rtcPos=p.vec3(),this._imageSize=p.vec2(),this._texture=new Oi(this),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new Ii(this,{matrix:p.inverseMat4(p.lookAtMat4v(this._pos,p.subVec3(this._pos,this._normal,p.mat4()),this._up,p.mat4())),children:[this._bitmapMesh=new ni(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new ct(this,Bi({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new ft(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height*e,1,this._height]}}class Li extends O{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],this._origin=p.vec3(t.origin||[0,0,0]),t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;ed.has(e.id)||E.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let i,r=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(i=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,i=Math.round(255*i).toString(16).padStart(2,"0"),r=i+r):d.has(s.id)&&(i=Math.round(255*s.opacity).toString(16).padStart(2,"0"),r=i+r),e[r]||(e[r]=[]);const o=s.id,n=s.originalSystemId,a={ifc_guid:n,originating_system:this.originatingSystem};return n!==o&&(a.authoring_tool_id=o),e[r].push(a),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));o.components.coloring=y;const g=t.objectIds,I=t.visibleObjects,v=t.visibleObjectIds,T=g.filter((e=>!I[e])),_=t.selectedObjectIds;return e.defaultInvisible||v.length0&&e.clipping_planes.forEach((function(e){let t=Qi(e.location,Ui),s=Qi(e.direction,Ui);h&&p.negateVec3(s),p.subVec3(t,l),r.yUp&&(t=zi(t),s=zi(s)),new ci(i,{pos:t,dir:s})})),i.clearLines(),e.lines&&e.lines.length>0){const t=[],s=[];let r=0;e.lines.forEach((e=>{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(r++),s.push(r++))})),new Li(i,{positions:t,indices:s,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let o=Qi(e.location,Hi),n=Qi(e.normal,Gi),a=Qi(e.up,ki),l=e.height||1;t&&s&&o&&n&&a&&(r.yUp&&(o=zi(o),n=zi(n),a=zi(a)),new Mi(i,{src:s,type:t,pos:o,normal:n,up:a,clippable:!1,collidable:!0,height:l}))})),a&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const r=e.components.visibility.view_setup_hints;r&&(!1===r.spaces_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!1),!1===r.openings_visible&&i.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!1),r.space_boundaries_visible)}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,i=0,r=!1;8===s.length&&(i=parseInt(s.substring(0,2),16)/256,i<=1&&i>=.95&&(i=1),s=s.substring(2),r=!0);const o=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=o,r&&(e.opacity=i)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let a,h,c,A;if(e.perspective_camera?(a=Qi(e.perspective_camera.camera_view_point,Ui),h=Qi(e.perspective_camera.camera_direction,Ui),c=Qi(e.perspective_camera.camera_up_vector,Ui),r.perspective.fov=e.perspective_camera.field_of_view,A="perspective"):(a=Qi(e.orthogonal_camera.camera_view_point,Ui),h=Qi(e.orthogonal_camera.camera_direction,Ui),c=Qi(e.orthogonal_camera.camera_up_vector,Ui),r.ortho.scale=e.orthogonal_camera.view_to_world_scale,A="ortho"),p.subVec3(a,l),r.yUp&&(a=zi(a),h=zi(h),c=zi(c)),o){const e=i.pick({pickSurface:!0,origin:a,direction:h});h=e?e.worldPos:p.addVec3(a,h,Ui)}else h=p.addVec3(a,h,Ui);n?(r.eye=a,r.look=h,r.up=c,r.projection=A):s.cameraFlight.flyTo({eye:a,look:h,up:c,duration:t.duration,projection:A})}}_withBCFComponent(e,t,s){const i=this.viewer,r=i.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const o=t.authoring_tool_id,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}}if(t.ifc_guid){const o=t.ifc_guid,n=r.objects[o];if(n)return void s(n);if(e.updateCompositeObjects){if(i.metaScene.metaObjects[o])return void r.withObjects(i.metaScene.getObjectIDsInSubtree(o),s)}Object.keys(r.models).forEach((t=>{const n=p.globalizeObjectId(t,o),a=r.objects[n];if(a)s(a);else if(e.updateCompositeObjects){i.metaScene.metaObjects[n]&&r.withObjects(i.metaScene.getObjectIDsInSubtree(n),s)}}))}}destroy(){super.destroy()}}function ji(e){return{x:e[0],y:e[1],z:e[2]}}function Qi(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function Wi(e){return new Float64Array([e[0],-e[2],e[1]])}function zi(e){return new Float64Array([e[0],e[2],-e[1]])}p.vec3();class Ki extends a{constructor(e,t={}){super("FastNav",e),this._hideColorTexture=!1!==t.hideColorTexture,this._hidePBR=!1!==t.hidePBR,this._hideSAO=!1!==t.hideSAO,this._hideEdges=!1!==t.hideEdges,this._hideTransparentObjects=!!t.hideTransparentObjects,this._scaleCanvasResolution=!!t.scaleCanvasResolution,this._scaleCanvasResolutionFactor=t.scaleCanvasResolutionFactor||.6,this._delayBeforeRestore=!1!==t.delayBeforeRestore,this._delayBeforeRestoreSeconds=t.delayBeforeRestoreSeconds||.5;let s=1e3*this._delayBeforeRestoreSeconds,i=!1;const r=()=>{s=1e3*this._delayBeforeRestoreSeconds,i||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,i=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",r),this._onCameraMatrix=e.scene.camera.on("matrix",r),this._onSceneTick=e.scene.on("tick",(t=>{i&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),i=!1))}));let o=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{o=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{o=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{o&&r()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}class Yi{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const i=Xi(e,s);return i?t?Zi(i,t):i:null}translatePlurals(e,t,s){const i=this._messages[this._locale];if(!i)return null;let r=Xi(e,i);return r=0===(t=parseInt(""+t,10))?r.zero:t>1?r.other:r.one,r?(r=Zi(r,[t]),s&&(r=Zi(r,s)),r):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];if(i)for(const e in i)if(i.hasOwnProperty(e)){i[e].callback(t)}}on(e,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new t),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._eventSubIDMap.addItem();i[r]={callback:s},this._eventSubEvents[r]=e;const o=this._events[e];return void 0!==o&&s(o),r}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function Xi(e,t){if(t[e])return t[e];const s=e.split(".");let i=t;for(let e=0,t=s.length;i&&e=1;e>1&&(e=1);const s=this.easing?sr._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(p.subVec3(i.eye,i.look,tr),i.eye=p.lerpVec3(s,0,1,this._eye1,this._eye2,$i),i.look=p.subVec3($i,tr,Ji)):this._flyingLook&&(i.look=p.lerpVec3(s,0,1,this._look1,this._look2,Ji),i.up=p.lerpVec3(s,0,1,this._up1,this._up2,er)):this._flyingEyeLookUp&&(i.eye=p.lerpVec3(s,0,1,this._eye1,this._eye2,$i),i.look=p.lerpVec3(s,0,1,this._look1,this._look2,Ji),i.up=p.lerpVec3(s,0,1,this._up1,this._up2,er)),this._projection2){const t="ortho"===this._projection2?sr._easeOutExpo(e,0,1,1):sr._easeInCubic(e,0,1,1);i.customProjection.matrix=p.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();N.scheduleTask(this._update,this)}static _ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}static _easeInCubic(e,t,s,i){return s*(e/=i)*e*e+t}static _easeOutExpo(e,t,s,i){return s*(1-Math.pow(2,-10*e/i))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class ir extends O{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new sr(this),this._t=0,this.state=ir.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const i=performance.now(),r=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==r)switch(this.state){case ir.SCRUBBING:return;case ir.PLAYING:if(this._t+=this._playingRate*r,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=ir.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case ir.PLAYING_TO:s=this._t+this._playingRate*r*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=ir.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,i){return-s*(e/=i)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=ir.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=ir.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const i=s.frames[e];i?(this.state=ir.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=ir.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=ir.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=ir.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}ir.STOPPED=0,ir.SCRUBBING=1,ir.PLAYING=2,ir.PLAYING_TO=3,p.vec3(),p.vec3(),p.vec3(),p.vec3([0,-1,0]),p.vec4([0,0,0,1]);const rr=p.vec3(),or=p.vec3(),nr=p.mat4();class ar{constructor(){this.normal=p.vec3(),this.offset=0,this.testVertex=p.vec3()}set(e,t,s,i){const r=1/Math.sqrt(e*e+t*t+s*s);this.normal[0]=e*r,this.normal[1]=t*r,this.normal[2]=s*r,this.offset=i*r,this.testVertex[0]=this.normal[0]>=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class lr{constructor(){this.planes=[new ar,new ar,new ar,new ar,new ar,new ar]}}function hr(e,t){let s=lr.INSIDE;const i=rr,r=or;i[0]=t[0],i[1]=t[1],i[2]=t[2],r[0]=t[3],r[1]=t[4],r[2]=t[5];const o=[i,r];for(let t=0;t<6;++t){const i=e.planes[t];if(i.normal[0]*o[i.testVertex[0]][0]+i.normal[1]*o[i.testVertex[1]][1]+i.normal[2]*o[i.testVertex[2]][2]+i.offset<0)return lr.OUTSIDE;i.normal[0]*o[1-i.testVertex[0]][0]+i.normal[1]*o[1-i.testVertex[1]][1]+i.normal[2]*o[1-i.testVertex[2]][2]+i.offset<0&&(s=lr.INTERSECT)}return s}lr.INSIDE=0,lr.INTERSECT=1,lr.OUTSIDE=2;const cr=p.vec3();class Ar{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?y.apply(s,{}):null;const i=!s||s.visible,r=!s||s.edges,o=!s||s.xrayed,n=!s||s.highlighted,a=!s||s.selected,l=!s||s.clippable,h=!s||s.pickable,c=!s||s.colorize,A=!s||s.opacity,u=t.metaObjects,p=e.objects;for(let e=0,t=u.length;e0){const n=t._sectionPlanesState.sectionPlanes,a=r*o,l=i.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.sectionPlanes.length;t0&&d.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,d.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),d.lightMaps.length>0&&d.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,d.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++),this._withSAO){const t=n.sao;if(t.possible){const s=a.drawingBufferWidth,i=a.drawingBufferHeight;yr[0]=s,yr[1]=i,yr[2]=t.blendCutoff,yr[3]=t.blendFactor,a.uniform4fv(this._uSAOParams,yr),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%o,e.bindTexture++}}if(i){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===fr[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=n.xrayMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===fr[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=n.highlightMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else if(s===fr[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=n.selectedMaterial._state,i=s[e],r=s[t];a.uniform4f(this._uColor,i[0],i[1],i[2],r)}else a.uniform4fv(this._uColor,this._edges?mr:Er)}this._draw({state:l,frameCtx:e,incrementDrawState:r}),a.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,d.memory.programs--}}class _r extends Tr{constructor(e,t,{instancing:s=!1,edges:i=!1}={}){super(e,t,{instancing:s,edges:i})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=i.pickElementsCount||s.indicesBuf.numItems,o=i.pickElementsOffset?i.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,o),r&&i.drawElements++}}}class Rr extends _r{constructor(e,t){super(e,t,{instancing:!1,edges:!0})}}class Pr extends Tr{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++)}}class Dr extends Pr{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Nr extends Tr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),r&&i.drawArrays++}}class Cr extends Tr{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawArraysInstanced(t.POINTS,0,s.positionsBuf.numItems,s.numInstances),r&&i.drawArrays++}}class Or extends Tr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),r&&i.drawElements++}}class br extends Tr{constructor(e,t){super(e,t,{instancing:!0})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:i,incrementDrawState:r}=e;t.drawElementsInstanced(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),r&&i.drawElements++}}class Sr extends _r{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r;const o=[];o.push("#version 300 es"),o.push("// Triangles batching draw vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class wr extends _r{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,i=s.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching flat-shading draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching silhouette fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = vColor;"),o.push("}"),o}}class Br extends Rr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class Fr extends Rr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class Mr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class Lr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Ur extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(` outNormal = ivec4(vWorldNormal * float(${p.MAX_INT}), 1.0);`),i.push("}"),i}}class Hr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Gr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching depth fragment shader"),i.push("precision highp float;"),i.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}}class kr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Vr extends _r{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class jr extends _r{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Triangles batching quality draw vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),o.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),o.push("vFragDepth = 1.0 + clipPos.w;")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Triangles batching quality draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),n.push("uniform sampler2D uAOMap;"),n.push("in vec4 vViewPosition;"),n.push("in vec3 vViewNormal;"),n.push("in vec4 vColor;"),n.push("in vec2 vUV;"),n.push("in vec2 vMetallicRoughness;"),i.lightMaps.length>0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching pick flat normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${p.MAX_INT}), 1.0);`),i.push("}"),i}}class Wr extends _r{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,i=e._sectionPlanesState,r=i.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Triangles batching color texture fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),r){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=i.sectionPlanes.length;e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=i.sectionPlanes.length;e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const Xr=p.mat4(),Zr=p.mat4();function qr(e,t,s){const i=e.length,r=new Uint16Array(i),o=t[0],n=t[1],a=t[2],l=t[3]-o,h=t[4]-n,c=t[5]-a,A=65525,u=A/l,d=A/h,f=A/c,E=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1),i=e,r=t}return new Int8Array([Math[t](127.5*i+(i<0?-1:0)),Math[s](127.5*r+(r<0?-1:0))])}function eo(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const i=1-Math.abs(t)-Math.abs(s);i<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const r=Math.sqrt(t*t+s*s+i*i);return[t/r,s/r,i/r]}const to=p.vec3(),so=p.vec3(),io=p.vec3(),ro=p.vec3(),oo=p.mat4();class no extends Tr{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=to;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=so;if(l){const e=io;p.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,oo),m=ro,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.indicesBuf.bind(),n.drawElements(n.TRIANGLES,a.indicesBuf.numItems,a.indicesBuf.itemType,0),a.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ao=p.vec3(),lo=p.vec3(),ho=p.vec3(),co=p.vec3(),Ao=p.mat4();class uo extends Tr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=ao;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=lo;if(l){const e=ho;p.transformPoint3(c,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,Ao),m=co,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(a.edgeIndicesBuf.bind(),n.drawElements(n.LINES,a.edgeIndicesBuf.numItems,a.edgeIndicesBuf.itemType,0),a.edgeIndicesBuf.unbind()):n.drawArrays(n.POINTS,0,a.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class po{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}eagerCreateRenders(){this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new no(this._scene,!1)),this._snapDepthRenderer||(this._snapDepthRenderer=new uo(this._scene))}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new no(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new uo(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const fo={};const Eo=p.mat4(),mo=p.mat4(),yo=p.vec4([0,0,0,1]),go=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();const Io=p.vec3(),vo=p.vec3(),To=p.vec3(),_o=p.vec3(),Ro=p.vec3(),Po=p.vec3(),Do=p.vec3();class No{constructor(e){console.info("Creating TrianglesBatchingLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=Kr[t];return s||(s=new zr(e),Kr[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Kr[t],s._destroy()}))),s}(e.model.scene),this._snapBatchingRenderers=function(e){const t=e.id;let s=fo[t];return s||(s=new po(e),fo[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete fo[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Yr(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ce({origin:p.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=p.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=p.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.aabb=p.collapseAABB3(),this.solid=!!e.solid}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)for(let e=0,t=r.length;e0){const e=Eo;E?p.inverseMat4(p.transposeMat4(E,mo),e):p.identityMat4(e,e),function(e,t,s,i,r){function o(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let n,a,l,h,c,A,u=new Float32Array([0,0,0,0]),d=new Float32Array([0,0,0,0]);for(A=0;Ac&&(l=n,c=h),n=$r(d,"floor","ceil"),a=eo(n),h=o(d,a),h>c&&(l=n,c=h),n=$r(d,"ceil","ceil"),a=eo(n),h=o(d,a),h>c&&(l=n,c=h),i[r+A+0]=l[0],i[r+A+1]=l[1],i[r+A+2]=0}(e,i,i.length,I.normals,I.normals.length)}if(a)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0)for(let e=0,t=n.length;e0){const i=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):qr(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=p.mat4());if(e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,i.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const i=new Int8Array(s.normals);let r=!0;e.normalsBuf=new le(t,t.ARRAY_BUFFER,i,s.normals.length,3,t.STATIC_DRAW,r)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.uv.length>0)if(e.uvDecodeMatrix){let i=!1;e.uvBuf=new le(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,i)}else{const i=at.getUVBounds(s.uv),r=at.compressUVs(s.uv,i.min,i.max),o=r.quantized;let n=!1;e.uvDecodeMatrix=p.mat3(r.decodeMatrix),e.uvBuf=new le(t,t.ARRAY_BUFFER,o,o.length,2,t.STATIC_DRAW,n)}if(s.metallicRoughness.length>0){const i=new Uint8Array(s.metallicRoughness);let r=!1;e.metallicRoughnessBuf=new le(t,t.ARRAY_BUFFER,i,s.metallicRoughness.length,2,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i),o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new le(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const i=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,i=this._portions[s],r=4*i.vertsBaseIndex,o=4*i.numVerts,n=this._scratchMemory.getUInt8Array(o),a=t[0],l=t[1],h=t[2],c=t[3];for(let e=0;ey)&&(y=e,i.set(g),r&&p.triangleNormal(d,f,E,r),m=!0)}}return m&&r&&(p.transformVec3(this.model.worldNormalMatrix,r,r),p.normalizeVec3(r)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class Co extends Pr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0;let r,o,n;const a=[];for(a.push("#version 300 es"),a.push("// Instancing geometry drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec2 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;"),r=0,o=s.lights.length;r= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),a.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),r=0,o=s.lights.length;r0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}}class Oo extends Pr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let i,r;const o=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),o){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}for(n.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),n.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),n.push("float lambertian = 1.0;"),n.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),n.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),n.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=s.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing fill fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class So extends Dr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class wo extends Dr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Triangles instancing edges vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class xo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class Bo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Fo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(` outNormal = ivec4(vWorldNormal * float(${p.MAX_INT}), 1.0);`),i.push("}"),i}}class Mo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Lo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry depth drawing fragment shader"),o.push("precision highp float;"),o.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),o.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),o.push("}"),o}}class Uo extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class Ho extends Pr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}const Go={3e3:"linearToLinear",3001:"sRGBToLinear"};class ko extends Pr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,i=t.sectionPlanes.length>0,r=t.clippingCaps,o=[];return o.push("#version 300 es"),o.push("// Instancing geometry quality drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec3 normal;"),o.push("in vec4 color;"),o.push("in vec2 uv;"),o.push("in vec2 metallicRoughness;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),o.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("vec3 octDecode(vec2 oct) {"),o.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),o.push(" if (v.z < 0.0) {"),o.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),o.push("out vec4 vViewPosition;"),o.push("out vec3 vViewNormal;"),o.push("out vec4 vColor;"),o.push("out vec2 vUV;"),o.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&o.push("out vec3 vWorldNormal;"),i&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;"),r&&o.push("out vec4 vClipPosition;")),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push(" worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),o.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),o.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(o.push("vFragDepth = 1.0 + clipPos.w;"),o.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i&&(o.push("vWorldPosition = worldPosition;"),o.push("vFlags = flags;"),r&&o.push("vClipPosition = clipPos;")),o.push("vViewPosition = viewPosition;"),o.push("vViewNormal = viewNormal;"),o.push("vColor = color;"),o.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),o.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&o.push("vWorldNormal = worldNormal.xyz;"),o.push("gl_Position = clipPos;"),o.push("}"),o.push("}"),o}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState,r=s.sectionPlanes.length>0,o=s.clippingCaps,n=[];n.push("#version 300 es"),n.push("// Instancing geometry quality drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform sampler2D uColorMap;"),n.push("uniform sampler2D uMetallicRoughMap;"),n.push("uniform sampler2D uEmissiveMap;"),n.push("uniform sampler2D uNormalMap;"),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),i.reflectionMaps.length>0&&n.push("uniform samplerCube reflectionMap;"),i.lightMaps.length>0&&n.push("uniform samplerCube lightMap;"),n.push("uniform vec4 lightAmbient;");for(let e=0,t=i.lights.length;e0&&n.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(n,!0),n.push("#define PI 3.14159265359"),n.push("#define RECIPROCAL_PI 0.31830988618"),n.push("#define RECIPROCAL_PI2 0.15915494"),n.push("#define EPSILON 1e-6"),n.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),n.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),n.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),n.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),n.push(" return normalize(surf_norm );"),n.push(" }"),n.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),n.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),n.push(" vec2 st0 = dFdx( uv.st );"),n.push(" vec2 st1 = dFdy( uv.st );"),n.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),n.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),n.push(" vec3 N = normalize( surf_norm );"),n.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),n.push(" mat3 tsn = mat3( S, T, N );"),n.push(" return normalize( tsn * mapN );"),n.push("}"),n.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),n.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),n.push("}"),n.push("struct IncidentLight {"),n.push(" vec3 color;"),n.push(" vec3 direction;"),n.push("};"),n.push("struct ReflectedLight {"),n.push(" vec3 diffuse;"),n.push(" vec3 specular;"),n.push("};"),n.push("struct Geometry {"),n.push(" vec3 position;"),n.push(" vec3 viewNormal;"),n.push(" vec3 worldNormal;"),n.push(" vec3 viewEyeDir;"),n.push("};"),n.push("struct Material {"),n.push(" vec3 diffuseColor;"),n.push(" float specularRoughness;"),n.push(" vec3 specularColor;"),n.push(" float shine;"),n.push("};"),n.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),n.push(" float r = ggxRoughness + 0.0001;"),n.push(" return (2.0 / (r * r) - 2.0);"),n.push("}"),n.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),n.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),n.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),n.push("}"),i.reflectionMaps.length>0&&(n.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),n.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),n.push(" vec3 envMapColor = "+Go[i.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),n.push(" return envMapColor;"),n.push("}")),n.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),n.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),n.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),n.push("}"),n.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" return 1.0 / ( gl * gv );"),n.push("}"),n.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),n.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),n.push(" return 0.5 / max( gv + gl, EPSILON );"),n.push("}"),n.push("float D_GGX(const in float alpha, const in float dotNH) {"),n.push(" float a2 = ( alpha * alpha );"),n.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),n.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float alpha = ( roughness * roughness );"),n.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),n.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),n.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),n.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),n.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),n.push(" vec3 F = F_Schlick( specularColor, dotLH );"),n.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),n.push(" float D = D_GGX( alpha, dotNH );"),n.push(" return F * (G * D);"),n.push("}"),n.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),n.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),n.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),n.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),n.push(" vec4 r = roughness * c0 + c1;"),n.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),n.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),n.push(" return specularColor * AB.x + AB.y;"),n.push("}"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&(n.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),i.lightMaps.length>0&&(n.push(" vec3 irradiance = "+Go[i.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),n.push(" irradiance *= PI;"),n.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),i.reflectionMaps.length>0&&(n.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),n.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),n.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),n.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),n.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),n.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),n.push("}")),n.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),n.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),n.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),n.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),n.push("}"),n.push("out vec4 outColor;"),n.push("void main(void) {"),r){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e (0.002 * vClipPosition.w)) {"),n.push(" discard;"),n.push(" }"),n.push(" if (dist > 0.0) { "),n.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" return;"),n.push("}")):(n.push(" if (dist > 0.0) { "),n.push(" discard;"),n.push(" }")),n.push("}")}n.push("IncidentLight light;"),n.push("Material material;"),n.push("Geometry geometry;"),n.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),n.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),n.push("float opacity = float(vColor.a) / 255.0;"),n.push("vec3 baseColor = rgb;"),n.push("float specularF0 = 1.0;"),n.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),n.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),n.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),n.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),n.push("baseColor *= colorTexel.rgb;"),n.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),n.push("metallic *= metalRoughTexel.b;"),n.push("roughness *= metalRoughTexel.g;"),n.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),n.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),n.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),n.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),n.push("geometry.position = vViewPosition.xyz;"),n.push("geometry.viewNormal = -normalize(viewNormal);"),n.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),i.lightMaps.length>0&&n.push("geometry.worldNormal = normalize(vWorldNormal);"),(i.lightMaps.length>0||i.reflectionMaps.length>0)&&n.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=i.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${p.MAX_INT}), 1.0);`),i.push("}"),i}}class jo extends Pr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,i=e._lightsState;let r,o;const n=s.sectionPlanes.length>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),n){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,t=s.sectionPlanes.length;e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.sectionPlanes.length;e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),r=0,o=i.lights.length;r0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Jo=p.vec3(),$o=p.vec3(),en=p.vec3(),tn=p.vec3(),sn=p.mat4();class rn extends Tr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=t.aabb,d=e.pickViewMatrix||o.viewMatrix;this._vaoCache.has(t)?n.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(a));const f=Jo;let E,m;if(f[0]=p.safeInv(u[3]-u[0])*p.MAX_INT,f[1]=p.safeInv(u[4]-u[1])*p.MAX_INT,f[2]=p.safeInv(u[5]-u[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(f[0]),e.snapPickCoordinateScale[1]=p.safeInv(f[1]),e.snapPickCoordinateScale[2]=p.safeInv(f[2]),l||0!==h[0]||0!==h[1]||0!==h[2]){const t=$o;if(l){const e=p.transformPoint3(c,l,en);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=h[0],t[1]+=h[1],t[2]+=h[2],E=S(d,t,sn),m=tn,m[0]=o.eye[0]-t[0],m[1]=o.eye[1]-t[1],m[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else E=d,m=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,m),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,f),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(A,0),this._matricesUniformBlockBufferData.set(E,y+=16),this._matricesUniformBlockBufferData.set(o.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(a.positionsDecodeMatrix,y+=16),n.bindBuffer(n.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),n.bufferData(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,n.DYNAMIC_DRAW),n.bindBufferBase(n.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(a.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(a.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(a.modelMatrixCol2Buf),n.vertexAttribDivisor(this._aModelMatrixCol0.location,1),n.vertexAttribDivisor(this._aModelMatrixCol1.location,1),n.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(a.flagsBuf),n.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(a.edgeIndicesBuf.bind(),n.drawElementsInstanced(n.LINES,a.edgeIndicesBuf.numItems,a.edgeIndicesBuf.itemType,0,a.numInstances),a.edgeIndicesBuf.unbind()):n.drawArraysInstanced(n.POINTS,0,a.positionsBuf.numItems,a.numInstances),n.vertexAttribDivisor(this._aModelMatrixCol0.location,0),n.vertexAttribDivisor(this._aModelMatrixCol1.location,0),n.vertexAttribDivisor(this._aModelMatrixCol2.location,0),n.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&n.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class on{constructor(e){this._scene=e}_compile(){this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._snapDepthRenderer&&!this._snapDepthRenderer.getValid()&&(this._snapDepthRenderer.destroy(),this._snapDepthRenderer=null)}eagerCreateRenders(){this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new qo(this._scene,!1)),this._snapDepthRenderer||(this._snapDepthRenderer=new rn(this._scene))}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new qo(this._scene,!1)),this._snapDepthBufInitRenderer}get snapDepthRenderer(){return this._snapDepthRenderer||(this._snapDepthRenderer=new rn(this._scene)),this._snapDepthRenderer}_destroy(){this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._snapDepthRenderer&&this._snapDepthRenderer.destroy()}}const nn={};const an=new Uint8Array(4),ln=new Float32Array(1),hn=p.vec4([0,0,0,1]),cn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const An=new Float32Array(3),un=p.vec3(),pn=p.vec3(),dn=p.vec3(),fn=p.vec3(),En=p.vec3(),mn=p.vec3(),yn=p.vec3();class gn{constructor(e){console.info("Creating TrianglesInstancingLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._instancingRenderers=function(e){const t=e.id;let s=Wo[t];return s||(s=new Qo(e),Wo[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Wo[t],s._destroy()}))),s}(e.model.scene),this._snapInstancingRenderers=function(e){const t=e.id;let s=nn[t];return s||(s=new on(e),nn[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete nn[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new Ce({numInstances:0,obb:p.OBB3(),origin:p.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.aabb=p.collapseAABB3(),this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}createPortion(e){const t=e.color,s=e.metallic,i=e.roughness,r=null!==e.opacity&&void 0!==e.opacity?e.opacity:255,o=e.meshMatrix,n=e.aabb,a=e.pickColor;if(this._finalized)throw"Already finalized";const l=t[0],h=t[1],c=t[2];if(this._colors.push(l),this._colors.push(h),this._colors.push(c),this._colors.push(r),this._metallicRoughness.push(null!=s?s:0),this._metallicRoughness.push(null!=i?i:255),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(o[0]),this._modelMatrixCol0.push(o[4]),this._modelMatrixCol0.push(o[8]),this._modelMatrixCol0.push(o[12]),this._modelMatrixCol1.push(o[1]),this._modelMatrixCol1.push(o[5]),this._modelMatrixCol1.push(o[9]),this._modelMatrixCol1.push(o[13]),this._modelMatrixCol2.push(o[2]),this._modelMatrixCol2.push(o[6]),this._modelMatrixCol2.push(o[10]),this._modelMatrixCol2.push(o[14]),this._state.geometry.normals){let e=p.transposeMat4(o,p.mat4()),t=p.inverseMat4(e);this._modelNormalMatrixCol0.push(t[0]),this._modelNormalMatrixCol0.push(t[4]),this._modelNormalMatrixCol0.push(t[8]),this._modelNormalMatrixCol0.push(t[12]),this._modelNormalMatrixCol1.push(t[1]),this._modelNormalMatrixCol1.push(t[5]),this._modelNormalMatrixCol1.push(t[9]),this._modelNormalMatrixCol1.push(t[13]),this._modelNormalMatrixCol2.push(t[2]),this._modelNormalMatrixCol2.push(t[6]),this._modelNormalMatrixCol2.push(t[10]),this._modelNormalMatrixCol2.push(t[14])}this._pickColors.push(a[0]),this._pickColors.push(a[1]),this._pickColors.push(a[2]),this._pickColors.push(a[3]);const A=this._state.geometry.positionsCompressed.length,u=this._state.geometry.positionsCompressed,d=this._state.geometry.positionsDecodeMatrix;for(let e=0;e0){let t=!1;e.colorsBuf=new le(i,i.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,i.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new le(i,i.ARRAY_BUFFER,t,this._metallicRoughness.length,2,i.STATIC_DRAW,s)}if(o>0){let t=!1;e.flagsBuf=new le(i,i.ARRAY_BUFFER,new Float32Array(o),o,1,i.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,i.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new le(i,i.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,i.STATIC_DRAW,s),e.positionsDecodeMatrix=p.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),r=!1;e.colorsBuf=new le(i,i.ARRAY_BUFFER,s,s.length,4,i.STATIC_DRAW,r)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new le(i,i.ARRAY_BUFFER,s,s.length,2,i.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,i.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new le(i,i.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,i.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelMatrixCol1Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelMatrixCol2Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,i.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new le(i,i.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,i.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new le(i,i.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,i.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";an[0]=t[0],an[1]=t[1],an[2]=t[2],an[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(an,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?fr.NOT_RENDERED:s?fr.COLOR_TRANSPARENT:fr.COLOR_OPAQUE,A=!i||h?fr.NOT_RENDERED:n?fr.SILHOUETTE_SELECTED:o?fr.SILHOUETTE_HIGHLIGHTED:r?fr.SILHOUETTE_XRAYED:fr.NOT_RENDERED;let u=0;u=!i||h?fr.NOT_RENDERED:n?fr.EDGES_SELECTED:o?fr.EDGES_HIGHLIGHTED:r?fr.EDGES_XRAYED:a?s?fr.EDGES_COLOR_TRANSPARENT:fr.EDGES_COLOR_OPAQUE:fr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?fr.PICK:fr.NOT_RENDERED)<<12,p|=(t&U?1:0)<<16,ln[0]=p,this._state.flagsBuf&&this._state.flagsBuf.setData(ln,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(An[0]=t[0],An[1]=t[1],An[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(An,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,i=s.geometry,r=this._portions[e];if(!r)return void this.model.error("portion not found: "+e);const o=i.quantizedPositions,n=s.origin,a=r.offset,l=n[0]+a[0],h=n[1]+a[1],c=n[2]+a[2],A=hn,u=r.matrix,d=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=o.length;eg)&&(g=e,i.set(I),r&&p.triangleNormal(f,E,m,r),y=!0)}}return y&&r&&(p.transformVec3(a.normalMatrix,r,r),p.transformVec3(this.model.worldNormalMatrix,r,r),p.normalizeVec3(r)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class In extends Or{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class vn extends Or{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines batching silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class Tn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new In(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new vn(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const _n={};class Rn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}const Pn=p.vec4([0,0,0,1]),Dn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();class Nn{constructor(e){this.layerIndex=e.layerIndex,this._batchingRenderers=function(e){const t=e.id;let s=_n[t];return s||(s=new Tn(e),_n[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete _n[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new Rn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ce({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:p.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._numVerts=0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=p.vec3(e.origin)),this.aabb=p.collapseAABB3()}canCreatePortion(e,t){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts&&this._buffer.indices.length+t0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=qr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.DYNAMIC_DRAW,r)}if(s.colors.length>0){const i=s.colors.length/4,r=new Float32Array(i);let o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const i=new Uint32Array(s.indices);e.indicesBuf=new le(t,t.ELEMENT_ARRAY_BUFFER,i,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2],h=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Lines instancing color fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return this._withSAO?(o.push(" float viewportWidth = uSAOParams[0];"),o.push(" float viewportHeight = uSAOParams[1];"),o.push(" float blendCutoff = uSAOParams[2];"),o.push(" float blendFactor = uSAOParams[3];"),o.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),o.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),o.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):o.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class On extends br{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Lines instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = color;"),i.push("}"),i}}class bn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Cn(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new On(this._scene)),this._silhouetteRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy()}}const Sn={};const wn=new Uint8Array(4),xn=new Float32Array(1),Bn=p.vec4([0,0,0,1]),Fn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const Mn=new Float32Array(3);class Ln{constructor(e){this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._linesInstancingRenderers=function(e){const t=e.id;let s=Sn[t];return s||(s=new bn(e),Sn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Sn[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new Ce({obb:p.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],e.origin&&(this._state.origin=p.vec3(e.origin)),this._finalized=!1,this.aabb=p.collapseAABB3()}createPortion(e){const t=e.color,s=e.opacity,i=e.meshMatrix,r=e.aabb;if(this._finalized)throw"Already finalized";const o=t[0],n=t[1],a=t[2];t[3],this._colors.push(o),this._colors.push(n),this._colors.push(a),this._colors.push(s),this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(i[0]),this._modelMatrixCol0.push(i[4]),this._modelMatrixCol0.push(i[8]),this._modelMatrixCol0.push(i[12]),this._modelMatrixCol1.push(i[1]),this._modelMatrixCol1.push(i[5]),this._modelMatrixCol1.push(i[9]),this._modelMatrixCol1.push(i[13]),this._modelMatrixCol2.push(i[2]),this._modelMatrixCol2.push(i[6]),this._modelMatrixCol2.push(i[10]),this._modelMatrixCol2.push(i[14]),p.collapseAABB3(r);const l=this._state.obb,h=l.length;for(let e=0;e0){let t=!1;this._state.colorsBuf=new le(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(s>0){let t=!1;this._state.flagsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(s),s,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";wn[0]=t[0],wn[1]=t[1],wn[2]=t[2],wn[3]=t[3],this._state.colorsBuf.setData(wn,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?fr.NOT_RENDERED:s?fr.COLOR_TRANSPARENT:fr.COLOR_OPAQUE,A=!i||h?fr.NOT_RENDERED:n?fr.SILHOUETTE_SELECTED:o?fr.SILHOUETTE_HIGHLIGHTED:r?fr.SILHOUETTE_XRAYED:fr.NOT_RENDERED;let u=0;u=!i||h?fr.NOT_RENDERED:n?fr.EDGES_SELECTED:o?fr.EDGES_HIGHLIGHTED:r?fr.EDGES_XRAYED:a?s?fr.EDGES_COLOR_TRANSPARENT:fr.EDGES_COLOR_OPAQUE:fr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?fr.PICK:fr.NOT_RENDERED)<<12,p|=(t&U?255:0)<<16,xn[0]=p,this._state.flagsBuf.setData(xn,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Mn[0]=t[0],Mn[1]=t[1],Mn[2]=t[2],this._state.offsetsBuf.setData(Mn,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._linesInstancingRenderers.colorRenderer&&this._linesInstancingRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._linesInstancingRenderers.silhouetteRenderer&&this._linesInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Un extends Nr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial,i=[];return i.push("#version 300 es"),i.push("// Points batching color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push("worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class Hn extends Nr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform vec4 color;"),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points batching silhouette vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("outColor = color;"),o.push("}"),o}}class Gn extends Nr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching pick mesh vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var r=0;r 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vPickColor; "),i.push("}"),i}}class kn extends Nr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batched pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("gl_PointSize += 10.0;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batched pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class Vn extends Nr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points batching occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push(" } else {"),i.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push(" gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push(" }"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points batching occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),i.push("}"),i}}class jn{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Un(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Hn(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Gn(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new kn(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Vn(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const Qn={};class Wn{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}const zn=p.vec4(),Kn=p.vec4(),Yn=p.vec4([0,0,0,1]),Xn=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]),p.OBB3();class Zn{constructor(e){this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._pointsBatchingRenderers=function(e){const t=e.id;let s=Qn[t];return s||(s=new jn(e),Qn[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Qn[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Wn(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new Ce({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:p.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=p.collapseAABB3(),this._portions=[],this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=p.vec3(e.origin)),this.aabb=p.collapseAABB3()}canCreatePortion(e){if(this._finalized)throw"Already finalized";return this._buffer.positions.length+e<3*this._buffer.maxVerts}createPortion(e){if(this._finalized)throw"Already finalized";const t=e.positions,s=e.positionsCompressed,i=e.color,r=e.colorsCompressed,o=e.colors,n=e.meshMatrix,a=e.worldAABB,l=e.pickColor,h=this._buffer,c=h.positions.length/3;let A;if(this._preCompressedPositionsExpected){if(!s)throw"positionsCompressed expected";for(let e=0,t=s.length;e0)if(this._preCompressedPositionsExpected){const i=new Uint16Array(s.positions);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}else{const i=qr(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new le(t,t.ARRAY_BUFFER,i,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const i=new Uint8Array(s.colors);let r=!1;e.colorsBuf=new le(t,t.ARRAY_BUFFER,i,s.colors.length,4,t.STATIC_DRAW,r)}if(s.positions.length>0){const i=s.positions.length/3,r=new Float32Array(i);let o=!1;e.flagsBuf=new le(t,t.ARRAY_BUFFER,r,r.length,1,t.DYNAMIC_DRAW,o)}if(s.pickColors.length>0){const i=new Uint8Array(s.pickColors);let r=!1;e.pickColorsBuf=new le(t,t.ARRAY_BUFFER,i,s.pickColors.length,4,t.STATIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const i=new Float32Array(s.offsets);e.offsetsBuf=new le(t,t.ARRAY_BUFFER,i,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,i=4*this._portions[s],r=4*this._portions[s+1],o=this._scratchMemory.getUInt8Array(r),n=t[0],a=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing color vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("in float flags;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),s.filterIntensity&&i.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),s.filterIntensity&&(i.push("float intensity = float(color.a) / 255.0;"),i.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {")),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),s.filterIntensity&&i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing color fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class Jn extends Cr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing silhouette vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 color;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),i.push("uniform vec4 silhouetteColor;"),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vColor;"),i.push("void main(void) {"),i.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),i.push("if (silhouetteFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing silhouette fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vColor;"),i.push("}"),i}}class $n extends Cr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick mesh vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 pickColor;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vPickColor;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),i.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),i.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick mesh fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("outColor = vPickColor; "),i.push("}"),i}}class ea extends Cr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing pick depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),i.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(i),this._addRemapClipPosLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("out vec4 vViewPosition;"),i.push("void main(void) {"),i.push("int pickFlag = int(flags) >> 12 & 0xF;"),i.push("if (pickFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push(" vFlags = flags;")),i.push(" vViewPosition = viewPosition;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),i.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outColor = packDepth(zNormalizedDepth); "),i.push("}"),i}}class ta extends Cr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in vec4 color;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push(" vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Points instancing occlusion vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0;e 1.0) {"),i.push(" discard;"),i.push(" }")),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),i.push("}")}return i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("}"),i}}class sa extends Cr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=e.pointsMaterial._state,i=[];return i.push("#version 300 es"),i.push("// Points instancing depth vertex shader"),i.push("uniform int renderPass;"),i.push("in vec3 position;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("in float flags;"),i.push("in vec4 modelMatrixCol0;"),i.push("in vec4 modelMatrixCol1;"),i.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(i),i.push("uniform float pointSize;"),s.perspectivePoints&&i.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;")),t&&(i.push("out vec4 vWorldPosition;"),i.push("out float vFlags;")),i.push("void main(void) {"),i.push("int colorFlag = int(flags) & 0xF;"),i.push("if (colorFlag != renderPass) {"),i.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),i.push("} else {"),i.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),i.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags = flags;")),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("gl_Position = clipPos;"),s.perspectivePoints?(i.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),i.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),i.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):i.push("gl_PointSize = pointSize;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,i;const r=t.sectionPlanes.length>0,o=[];if(o.push("#version 300 es"),o.push("// Points instancing depth vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),r)for(o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;"),s=0,i=t.sectionPlanes.length;s 1.0) {"),o.push(" discard;"),o.push(" }")),r){for(o.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;"),s=0,i=t.sectionPlanes.length;s 0.0) { discard; }"),o.push("}")}return o.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&o.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),o.push("}"),o}}class ia extends Cr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.sectionPlanes.length>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Instancing geometry depth drawing fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,s=t.sectionPlanes.length;e 1.0) {"),i.push(" discard;"),i.push(" }"),s){i.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}}class ra{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new qn(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Jn(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new sa(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new $n(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new ea(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new ta(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new ia(this._scene)),this._shadowRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy()}}const oa={};const na=new Uint8Array(4),aa=new Float32Array(1),la=p.vec4([0,0,0,1]),ha=p.vec4([0,0,0,1]);p.vec4([0,0,0,1]);const ca=new Float32Array(3);class Aa{constructor(e){this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._pointsInstancingRenderers=function(e){const t=e.id;let s=oa[t];return s||(s=new ra(e),oa[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete oa[t],s._destroy()}))),s}(e.model.scene),this._aabb=p.collapseAABB3(),this._state=new Ce({obb:p.OBB3(),numInstances:0,origin:e.origin?p.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._finalized=!1,this.aabb=p.collapseAABB3()}createPortion(e){const t=e.meshMatrix,s=e.aabb,i=e.pickColor;if(this._finalized)throw"Already finalized";this.model.scene.entityOffsetsEnabled&&(this._offsets.push(0),this._offsets.push(0),this._offsets.push(0)),this._modelMatrixCol0.push(t[0]),this._modelMatrixCol0.push(t[4]),this._modelMatrixCol0.push(t[8]),this._modelMatrixCol0.push(t[12]),this._modelMatrixCol1.push(t[1]),this._modelMatrixCol1.push(t[5]),this._modelMatrixCol1.push(t[9]),this._modelMatrixCol1.push(t[13]),this._modelMatrixCol2.push(t[2]),this._modelMatrixCol2.push(t[6]),this._modelMatrixCol2.push(t[10]),this._modelMatrixCol2.push(t[14]),this._pickColors.push(i[0]),this._pickColors.push(i[1]),this._pickColors.push(i[2]),this._pickColors.push(i[3]),p.collapseAABB3(s);const r=this._state.obb,o=r.length;for(let e=0;e0){let i=!1;s.flagsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(i.positionsCompressed&&i.positionsCompressed.length>0){const t=!1;s.positionsBuf=new le(e,e.ARRAY_BUFFER,i.positionsCompressed,i.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=p.mat4(i.positionsDecodeMatrix)}if(i.colorsCompressed&&i.colorsCompressed.length>0){const t=new Uint8Array(i.colorsCompressed),r=!1;s.colorsBuf=new le(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,r)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new le(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new le(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";na[0]=t[0],na[1]=t[1],na[2]=t[2],this._state.colorsBuf.setData(na,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const i=!!(t&F),r=!!(t&G),o=!!(t&k),n=!!(t&V),a=!!(t&j),l=!!(t&L),h=!!(t&M);let c,A;c=!i||h||r||o&&!this.model.scene.highlightMaterial.glowThrough||n&&!this.model.scene.selectedMaterial.glowThrough?fr.NOT_RENDERED:s?fr.COLOR_TRANSPARENT:fr.COLOR_OPAQUE,A=!i||h?fr.NOT_RENDERED:n?fr.SILHOUETTE_SELECTED:o?fr.SILHOUETTE_HIGHLIGHTED:r?fr.SILHOUETTE_XRAYED:fr.NOT_RENDERED;let u=0;u=!i||h?fr.NOT_RENDERED:n?fr.EDGES_SELECTED:o?fr.EDGES_HIGHLIGHTED:r?fr.EDGES_XRAYED:a?s?fr.EDGES_COLOR_TRANSPARENT:fr.EDGES_COLOR_OPAQUE:fr.NOT_RENDERED;let p=0;p|=c,p|=A<<4,p|=u<<8,p|=(i&&!h&&l?fr.PICK:fr.NOT_RENDERED)<<12,p|=(t&U?255:0)<<16,aa[0]=p,this._state.flagsBuf.setData(aa,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(ca[0]=t[0],ca[1]=t[1],ca[2]=t[2],this._state.offsetsBuf.setData(ca,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._pointsInstancingRenderers.colorRenderer&&this._pointsInstancingRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._pointsInstancingRenderers.silhouetteRenderer&&this._pointsInstancingRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.occlusionRenderer&&this._pointsInstancingRenderers.occlusionRenderer.drawLayer(t,this,fr.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickMeshRenderer&&this._pointsInstancingRenderers.pickMeshRenderer.drawLayer(t,this,fr.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._pointsInstancingRenderers.pickDepthRenderer&&this._pointsInstancingRenderers.pickDepthRenderer.drawLayer(t,this,fr.PICK)}drawPickNormals(e,t){}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}class ua{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class pa{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const da={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};const fa=new class{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(r),this.manager.itemEnd(e)}),0),r;if(void 0!==Ea[e])return void Ea[e].push({onLoad:t,onProgress:s,onError:i});Ea[e]=[],Ea[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),n=this.mimeType,a=this.responseType;fetch(o).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=Ea[e],i=t.body.getReader(),r=t.headers.get("Content-Length"),o=r?parseInt(r):0,n=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){i.read().then((({done:i,value:r})=>{if(i)e.close();else{a+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:n,loaded:a,total:o});for(let e=0,t=s.length;e{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,n)));case"json":return e.json();default:if(void 0===n)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(n),s=t&&t[1]?t[1].toLowerCase():void 0,i=new TextDecoder(s);return e.arrayBuffer().then((e=>i.decode(e)))}}})).then((t=>{da.add(e,t);const s=Ea[e];delete Ea[e];for(let e=0,i=s.length;e{const s=Ea[e];if(void 0===s)throw this.manager.itemError(e),t;delete Ea[e];for(let e=0,i=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ya{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const i=this._getIdleWorker();-1!==i?(this._initWorker(i),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let ga=0;class Ia{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new ya,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const i=e.capabilities;this._workerConfig={astcSupported:i.astcSupported,etc1Supported:i.etc1Supported,etc2Supported:i.etc2Supported,dxtSupported:i.dxtSupported,bptcSupported:i.bptcSupported,pvrtcSupported:i.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new ma;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new ma;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const i=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,i]).then((([e,t])=>{const s=Ia.BasisWorker.toString(),i=["/* constants */","let _EngineFormat = "+JSON.stringify(Ia.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Ia.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Ia.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([i])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),ga>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),ga++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((i,r)=>{const o=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:o},e))).then((e=>{const s=e.data,{mipmaps:o,width:n,height:a,format:l,type:h,error:c,dfdTransferFn:A,dfdFlags:u}=s;if("error"===h)return r(c);t.setCompressedData({mipmaps:o,props:{format:l,minFilter:1===o.length?$t:ts,magFilter:1===o.length?$t:ts,encoding:2===A?fs:ds,premultiplyAlpha:!!(1&u)}}),i()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),ga--}}Ia.BasisFormat={ETC1S:0,UASTC_4x4:1},Ia.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Ia.EngineFormat={RGBAFormat:is,RGBA_ASTC_4x4_Format:us,RGBA_BPTC_Format:ps,RGBA_ETC2_EAC_Format:As,RGBA_PVRTC_4BPPV1_Format:hs,RGBA_S3TC_DXT5_Format:as,RGB_ETC1_Format:36196,RGB_ETC2_Format:cs,RGB_PVRTC_4BPPV1_Format:ls,RGB_S3TC_DXT1_Format:rs},Ia.BasisWorker=function(){let e,t,s;const i=_EngineFormat,r=_TranscoderFormat,o=_BasisFormat;self.addEventListener("message",(function(n){const c=n.data;switch(c.type){case"init":e=c.config,A=c.transcoderBinary,t=new Promise((e=>{s={wasmBinary:A,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:n,hasAlpha:A,mipmaps:u,format:p,dfdTransferFn:d,dfdFlags:f}=function(t){const n=new s.KTX2File(new Uint8Array(t));function c(){n.close(),n.delete()}if(!n.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const A=n.isUASTC()?o.UASTC_4x4:o.ETC1S,u=n.getWidth(),p=n.getHeight(),d=n.getLevels(),f=n.getHasAlpha(),E=n.getDFDTransferFunc(),m=n.getDFDFlags(),{transcoderFormat:y,engineFormat:g}=function(t,s,n,c){let A,u;const p=t===o.ETC1S?a:l;for(let i=0;i{for(let s=0,i=e.meshI * step, but is much more GC-friendly and actually faster than the classic O(N) * approach based in keeping a hash-based LUT to identify unique positionsCompressed. */ -let Ra=null;function Pa(e,t){let s;for(let i=0;i<3;i++)if(0!=(s=Ra[3*e+i]-Ra[3*t+i]))return s;return 0}let Da=null;function Na(e){const t=e.positionsCompressed,s=e.indices,i=e.edgeIndices;!function(e){if(!(null!==Da&&Da.length>=e)){Da=new Uint32Array(e);for(let t=0;t=e)){Ra=new Uint32Array(e);for(let t=0;t>t;s.sort(Ca);const i=new Int32Array(e.length);for(let t=0,r=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}Oa=new Int32Array(e),t.sort(Sa);const s=new Int32Array(e.length);for(let i=0,r=t.length;it){let s=e;e=t,t=s}function s(s,i){return s!==e?e-s:i!==t?t-i:0}let i=0,r=(o.length>>1)-1;for(;i<=r;){const e=r+i>>1,t=s(o[2*e],o[2*e+1]);if(t>0)i=e+1;else{if(!(t<0))return e;r=e-1}}return-i-1}const a=new Int32Array(o.length/2);a.fill(0);const l=i.length/3;if(l>8*(1<u.maxNumPositions&&(u=A()),u.bucketNumber>8)return[e];let d;-1===h[l]&&(h[l]=u.numPositions++,u.positionsCompressed.push(i[3*l]),u.positionsCompressed.push(i[3*l+1]),u.positionsCompressed.push(i[3*l+2])),-1===h[c]&&(h[c]=u.numPositions++,u.positionsCompressed.push(i[3*c]),u.positionsCompressed.push(i[3*c+1]),u.positionsCompressed.push(i[3*c+2])),-1===h[p]&&(h[p]=u.numPositions++,u.positionsCompressed.push(i[3*p]),u.positionsCompressed.push(i[3*p+1]),u.positionsCompressed.push(i[3*p+2])),u.indices.push(h[l]),u.indices.push(h[c]),u.indices.push(h[p]),(d=n(l,c))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(l,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(c,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]]))}const p=t/8*2,d=t/8,f=2*i.length+(r.length+o.length)*p;let E=0,m=-i.length/3;return c.forEach((e=>{E+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*d,m+=e.positionsCompressed.length/3})),E>f?[e]:(s&&function(e,t){const s={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,o=e.positionsCompressed;for(let e=0,i=t.length;e0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uRenderPass=i.getLocation("renderPass"),this._uLightAmbient=i.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const r=s.lights;let o;for(let e=0,t=r.length;e0;let r;const o=[];o.push("#version 300 es"),o.push("// TrianglesDataTextureColorRenderer vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("uniform mat4 sceneModelWorldMatrix;"),o.push("uniform mat4 viewMatrix;"),o.push("uniform mat4 projMatrix;"),o.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),o.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),o.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),o.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),o.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),o.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),o.push("uniform highp sampler2D uTextureModelMatrices;"),o.push("uniform vec3 uCameraEyeRtc;"),o.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("out float isPerspective;")),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),o.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),o.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),o.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),o.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),o.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),o.push("if (int(flags.x) != renderPass) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("} else {"),o.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),o.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),o.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),o.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),o.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),o.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),o.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),o.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),o.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),o.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),o.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),o.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),o.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),o.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),o.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),o.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),o.push("if (color.a == 0u) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("};"),o.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),o.push("vec3 position;"),o.push("position = positions[gl_VertexID % 3];"),o.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),o.push("if (solid != 1u) {"),o.push("if (isPerspectiveMatrix(projMatrix)) {"),o.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),o.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("} else {"),o.push("if (viewNormal.z < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("}"),o.push("}"),o.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),o.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),o.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureColorRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ga=new Float32Array([1,1,1]),ka=p.vec3(),Va=p.vec3(),ja=p.vec3(),Qa=p.vec3(),Wa=p.mat4();class za{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=o,d=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=ka;if(h){const t=Va;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,Wa),E=ja,E[0]=r.eye[0]-e[0],E[1]=r.eye[1]-e[1],E[2]=r.eye[2]-e[2]}else f=d,E=r.eye;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===pr.SILHOUETTE_XRAYED){const e=i.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===pr.SILHOUETTE_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===pr.SILHOUETTE_SELECTED){const e=i.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,Ga);if(i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = color;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ka=new Float32Array([0,0,0,1]),Ya=p.vec3(),Xa=p.vec3();p.vec3();const Za=p.vec3(),qa=p.mat4();class Ja{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Ya;if(E){const t=Xa;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,qa)}else f=d;if(n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s===pr.EDGES_XRAYED){const e=r.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===pr.EDGES_HIGHLIGHTED){const e=r.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===pr.EDGES_SELECTED){const e=r.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,Ka);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const $a=p.vec3(),el=p.vec3(),tl=p.vec3(),sl=p.mat4();class il{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=$a;if(E){const t=el;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,sl)}else f=d;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureEdgesColorRenderer"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const rl=p.vec3(),ol=p.vec3(),nl=p.vec3(),al=p.mat4();class ll{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i;let d,f;l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=rl;if(E){const t=p.transformPoint3(A,h,ol);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=S(o.viewMatrix,e,al),f=nl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=o.viewMatrix,f=o.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outPickColor = vPickColor; "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const hl=p.vec3(),cl=p.vec3(),Al=p.vec3(),ul=p.vec3(),pl=p.mat4();class dl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=e.pickViewMatrix||o.viewMatrix;let f,E;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const t=hl;if(h){const e=cl;p.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],f=S(d,t,pl),E=Al,E[0]=o.eye[0]-t[0],E[1]=o.eye[1]-t[1],E[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=d,E=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform1f(this._uPickZNear,e.pickZNear),n.uniform1f(this._uPickZFar,e.pickZFar),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),r.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outPackedDepth = packDepth(zNormalizedDepth); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const fl=p.vec3(),El=p.vec3(),ml=p.vec3(),yl=p.vec3(),gl=p.vec3(),Il=p.mat4();class vl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=fl;let m,y;E[0]=p.safeInv(d[3]-d[0])*p.MAX_INT,E[1]=p.safeInv(d[4]-d[1])*p.MAX_INT,E[2]=p.safeInv(d[5]-d[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(E[0]),e.snapPickCoordinateScale[1]=p.safeInv(E[1]),e.snapPickCoordinateScale[2]=p.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=El;if(g){const e=p.transformPoint3(A,h,ml);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=S(f,t,Il),y=yl,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(T,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(T,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(T,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Tl=p.vec3(),_l=p.vec3(),Rl=p.vec3(),Pl=p.vec3(),Dl=p.vec3(),Nl=p.mat4();class bl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=Tl;let m,y;E[0]=p.safeInv(d[3]-d[0])*p.MAX_INT,E[1]=p.safeInv(d[4]-d[1])*p.MAX_INT,E[2]=p.safeInv(d[5]-d[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(E[0]),e.snapPickCoordinateScale[1]=p.safeInv(E[1]),e.snapPickCoordinateScale[2]=p.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=_l;if(g){const e=Rl;p.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=S(f,t,Nl),y=Pl,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this._uVectorA,e.snapVectorA),n.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Cl=p.vec3();class Ol{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin;this._program||this._allocate(t),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureCameraMatrices,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);let c=o.eye;e.pickViewMatrix&&(l.bindPickCameraTexture(this._program,this._uTextureCameraMatrices),c=e.pickOrigin||c);const A=[c[0]-h[0],c[1]-h[1],c[2]-h[2]];if(n.uniform3fv(this._uCameraEyeRtc,A),n.uniform1i(this._uRenderPass,s),n.uniform3fv(this._uCameraEyeRtc,A),n.uniform1i(this._uPickInvisible,e.pickInvisible),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const u=r._sectionPlanesState.sectionPlanes.length;if(u>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*u,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick normals vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureCameraMatrices;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("mat4 viewMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 0), 0));"),s.push("mat4 projMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 2), 0));"),s.push("mat4 worldMatrix = mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("normal = -normal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("normal = -normal;"),s.push("}"),s.push("}"),s.push("}"),s.push("normal = -normal;"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldNormal = normal.xyz;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.w;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick normals fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outNormal = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Sl=p.vec3(),xl=p.vec3(),wl=p.vec3(),Bl=p.vec3(),Fl=p.mat4();class Ml{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=e.pickViewMatrix||o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=Sl;if(h){const t=xl;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,Fl),E=wl,E[0]=o.eye[0]-e[0],E[1]=o.eye[1]-e[1],E[2]=o.eye[2]-e[2]}else f=d,E=o.eye;n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ll=p.vec3(),Ul=p.vec3(),Hl=p.vec3(),Gl=p.vec3(),kl=p.mat4();class Vl{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Ll;if(E){const t=p.transformPoint3(A,h,Ul);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=S(r.viewMatrix,e,kl),f=Hl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// Triangles dataTexture draw vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out highp vec2 vHighPrecisionZW;"),s&&(i.push("out vec4 vWorldPosition;"),i.push("flat out uint vFlags2;")),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.x) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags2 = flags2.r;")),i.push("gl_Position = clipPos;"),i.push("vHighPrecisionZW = gl_Position.zw;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in highp vec2 vHighPrecisionZW;"),i.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const jl=p.vec3(),Ql=p.vec3(),Wl=p.vec3(),zl=p.vec3(),Kl=p.mat4();class Yl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const E=0!==l[0]||0!==l[1]||0!==l[2],m=0!==h[0]||0!==h[1]||0!==h[2];if(E||m){const e=jl;if(E){const t=Ql;p.transformPoint3(c,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=h[0],e[1]+=h[1],e[2]+=h[2],d=S(u,e,Kl),f=Wl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=u,f=o.eye;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniformMatrix4fv(this._uViewNormalMatrix,!1,o.viewNormalMatrix),n.uniformMatrix4fv(this._uWorldNormalMatrix,!1,i.worldNormalMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&X.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),X.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(X.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&X.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&X.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in vec4 vFlags2;");for(let e=0;e 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&X.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Xl=p.vec3();class Zl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin;this._program||this._allocate(t),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),this._program.bindTexture(this._uTexturePerObjectIdPositionsDecodeMatrix,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerObjectIdPositionsDecodeMatrix),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},1),this._program.bindTexture(this._uTexturePerVertexIdCoordinates,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerVertexIdCoordinates),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},2),this._program.bindTexture(this._uTexturePerObjectIdColorsAndFlags,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerObjectIdColorsAndFlags),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},3),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uWorldMatrix,!1,i.worldMatrix);const h=e.pickViewMatrix||o.viewMatrix,c=l?S(h,l):h;if(n.uniformMatrix4fv(this._uViewMatrix,!1,c),n.uniformMatrix4fv(this._uProjMatrix,!1,e.pickProjMatrix),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const A=r._sectionPlanesState.sectionPlanes.length;if(A>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*A,o=i.renderFlags;for(let t=0;t0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds8Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices8Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds16Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices16Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(this._program.bindTexture(this._uTexturePerPolygonIdPortionIds,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdPortionIds32Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},4),this._program.bindTexture(this._uTexturePerPolygonIdIndices,{bind:function(e){return n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,a.texturePerPolygonIdIndices32Bits),!0},unbind:function(e){n.activeTexture(n["TEXTURE"+e]),n.bindTexture(n.TEXTURE_2D,null)}},5),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick flat normals vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in uvec3 packedVertexId;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform bool pickInvisible;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform isampler2D uTexturePerPolygonIdNormals;"),s.push("uniform usampler2D uTexturePerPolygonIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out int vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_normal_index = polygonIndex & 4095;"),s.push("int v_normal_index = polygonIndex >> 12;"),s.push("int h_packed_object_id_index = ((polygonIndex >> 3) / 2) & 4095;"),s.push("int v_packed_object_id_index = ((polygonIndex >> 3) / 2) >> 12;"),s.push("ivec3 packedObjectId = ivec3(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).rgb);"),s.push("int objectIndex;"),s.push("if (((polygonIndex >> 3) % 2) == 0) {"),s.push(" objectIndex = (packedObjectId.r << 4) + (packedObjectId.g >> 4);"),s.push("} else {"),s.push(" objectIndex = ((packedObjectId.g & 15) << 8) + packedObjectId.b;"),s.push("}"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("int h_index = polygonIndex & 4095;"),s.push("int v_index = polygonIndex >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position1 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("vec3 position2 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("vec3 position3 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(position3 - position1, position2 - position1));"),s.push("int vertexNumber = gl_VertexID % 3;"),s.push("vec3 position;"),s.push("if (vertexNumber == 0) position = position1;"),s.push("else if (vertexNumber == 1) position = position2;"),s.push("else position = position3;"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags2 = flags2.r;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick flat normals fragment shader"),i.push("#extension GL_OES_standard_derivatives : enable"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("in int vFlags2;");for(var r=0;r 0;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(" outNormal = vec4((worldNormal * 0.5) + 0.5, 1.0);"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class ql{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._vertexDepthRenderer&&!this._vertexDepthRenderer.getValid()&&(this._vertexDepthRenderer.destroy(),this._vertexDepthRenderer=null),this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ha(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Ha(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO||(this._colorQualityRendererWithSAO=new TrianglesDataTextureColorQualityRenderer(this._scene,!0)),this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new za(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Vl(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Yl(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Ja(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new il(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ll(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ol(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Zl(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new dl(this._scene)),this._pickDepthRenderer}get vertexDepthRenderer(){return this._vertexDepthRenderer||(this._vertexDepthRenderer=new vl(this._scene)),this._vertexDepthRenderer}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new bl(this._scene)),this._snapDepthBufInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Ml(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._vertexDepthRenderer&&this._vertexDepthRenderer.destroy(),this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const Jl={};class $l{constructor(){this.positionsCompressed=[],this.metallicRoughness=[],this.indices8Bits=[],this.indices16Bits=[],this.indices32Bits=[],this.edgeIndices8Bits=[],this.edgeIndices16Bits=[],this.edgeIndices32Bits=[],this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class eh{constructor(){this.texturePerObjectIdColorsAndFlags=null,this.texturePerObjectIdOffsets=null,this.texturePerObjectIdPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,i,r,o){this.texturePerObjectIdPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectIdColorsAndFlags.bindTexture(e,i,3),this.textureModelMatrices.bindTexture(e,r,4),this.texturePerObjectIdOffsets.bindTexture(e,o,5)}bindPickCameraTexture(e,t){}bindTriangleIndicesTextures(e,t,s,i){this.indicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,6),this.indicesPerBitnessTextures[i].bindTexture(e,s,7)}bindEdgeIndicesTextures(e,t,s,i){this.edgeIndicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,6),this.edgeIndicesPerBitnessTextures[i].bindTexture(e,s,7)}}class th{constructor(e,t,s,i,r=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=i,this._textureData=r}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const sh={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(sh,null,4));let e=0;Object.keys(sh).forEach((t=>{t.startsWith("size")&&(e+=sh[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/sh.totalPolygons).toFixed(2)}`);let t={};Object.keys(sh).forEach((s=>{s.startsWith("size")&&(t[s]=`${(sh[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ih{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateCameraDataTexture(e,t,s,i){const r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,3),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null);const o=new th(e,r,4,3);let n=!0;o.updateViewMatrix=(s,r)=>{e.bindTexture(e.TEXTURE_2D,o._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(i?S(s,i):s)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.viewNormalMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,2,4,1,e.RGBA,e.FLOAT,new Float32Array(r))};const a=()=>{n&&(n=!1,o.updateViewMatrix(t.viewMatrix,t.project.matrix))};return t.on("matrix",(()=>n=!0)),s.on("rendering",a),a(),o}generatePickCameraDataTexture(e,t,s){const i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,3),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null);const r=new th(e,i,4,3);return r.updateViewMatrix=(i,o)=>{e.bindTexture(e.TEXTURE_2D,r._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(s?S(i,s):i)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.viewNormalMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,2,4,1,e.RGBA,e.FLOAT,new Float32Array(o))},r}generateModelTexture(e,t){const s=e.createTexture();return e.bindTexture(e.TEXTURE_2D,s),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA32F,4,2),e.texSubImage2D(e.TEXTURE_2D,0,0,0,4,1,e.RGBA,e.FLOAT,new Float32Array(t.worldMatrix)),e.texSubImage2D(e.TEXTURE_2D,0,0,1,4,1,e.RGBA,e.FLOAT,new Float32Array(t.worldNormalMatrix)),this.disableBindedTextureFiltering(e),e.bindTexture(e.TEXTURE_2D,null),new th(e,s,4,2)}generateTextureForColorsAndFlags(e,t,s,i,r,o,n){const a=t.length;this.numPortions=a;const l=4096,h=Math.ceil(a/512);if(0===h)throw"texture height===0";const c=new Uint8Array(16384*h);sh.sizeDataColorsAndFlags+=c.byteLength,sh.numberOfTextures++;for(let e=0;e>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+16),c.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+20),c.set([o[e]>>24&255,o[e]>>16&255,o[e]>>8&255,255&o[e]],32*e+24),c.set([n[e]?1:0,0,0,0],32*e+28);const A=e.createTexture();return e.bindTexture(e.TEXTURE_2D,A),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,h),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,h,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new th(e,A,l,h,c)}generateTextureForObjectOffsets(e,t){const s=512,i=Math.ceil(t/s);if(0===i)throw"texture height===0";const r=new Float32Array(1536*i).fill(0);sh.sizeDataTextureOffsets+=r.byteLength,sh.numberOfTextures++;const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,i),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,i,e.RGB,e.FLOAT,r,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new th(e,o,s,i,r)}generateTextureForPositionsDecodeMatrices(e,t,s){const i=t.length;if(0===i)throw"num decode+entity matrices===0";const r=2048,o=Math.ceil(i/512),n=new Float32Array(8192*o);sh.sizeDataPositionDecodeMatrices+=n.byteLength,sh.numberOfTextures++;const a=p.mat4();for(let e=0;e{s._compile()})),e.on("destroyed",(()=>{delete Jl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new $l,this._dataTextureState=new eh,this._dataTextureGenerator=new ih,this._state=new be({origin:p.vec3(t.origin),metallicRoughnessBuf:null,positionsDecodeMatrix:p.mat4(),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this.aabb=p.collapseAABB3(),this._numUpdatesInFrame=0,this._finalized=!1}canCreatePortion(e){if(this._finalized)throw"Already finalized";const t=e.buckets.length;this._numPortions+t>65536&&sh.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const i=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[i]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let i=0,r=0;e.buckets.forEach((e=>{i+=e.positionsCompressed.length/3,r+=e.indices.length/3})),(this._state.numVertices+i>16777216||t+r>16777216)&&sh.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+i<=16777216&&t+r<=16777216}return s}createPortion(e){if(this._finalized)throw"Already finalized";const t=[],s=e.worldAABB;e.buckets.forEach(((i,r)=>{const o=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#${r}`:`${e.id}#${r}`;let n=this._bucketGeometries[o];n||(n=this._createBucketGeometry(e,i),this._bucketGeometries[o]=n);const a=p.collapseAABB3(lh),l=this._createSubPortion(e,n,i,a);p.expandAABB3(s,a),t.push(l)}));const i=this._state.origin;0===i[0]&&0===i[1]&&0===i[2]||(s[0]+=i[0],s[1]+=i[1],s[2]+=i[2],s[3]+=i[0],s[4]+=i[1],s[5]+=i[2]),p.expandAABB3(this.aabb,s);const r=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(t),this.model.numPortions++,r}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;sh.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;sh.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,i=t.indices,r=t.edgeIndices,o=this._buffer,n=o.positionsCompressed.length/3,a=s.length/3;for(let e=0,t=s.length;e0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=h.perTriangleNumberPortionId8Bits,c.numIndices8Bits+=s,sh.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=h.perTriangleNumberPortionId16Bits,c.numIndices16Bits+=s,sh.totalPolygons16Bits+=t.numTriangles):(e=h.perTriangleNumberPortionId32Bits,c.numIndices32Bits+=s,sh.totalPolygons32Bits+=t.numTriangles),sh.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=h.perEdgeNumberPortionId8Bits,c.numEdgeIndices8Bits+=s,sh.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=h.perEdgeNumberPortionId16Bits,c.numEdgeIndices16Bits+=s,sh.totalEdges16Bits+=t.numEdges):(e=h.perEdgeNumberPortionId32Bits,c.numEdgeIndices32Bits+=s,sh.totalEdges32Bits+=t.numEdges),sh.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId32Bits)),i.indices8Bits.length>0&&(t.texturePerPolygonIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,i.indices8Bits)),i.indices16Bits.length>0&&(t.texturePerPolygonIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,i.indices16Bits)),i.indices32Bits.length>0&&(t.texturePerPolygonIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,i.indices32Bits)),i.edgeIndices8Bits.length>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(s,i.edgeIndices8Bits)),i.edgeIndices16Bits.length>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(s,i.edgeIndices16Bits)),i.edgeIndices32Bits.length>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(s,i.edgeIndices32Bits)),this.model._modelMatricesTexture||(this.model._modelMatricesTexture=this._dataTextureGenerator.generateModelTexture(s,this.model)),t.textureModelMatrices=this.model._modelMatricesTexture,t.cameraTexture=this._dataTextureGenerator.generateCameraDataTexture(this.model.scene.canvas.gl,this.model.scene.camera,this.model.scene,this._state.origin.slice()),t.textureCameraMatrices=t.cameraTexture,t.texturePickCameraMatrices=this._dataTextureGenerator.generatePickCameraDataTexture(this.model.scene.canvas.gl,this.model.scene.camera,this._state.origin.slice()),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(console.info("_uploadDeferredFlags"),this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdColorsAndFlags._textureWidth,t.texturePerObjectIdColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectIdColorsAndFlags._textureData),e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdOffsets._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdOffsets._textureWidth,t.texturePerObjectIdOffsets._textureHeight,e.RGB,e.FLOAT,t.texturePerObjectIdOffsets._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdColorsAndFlags._texture),i.texSubImage2D(i.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,i.RGBA_INTEGER,i.UNSIGNED_BYTE,nh)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,i=!1){const r=this._portionToSubPortionsMap[e];for(let e=0,o=r.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetFlags set flags write through"),d.bindTexture(d.TEXTURE_2D,p.texturePerObjectIdColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,nh)}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetFlags2 set flags write through"),o.bindTexture(o.TEXTURE_2D,r.texturePerObjectIdColorsAndFlags._texture),o.texSubImage2D(o.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,o.RGBA_INTEGER,o.UNSIGNED_BYTE,nh))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdOffsets._texture),i.texSubImage2D(i.TEXTURE_2D,0,0,e,1,1,i.RGB,i.FLOAT,ah))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._dataTextureRenderers.colorRendererWithSAO&&this._dataTextureRenderers.colorRendererWithSAO.drawLayer(t,this,pr.COLOR_OPAQUE):this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,pr.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.depthRenderer&&this._dataTextureRenderers.depthRenderer.drawLayer(t,this,pr.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.normalsRenderer&&this._dataTextureRenderers.normalsRenderer.drawLayer(t,this,pr.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,pr.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,pr.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,pr.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,pr.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,pr.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,pr.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.occlusionRenderer&&this._dataTextureRenderers.occlusionRenderer.drawLayer(t,this,pr.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.shadowRenderer&&this._dataTextureRenderers.shadowRenderer.drawLayer(t,this,pr.COLOR_OPAQUE))}setPickMatrices(e,t){0!==this._numVisibleLayerPortions&&this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(e,t)}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickMeshRenderer&&this._dataTextureRenderers.pickMeshRenderer.drawLayer(t,this,pr.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickDepthRenderer&&this._dataTextureRenderers.pickDepthRenderer.drawLayer(t,this,pr.PICK))}drawSnapInitDepthBuf(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.snapDepthBufInitRenderer&&this._dataTextureRenderers.snapDepthBufInitRenderer.drawLayer(t,this,pr.PICK))}drawSnapDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.vertexDepthRenderer&&this._dataTextureRenderers.vertexDepthRenderer.drawLayer(t,this,pr.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickNormalsRenderer&&this._dataTextureRenderers.pickNormalsRenderer.drawLayer(t,this,pr.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const uh=p.vec3();p.mat4();const ph=p.vec3([1,1,1]),dh=p.vec3([0,0,0]),fh=p.vec3([0,0,0]),Eh=p.identityQuaternion(),mh=p.identityMat4(),yh="defaultColorTexture",gh="defaultMetalRoughTexture",Ih="defaultNormalsTexture",vh="defaultEmissiveTexture",Th="defaultOcclusionTexture",_h="defaultTextureSet",Rh=new Uint8Array([255,255,255]);class Ph extends C{constructor(e,t={}){super(e,t),this._dtxEnabled=this.scene.dtxEnabled&&!1!==t.dtxEnabled,this._enableVertexWelding=!1,this._enableIndexBucketing=!0,this._vboBatchingLayerScratchMemory=(ur++,Ar),this._textureTranscoder=t.textureTranscoder||function(e){const t=e.scene.id;let s=_a[t];return s||(s=new Ta({viewer:e}),_a[t]=s,e.scene.on("destroyed",(()=>{delete _a[t],s.destroy()}))),s}(this.scene.viewer),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this._aabb=p.collapseAABB3(),this._aabbDirty=!0,this._quantizationRanges={},this._vboInstancingLayers={},this._vboBatchingLayers={},this._dtxLayers={},this._meshList=[],this.layerList=[],this._entityList=[],this._geometries={},this._dtxBuckets={},this._textures={},this._textureSets={},this._meshes={},this._entities={},this._scheduledMeshes={},this.renderFlags=new ei,this.numGeometries=0,this.numPortions=0,this.numVisibleLayerPortions=0,this.numTransparentLayerPortions=0,this.numXRayedLayerPortions=0,this.numHighlightedLayerPortions=0,this.numSelectedLayerPortions=0,this.numEdgesLayerPortions=0,this.numPickableLayerPortions=0,this.numClippableLayerPortions=0,this.numCulledLayerPortions=0,this.numEntities=0,this._numTriangles=0,this._numLines=0,this._numPoints=0,this._edgeThreshold=t.edgeThreshold||10,this._origin=p.vec3(t.origin||[0,0,0]),this._position=p.vec3(t.position||[0,0,0]),this._rotation=p.vec3(t.rotation||[0,0,0]),this._quaternion=p.vec4(t.quaternion||[0,0,0,1]),this._conjugateQuaternion=p.vec4(t.quaternion||[0,0,0,1]),t.rotation&&p.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._scale=p.vec3(t.scale||[1,1,1]),this._worldRotationMatrix=p.mat4(),this._worldRotationMatrixConjugate=p.mat4(),this._matrix=p.mat4(),this._matrixDirty=!0,this._rebuildMatrices(),this._worldNormalMatrix=p.mat4(),p.inverseMat4(this._matrix,this._worldNormalMatrix),p.transposeMat4(this._worldNormalMatrix),(t.matrix||t.position||t.rotation||t.scale||t.quaternion)&&(this._viewMatrix=p.mat4(),this._viewNormalMatrix=p.mat4(),this._viewMatrixDirty=!0,this._matrixNonIdentity=!0),this._opacity=1,this._colorize=[1,1,1],this._saoEnabled=!1!==t.saoEnabled,this._pbrEnabled=!1!==t.pbrEnabled,this._colorTextureEnabled=!1!==t.colorTextureEnabled,this._isModel=t.isModel,this._isModel&&this.scene._registerModel(this),this._onCameraViewMatrix=this.scene.camera.on("matrix",(()=>{this._viewMatrixDirty=!0})),this.scene.vfc.enabled&&(this._vfcManager=this.scene.vfc.getVFCManager(this)),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_createDefaultTextureSet(){const e=new fa({id:yh,texture:new bi({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new fa({id:gh,texture:new bi({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new fa({id:Ih,texture:new bi({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),i=new fa({id:vh,texture:new bi({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),r=new fa({id:Th,texture:new bi({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=i,this._textures.defaultOcclusionTexture=r,this._textureSets.defaultTextureSet=new da({id:_h,model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:i,occlusionTexture:r})}get isPerformanceModel(){return!0}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),p.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),p.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||mh),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),p.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),p.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),p.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),p.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0}_setLocalAABBDirty(){for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,i=t.length;e{l.setImage(h,{minFilter:s,magFilter:i,wrapS:r,wrapT:o,wrapR:n,flipY:e.flipY,encoding:a}),this.glRedraw()},h.src=e.src;break;default:this._textureTranscoder?y.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new fa({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,i,r,o,n;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(i=this._textures[e.metallicRoughnessTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(r=this._textures[e.normalsTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(o=this._textures[e.emissiveTextureId],!o)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else o=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(n=this._textures[e.occlusionTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultOcclusionTexture;const a=new da({id:t,model:this,colorTexture:s,metallicRoughnessTexture:i,normalsTexture:r,emissiveTexture:o,occlusionTexture:n});this._textureSets[t]=a}createMesh(e){if(void 0===e.id||null===e.id)return void this.error("[createMesh] SceneModel.createMesh() config missing: id");if(this._scheduledMeshes[e.id])return void this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`);if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return void this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),null;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),null;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),null;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),null;const t=!!this._dtxEnabled&&("triangles"===e.primitive||"solid"===e.primitive||"surface"===e.primitive);if(e.origin=e.origin?p.addVec3(this._origin,e.origin,p.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||ph,s=e.position||dh,i=e.rotation||fh;p.eulerToQuaternion(i,"XYZ",Eh),e.meshMatrix=p.composeMat4(s,Eh,t,p.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Zr(e.positionsDecodeBoundary,p.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=p.vec3(),s=[];w(e.positions,s,t)&&(e.positions=s,e.origin=p.addVec3(e.origin,t,t))}if(e.positions){const t=p.collapseAABB3();e.positionsDecodeMatrix=p.mat4(),p.expandAABB3Points3(t,e.positions),e.positionsCompressed=Xr(e.positions,t,e.positionsDecodeMatrix)}e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=et(e.positions,e.indices,null,2):e.edgeIndices=et(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.buckets||(e.buckets=Dh(e,this._enableVertexWelding&&this._enableIndexBucketing))}else{if(e.type=1,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):[255,255,255],e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.positions){const t=[];w(e.positions,t,uh)&&(e.positions=t,e.origin=p.addVec3(e.origin,uh,p.vec3()))}if(e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=et(e.positions,e.indices,null,2):e.edgeIndices=et(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId],!e.textureSet))return void this.error(`[createMesh] Texture set not found: ${e.textureSetId} - ensure that you create it first with createTextureSet()`)}}else{if(e.positions||e.positionsCompressed||e.indices||e.edgeIndices||e.normals||e.normalsCompressed||e.uv||e.uvCompressed||e.positionsDecodeMatrix)return void this.error("Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)");if(e.geometry=this._geometries[e.geometryId],!e.geometry)return void this.error(`[createMesh] Geometry not found: ${e.geometryId} - ensure that you create it first with createGeometry()`);if(e.origin=e.origin?p.addVec3(this._origin,e.origin,p.vec3()):this._origin,e.positionsDecodeMatrix=e.geometry.positionsDecodeMatrix,e.matrix)e.meshMatrix=e.matrix.slice();else{const t=e.scale||ph,s=e.position||dh,i=e.rotation||fh;p.eulerToQuaternion(i,"XYZ",Eh),e.meshMatrix=p.composeMat4(s,Eh,t,p.mat4())}if(!!this._dtxEnabled&&("triangles"===e.geometry.primitive||"solid"===e.geometry.primitive||"surface"===e.geometry.primitive)){e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255;let t=this._dtxBuckets[e.geometryId];t||(t=Dh(e.geometry,this._enableVertexWelding,this._enableIndexBucketing),this._dtxBuckets[e.geometryId]=t),e.buckets=t}else e.type=0,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId]),function(e){if(e.obb=p.OBB3(),e.positionsCompressed&&e.positionsCompressed.length>0){const t=p.collapseAABB3();p.expandAABB3Points3(t,e.positionsCompressed),at.decompressAABB(t,e.positionsDecodeMatrix),p.AABB3ToOBB3(t,e.obb)}else if(e.positions&&e.positions.length>0){const t=p.collapseAABB3();p.expandAABB3Points3(t,e.positions),p.AABB3ToOBB3(t,e.obb)}}(e.geometry)}e.numPrimitives=this._getNumPrimitives(e),this._vfcManager&&!this._vfcManager.finalized?this._vfcManager.addMesh(e):this._createMesh(e)}_createMesh(e){const t=new cr(this,e.id,e.color,e.opacity);t.pickId=this.scene._renderer.getPickID(t);const s=t.pickId,i=s>>24&255,r=s>>16&255,o=s>>8&255,n=255&s;switch(e.pickColor=new Uint8Array([n,o,r,i]),e.worldAABB=p.collapseAABB3(),e.aabb=e.worldAABB,e.solid="solid"===e.primitive,t.origin=p.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e);break;case 1:t.layer=this._getVBOBatchingLayer(e);break;case 0:t.layer=this._getVBOInstancingLayer(e)}t.portionId=t.layer.createPortion(e),t.aabb=e.worldAABB,t.numPrimitives=e.numPrimitives,p.expandAABB3(this._aabb,t.aabb),this._meshes[e.id]=t,this._meshList.push(t)}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,i=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,i=e.textureSetId||"-",r=e.geometryId,o=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${i}.${r}`;let n=this._vboInstancingLayers[o];if(n)return n;let a=e.textureSet;const l=e.geometry;for(;!n;)switch(l.primitive){case"triangles":case"surface":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new vn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new vn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":console.info(`[SceneModel ${this.id}]: creating LinesInstancingLayer`),n=new Hn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0});break;case"points":console.info(`[SceneModel ${this.id}]: creating PointsInstancingLayer`),n=new pa({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[o]=n,this.layerList.push(n),n}createEntity(e){if(void 0===e.id?e.id=p.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=p.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;if(this._visible&&!1!==e.visible&&(t|=F),this._pickable&&!1!==e.pickable&&(t|=L),this._culled&&!1!==e.culled&&(t|=M),this._clippable&&!1!==e.clippable&&(t|=U),this._collidable&&!1!==e.collidable&&(t|=H),this._edges&&!1!==e.edges&&(t|=j),this._xrayed&&!1!==e.xrayed&&(t|=G),this._highlighted&&!1!==e.highlighted&&(t|=k),this._selected&&!1!==e.selected&&(t|=V),e.flags=t,this._vfcManager&&!this._vfcManager.finalized){for(let t=0,s=e.meshIds.length;t{}));for(let e=0,t=this.layerList.length;ee.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,i=t.visibleLayers.length;s65536?16:8)}else n=[{positionsCompressed:i,indices:r,edgeIndices:o}];return n}const Nh=p.vec4(),bh=p.vec4(),Ch=p.vec3(),Oh=p.vec3(),Sh=p.vec3(),xh=p.vec4(),wh=p.vec4(),Bh=p.vec4();class Fh{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let i=!1;const r=this._scene.camera;if(e){const t=p.subVec3(e,r.eye,Ch);i=p.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=p.vec3();p.decomposeMat4(p.inverseMat4(this._scene.viewer.camera.viewMatrix,p.mat4()),t,p.vec4(),p.vec3());const s=p.distVec3(t,e);let i=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(i/=this._scene.camera.ortho.scale/2),x(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Li(this._scene,di({radius:i})),this._pivotSphere=new Ai(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){p.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,p.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,i=s[2],r=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*i/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*r/2);let o=t._lastBoundingClientRect;if(!o||t._canvasSizeChanged){const e=t.canvas;o=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(o.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(o.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(x(this.getPivotPos(),this._rtcCenter,this._rtcPos),p.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new ft(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=p.lookAtMat4v(e.eye,e.look,e.worldUp);p.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=p.distVec3(e.eye,s),t=p.inverseMat4(t);const i=p.transformVec3(t,this._cameraOffset),r=p.vec3();if(p.subVec3(e.eye,s,r),p.addVec3(r,i),e.zUp){const e=r[1];r[1]=r[2],r[2]=e}this._radius=p.lenVec3(r),this._polar=Math.acos(r[1]/this._radius),this._azimuth=Math.atan2(r[0],r[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=p.normalizeVec3(p.subVec3(e.look,e.eye,Mh)),s=p.cross3Vec3(t,e.worldUp,Lh);return p.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(p.distVec3(this._scene.center,t.eye)),i=t.project.transposedMatrix,r=i.subarray(8,12),o=i.subarray(12),n=[0,0,-1,1],a=p.dotVec4(n,r)/p.dotVec4(n,o),l=Hh;t.project.unproject(e,a,Gh,kh,l);const h=p.normalizeVec3(p.subVec3(l,t.eye,Mh)),c=p.addVec3(t.eye,p.mulVec3Scalar(h,s,Lh),Uh);this.setPivotPos(c)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var i=-e;const r=-t;1===s.worldUp[2]&&(i=-i),this._azimuth+=.01*-i,this._polar+=.01*r,this._polar=p.clamp(this._polar,.001,Math.PI-.001);const o=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=o[1];o[1]=o[2],o[2]=e}const n=p.lenVec3(p.subVec3(s.look,s.eye,p.vec3())),a=this.getPivotPos();p.addVec3(o,a);let l=p.lookAtMat4v(o,a,s.worldUp);l=p.inverseMat4(l);const h=p.transformVec3(l,this._cameraOffset);l[12]-=h[0],l[13]-=h[1],l[14]-=h[2];const c=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],p.subVec3(s.eye,p.mulVec3Scalar(c,n),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class jh{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=p.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._needFireEvents=!1}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1,this._needFireEvents=!1;const e=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.snapPick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapMode:this._configs.snapMode});e&&e.snappedWorldPos?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents=!0):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const t=this.pickResult.canvasPos;if(t[0]===this.pickCursorPos[0]&&t[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents=e,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents=!0):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents=!0)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!0)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new ee;e.worldPos=this.snapPickResult.snappedWorldPos,e.canvasPos=this.snapPickResult.snappedCanvasPos,"vertex"===this._configs.snapMode?e.snappedToVertex=!0:e.snappedToEdge=!0,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=!1}}destroy(){}}const Qh=p.vec2();class Wh{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController;let n,a,l,h=0,c=0,A=0,u=0,d=!1;const f=p.vec3();let E=!0;const m=this._scene.canvas.canvas,y=[];function g(e=!0){m.style.cursor="move",h=i.pointerCanvasPos[0],c=i.pointerCanvasPos[1],A=i.pointerCanvasPos[0],u=i.pointerCanvasPos[1],e&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(d=!0,f.set(o.pickResult.worldPos)):d=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(n=!0,g()):(n=!0,g(!1));break;case 2:a=!0,g();break;case 3:l=!0,s.panRightClick&&g()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!n&&!a&&!l)return;const t=e.canvas.boundary,o=t[2],A=t[3],u=i.pointerCanvasPos[0],E=i.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&a||s.panRightClick&&l){const t=u-h,s=E-c,i=e.camera;if("perspective"===i.projection){const o=Math.abs(d?p.lenVec3(p.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=1.5*t*o/A,r.panDeltaY+=1.5*s*o/A}else r.panDeltaX+=.5*i.ortho.scale*(t/A),r.panDeltaY+=.5*i.ortho.scale*(s/A)}else!n||a||l||s.planView||(s.firstPerson?(r.rotateDeltaY-=(u-h)/o*s.dragRotationRate/2,r.rotateDeltaX+=(E-c)/A*(s.dragRotationRate/4)):(r.rotateDeltaY-=(u-h)/o*(1.5*s.dragRotationRate),r.rotateDeltaX+=(E-c)/A*(1.5*s.dragRotationRate)));h=u,c=E}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&i.mouseover&&(E=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:n=!1,a=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,i=0,r=0,o=0,n=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,o+=s.scrollLeft,n+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+o-i,t[1]=e.pageY+n-r}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Qh);const s=Qh[0],i=Qh[1];Math.abs(s-A)<3&&Math.abs(i-u)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Qh,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const I=1/60;let v=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var o=null!==v?t-v:0;v=t,o>.05&&(o=.05),o{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const n=r._isKeyDownForAction(r.AXIS_VIEW_RIGHT),a=r._isKeyDownForAction(r.AXIS_VIEW_BACK),l=r._isKeyDownForAction(r.AXIS_VIEW_LEFT),h=r._isKeyDownForAction(r.AXIS_VIEW_FRONT),c=r._isKeyDownForAction(r.AXIS_VIEW_TOP),A=r._isKeyDownForAction(r.AXIS_VIEW_BOTTOM);if(!(n||a||l||h||c||A))return;const u=e.aabb,d=p.getAABB3Diag(u);p.getAABB3Center(u,zh);const f=Math.abs(d/Math.tan(t.cameraFlight.fitFOV*p.DEGTORAD)),E=1.1*d;qh.orthoScale=E,n?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldRight,f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):a?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldForward,f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):l?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldRight,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):h?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldForward,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):c?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldUp,f,Kh),Zh)),qh.look.set(zh),qh.up.set(p.normalizeVec3(p.mulVec3Scalar(o.worldForward,1,Yh),Xh))):A&&(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldUp,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(p.normalizeVec3(p.mulVec3Scalar(o.worldForward,-1,Yh)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(zh),t.cameraFlight.duration>0?t.cameraFlight.flyTo(qh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(qh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class $h{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,h=!1;const c=this._scene.canvas.canvas,A=s=>{let i;s&&s.worldPos&&(i=s.worldPos);const r=s&&s.entity?s.entity.aabb:e.aabb;if(i){const s=e.camera;p.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};c.addEventListener("mousemove",this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||h)return;const r=a.hasSubs("hover"),n=a.hasSubs("hoverOut"),c=a.hasSubs("hoverOff"),A=a.hasSubs("hoverSurface"),u=a.hasSubs("hoverSnapOrSurface");if(r||n||c||A||u)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=u,o.update(),o.pickResult){if(o.pickResult.entity){const t=o.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),a.fire("hoverEnter",o.pickResult,!0),this._lastPickedEntityId=t)}a.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&a.fire("hoverSurface",o.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),a.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}),c.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(h=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(i.mouseDownClientX=t.clientX,i.mouseDownClientY=t.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===t.which))){const t=o.pickResult;t&&t.worldPos?(n.setPivotPos(t.worldPos),n.startPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),n.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(h=!1),n.getPivoting()&&n.endPivot()}),c.addEventListener("mouseup",this._canvasMouseUpHandler=r=>{if(!s.active||!s.pointerEnabled)return;if(!(1===r.which))return;if(n.hidePivot(),Math.abs(r.clientX-i.mouseDownClientX)>3||Math.abs(r.clientY-i.mouseDownClientY)>3)return;const l=a.hasSubs("picked"),h=a.hasSubs("pickedNothing"),c=a.hasSubs("pickedSurface"),u=a.hasSubs("doublePicked"),d=a.hasSubs("doublePickedSurface"),f=a.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||u||d||f))return(l||h||c)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=c,o.update(),o.pickResult?(a.fire("picked",o.pickResult,!0),o.pickedSurface&&a.fire("pickedSurface",o.pickResult,!0)):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo,o.schedulePickSurface=c,o.update();const e=o.pickResult,r=o.pickedSurface;this._timeout=setTimeout((()=>{e?(a.fire("picked",e,!0),r&&(a.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo||u||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(a.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&a.fire("doublePickedSurface",o.pickResult,!0),s.doublePickFlyTo&&(A(o.pickResult),!s.firstPerson&&s.followPointer)){const e=o.pickResult.entity.aabb,s=p.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(a.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),s.doublePickFlyTo&&(A(),!s.firstPerson&&s.followPointer)){const s=e.aabb,i=p.getAABB3Center(s);t.pivotController.setPivotPos(i),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class ec{constructor(e,t,s,i,r){this._scene=e;const o=e.input,n=[],a=e.canvas.canvas;let l=!0;this._onSceneMouseMove=o.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=o.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&i.mouseover&&(n[t]=!0,t===o.KEY_SHIFT&&(a.style.cursor="move"))})),this._onSceneKeyUp=o.on("keyup",(i=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(n[i]=!1,i===o.KEY_SHIFT&&(a.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(a=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const h=t.cameraControl,c=a.deltaTime/1e3;if(!s.planView){const e=h._isKeyDownForAction(h.ROTATE_Y_POS,n),i=h._isKeyDownForAction(h.ROTATE_Y_NEG,n),o=h._isKeyDownForAction(h.ROTATE_X_POS,n),a=h._isKeyDownForAction(h.ROTATE_X_NEG,n),l=c*s.keyboardRotationRate;(e||i||o||a)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?r.rotateDeltaY+=l:i&&(r.rotateDeltaY-=l),o?r.rotateDeltaX+=l:a&&(r.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!n[o.KEY_CTRL]&&!n[o.KEY_ALT]){const e=h._isKeyDownForAction(h.DOLLY_BACKWARDS,n),o=h._isKeyDownForAction(h.DOLLY_FORWARDS,n);if(e||o){const n=c*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),o?r.dollyDelta-=n:e&&(r.dollyDelta+=n),l&&(i.followPointerDirty=!0,l=!1)}}const A=h._isKeyDownForAction(h.PAN_FORWARDS,n),u=h._isKeyDownForAction(h.PAN_BACKWARDS,n),p=h._isKeyDownForAction(h.PAN_LEFT,n),d=h._isKeyDownForAction(h.PAN_RIGHT,n),f=h._isKeyDownForAction(h.PAN_UP,n),E=h._isKeyDownForAction(h.PAN_DOWN,n),m=(n[o.KEY_ALT]?.3:1)*c*s.keyboardPanRate;(A||u||p||d||f||E)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),E?r.panDeltaY+=m:f&&(r.panDeltaY+=-m),d?r.panDeltaX+=-m:p&&(r.panDeltaX+=m),u?r.panDeltaZ+=m:A&&(r.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const tc=.001,sc=p.vec3();class ic{constructor(e,t,s,i,r){this._scene=e;const o=e.camera,n=t.pickController,a=t.pivotController,l=t.panController;let h=1,c=1,A=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(r.dollyDelta){i.mouseover=!0}),o.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{i.mouseover=!1,o.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{oc(e,o,i.pointerCanvasPos)}),o.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(oc(e,o,i.pointerCanvasPos),i.mouseover=!0)}),o.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function oc(e,t,s){if(e){const{x:i,y:r}=t.getBoundingClientRect();s[0]=e.clientX-i,s[1]=e.clientY-r}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const nc=function(e,t){if(e){let s=e.target,i=0,r=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class ac{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=p.vec2(),l=p.vec2(),h=p.vec2(),c=p.vec2(),A=[],u=this._scene.canvas.canvas;let d=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),u.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const r=t.touches,l=t.changedTouches;for(i.touchStartTime=Date.now(),1===r.length&&1===l.length&&(nc(r[0],a),s.followPointer&&(o.pickCursorPos=a,o.schedulePickSurface=!0,o.update(),s.planView||(o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(n.setPivotPos(o.pickResult.worldPos),!s.firstPerson&&n.startPivot()&&n.showPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),!s.firstPerson&&n.startPivot()&&n.showPivot()))));A.length{n.getPivoting()&&n.endPivot()}),u.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const n=e.canvas.boundary,a=n[2],u=n[3],E=t.touches;if(t.touches.length===d){if(1===d){nc(E[0],l),p.subVec2(l,A[0],c);const t=c[0],o=c[1];if(null!==i.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(o)>s.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),s.planView){const i=e.camera;if("perspective"===i.projection){const n=Math.abs(e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=t*n/u*s.touchPanRate,r.panDeltaY+=o*n/u*s.touchPanRate}else r.panDeltaX+=.5*i.ortho.scale*(t/u)*s.touchPanRate,r.panDeltaY+=.5*i.ortho.scale*(o/u)*s.touchPanRate}else r.rotateDeltaY-=t/a*(1*s.dragRotationRate),r.rotateDeltaX+=o/u*(1.5*s.dragRotationRate)}else if(2===d){const t=E[0],n=E[1];nc(t,l),nc(n,h);const a=p.geometricMeanVec2(A[0],A[1]),c=p.geometricMeanVec2(l,h),d=p.vec2();p.subVec2(a,c,d);const f=d[0],m=d[1],y=e.camera,g=p.distVec2([t.pageX,t.pageY],[n.pageX,n.pageY]),I=(p.distVec2(A[0],A[1])-g)*s.touchDollyRate;if(r.dollyDelta=I,Math.abs(I)<1)if("perspective"===y.projection){const t=o.pickResult?o.pickResult.worldPos:e.center,i=Math.abs(p.lenVec3(p.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);r.panDeltaX-=f*i/u*s.touchPanRate,r.panDeltaY-=m*i/u*s.touchPanRate}else r.panDeltaX-=.5*y.ortho.scale*(f/u)*s.touchPanRate,r.panDeltaY-=.5*y.ortho.scale*(m/u)*s.touchPanRate;i.pointerCanvasPos=c}for(let e=0;e{let i;s&&s.worldPos&&(i=s.worldPos);const r=s?s.entity.aabb:e.aabb;if(i){const s=e.camera;p.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};u.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null);const r=e.touches,o=e.changedTouches;if(a=Date.now(),1===r.length&&1===o.length){c=a,lc(r[0],h);const o=h[0],n=h[1],l=r[0].pageX,A=r[0].pageY;i.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(A)],canvasPos:[Math.round(o),Math.round(n)],event:e},!0),i.longTouchTimeout=null}),s.longTapTimeout)}else c=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),r=e.touches,a=e.changedTouches,u=n.hasSubs("pickedSurface");null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),0===r.length&&1===a.length&&c>-1&&t-c<150&&(A>-1&&c-A<325?(lc(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=u,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("doublePicked",o.pickResult),o.pickedSurface&&n.fire("doublePickedSurface",o.pickResult),s.doublePickFlyTo&&d(o.pickResult)):(n.fire("doublePickedNothing"),s.doublePickFlyTo&&d()),A=-1):p.distVec2(l[0],h)<4&&(lc(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=u,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("picked",o.pickResult),o.pickedSurface&&n.fire("pickedSurface",o.pickResult)):n.fire("pickedNothing"),A=t),c=-1),l.length=r.length;for(let e=0,t=r.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapMode:"vertex",snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:p.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:p.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new jh(this,this._configs),pivotController:new Vh(s,this._configs),panController:new Fh(s),cameraFlight:new nr(this,{duration:.5})},this._handlers=[new rc(this.scene,this._controllers,this._configs,this._states,this._updates),new ac(this.scene,this._controllers,this._configs,this._states,this._updates),new Wh(this.scene,this._controllers,this._configs,this._states,this._updates),new Jh(this.scene,this._controllers,this._configs,this._states,this._updates),new $h(this.scene,this._controllers,this._configs,this._states,this._updates),new hc(this.scene,this._controllers,this._configs,this._states,this._updates),new ec(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new ic(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",y.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,i=s.length;e0?Ec(t):null,n=s&&s.length>0?Ec(s):null,a=e=>{if(!e)return;var t=!0;(n&&n[e.type]||o&&!o[e.type])&&(t=!1),t&&i.push(e.id);const s=e.children;if(s)for(var r=0,l=s.length;r>t;s.sort(Na);const i=new Int32Array(e.length);for(let t=0,r=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}Ca=new Int32Array(e),t.sort(Oa);const s=new Int32Array(e.length);for(let i=0,r=t.length;it){let s=e;e=t,t=s}function s(s,i){return s!==e?e-s:i!==t?t-i:0}let i=0,r=(o.length>>1)-1;for(;i<=r;){const e=r+i>>1,t=s(o[2*e],o[2*e+1]);if(t>0)i=e+1;else{if(!(t<0))return e;r=e-1}}return-i-1}const a=new Int32Array(o.length/2);a.fill(0);const l=i.length/3;if(l>8*(1<u.maxNumPositions&&(u=A()),u.bucketNumber>8)return[e];let d;-1===h[l]&&(h[l]=u.numPositions++,u.positionsCompressed.push(i[3*l]),u.positionsCompressed.push(i[3*l+1]),u.positionsCompressed.push(i[3*l+2])),-1===h[c]&&(h[c]=u.numPositions++,u.positionsCompressed.push(i[3*c]),u.positionsCompressed.push(i[3*c+1]),u.positionsCompressed.push(i[3*c+2])),-1===h[p]&&(h[p]=u.numPositions++,u.positionsCompressed.push(i[3*p]),u.positionsCompressed.push(i[3*p+1]),u.positionsCompressed.push(i[3*p+2])),u.indices.push(h[l]),u.indices.push(h[c]),u.indices.push(h[p]),(d=n(l,c))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(l,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]])),(d=n(c,p))>=0&&0===a[d]&&(a[d]=1,u.edgeIndices.push(h[o[2*d]]),u.edgeIndices.push(h[o[2*d+1]]))}const p=t/8*2,d=t/8,f=2*i.length+(r.length+o.length)*p;let E=0,m=-i.length/3;return c.forEach((e=>{E+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*d,m+=e.positionsCompressed.length/3})),E>f?[e]:(s&&function(e,t){const s={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,o=e.positionsCompressed;for(let e=0,i=t.length;e0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const i=this._program;this._uRenderPass=i.getLocation("renderPass"),this._uLightAmbient=i.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const r=s.lights;let o;for(let e=0,t=r.length;e0;let r;const o=[];o.push("#version 300 es"),o.push("// TrianglesDataTextureColorRenderer vertex shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("precision highp usampler2D;"),o.push("precision highp isampler2D;"),o.push("precision highp sampler2D;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("precision mediump usampler2D;"),o.push("precision mediump isampler2D;"),o.push("precision mediump sampler2D;"),o.push("#endif"),o.push("uniform int renderPass;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("uniform mat4 sceneModelWorldMatrix;"),o.push("uniform mat4 viewMatrix;"),o.push("uniform mat4 projMatrix;"),o.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),o.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),o.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),o.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),o.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),o.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),o.push("uniform highp sampler2D uTextureModelMatrices;"),o.push("uniform vec3 uCameraEyeRtc;"),o.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("out float isPerspective;")),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),o.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),o.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),o.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),o.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),o.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),o.push("if (int(flags.x) != renderPass) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("} else {"),o.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),o.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),o.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),o.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),o.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),o.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),o.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),o.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),o.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),o.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),o.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),o.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),o.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),o.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),o.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),o.push("if (color.a == 0u) {"),o.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),o.push(" return;"),o.push("};"),o.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),o.push("vec3 position;"),o.push("position = positions[gl_VertexID % 3];"),o.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),o.push("if (solid != 1u) {"),o.push("if (isPerspectiveMatrix(projMatrix)) {"),o.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),o.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("} else {"),o.push("if (viewNormal.z < 0.0) {"),o.push("position = positions[2 - (gl_VertexID % 3)];"),o.push("viewNormal = -viewNormal;"),o.push("}"),o.push("}"),o.push("}"),o.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),o.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),o.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureColorRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(i.push(" float viewportWidth = uSAOParams[0];"),i.push(" float viewportHeight = uSAOParams[1];"),i.push(" float blendCutoff = uSAOParams[2];"),i.push(" float blendFactor = uSAOParams[3];"),i.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),i.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),i.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ua=new Float32Array([1,1,1]),Ha=p.vec3(),Ga=p.vec3(),ka=p.vec3(),Va=p.vec3(),ja=p.mat4();class Qa{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=o,d=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=Ha;if(h){const t=Ga;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,ja),E=ka,E[0]=r.eye[0]-e[0],E[1]=r.eye[1]-e[1],E[2]=r.eye[2]-e[2]}else f=d,E=r.eye;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===fr.SILHOUETTE_XRAYED){const e=i.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===fr.SILHOUETTE_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===fr.SILHOUETTE_SELECTED){const e=i.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,Ua);if(i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = color;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Wa=new Float32Array([0,0,0,1]),za=p.vec3(),Ka=p.vec3();p.vec3();const Ya=p.vec3(),Xa=p.mat4();class Za{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=za;if(E){const t=Ka;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,Xa)}else f=d;if(n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s===fr.EDGES_XRAYED){const e=r.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===fr.EDGES_HIGHLIGHTED){const e=r.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===fr.EDGES_SELECTED){const e=r.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;n.uniform4f(this._uColor,t[0],t[1],t[2],s)}else n.uniform4fv(this._uColor,Wa);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry edges drawing fragment shader"),e.logarithmicDepthBufferEnabled&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const qa=p.vec3(),Ja=p.vec3(),$a=p.vec3(),el=p.mat4();class tl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=o.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=qa;if(E){const t=Ja;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,el)}else f=d;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(n.LINES,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(n.LINES,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(n.LINES,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push(" vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTextureEdgesColorRenderer"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { discard; }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outColor = vColor;"),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const sl=p.vec3(),il=p.vec3(),rl=p.vec3(),ol=p.mat4();class nl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i;let d,f;l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=sl;if(E){const t=p.transformPoint3(A,h,il);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=S(o.viewMatrix,e,ol),f=rl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=o.viewMatrix,f=o.eye;if(n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),r.logarithmicDepthBufferEnabled){const e=2/(Math.log(o.project.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" outPickColor = vPickColor; "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const al=p.vec3(),ll=p.vec3(),hl=p.vec3(),cl=p.vec3(),Al=p.mat4();class ul{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=e.pickViewMatrix||o.viewMatrix;let f,E;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const t=al;if(h){const e=ll;p.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],f=S(d,t,Al),E=hl,E[0]=o.eye[0]-t[0],E[1]=o.eye[1]-t[1],E[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=d,E=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniform1f(this._uPickZNear,e.pickZNear),n.uniform1f(this._uPickZFar,e.pickZFar),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),r.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture pick depth fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("uniform float pickZNear;"),i.push("uniform float pickZFar;"),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(var r=0;r 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),i.push(" outPackedDepth = packDepth(zNormalizedDepth); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const pl=p.vec3(),dl=p.vec3(),fl=p.vec3(),El=p.vec3(),ml=p.vec3(),yl=p.mat4();class gl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=pl;let m,y;E[0]=p.safeInv(d[3]-d[0])*p.MAX_INT,E[1]=p.safeInv(d[4]-d[1])*p.MAX_INT,E[2]=p.safeInv(d[5]-d[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(E[0]),e.snapPickCoordinateScale[1]=p.safeInv(E[1]),e.snapPickCoordinateScale[2]=p.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=dl;if(g){const e=p.transformPoint3(A,h,fl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=S(f,t,yl),y=El,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this.uVectorA,e.snapVectorA),n.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),n.drawArrays(T,0,a.numEdgeIndices8Bits)),a.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),n.drawArrays(T,0,a.numEdgeIndices16Bits)),a.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),n.drawArrays(T,0,a.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Il=p.vec3(),vl=p.vec3(),Tl=p.vec3(),_l=p.vec3(),Rl=p.vec3(),Pl=p.mat4();class Dl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=t.aabb,f=e.pickViewMatrix||o.viewMatrix,E=Il;let m,y;E[0]=p.safeInv(d[3]-d[0])*p.MAX_INT,E[1]=p.safeInv(d[4]-d[1])*p.MAX_INT,E[2]=p.safeInv(d[5]-d[2])*p.MAX_INT,e.snapPickCoordinateScale[0]=p.safeInv(E[0]),e.snapPickCoordinateScale[1]=p.safeInv(E[1]),e.snapPickCoordinateScale[2]=p.safeInv(E[2]),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const g=0!==h[0]||0!==h[1]||0!==h[2],I=0!==c[0]||0!==c[1]||0!==c[2];if(g||I){const t=vl;if(g){const e=Tl;p.transformPoint3(A,h,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],m=S(f,t,Pl),y=_l,y[0]=o.eye[0]-t[0],y[1]=o.eye[1]-t[1],y[2]=o.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;n.uniform3fv(this._uCameraEyeRtc,y),n.uniform2fv(this._uVectorA,e.snapVectorA),n.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),n.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),n.uniform3fv(this._uCoordinateScaler,E),n.uniform1i(this._uRenderPass,s),n.uniform1i(this._uPickInvisible,e.pickInvisible),n.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,m),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const v=r._sectionPlanesState.sectionPlanes.length;if(v>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.z += 0.0001;"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureSnapDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,i=e.sectionPlanes.length;t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Nl=p.vec3(),Cl=p.vec3(),Ol=p.vec3(),bl=p.vec3(),Sl=p.mat4();class wl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=i,d=e.pickViewMatrix||o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,E;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets),h||0!==c[0]||0!==c[1]||0!==c[2]){const e=Nl;if(h){const t=Cl;p.transformPoint3(A,h,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],f=S(d,e,Sl),E=Ol,E[0]=o.eye[0]-e[0],E[1]=o.eye[1]-e[1],E[2]=o.eye[2]-e[2]}else f=d,E=o.eye;n.uniform3fv(this._uCameraEyeRtc,E),n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,f),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);const m=r._sectionPlanesState.sectionPlanes.length;if(m>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*m,o=i.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelWorldMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform highp sampler2D uTextureModelMatrices;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); "),s.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),s.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.sectionPlanes.length>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const xl=p.vec3(),Bl=p.vec3(),Fl=p.vec3(),Ml=p.vec3(),Ll=p.mat4();class Ul{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=xl;if(E){const t=p.transformPoint3(A,h,Bl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=S(r.viewMatrix,e,Ll),f=Fl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("positionsDecodeMatrix"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// Triangles dataTexture draw vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out highp vec2 vHighPrecisionZW;"),s&&(i.push("out vec4 vWorldPosition;"),i.push("flat out uint vFlags2;")),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.x) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s&&(i.push("vWorldPosition = worldPosition;"),i.push("vFlags2 = flags2.r;")),i.push("gl_Position = clipPos;"),i.push("vHighPrecisionZW = gl_Position.zw;"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles dataTexture draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in highp vec2 vHighPrecisionZW;"),i.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),i.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Hl=p.vec3(),Gl=p.vec3(),kl=p.vec3(),Vl=p.vec3(),jl=p.mat4();class Ql{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const i=t.model,r=i.scene,o=r.camera,n=r.canvas.gl,a=t._state,l=t._state.origin,{position:h,rotationMatrix:c,rotationMatrixConjugate:A}=i,u=o.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const E=0!==l[0]||0!==l[1]||0!==l[2],m=0!==h[0]||0!==h[1]||0!==h[2];if(E||m){const e=Hl;if(E){const t=Gl;p.transformPoint3(c,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=h[0],e[1]+=h[1],e[2]+=h[2],d=S(u,e,jl),f=kl,f[0]=o.eye[0]-e[0],f[1]=o.eye[1]-e[1],f[2]=o.eye[2]-e[2]}else d=u,f=o.eye;n.uniform1i(this._uRenderPass,s),n.uniformMatrix4fv(this._uWorldMatrix,!1,A),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),n.uniformMatrix4fv(this._uViewNormalMatrix,!1,o.viewNormalMatrix),n.uniformMatrix4fv(this._uWorldNormalMatrix,!1,i.worldNormalMatrix);const y=r._sectionPlanesState.sectionPlanes.length;if(y>0){const e=r._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,o=i.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&J.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 positionsDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),J.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(J.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&J.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push("#extension GL_EXT_frag_depth : enable"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&J.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),s){i.push("in vec4 vWorldPosition;"),i.push("in vec4 vFlags2;");for(let e=0;e 0.0);"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var r=0;r 0.0) { discard; }"),i.push(" }")}return e.logarithmicDepthBufferEnabled&&J.SUPPORTED_EXTENSIONS.EXT_frag_depth&&i.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Wl=p.vec3(),zl=p.vec3(),Kl=p.vec3(),Yl=p.vec3();p.vec4();const Xl=p.mat4();class Zl{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const i=this._scene,r=i.camera,o=t.model,n=i.canvas.gl,a=t._state,l=a.textureState,h=t._state.origin,{position:c,rotationMatrix:A,rotationMatrixConjugate:u}=o;if(!this._program&&(this._allocate(),this.errors))return;let d,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,a)),l.bindCommonTextures(this._program,this._uTexturePerObjectIdPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this._uTexturePerObjectIdColorsAndFlags,this._uTextureModelMatrices,this._uTexturePerObjectIdOffsets);const E=0!==h[0]||0!==h[1]||0!==h[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(E||m){const e=Wl;if(E){const t=p.transformPoint3(A,h,zl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],d=S(r.viewMatrix,e,Xl),f=Kl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else d=r.viewMatrix,f=r.eye;if(n.uniform2fv(this._uPickClipPos,e.pickClipPos),n.uniform2f(this._uDrawingBufferSize,n.drawingBufferWidth,n.drawingBufferHeight),n.uniformMatrix4fv(this._uSceneModelWorldMatrix,!1,u),n.uniformMatrix4fv(this._uViewMatrix,!1,d),n.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),n.uniform3fv(this._uCameraEyeRtc,f),n.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,t)}const y=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=o.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),n.drawArrays(n.TRIANGLES,0,a.numIndices8Bits)),a.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),n.drawArrays(n.TRIANGLES,0,a.numIndices16Bits)),a.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),n.drawArrays(n.TRIANGLES,0,a.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new ae(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelWorldMatrix=s.getLocation("sceneModelWorldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,i=e._sectionPlanesState.sectionPlanes.length;t0,i=[];return i.push("#version 300 es"),i.push("// trianglesDatatextureNormalsRenderer vertex shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("precision highp usampler2D;"),i.push("precision highp isampler2D;"),i.push("precision highp sampler2D;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("precision mediump usampler2D;"),i.push("precision mediump isampler2D;"),i.push("precision mediump sampler2D;"),i.push("#endif"),i.push("uniform int renderPass;"),e.entityOffsetsEnabled&&i.push("in vec3 offset;"),i.push("uniform mat4 sceneModelWorldMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"),i.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"),i.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"),i.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),i.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),i.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),i.push("uniform highp sampler2D uTextureModelMatrices;"),i.push("uniform vec3 uCameraEyeRtc;"),i.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("out float isPerspective;")),i.push("uniform vec2 pickClipPos;"),i.push("uniform vec2 drawingBufferSize;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out vec4 vWorldPosition;"),s&&i.push("flat out uint vFlags2;"),i.push("void main(void) {"),i.push("int polygonIndex = gl_VertexID / 3;"),i.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),i.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),i.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),i.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),i.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),i.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),i.push("if (int(flags.w) != renderPass) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("} else {"),i.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),i.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),i.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),i.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),i.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),i.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),i.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),i.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),i.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),i.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),i.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),i.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),i.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),i.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),i.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),i.push("if (color.a == 0u) {"),i.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),i.push(" return;"),i.push("};"),i.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),i.push("vec3 position;"),i.push("position = positions[gl_VertexID % 3];"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (solid != 1u) {"),i.push("if (isPerspectiveMatrix(projMatrix)) {"),i.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),i.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("viewNormal = -viewNormal;"),i.push("}"),i.push("} else {"),i.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"),i.push("if (viewNormal.z < 0.0) {"),i.push("position = positions[2 - (gl_VertexID % 3)];"),i.push("}"),i.push("}"),i.push("}"),i.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),i.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"),i.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"),i.push("vec4 viewPosition = viewMatrix * worldPosition; "),i.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),i.push("vWorldPosition = worldPosition;"),s&&i.push("vFlags2 = flags2.r;"),i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i.push("}"),i}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,i=[];if(i.push("#version 300 es"),i.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),i.push("in vec4 vWorldPosition;"),s){i.push("flat in uint vFlags2;");for(let e=0,s=t.sectionPlanes.length;e 0u;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,s=t.sectionPlanes.length;e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}return e.logarithmicDepthBufferEnabled&&i.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),i.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),i.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),i.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),i.push(` outNormal = ivec4(worldNormal * float(${p.MAX_INT}), 1.0);`),i.push("}"),i}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class ql{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._vertexDepthRenderer&&!this._vertexDepthRenderer.getValid()&&(this._vertexDepthRenderer.destroy(),this._vertexDepthRenderer=null),this._snapDepthBufInitRenderer&&!this._snapDepthBufInitRenderer.getValid()&&(this._snapDepthBufInitRenderer.destroy(),this._snapDepthBufInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Qa(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new nl(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new ul(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new Zl(this._scene)),this._vertexDepthRenderer||(this._vertexDepthRenderer=new gl(this._scene)),this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Dl(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new La(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new La(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Qa(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Ul(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Ql(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Za(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new tl(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new nl(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Zl(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Zl(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new ul(this._scene)),this._pickDepthRenderer}get vertexDepthRenderer(){return this._vertexDepthRenderer||(this._vertexDepthRenderer=new gl(this._scene)),this._vertexDepthRenderer}get snapDepthBufInitRenderer(){return this._snapDepthBufInitRenderer||(this._snapDepthBufInitRenderer=new Dl(this._scene)),this._snapDepthBufInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new wl(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._vertexDepthRenderer&&this._vertexDepthRenderer.destroy(),this._snapDepthBufInitRenderer&&this._snapDepthBufInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const Jl={};class $l{constructor(){this.positionsCompressed=[],this.metallicRoughness=[],this.indices8Bits=[],this.indices16Bits=[],this.indices32Bits=[],this.edgeIndices8Bits=[],this.edgeIndices16Bits=[],this.edgeIndices32Bits=[],this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class eh{constructor(){this.texturePerObjectIdColorsAndFlags=null,this.texturePerObjectIdOffsets=null,this.texturePerObjectIdPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,i,r,o){this.texturePerObjectIdPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectIdColorsAndFlags.bindTexture(e,i,3),this.texturePerObjectIdOffsets.bindTexture(e,o,4)}bindTriangleIndicesTextures(e,t,s,i){this.indicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,5),this.indicesPerBitnessTextures[i].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,i){this.edgeIndicesPortionIdsPerBitnessTextures[i].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[i].bindTexture(e,s,6)}}class th{constructor(e,t,s,i,r=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=i,this._textureData=r}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const sh={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(sh,null,4));let e=0;Object.keys(sh).forEach((t=>{t.startsWith("size")&&(e+=sh[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/sh.totalPolygons).toFixed(2)}`);let t={};Object.keys(sh).forEach((s=>{s.startsWith("size")&&(t[s]=`${(sh[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ih{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,i,r,o,n){const a=t.length;this.numPortions=a;const l=4096,h=Math.ceil(a/512);if(0===h)throw"texture height===0";const c=new Uint8Array(16384*h);sh.sizeDataColorsAndFlags+=c.byteLength,sh.numberOfTextures++;for(let e=0;e>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+16),c.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+20),c.set([o[e]>>24&255,o[e]>>16&255,o[e]>>8&255,255&o[e]],32*e+24),c.set([n[e]?1:0,0,0,0],32*e+28);const A=e.createTexture();return e.bindTexture(e.TEXTURE_2D,A),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,h),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,h,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new th(e,A,l,h,c)}generateTextureForObjectOffsets(e,t){const s=512,i=Math.ceil(t/s);if(0===i)throw"texture height===0";const r=new Float32Array(1536*i).fill(0);sh.sizeDataTextureOffsets+=r.byteLength,sh.numberOfTextures++;const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,i),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,i,e.RGB,e.FLOAT,r,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new th(e,o,s,i,r)}generateTextureForPositionsDecodeMatrices(e,t,s){const i=t.length;if(0===i)throw"num decode+entity matrices===0";const r=2048,o=Math.ceil(i/512),n=new Float32Array(8192*o);sh.sizeDataPositionDecodeMatrices+=n.byteLength,sh.numberOfTextures++;const a=p.mat4();for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Jl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new $l,this._dataTextureState=new eh,this._dataTextureGenerator=new ih,this._state=new Ce({origin:p.vec3(t.origin),metallicRoughnessBuf:null,positionsDecodeMatrix:p.mat4(),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this.aabb=p.collapseAABB3(),this._numUpdatesInFrame=0,this._finalized=!1}canCreatePortion(e){if(this._finalized)throw"Already finalized";const t=e.buckets.length;this._numPortions+t>65536&&sh.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const i=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[i]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let i=0,r=0;e.buckets.forEach((e=>{i+=e.positionsCompressed.length/3,r+=e.indices.length/3})),(this._state.numVertices+i>16777216||t+r>16777216)&&sh.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+i<=16777216&&t+r<=16777216}return s}createPortion(e){if(this._finalized)throw"Already finalized";const t=[],s=e.worldAABB;e.buckets.forEach(((i,r)=>{const o=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#${r}`:`${e.id}#${r}`;let n=this._bucketGeometries[o];n||(n=this._createBucketGeometry(e,i),this._bucketGeometries[o]=n);const a=p.collapseAABB3(lh),l=this._createSubPortion(e,n,i,a);p.expandAABB3(s,a),t.push(l)}));const i=this._state.origin;0===i[0]&&0===i[1]&&0===i[2]||(s[0]+=i[0],s[1]+=i[1],s[2]+=i[2],s[3]+=i[0],s[4]+=i[1],s[5]+=i[2]),p.expandAABB3(this.aabb,s);const r=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(t),this.model.numPortions++,r}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;sh.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;sh.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,i=t.indices,r=t.edgeIndices,o=this._buffer,n=o.positionsCompressed.length/3,a=s.length/3;for(let e=0,t=s.length;e0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=h.perTriangleNumberPortionId8Bits,c.numIndices8Bits+=s,sh.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=h.perTriangleNumberPortionId16Bits,c.numIndices16Bits+=s,sh.totalPolygons16Bits+=t.numTriangles):(e=h.perTriangleNumberPortionId32Bits,c.numIndices32Bits+=s,sh.totalPolygons32Bits+=t.numTriangles),sh.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=h.perEdgeNumberPortionId8Bits,c.numEdgeIndices8Bits+=s,sh.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=h.perEdgeNumberPortionId16Bits,c.numEdgeIndices16Bits+=s,sh.totalEdges16Bits+=t.numEdges):(e=h.perEdgeNumberPortionId32Bits,c.numEdgeIndices32Bits+=s,sh.totalEdges32Bits+=t.numEdges),sh.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dataTextureGenerator.generateTextureForPackedPortionIds(s,i.perEdgeNumberPortionId32Bits)),i.indices8Bits.length>0&&(t.texturePerPolygonIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,i.indices8Bits)),i.indices16Bits.length>0&&(t.texturePerPolygonIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,i.indices16Bits)),i.indices32Bits.length>0&&(t.texturePerPolygonIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,i.indices32Bits)),i.edgeIndices8Bits.length>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitsEdgeIndices(s,i.edgeIndices8Bits)),i.edgeIndices16Bits.length>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitsEdgeIndices(s,i.edgeIndices16Bits)),i.edgeIndices32Bits.length>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitsEdgeIndices(s,i.edgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&F&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&k&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&G&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&V&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&U&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&j&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&L&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&M&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&F?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&k?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&G?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&V?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&j?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&U?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(console.info("_uploadDeferredFlags"),this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdColorsAndFlags._textureWidth,t.texturePerObjectIdColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectIdColorsAndFlags._textureData),e.bindTexture(e.TEXTURE_2D,t.texturePerObjectIdOffsets._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectIdOffsets._textureWidth,t.texturePerObjectIdOffsets._textureHeight,e.RGB,e.FLOAT,t.texturePerObjectIdOffsets._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&M?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&L?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdColorsAndFlags._texture),i.texSubImage2D(i.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,i.RGBA_INTEGER,i.UNSIGNED_BYTE,nh)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,i=!1){const r=this._portionToSubPortionsMap[e];for(let e=0,o=r.length;e=10&&this._beginDeferredFlags(),d.bindTexture(d.TEXTURE_2D,p.texturePerObjectIdColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,nh))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),o.bindTexture(o.TEXTURE_2D,r.texturePerObjectIdColorsAndFlags._texture),o.texSubImage2D(o.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,o.RGBA_INTEGER,o.UNSIGNED_BYTE,nh))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,i=s.length;e=10&&this._beginDeferredFlags(),i.bindTexture(i.TEXTURE_2D,s.texturePerObjectIdOffsets._texture),i.texSubImage2D(i.TEXTURE_2D,0,0,e,1,1,i.RGB,i.FLOAT,ah))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._dataTextureRenderers.colorRendererWithSAO&&this._dataTextureRenderers.colorRendererWithSAO.drawLayer(t,this,fr.COLOR_OPAQUE):this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.colorRenderer&&this._dataTextureRenderers.colorRenderer.drawLayer(t,this,fr.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.depthRenderer&&this._dataTextureRenderers.depthRenderer.drawLayer(t,this,fr.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.normalsRenderer&&this._dataTextureRenderers.normalsRenderer.drawLayer(t,this,fr.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.silhouetteRenderer&&this._dataTextureRenderers.silhouetteRenderer.drawLayer(t,this,fr.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,fr.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._dataTextureRenderers.edgesColorRenderer&&this._dataTextureRenderers.edgesColorRenderer.drawLayer(t,this,fr.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,fr.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,fr.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._dataTextureRenderers.edgesRenderer&&this._dataTextureRenderers.edgesRenderer.drawLayer(t,this,fr.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.occlusionRenderer&&this._dataTextureRenderers.occlusionRenderer.drawLayer(t,this,fr.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.shadowRenderer&&this._dataTextureRenderers.shadowRenderer.drawLayer(t,this,fr.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickMeshRenderer&&this._dataTextureRenderers.pickMeshRenderer.drawLayer(t,this,fr.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickDepthRenderer&&this._dataTextureRenderers.pickDepthRenderer.drawLayer(t,this,fr.PICK))}drawSnapInitDepthBuf(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.snapDepthBufInitRenderer&&this._dataTextureRenderers.snapDepthBufInitRenderer.drawLayer(t,this,fr.PICK))}drawSnapDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.vertexDepthRenderer&&this._dataTextureRenderers.vertexDepthRenderer.drawLayer(t,this,fr.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._dataTextureRenderers.pickNormalsRenderer&&this._dataTextureRenderers.pickNormalsRenderer.drawLayer(t,this,fr.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const uh=p.vec3();p.mat4();const ph=p.vec3([1,1,1]),dh=p.vec3([0,0,0]),fh=p.vec3([0,0,0]),Eh=p.identityQuaternion(),mh=p.identityMat4(),yh="defaultColorTexture",gh="defaultMetalRoughTexture",Ih="defaultNormalsTexture",vh="defaultEmissiveTexture",Th="defaultOcclusionTexture",_h="defaultTextureSet",Rh=new Uint8Array([255,255,255]);class Ph extends O{constructor(e,t={}){super(e,t),this._dtxEnabled=this.scene.dtxEnabled&&!1!==t.dtxEnabled,this._enableVertexWelding=!1,this._enableIndexBucketing=!0,this._vboBatchingLayerScratchMemory=(dr++,pr),this._textureTranscoder=t.textureTranscoder||function(e){const t=e.scene.id;let s=va[t];return s||(s=new Ia({viewer:e}),va[t]=s,e.scene.on("destroyed",(()=>{delete va[t],s.destroy()}))),s}(this.scene.viewer),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this._aabb=p.collapseAABB3(),this._aabbDirty=!0,this._quantizationRanges={},this._vboInstancingLayers={},this._vboBatchingLayers={},this._dtxLayers={},this._meshList=[],this.layerList=[],this._entityList=[],this._geometries={},this._dtxBuckets={},this._textures={},this._textureSets={},this._meshes={},this._entities={},this._scheduledMeshes={},this.renderFlags=new Xs,this.numGeometries=0,this.numPortions=0,this.numVisibleLayerPortions=0,this.numTransparentLayerPortions=0,this.numXRayedLayerPortions=0,this.numHighlightedLayerPortions=0,this.numSelectedLayerPortions=0,this.numEdgesLayerPortions=0,this.numPickableLayerPortions=0,this.numClippableLayerPortions=0,this.numCulledLayerPortions=0,this.numEntities=0,this._numTriangles=0,this._numLines=0,this._numPoints=0,this._edgeThreshold=t.edgeThreshold||10,this._origin=p.vec3(t.origin||[0,0,0]),this._position=p.vec3(t.position||[0,0,0]),this._rotation=p.vec3(t.rotation||[0,0,0]),this._quaternion=p.vec4(t.quaternion||[0,0,0,1]),this._conjugateQuaternion=p.vec4(t.quaternion||[0,0,0,1]),t.rotation&&p.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._scale=p.vec3(t.scale||[1,1,1]),this._worldRotationMatrix=p.mat4(),this._worldRotationMatrixConjugate=p.mat4(),this._matrix=p.mat4(),this._matrixDirty=!0,this._rebuildMatrices(),this._worldNormalMatrix=p.mat4(),p.inverseMat4(this._matrix,this._worldNormalMatrix),p.transposeMat4(this._worldNormalMatrix),(t.matrix||t.position||t.rotation||t.scale||t.quaternion)&&(this._viewMatrix=p.mat4(),this._viewNormalMatrix=p.mat4(),this._viewMatrixDirty=!0,this._matrixNonIdentity=!0),this._opacity=1,this._colorize=[1,1,1],this._saoEnabled=!1!==t.saoEnabled,this._pbrEnabled=!1!==t.pbrEnabled,this._colorTextureEnabled=!1!==t.colorTextureEnabled,this._isModel=t.isModel,this._isModel&&this.scene._registerModel(this),this._onCameraViewMatrix=this.scene.camera.on("matrix",(()=>{this._viewMatrixDirty=!0})),this.scene.vfc.enabled&&(this._vfcManager=this.scene.vfc.getVFCManager(this)),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_createDefaultTextureSet(){const e=new pa({id:yh,texture:new _i({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new pa({id:gh,texture:new _i({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new pa({id:Ih,texture:new _i({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),i=new pa({id:vh,texture:new _i({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),r=new pa({id:Th,texture:new _i({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=i,this._textures.defaultOcclusionTexture=r,this._textureSets.defaultTextureSet=new ua({id:_h,model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:i,occlusionTexture:r})}get isPerformanceModel(){return!0}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),p.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),p.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||mh),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),p.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),p.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._setWorldAABBDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),p.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),p.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),p.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0}_setLocalAABBDirty(){for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,i=t.length;e{l.setImage(h,{minFilter:s,magFilter:i,wrapS:r,wrapT:o,wrapR:n,flipY:e.flipY,encoding:a}),this.glRedraw()},h.src=e.src;break;default:this._textureTranscoder?y.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new pa({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,i,r,o,n;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(i=this._textures[e.metallicRoughnessTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(r=this._textures[e.normalsTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(o=this._textures[e.emissiveTextureId],!o)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else o=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(n=this._textures[e.occlusionTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultOcclusionTexture;const a=new ua({id:t,model:this,colorTexture:s,metallicRoughnessTexture:i,normalsTexture:r,emissiveTexture:o,occlusionTexture:n});this._textureSets[t]=a}createMesh(e){if(void 0===e.id||null===e.id)return void this.error("[createMesh] SceneModel.createMesh() config missing: id");if(this._scheduledMeshes[e.id])return void this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`);if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return void this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`);if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),null;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),null;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),null;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),null;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),null;e.normals&&(e.normals=null);const t=!!this._dtxEnabled&&("triangles"===e.primitive||"solid"===e.primitive||"surface"===e.primitive);if(e.origin=e.origin?p.addVec3(this._origin,e.origin,p.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||ph,s=e.position||dh,i=e.rotation||fh;p.eulerToQuaternion(i,"XYZ",Eh),e.meshMatrix=p.composeMat4(s,Eh,t,p.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Jr(e.positionsDecodeBoundary,p.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=p.vec3(),s=[];x(e.positions,s,t)&&(e.positions=s,e.origin=p.addVec3(e.origin,t,t))}if(e.positions){const t=p.collapseAABB3();e.positionsDecodeMatrix=p.mat4(),p.expandAABB3Points3(t,e.positions),e.positionsCompressed=qr(e.positions,t,e.positionsDecodeMatrix)}e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=et(e.positions,e.indices,null,2):e.edgeIndices=et(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.buckets||(e.buckets=Dh(e,this._enableVertexWelding&&this._enableIndexBucketing))}else{if(e.type=1,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):[255,255,255],e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.positions){const t=[];x(e.positions,t,uh)&&(e.positions=t,e.origin=p.addVec3(e.origin,uh,p.vec3()))}if(e.buckets||e.edgeIndices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||(e.positions?e.edgeIndices=et(e.positions,e.indices,null,2):e.edgeIndices=et(e.positionsCompressed,e.indices,e.positionsDecodeMatrix,2)),e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId],!e.textureSet))return void this.error(`[createMesh] Texture set not found: ${e.textureSetId} - ensure that you create it first with createTextureSet()`)}}else{if(e.positions||e.positionsCompressed||e.indices||e.edgeIndices||e.normals||e.normalsCompressed||e.uv||e.uvCompressed||e.positionsDecodeMatrix)return void this.error("Mesh geometry parameters not expected when instancing a geometry (not expected: positions, positionsCompressed, indices, edgeIndices, normals, normalsCompressed, uv, uvCompressed, positionsDecodeMatrix)");if(e.geometry=this._geometries[e.geometryId],!e.geometry)return void this.error(`[createMesh] Geometry not found: ${e.geometryId} - ensure that you create it first with createGeometry()`);if(e.origin=e.origin?p.addVec3(this._origin,e.origin,p.vec3()):this._origin,e.positionsDecodeMatrix=e.geometry.positionsDecodeMatrix,e.matrix)e.meshMatrix=e.matrix.slice();else{const t=e.scale||ph,s=e.position||dh,i=e.rotation||fh;p.eulerToQuaternion(i,"XYZ",Eh),e.meshMatrix=p.composeMat4(s,Eh,t,p.mat4())}if(!!this._dtxEnabled&&("triangles"===e.geometry.primitive||"solid"===e.geometry.primitive||"surface"===e.geometry.primitive)){e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255;let t=this._dtxBuckets[e.geometryId];t||(t=Dh(e.geometry,this._enableVertexWelding,this._enableIndexBucketing),this._dtxBuckets[e.geometryId]=t),e.buckets=t}else e.type=0,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Rh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.metallic=void 0!==e.metallic&&null!==e.metallic?Math.floor(255*e.metallic):0,e.roughness=void 0!==e.roughness&&null!==e.roughness?Math.floor(255*e.roughness):255,e.textureSetId&&(e.textureSet=this._textureSets[e.textureSetId]),function(e){if(e.obb=p.OBB3(),e.positionsCompressed&&e.positionsCompressed.length>0){const t=p.collapseAABB3();p.expandAABB3Points3(t,e.positionsCompressed),at.decompressAABB(t,e.positionsDecodeMatrix),p.AABB3ToOBB3(t,e.obb)}else if(e.positions&&e.positions.length>0){const t=p.collapseAABB3();p.expandAABB3Points3(t,e.positions),p.AABB3ToOBB3(t,e.obb)}}(e.geometry)}e.numPrimitives=this._getNumPrimitives(e),this._vfcManager&&!this._vfcManager.finalized?this._vfcManager.addMesh(e):this._createMesh(e)}_createMesh(e){const t=new ur(this,e.id,e.color,e.opacity);t.pickId=this.scene._renderer.getPickID(t);const s=t.pickId,i=s>>24&255,r=s>>16&255,o=s>>8&255,n=255&s;switch(e.pickColor=new Uint8Array([n,o,r,i]),e.worldAABB=p.collapseAABB3(),e.aabb=e.worldAABB,e.solid="solid"===e.primitive,t.origin=p.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e);break;case 1:t.layer=this._getVBOBatchingLayer(e);break;case 0:t.layer=this._getVBOInstancingLayer(e)}t.portionId=t.layer.createPortion(e),t.aabb=e.worldAABB,t.numPrimitives=e.numPrimitives,p.expandAABB3(this._aabb,t.aabb),this._meshes[e.id]=t,this._meshList.push(t)}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,i=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,i=e.textureSetId||"-",r=e.geometryId,o=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${i}.${r}`;let n=this._vboInstancingLayers[o];if(n)return n;let a=e.textureSet;const l=e.geometry;for(;!n;)switch(l.primitive){case"triangles":case"surface":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new gn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`),n=new gn({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":console.info(`[SceneModel ${this.id}]: creating LinesInstancingLayer`),n=new Ln({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0});break;case"points":console.info(`[SceneModel ${this.id}]: creating PointsInstancingLayer`),n=new Aa({model:t,textureSet:a,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[o]=n,this.layerList.push(n),n}createEntity(e){if(void 0===e.id?e.id=p.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=p.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;if(this._visible&&!1!==e.visible&&(t|=F),this._pickable&&!1!==e.pickable&&(t|=L),this._culled&&!1!==e.culled&&(t|=M),this._clippable&&!1!==e.clippable&&(t|=U),this._collidable&&!1!==e.collidable&&(t|=H),this._edges&&!1!==e.edges&&(t|=j),this._xrayed&&!1!==e.xrayed&&(t|=G),this._highlighted&&!1!==e.highlighted&&(t|=k),this._selected&&!1!==e.selected&&(t|=V),e.flags=t,this._vfcManager&&!this._vfcManager.finalized){for(let t=0,s=e.meshIds.length;t{}));for(let e=0,t=this.layerList.length;ee.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,i=t.visibleLayers.length;s65536?16:8)}else n=[{positionsCompressed:i,indices:r,edgeIndices:o}];return n}const Nh=p.vec4(),Ch=p.vec4(),Oh=p.vec3(),bh=p.vec3(),Sh=p.vec3(),wh=p.vec4(),xh=p.vec4(),Bh=p.vec4();class Fh{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let i=!1;const r=this._scene.camera;if(e){const t=p.subVec3(e,r.eye,Oh);i=p.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=p.vec3();p.decomposeMat4(p.inverseMat4(this._scene.viewer.camera.viewMatrix,p.mat4()),t,p.vec4(),p.vec3());const s=p.distVec3(t,e);let i=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(i/=this._scene.camera.ortho.scale/2),w(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new wi(this._scene,hi({radius:i})),this._pivotSphere=new ni(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){p.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,p.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,i=s[2],r=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*i/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*r/2);let o=t._lastBoundingClientRect;if(!o||t._canvasSizeChanged){const e=t.canvas;o=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(o.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(o.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(w(this.getPivotPos(),this._rtcCenter,this._rtcPos),p.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new ft(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=p.lookAtMat4v(e.eye,e.look,e.worldUp);p.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=p.distVec3(e.eye,s),t=p.inverseMat4(t);const i=p.transformVec3(t,this._cameraOffset),r=p.vec3();if(p.subVec3(e.eye,s,r),p.addVec3(r,i),e.zUp){const e=r[1];r[1]=r[2],r[2]=e}this._radius=p.lenVec3(r),this._polar=Math.acos(r[1]/this._radius),this._azimuth=Math.atan2(r[0],r[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=p.normalizeVec3(p.subVec3(e.look,e.eye,Mh)),s=p.cross3Vec3(t,e.worldUp,Lh);return p.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(p.distVec3(this._scene.center,t.eye)),i=t.project.transposedMatrix,r=i.subarray(8,12),o=i.subarray(12),n=[0,0,-1,1],a=p.dotVec4(n,r)/p.dotVec4(n,o),l=Hh;t.project.unproject(e,a,Gh,kh,l);const h=p.normalizeVec3(p.subVec3(l,t.eye,Mh)),c=p.addVec3(t.eye,p.mulVec3Scalar(h,s,Lh),Uh);this.setPivotPos(c)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var i=-e;const r=-t;1===s.worldUp[2]&&(i=-i),this._azimuth+=.01*-i,this._polar+=.01*r,this._polar=p.clamp(this._polar,.001,Math.PI-.001);const o=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=o[1];o[1]=o[2],o[2]=e}const n=p.lenVec3(p.subVec3(s.look,s.eye,p.vec3())),a=this.getPivotPos();p.addVec3(o,a);let l=p.lookAtMat4v(o,a,s.worldUp);l=p.inverseMat4(l);const h=p.transformVec3(l,this._cameraOffset);l[12]-=h[0],l[13]-=h[1],l[14]-=h[2];const c=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],p.subVec3(s.eye,p.mulVec3Scalar(c,n),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class jh{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=p.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._needFireEvents=!1}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1,this._needFireEvents=!1;const e=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.snapPick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&e.snappedWorldPos?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents=!0):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const t=this.pickResult.canvasPos;if(t[0]===this.pickCursorPos[0]&&t[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents=e,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents=!0):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents=!0)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents=!0)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,cursorPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new ee;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.snappedWorldPos,e.cursorPos=this.pickCursorPos,e.canvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=!1}}destroy(){}}const Qh=p.vec2();class Wh{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController;let n,a,l,h=0,c=0,A=0,u=0,d=!1;const f=p.vec3();let E=!0;const m=this._scene.canvas.canvas,y=[];function g(e=!0){m.style.cursor="move",h=i.pointerCanvasPos[0],c=i.pointerCanvasPos[1],A=i.pointerCanvasPos[0],u=i.pointerCanvasPos[1],e&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(d=!0,f.set(o.pickResult.worldPos)):d=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const i=t.keyCode;y[i]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(n=!0,g()):(n=!0,g(!1));break;case 2:a=!0,g();break;case 3:l=!0,s.panRightClick&&g()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!n&&!a&&!l)return;const t=e.canvas.boundary,o=t[2],A=t[3],u=i.pointerCanvasPos[0],E=i.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&a||s.panRightClick&&l){const t=u-h,s=E-c,i=e.camera;if("perspective"===i.projection){const o=Math.abs(d?p.lenVec3(p.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=1.5*t*o/A,r.panDeltaY+=1.5*s*o/A}else r.panDeltaX+=.5*i.ortho.scale*(t/A),r.panDeltaY+=.5*i.ortho.scale*(s/A)}else!n||a||l||s.planView||(s.firstPerson?(r.rotateDeltaY-=(u-h)/o*s.dragRotationRate/2,r.rotateDeltaX+=(E-c)/A*(s.dragRotationRate/4)):(r.rotateDeltaY-=(u-h)/o*(1.5*s.dragRotationRate),r.rotateDeltaX+=(E-c)/A*(1.5*s.dragRotationRate)));h=u,c=E}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&i.mouseover&&(E=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:n=!1,a=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,i=0,r=0,o=0,n=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,o+=s.scrollLeft,n+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+o-i,t[1]=e.pageY+n-r}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Qh);const s=Qh[0],i=Qh[1];Math.abs(s-A)<3&&Math.abs(i-u)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Qh,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const I=1/60;let v=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var o=null!==v?t-v:0;v=t,o>.05&&(o=.05),o{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const n=r._isKeyDownForAction(r.AXIS_VIEW_RIGHT),a=r._isKeyDownForAction(r.AXIS_VIEW_BACK),l=r._isKeyDownForAction(r.AXIS_VIEW_LEFT),h=r._isKeyDownForAction(r.AXIS_VIEW_FRONT),c=r._isKeyDownForAction(r.AXIS_VIEW_TOP),A=r._isKeyDownForAction(r.AXIS_VIEW_BOTTOM);if(!(n||a||l||h||c||A))return;const u=e.aabb,d=p.getAABB3Diag(u);p.getAABB3Center(u,zh);const f=Math.abs(d/Math.tan(t.cameraFlight.fitFOV*p.DEGTORAD)),E=1.1*d;qh.orthoScale=E,n?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldRight,f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):a?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldForward,f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):l?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldRight,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):h?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldForward,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(o.worldUp)):c?(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldUp,f,Kh),Zh)),qh.look.set(zh),qh.up.set(p.normalizeVec3(p.mulVec3Scalar(o.worldForward,1,Yh),Xh))):A&&(qh.eye.set(p.addVec3(zh,p.mulVec3Scalar(o.worldUp,-f,Kh),Zh)),qh.look.set(zh),qh.up.set(p.normalizeVec3(p.mulVec3Scalar(o.worldForward,-1,Yh)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(zh),t.cameraFlight.duration>0?t.cameraFlight.flyTo(qh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(qh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class $h{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,h=!1;const c=this._scene.canvas.canvas,A=s=>{let i;s&&s.worldPos&&(i=s.worldPos);const r=s&&s.entity?s.entity.aabb:e.aabb;if(i){const s=e.camera;p.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};c.addEventListener("mousemove",this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||h)return;const r=a.hasSubs("hover"),n=a.hasSubs("hoverOut"),c=a.hasSubs("hoverOff"),A=a.hasSubs("hoverSurface"),u=a.hasSubs("hoverSnapOrSurface");if(r||n||c||A||u)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=u,o.update(),o.pickResult){if(o.pickResult.entity){const t=o.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),a.fire("hoverEnter",o.pickResult,!0),this._lastPickedEntityId=t)}a.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&a.fire("hoverSurface",o.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(a.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),a.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}),c.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(h=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(i.mouseDownClientX=t.clientX,i.mouseDownClientY=t.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===t.which))){const t=o.pickResult;t&&t.worldPos?(n.setPivotPos(t.worldPos),n.startPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),n.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(h=!1),n.getPivoting()&&n.endPivot()}),c.addEventListener("mouseup",this._canvasMouseUpHandler=r=>{if(!s.active||!s.pointerEnabled)return;if(!(1===r.which))return;if(n.hidePivot(),Math.abs(r.clientX-i.mouseDownClientX)>3||Math.abs(r.clientY-i.mouseDownClientY)>3)return;const l=a.hasSubs("picked"),h=a.hasSubs("pickedNothing"),c=a.hasSubs("pickedSurface"),u=a.hasSubs("doublePicked"),d=a.hasSubs("doublePickedSurface"),f=a.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||u||d||f))return(l||h||c)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=c,o.update(),o.pickResult?(a.fire("picked",o.pickResult,!0),o.pickedSurface&&a.fire("pickedSurface",o.pickResult,!0)):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo,o.schedulePickSurface=c,o.update();const e=o.pickResult,r=o.pickedSurface;this._timeout=setTimeout((()=>{e?(a.fire("picked",e,!0),r&&(a.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):a.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=s.doublePickFlyTo||u||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(a.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&a.fire("doublePickedSurface",o.pickResult,!0),s.doublePickFlyTo&&(A(o.pickResult),!s.firstPerson&&s.followPointer)){const e=o.pickResult.entity.aabb,s=p.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(a.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),s.doublePickFlyTo&&(A(),!s.firstPerson&&s.followPointer)){const s=e.aabb,i=p.getAABB3Center(s);t.pivotController.setPivotPos(i),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class ec{constructor(e,t,s,i,r){this._scene=e;const o=e.input,n=[],a=e.canvas.canvas;let l=!0;this._onSceneMouseMove=o.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=o.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&i.mouseover&&(n[t]=!0,t===o.KEY_SHIFT&&(a.style.cursor="move"))})),this._onSceneKeyUp=o.on("keyup",(i=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(n[i]=!1,i===o.KEY_SHIFT&&(a.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(a=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!i.mouseover)return;const h=t.cameraControl,c=a.deltaTime/1e3;if(!s.planView){const e=h._isKeyDownForAction(h.ROTATE_Y_POS,n),i=h._isKeyDownForAction(h.ROTATE_Y_NEG,n),o=h._isKeyDownForAction(h.ROTATE_X_POS,n),a=h._isKeyDownForAction(h.ROTATE_X_NEG,n),l=c*s.keyboardRotationRate;(e||i||o||a)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?r.rotateDeltaY+=l:i&&(r.rotateDeltaY-=l),o?r.rotateDeltaX+=l:a&&(r.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!n[o.KEY_CTRL]&&!n[o.KEY_ALT]){const e=h._isKeyDownForAction(h.DOLLY_BACKWARDS,n),o=h._isKeyDownForAction(h.DOLLY_FORWARDS,n);if(e||o){const n=c*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),o?r.dollyDelta-=n:e&&(r.dollyDelta+=n),l&&(i.followPointerDirty=!0,l=!1)}}const A=h._isKeyDownForAction(h.PAN_FORWARDS,n),u=h._isKeyDownForAction(h.PAN_BACKWARDS,n),p=h._isKeyDownForAction(h.PAN_LEFT,n),d=h._isKeyDownForAction(h.PAN_RIGHT,n),f=h._isKeyDownForAction(h.PAN_UP,n),E=h._isKeyDownForAction(h.PAN_DOWN,n),m=(n[o.KEY_ALT]?.3:1)*c*s.keyboardPanRate;(A||u||p||d||f||E)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),E?r.panDeltaY+=m:f&&(r.panDeltaY+=-m),d?r.panDeltaX+=-m:p&&(r.panDeltaX+=m),u?r.panDeltaZ+=m:A&&(r.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const tc=.001,sc=p.vec3();class ic{constructor(e,t,s,i,r){this._scene=e;const o=e.camera,n=t.pickController,a=t.pivotController,l=t.panController;let h=1,c=1,A=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(r.dollyDelta){i.mouseover=!0}),o.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{i.mouseover=!1,o.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{oc(e,o,i.pointerCanvasPos)}),o.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(oc(e,o,i.pointerCanvasPos),i.mouseover=!0)}),o.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function oc(e,t,s){if(e){const{x:i,y:r}=t.getBoundingClientRect();s[0]=e.clientX-i,s[1]=e.clientY-r}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const nc=function(e,t){if(e){let s=e.target,i=0,r=0;for(;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class ac{constructor(e,t,s,i,r){this._scene=e;const o=t.pickController,n=t.pivotController,a=p.vec2(),l=p.vec2(),h=p.vec2(),c=p.vec2(),A=[],u=this._scene.canvas.canvas;let d=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),u.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const r=t.touches,l=t.changedTouches;for(i.touchStartTime=Date.now(),1===r.length&&1===l.length&&(nc(r[0],a),s.followPointer&&(o.pickCursorPos=a,o.schedulePickSurface=!0,o.update(),s.planView||(o.picked&&o.pickedSurface&&o.pickResult&&o.pickResult.worldPos?(n.setPivotPos(o.pickResult.worldPos),!s.firstPerson&&n.startPivot()&&n.showPivot()):(s.smartPivot?n.setCanvasPivotPos(i.pointerCanvasPos):n.setPivotPos(e.camera.look),!s.firstPerson&&n.startPivot()&&n.showPivot()))));A.length{n.getPivoting()&&n.endPivot()}),u.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const n=e.canvas.boundary,a=n[2],u=n[3],E=t.touches;if(t.touches.length===d){if(1===d){nc(E[0],l),p.subVec2(l,A[0],c);const t=c[0],o=c[1];if(null!==i.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(o)>s.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),s.planView){const i=e.camera;if("perspective"===i.projection){const n=Math.abs(e.camera.eyeLookDist)*Math.tan(i.perspective.fov/2*Math.PI/180);r.panDeltaX+=t*n/u*s.touchPanRate,r.panDeltaY+=o*n/u*s.touchPanRate}else r.panDeltaX+=.5*i.ortho.scale*(t/u)*s.touchPanRate,r.panDeltaY+=.5*i.ortho.scale*(o/u)*s.touchPanRate}else r.rotateDeltaY-=t/a*(1*s.dragRotationRate),r.rotateDeltaX+=o/u*(1.5*s.dragRotationRate)}else if(2===d){const t=E[0],n=E[1];nc(t,l),nc(n,h);const a=p.geometricMeanVec2(A[0],A[1]),c=p.geometricMeanVec2(l,h),d=p.vec2();p.subVec2(a,c,d);const f=d[0],m=d[1],y=e.camera,g=p.distVec2([t.pageX,t.pageY],[n.pageX,n.pageY]),I=(p.distVec2(A[0],A[1])-g)*s.touchDollyRate;if(r.dollyDelta=I,Math.abs(I)<1)if("perspective"===y.projection){const t=o.pickResult?o.pickResult.worldPos:e.center,i=Math.abs(p.lenVec3(p.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);r.panDeltaX-=f*i/u*s.touchPanRate,r.panDeltaY-=m*i/u*s.touchPanRate}else r.panDeltaX-=.5*y.ortho.scale*(f/u)*s.touchPanRate,r.panDeltaY-=.5*y.ortho.scale*(m/u)*s.touchPanRate;i.pointerCanvasPos=c}for(let e=0;e{let i;s&&s.worldPos&&(i=s.worldPos);const r=s?s.entity.aabb:e.aabb;if(i){const s=e.camera;p.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:r})}else t.cameraFlight.flyTo({aabb:r})};u.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null);const r=e.touches,o=e.changedTouches;if(a=Date.now(),1===r.length&&1===o.length){c=a,lc(r[0],h);const o=h[0],n=h[1],l=r[0].pageX,A=r[0].pageY;i.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(A)],canvasPos:[Math.round(o),Math.round(n)],event:e},!0),i.longTouchTimeout=null}),s.longTapTimeout)}else c=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),r=e.touches,a=e.changedTouches,u=n.hasSubs("pickedSurface");null!==i.longTouchTimeout&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),0===r.length&&1===a.length&&c>-1&&t-c<150&&(A>-1&&c-A<325?(lc(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=u,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("doublePicked",o.pickResult),o.pickedSurface&&n.fire("doublePickedSurface",o.pickResult),s.doublePickFlyTo&&d(o.pickResult)):(n.fire("doublePickedNothing"),s.doublePickFlyTo&&d()),A=-1):p.distVec2(l[0],h)<4&&(lc(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=u,o.update(),o.pickResult?(o.pickResult.touchInput=!0,n.fire("picked",o.pickResult),o.pickedSurface&&n.fire("pickedSurface",o.pickResult)):n.fire("pickedNothing"),A=t),c=-1),l.length=r.length;for(let e=0,t=r.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:p.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:p.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new jh(this,this._configs),pivotController:new Vh(s,this._configs),panController:new Fh(s),cameraFlight:new sr(this,{duration:.5})},this._handlers=[new rc(this.scene,this._controllers,this._configs,this._states,this._updates),new ac(this.scene,this._controllers,this._configs,this._states,this._updates),new Wh(this.scene,this._controllers,this._configs,this._states,this._updates),new Jh(this.scene,this._controllers,this._configs,this._states,this._updates),new $h(this.scene,this._controllers,this._configs,this._states,this._updates),new hc(this.scene,this._controllers,this._configs,this._states,this._updates),new ec(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new ic(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",y.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,i=s.length;e0?Ec(t):null,n=s&&s.length>0?Ec(s):null,a=e=>{if(!e)return;var t=!0;(n&&n[e.type]||o&&!o[e.type])&&(t=!1),t&&i.push(e.id);const s=e.children;if(s)for(var r=0,l=s.length;r * Copyright (c) 2022 Niklas von Hertzen @@ -43,5 +43,5 @@ let Ra=null;function Pa(e,t){let s;for(let i=0;i<3;i++)if(0!=(s=Ra[3*e+i]-Ra[3*t LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var mc=function(e,t){return mc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},mc(e,t)};function yc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}mc(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var gc=function(){return gc=Object.assign||function(e){for(var t,s=1,i=arguments.length;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=55296&&r<=56319&&s>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cc=0;Cc=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Fc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Lc=0;Lc>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i0;){var n=i[--o];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var a=s;a<=i.length;){var l;if((l=i[++a])===t)return!0;if(l!==Uc)break}if(n!==Uc)break}return!1},IA=function(e,t){for(var s=e;s>=0;){var i=t[s];if(i!==Uc)return i;s--}return 0},vA=function(e,t,s,i,r){if(0===s[i])return hA;var o=i-1;if(Array.isArray(r)&&!0===r[o])return hA;var n=o-1,a=o+1,l=t[o],h=n>=0?t[n]:0,c=t[a];if(2===l&&3===c)return hA;if(-1!==pA.indexOf(l))return"!";if(-1!==pA.indexOf(c))return hA;if(-1!==dA.indexOf(c))return hA;if(8===IA(o,t))return cA;if(11===AA.get(e[o]))return hA;if((l===$c||l===eA)&&11===AA.get(e[a]))return hA;if(7===l||7===c)return hA;if(9===l)return hA;if(-1===[Uc,Hc,Gc].indexOf(l)&&9===c)return hA;if(-1!==[kc,Vc,jc,Kc,qc].indexOf(c))return hA;if(IA(o,t)===zc)return hA;if(gA(23,zc,o,t))return hA;if(gA([kc,Vc],Wc,o,t))return hA;if(gA(12,12,o,t))return hA;if(l===Uc)return cA;if(23===l||23===c)return hA;if(16===c||16===l)return cA;if(-1!==[Hc,Gc,Wc].indexOf(c)||14===l)return hA;if(36===h&&-1!==yA.indexOf(l))return hA;if(l===qc&&36===c)return hA;if(c===Qc)return hA;if(-1!==uA.indexOf(c)&&l===Yc||-1!==uA.indexOf(l)&&c===Yc)return hA;if(l===Zc&&-1!==[iA,$c,eA].indexOf(c)||-1!==[iA,$c,eA].indexOf(l)&&c===Xc)return hA;if(-1!==uA.indexOf(l)&&-1!==fA.indexOf(c)||-1!==fA.indexOf(l)&&-1!==uA.indexOf(c))return hA;if(-1!==[Zc,Xc].indexOf(l)&&(c===Yc||-1!==[zc,Gc].indexOf(c)&&t[a+1]===Yc)||-1!==[zc,Gc].indexOf(l)&&c===Yc||l===Yc&&-1!==[Yc,qc,Kc].indexOf(c))return hA;if(-1!==[Yc,qc,Kc,kc,Vc].indexOf(c))for(var A=o;A>=0;){if((u=t[A])===Yc)return hA;if(-1===[qc,Kc].indexOf(u))break;A--}if(-1!==[Zc,Xc].indexOf(c))for(A=-1!==[kc,Vc].indexOf(l)?n:o;A>=0;){var u;if((u=t[A])===Yc)return hA;if(-1===[qc,Kc].indexOf(u))break;A--}if(rA===l&&-1!==[rA,oA,tA,sA].indexOf(c)||-1!==[oA,tA].indexOf(l)&&-1!==[oA,nA].indexOf(c)||-1!==[nA,sA].indexOf(l)&&c===nA)return hA;if(-1!==mA.indexOf(l)&&-1!==[Qc,Xc].indexOf(c)||-1!==mA.indexOf(c)&&l===Zc)return hA;if(-1!==uA.indexOf(l)&&-1!==uA.indexOf(c))return hA;if(l===Kc&&-1!==uA.indexOf(c))return hA;if(-1!==uA.concat(Yc).indexOf(l)&&c===zc&&-1===lA.indexOf(e[a])||-1!==uA.concat(Yc).indexOf(c)&&l===Vc)return hA;if(41===l&&41===c){for(var p=s[o],d=1;p>0&&41===t[--p];)d++;if(d%2!=0)return hA}return l===$c&&c===eA?hA:cA},TA=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var s=function(e,t){void 0===t&&(t="strict");var s=[],i=[],r=[];return e.forEach((function(e,o){var n=AA.get(e);if(n>50?(r.push(!0),n-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(o),s.push(16);if(4===n||11===n){if(0===o)return i.push(o),s.push(Jc);var a=s[o-1];return-1===EA.indexOf(a)?(i.push(i[o-1]),s.push(a)):(i.push(o),s.push(Jc))}return i.push(o),31===n?s.push("strict"===t?Wc:iA):n===aA||29===n?s.push(Jc):43===n?e>=131072&&e<=196605||e>=196608&&e<=262141?s.push(iA):s.push(Jc):void s.push(n)})),[i,s,r]}(e,t.lineBreak),i=s[0],r=s[1],o=s[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map((function(e){return-1!==[Yc,Jc,aA].indexOf(e)?iA:e})));var n="keep-all"===t.wordBreak?o.map((function(t,s){return t&&e[s]>=19968&&e[s]<=40959})):void 0;return[i,r,n]},_A=function(){function e(e,t,s,i){this.codePoints=e,this.required="!"===t,this.start=s,this.end=i}return e.prototype.slice=function(){return Dc.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),RA=45,PA=43,DA=-1,NA=function(e){return e>=48&&e<=57},bA=function(e){return NA(e)||e>=65&&e<=70||e>=97&&e<=102},CA=function(e){return 10===e||9===e||32===e},OA=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},SA=function(e){return OA(e)||NA(e)||e===RA},xA=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},wA=function(e,t){return 92===e&&10!==t},BA=function(e,t,s){return e===RA?OA(t)||wA(t,s):!!OA(e)||!(92!==e||!wA(e,t))},FA=function(e,t,s){return e===PA||e===RA?!!NA(t)||46===t&&NA(s):NA(46===e?t:e)},MA=function(e){var t=0,s=1;e[t]!==PA&&e[t]!==RA||(e[t]===RA&&(s=-1),t++);for(var i=[];NA(e[t]);)i.push(e[t++]);var r=i.length?parseInt(Dc.apply(void 0,i),10):0;46===e[t]&&t++;for(var o=[];NA(e[t]);)o.push(e[t++]);var n=o.length,a=n?parseInt(Dc.apply(void 0,o),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;e[t]!==PA&&e[t]!==RA||(e[t]===RA&&(l=-1),t++);for(var h=[];NA(e[t]);)h.push(e[t++]);var c=h.length?parseInt(Dc.apply(void 0,h),10):0;return s*(r+a*Math.pow(10,-n))*Math.pow(10,l*c)},LA={type:2},UA={type:3},HA={type:4},GA={type:13},kA={type:8},VA={type:21},jA={type:9},QA={type:10},WA={type:11},zA={type:12},KA={type:14},YA={type:23},XA={type:1},ZA={type:25},qA={type:24},JA={type:26},$A={type:27},eu={type:28},tu={type:29},su={type:31},iu={type:32},ru=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(Pc(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==iu;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),s=this.peekCodePoint(1),i=this.peekCodePoint(2);if(SA(t)||wA(s,i)){var r=BA(t,s,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),GA;break;case 39:return this.consumeStringToken(39);case 40:return LA;case 41:return UA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),KA;break;case PA:if(FA(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return HA;case RA:var o=e,n=this.peekCodePoint(0),a=this.peekCodePoint(1);if(FA(o,n,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(BA(o,n,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===RA&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),qA;break;case 46:if(FA(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(l===DA)return this.consumeToken()}break;case 58:return JA;case 59:return $A;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===RA&&this.peekCodePoint(2)===RA)return this.consumeCodePoint(),this.consumeCodePoint(),ZA;break;case 64:var h=this.peekCodePoint(0),c=this.peekCodePoint(1),A=this.peekCodePoint(2);if(BA(h,c,A))return{type:7,value:this.consumeName()};break;case 91:return eu;case 92:if(wA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return tu;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),kA;break;case 123:return WA;case 125:return zA;case 117:case 85:var u=this.peekCodePoint(0),p=this.peekCodePoint(1);return u!==PA||!bA(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),jA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),VA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),QA;break;case DA:return iu}return CA(e)?(this.consumeWhiteSpace(),su):NA(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):OA(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Dc(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();bA(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var s=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),s=!0;if(s)return{type:30,start:parseInt(Dc.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(Dc.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var i=parseInt(Dc.apply(void 0,e),16);if(this.peekCodePoint(0)===RA&&bA(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var r=[];bA(t)&&r.length<6;)r.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(Dc.apply(void 0,r),16)}}return{type:30,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===DA)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var s=this.consumeStringToken(this.consumeCodePoint());return 0===s.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===DA||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:s.value}):(this.consumeBadUrlRemnants(),YA)}for(;;){var i=this.consumeCodePoint();if(i===DA||41===i)return{type:22,value:Dc.apply(void 0,e)};if(CA(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===DA||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:Dc.apply(void 0,e)}):(this.consumeBadUrlRemnants(),YA);if(34===i||39===i||40===i||xA(i))return this.consumeBadUrlRemnants(),YA;if(92===i){if(!wA(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),YA;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;CA(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===DA)return;wA(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var s=Math.min(5e4,e);t+=Dc.apply(void 0,this._value.splice(0,s)),e-=s}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",s=0;;){var i=this._value[s];if(i===DA||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(s)};if(10===i)return this._value.splice(0,s),XA;if(92===i){var r=this._value[s+1];r!==DA&&void 0!==r&&(10===r?(t+=this.consumeStringSlice(s),s=-1,this._value.shift()):wA(i,r)&&(t+=this.consumeStringSlice(s),t+=Dc(this.consumeEscapedCodePoint()),s=-1))}s++}},e.prototype.consumeNumber=function(){var e=[],t=4,s=this.peekCodePoint(0);for(s!==PA&&s!==RA||e.push(this.consumeCodePoint());NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(46===s&&NA(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0),i=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===s||101===s)&&((i===PA||i===RA)&&NA(r)||NA(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[MA(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],s=e[1],i=this.peekCodePoint(0),r=this.peekCodePoint(1),o=this.peekCodePoint(2);return BA(i,r,o)?{type:15,number:t,flags:s,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:t,flags:s}):{type:17,number:t,flags:s}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(bA(e)){for(var t=Dc(e);bA(this.peekCodePoint(0))&&t.length<6;)t+=Dc(this.consumeCodePoint());CA(this.peekCodePoint(0))&&this.consumeCodePoint();var s=parseInt(t,16);return 0===s||function(e){return e>=55296&&e<=57343}(s)||s>1114111?65533:s}return e===DA?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(SA(t))e+=Dc(t);else{if(!wA(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=Dc(this.consumeEscapedCodePoint())}}},e}(),ou=function(){function e(e){this._tokens=e}return e.create=function(t){var s=new ru;return s.write(t),new e(s.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},s=this.consumeToken();;){if(32===s.type||du(s,e))return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue()),s=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var s=this.consumeToken();if(32===s.type||3===s.type)return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?iu:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),nu=function(e){return 15===e.type},au=function(e){return 17===e.type},lu=function(e){return 20===e.type},hu=function(e){return 0===e.type},cu=function(e,t){return lu(e)&&e.value===t},Au=function(e){return 31!==e.type},uu=function(e){return 31!==e.type&&4!==e.type},pu=function(e){var t=[],s=[];return e.forEach((function(e){if(4===e.type){if(0===s.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(s),void(s=[])}31!==e.type&&s.push(e)})),s.length&&t.push(s),t},du=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},fu=function(e){return 17===e.type||15===e.type},Eu=function(e){return 16===e.type||fu(e)},mu=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},yu={type:17,number:0,flags:4},gu={type:16,number:50,flags:4},Iu={type:16,number:100,flags:4},vu=function(e,t,s){var i=e[0],r=e[1];return[Tu(i,t),Tu(void 0!==r?r:i,s)]},Tu=function(e,t){if(16===e.type)return e.number/100*t;if(nu(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},_u="grad",Ru="turn",Pu=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case _u:return Math.PI/200*t.number;case"rad":return t.number;case Ru:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Du=function(e){return 15===e.type&&("deg"===e.unit||e.unit===_u||"rad"===e.unit||e.unit===Ru)},Nu=function(e){switch(e.filter(lu).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[yu,yu];case"to top":case"bottom":return bu(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[yu,Iu];case"to right":case"left":return bu(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Iu,Iu];case"to bottom":case"top":return bu(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Iu,yu];case"to left":case"right":return bu(270)}return 0},bu=function(e){return Math.PI*e/180},Cu=function(e,t){if(18===t.type){var s=Lu[t.name];if(void 0===s)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return s(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);return xu(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),1)}if(4===t.value.length){i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);var n=t.value.substring(3,4);return xu(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),parseInt(n+n,16)/255)}if(6===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6);return xu(parseInt(i,16),parseInt(r,16),parseInt(o,16),1)}if(8===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6),n=t.value.substring(6,8);return xu(parseInt(i,16),parseInt(r,16),parseInt(o,16),parseInt(n,16)/255)}}if(20===t.type){var a=Hu[t.value.toUpperCase()];if(void 0!==a)return a}return Hu.TRANSPARENT},Ou=function(e){return 0==(255&e)},Su=function(e){var t=255&e,s=255&e>>8,i=255&e>>16,r=255&e>>24;return t<255?"rgba("+r+","+i+","+s+","+t/255+")":"rgb("+r+","+i+","+s+")"},xu=function(e,t,s,i){return(e<<24|t<<16|s<<8|Math.round(255*i)<<0)>>>0},wu=function(e,t){if(17===e.type)return e.number;if(16===e.type){var s=3===t?1:255;return 3===t?e.number/100*s:Math.round(e.number/100*s)}return 0},Bu=function(e,t){var s=t.filter(uu);if(3===s.length){var i=s.map(wu),r=i[0],o=i[1],n=i[2];return xu(r,o,n,1)}if(4===s.length){var a=s.map(wu),l=(r=a[0],o=a[1],n=a[2],a[3]);return xu(r,o,n,l)}return 0};function Fu(e,t,s){return s<0&&(s+=1),s>=1&&(s-=1),s<1/6?(t-e)*s*6+e:s<.5?t:s<2/3?6*(t-e)*(2/3-s)+e:e}var Mu=function(e,t){var s=t.filter(uu),i=s[0],r=s[1],o=s[2],n=s[3],a=(17===i.type?bu(i.number):Pu(e,i))/(2*Math.PI),l=Eu(r)?r.number/100:0,h=Eu(o)?o.number/100:0,c=void 0!==n&&Eu(n)?Tu(n,1):1;if(0===l)return xu(255*h,255*h,255*h,1);var A=h<=.5?h*(l+1):h+l-h*l,u=2*h-A,p=Fu(u,A,a+1/3),d=Fu(u,A,a),f=Fu(u,A,a-1/3);return xu(255*p,255*d,255*f,c)},Lu={hsl:Mu,hsla:Mu,rgb:Bu,rgba:Bu},Uu=function(e,t){return Cu(e,ou.create(t).parseComponentValue())},Hu={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Gu={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(lu(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},ku={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Vu=function(e,t){var s=Cu(e,t[0]),i=t[1];return i&&Eu(i)?{color:s,stop:i}:{color:s,stop:null}},ju=function(e,t){var s=e[0],i=e[e.length-1];null===s.stop&&(s.stop=yu),null===i.stop&&(i.stop=Iu);for(var r=[],o=0,n=0;no?r.push(l):r.push(o),o=l}else r.push(null)}var h=null;for(n=0;ne.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},Ku=function(e,t){var s=bu(180),i=[];return pu(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(s=Nu(t));if(Du(o))return void(s=(Pu(e,o)+bu(270))%bu(360))}var n=Vu(e,t);i.push(n)})),{angle:s,stops:i,type:1}},Yu="closest-side",Xu="farthest-side",Zu="closest-corner",qu="farthest-corner",Ju="circle",$u="ellipse",ep="cover",tp="contain",sp=function(e,t){var s=0,i=3,r=[],o=[];return pu(t).forEach((function(t,n){var a=!0;if(0===n?a=t.reduce((function(e,t){if(lu(t))switch(t.value){case"center":return o.push(gu),!1;case"top":case"left":return o.push(yu),!1;case"right":case"bottom":return o.push(Iu),!1}else if(Eu(t)||fu(t))return o.push(t),!1;return e}),a):1===n&&(a=t.reduce((function(e,t){if(lu(t))switch(t.value){case Ju:return s=0,!1;case $u:return s=1,!1;case tp:case Yu:return i=0,!1;case Xu:return i=1,!1;case Zu:return i=2,!1;case ep:case qu:return i=3,!1}else if(fu(t)||Eu(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)),a){var l=Vu(e,t);r.push(l)}})),{size:i,shape:s,stops:r,position:o,type:2}},ip=function(e,t){if(22===t.type){var s={url:t.value,type:0};return e.cache.addImage(t.value),s}if(18===t.type){var i=op[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)};var rp,op={"linear-gradient":function(e,t){var s=bu(180),i=[];return pu(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&"to"===o.value)return void(s=Nu(t));if(Du(o))return void(s=Pu(e,o))}var n=Vu(e,t);i.push(n)})),{angle:s,stops:i,type:1}},"-moz-linear-gradient":Ku,"-ms-linear-gradient":Ku,"-o-linear-gradient":Ku,"-webkit-linear-gradient":Ku,"radial-gradient":function(e,t){var s=0,i=3,r=[],o=[];return pu(t).forEach((function(t,n){var a=!0;if(0===n){var l=!1;a=t.reduce((function(e,t){if(l)if(lu(t))switch(t.value){case"center":return o.push(gu),e;case"top":case"left":return o.push(yu),e;case"right":case"bottom":return o.push(Iu),e}else(Eu(t)||fu(t))&&o.push(t);else if(lu(t))switch(t.value){case Ju:return s=0,!1;case $u:return s=1,!1;case"at":return l=!0,!1;case Yu:return i=0,!1;case ep:case Xu:return i=1,!1;case tp:case Zu:return i=2,!1;case qu:return i=3,!1}else if(fu(t)||Eu(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)}if(a){var h=Vu(e,t);r.push(h)}})),{size:i,shape:s,stops:r,position:o,type:2}},"-moz-radial-gradient":sp,"-ms-radial-gradient":sp,"-o-radial-gradient":sp,"-webkit-radial-gradient":sp,"-webkit-gradient":function(e,t){var s=bu(180),i=[],r=1;return pu(t).forEach((function(t,s){var o=t[0];if(0===s){if(lu(o)&&"linear"===o.value)return void(r=1);if(lu(o)&&"radial"===o.value)return void(r=2)}if(18===o.type)if("from"===o.name){var n=Cu(e,o.values[0]);i.push({stop:yu,color:n})}else if("to"===o.name){n=Cu(e,o.values[0]);i.push({stop:Iu,color:n})}else if("color-stop"===o.name){var a=o.values.filter(uu);if(2===a.length){n=Cu(e,a[1]);var l=a[0];au(l)&&i.push({stop:{type:16,number:100*l.number,flags:l.flags},color:n})}}})),1===r?{angle:(s+bu(180))%bu(360),stops:i,type:r}:{size:3,shape:0,stops:i,position:[],type:r}}},np={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var s=t[0];return 20===s.type&&"none"===s.value?[]:t.filter((function(e){return uu(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!op[e.name])}(e)})).map((function(t){return ip(e,t)}))}},ap={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(lu(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},lp={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return pu(t).map((function(e){return e.filter(Eu)})).map(mu)}},hp={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return pu(t).map((function(e){return e.filter(lu).map((function(e){return e.value})).join(" ")})).map(cp)}},cp=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(rp||(rp={}));var Ap,up={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return pu(t).map((function(e){return e.filter(pp)}))}},pp=function(e){return lu(e)||Eu(e)},dp=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},fp=dp("top"),Ep=dp("right"),mp=dp("bottom"),yp=dp("left"),gp=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return mu(t.filter(Eu))}}},Ip=gp("top-left"),vp=gp("top-right"),Tp=gp("bottom-right"),_p=gp("bottom-left"),Rp=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Pp=Rp("top"),Dp=Rp("right"),Np=Rp("bottom"),bp=Rp("left"),Cp=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return nu(t)?t.number:0}}},Op=Cp("top"),Sp=Cp("right"),xp=Cp("bottom"),wp=Cp("left"),Bp={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fp={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Mp={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(lu).reduce((function(e,t){return e|Lp(t.value)}),0)}},Lp=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Up={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Hp={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(Ap||(Ap={}));var Gp,kp={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?Ap.STRICT:Ap.NORMAL}},Vp={name:"line-height",initialValue:"normal",prefix:!1,type:4},jp=function(e,t){return lu(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Eu(e)?Tu(e,t):t},Qp={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:ip(e,t)}},Wp={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},zp={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Kp=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Yp=Kp("top"),Xp=Kp("right"),Zp=Kp("bottom"),qp=Kp("left"),Jp={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(lu).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},$p={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},ed=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},td=ed("top"),sd=ed("right"),id=ed("bottom"),rd=ed("left"),od={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},nd={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},ad={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&cu(t[0],"none")?[]:pu(t).map((function(t){for(var s={color:Hu.TRANSPARENT,offsetX:yu,offsetY:yu,blur:yu},i=0,r=0;r1?1:0],this.overflowWrap=Gd(e,$p,t.overflowWrap),this.paddingTop=Gd(e,td,t.paddingTop),this.paddingRight=Gd(e,sd,t.paddingRight),this.paddingBottom=Gd(e,id,t.paddingBottom),this.paddingLeft=Gd(e,rd,t.paddingLeft),this.paintOrder=Gd(e,Bd,t.paintOrder),this.position=Gd(e,nd,t.position),this.textAlign=Gd(e,od,t.textAlign),this.textDecorationColor=Gd(e,gd,null!==(s=t.textDecorationColor)&&void 0!==s?s:t.color),this.textDecorationLine=Gd(e,Id,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=Gd(e,ad,t.textShadow),this.textTransform=Gd(e,ld,t.textTransform),this.transform=Gd(e,hd,t.transform),this.transformOrigin=Gd(e,pd,t.transformOrigin),this.visibility=Gd(e,dd,t.visibility),this.webkitTextStrokeColor=Gd(e,Fd,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Gd(e,Md,t.webkitTextStrokeWidth),this.wordBreak=Gd(e,fd,t.wordBreak),this.zIndex=Gd(e,Ed,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return Ou(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return Dd(this.display,4)||Dd(this.display,33554432)||Dd(this.display,268435456)||Dd(this.display,536870912)||Dd(this.display,67108864)||Dd(this.display,134217728)},e}(),Ud=function(e,t){this.content=Gd(e,Nd,t.content),this.quotes=Gd(e,Sd,t.quotes)},Hd=function(e,t){this.counterIncrement=Gd(e,bd,t.counterIncrement),this.counterReset=Gd(e,Cd,t.counterReset)},Gd=function(e,t,s){var i=new ru,r=null!=s?s.toString():t.initialValue;i.write(r);var o=new ou(i.read());switch(t.type){case 2:var n=o.parseComponentValue();return t.parse(e,lu(n)?n.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Pu(e,o.parseComponentValue());case"color":return Cu(e,o.parseComponentValue());case"image":return ip(e,o.parseComponentValue());case"length":var a=o.parseComponentValue();return fu(a)?a:yu;case"length-percentage":var l=o.parseComponentValue();return Eu(l)?l:yu;case"time":return md(e,o.parseComponentValue())}}},kd=function(e,t){var s=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===s||t===s},Vd=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,kd(t,3),this.styles=new Ld(e,window.getComputedStyle(t,null)),Kf(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=Rc(this.context,t),kd(t,4)&&(this.flags|=16)},jd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wd=0;Wd=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Yd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zd=0;Zd>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},rf=function(e,t){var s,i,r,o=function(e){var t,s,i,r,o,n=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),c=Array.isArray(h)?h:new Uint8Array(h);for(t=0;t>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i=55296&&r<=56319&&s=s)return{done:!0,value:null};for(var e=of;in.x||r.y>n.y;return n=r,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(uf,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,s=e.createElement("canvas"),i=s.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,";try{i.drawImage(t,0,0),s.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(uf,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),s=100;t.width=s,t.height=s;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,s,s);var r=new Image,o=t.toDataURL();r.src=o;var n=cf(s,s,0,0,r);return i.fillStyle="red",i.fillRect(0,0,s,s),Af(n).then((function(t){i.drawImage(t,0,0);var r=i.getImageData(0,0,s,s).data;i.fillStyle="red",i.fillRect(0,0,s,s);var n=e.createElement("div");return n.style.backgroundImage="url("+o+")",n.style.height="100px",hf(r)?Af(cf(s,s,0,0,n)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),hf(i.getImageData(0,0,s,s).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(uf,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(uf,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(uf,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(uf,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(uf,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},pf=function(e,t){this.text=e,this.bounds=t},df=function(e,t){var s=t.ownerDocument;if(s){var i=s.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var r=t.parentNode;if(r){r.replaceChild(i,t);var o=Rc(e,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return _c.EMPTY},ff=function(e,t,s){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(e,t),r.setEnd(e,t+s),r},Ef=function(e){if(uf.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,s=lf(e),i=[];!(t=s.next()).done;)t.value&&i.push(t.value.slice());return i}(e)},mf=function(e,t){return 0!==t.letterSpacing?Ef(e):function(e,t){if(uf.SUPPORT_NATIVE_TEXT_SEGMENTATION){var s=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(s.segment(e)).map((function(e){return e.segment}))}return gf(e,t)}(e,t)},yf=[32,160,4961,65792,65793,4153,4241],gf=function(e,t){for(var s,i=function(e,t){var s=Pc(e),i=TA(s,t),r=i[0],o=i[1],n=i[2],a=s.length,l=0,h=0;return{next:function(){if(h>=a)return{done:!0,value:null};for(var e=hA;h0)if(uf.SUPPORT_RANGE_BOUNDS){var r=ff(i,n,t.length).getClientRects();if(r.length>1){var a=Ef(t),l=0;a.forEach((function(t){o.push(new pf(t,_c.fromDOMRectList(e,ff(i,l+n,t.length).getClientRects()))),l+=t.length}))}else o.push(new pf(t,_c.fromDOMRectList(e,r)))}else{var h=i.splitText(t.length);o.push(new pf(t,df(e,i))),i=h}else uf.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));n+=t.length})),o}(e,this.text,s,t)},vf=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Tf,_f);case 2:return e.toUpperCase();default:return e}},Tf=/(^|\s|:|-|\(|\))([a-z])/g,_f=function(e,t,s){return e.length>0?t+s.toUpperCase():e},Rf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.src=s.currentSrc||s.src,i.intrinsicWidth=s.naturalWidth,i.intrinsicHeight=s.naturalHeight,i.context.cache.addImage(i.src),i}return yc(t,e),t}(Vd),Pf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.canvas=s,i.intrinsicWidth=s.width,i.intrinsicHeight=s.height,i}return yc(t,e),t}(Vd),Df=function(e){function t(t,s){var i=e.call(this,t,s)||this,r=new XMLSerializer,o=Rc(t,s);return s.setAttribute("width",o.width+"px"),s.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(s)),i.intrinsicWidth=s.width.baseVal.value,i.intrinsicHeight=s.height.baseVal.value,i.context.cache.addImage(i.svg),i}return yc(t,e),t}(Vd),Nf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.value=s.value,i}return yc(t,e),t}(Vd),bf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.start=s.start,i.reversed="boolean"==typeof s.reversed&&!0===s.reversed,i}return yc(t,e),t}(Vd),Cf=[{type:15,flags:0,unit:"px",number:3}],Of=[{type:16,flags:0,number:50}],Sf="checkbox",xf="radio",wf="password",Bf=707406591,Ff=function(e){function t(t,s){var i,r,o,n=e.call(this,t,s)||this;switch(n.type=s.type.toLowerCase(),n.checked=s.checked,n.value=0===(r=(i=s).type===wf?new Array(i.value.length+1).join("•"):i.value).length?i.placeholder||"":r,n.type!==Sf&&n.type!==xf||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(o=n.bounds).width>o.height?new _c(o.left+(o.width-o.height)/2,o.top,o.height,o.height):o.width0)s.textNodes.push(new If(e,r,s.styles));else if(zf(r))if(aE(r)&&r.assignedNodes)r.assignedNodes().forEach((function(t){return Gf(e,t,s,i)}));else{var n=kf(e,r);n.styles.isVisible()&&(jf(r,n,i)?n.flags|=4:Qf(n.styles)&&(n.flags|=2),-1!==Hf.indexOf(r.tagName)&&(n.flags|=8),s.elements.push(n),r.slot,r.shadowRoot?Gf(e,r.shadowRoot,n,i):oE(r)||Jf(r)||nE(r)||Gf(e,r,n,i))}},kf=function(e,t){return sE(t)?new Rf(e,t):eE(t)?new Pf(e,t):Jf(t)?new Df(e,t):Xf(t)?new Nf(e,t):Zf(t)?new bf(e,t):qf(t)?new Ff(e,t):nE(t)?new Mf(e,t):oE(t)?new Lf(e,t):iE(t)?new Uf(e,t):new Vd(e,t)},Vf=function(e,t){var s=kf(e,t);return s.flags|=4,Gf(e,t,s,s),s},jf=function(e,t,s){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||$f(e)&&s.styles.isTransparent()},Qf=function(e){return e.isPositioned()||e.isFloating()},Wf=function(e){return e.nodeType===Node.TEXT_NODE},zf=function(e){return e.nodeType===Node.ELEMENT_NODE},Kf=function(e){return zf(e)&&void 0!==e.style&&!Yf(e)},Yf=function(e){return"object"==typeof e.className},Xf=function(e){return"LI"===e.tagName},Zf=function(e){return"OL"===e.tagName},qf=function(e){return"INPUT"===e.tagName},Jf=function(e){return"svg"===e.tagName},$f=function(e){return"BODY"===e.tagName},eE=function(e){return"CANVAS"===e.tagName},tE=function(e){return"VIDEO"===e.tagName},sE=function(e){return"IMG"===e.tagName},iE=function(e){return"IFRAME"===e.tagName},rE=function(e){return"STYLE"===e.tagName},oE=function(e){return"TEXTAREA"===e.tagName},nE=function(e){return"SELECT"===e.tagName},aE=function(e){return"SLOT"===e.tagName},lE=function(e){return e.tagName.indexOf("-")>0},hE=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,s=e.counterIncrement,i=e.counterReset,r=!0;null!==s&&s.forEach((function(e){var s=t.counters[e.counter];s&&0!==e.increment&&(r=!1,s.length||s.push(1),s[Math.max(0,s.length-1)]+=e.increment)}));var o=[];return r&&i.forEach((function(e){var s=t.counters[e.counter];o.push(e.counter),s||(s=t.counters[e.counter]=[]),s.push(e.reset)})),o},e}(),cE={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},AE={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},uE={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},pE={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},dE=function(e,t,s,i,r,o){return es?_E(e,r,o.length>0):i.integers.reduce((function(t,s,r){for(;e>=s;)e-=s,t+=i.values[r];return t}),"")+o},fE=function(e,t,s,i){var r="";do{s||e--,r=i(e)+r,e/=t}while(e*t>=t);return r},EE=function(e,t,s,i,r){var o=s-t+1;return(e<0?"-":"")+(fE(Math.abs(e),o,i,(function(e){return Dc(Math.floor(e%o)+t)}))+r)},mE=function(e,t,s){void 0===s&&(s=". ");var i=t.length;return fE(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+s},yE=function(e,t,s,i,r,o){if(e<-9999||e>9999)return _E(e,4,r.length>0);var n=Math.abs(e),a=r;if(0===n)return t[0]+a;for(var l=0;n>0&&l<=4;l++){var h=n%10;0===h&&Dd(o,1)&&""!==a?a=t[h]+a:h>1||1===h&&0===l||1===h&&1===l&&Dd(o,2)||1===h&&1===l&&Dd(o,4)&&e>100||1===h&&l>1&&Dd(o,8)?a=t[h]+(l>0?s[l-1]:"")+a:1===h&&l>0&&(a=s[l-1]+a),n=Math.floor(n/10)}return(e<0?i:"")+a},gE="十百千萬",IE="拾佰仟萬",vE="マイナス",TE="마이너스",_E=function(e,t,s){var i=s?". ":"",r=s?"、":"",o=s?", ":"",n=s?" ":"";switch(t){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var a=EE(e,48,57,!0,i);return a.length<4?"0"+a:a;case 4:return mE(e,"〇一二三四五六七八九",r);case 6:return dE(e,1,3999,cE,3,i).toLowerCase();case 7:return dE(e,1,3999,cE,3,i);case 8:return EE(e,945,969,!1,i);case 9:return EE(e,97,122,!1,i);case 10:return EE(e,65,90,!1,i);case 11:return EE(e,1632,1641,!0,i);case 12:case 49:return dE(e,1,9999,AE,3,i);case 35:return dE(e,1,9999,AE,3,i).toLowerCase();case 13:return EE(e,2534,2543,!0,i);case 14:case 30:return EE(e,6112,6121,!0,i);case 15:return mE(e,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return mE(e,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return yE(e,"零一二三四五六七八九",gE,"負",r,14);case 47:return yE(e,"零壹貳參肆伍陸柒捌玖",IE,"負",r,15);case 42:return yE(e,"零一二三四五六七八九",gE,"负",r,14);case 41:return yE(e,"零壹贰叁肆伍陆柒捌玖",IE,"负",r,15);case 26:return yE(e,"〇一二三四五六七八九","十百千万",vE,r,0);case 25:return yE(e,"零壱弐参四伍六七八九","拾百千万",vE,r,7);case 31:return yE(e,"영일이삼사오육칠팔구","십백천만",TE,o,7);case 33:return yE(e,"零一二三四五六七八九","十百千萬",TE,o,0);case 32:return yE(e,"零壹貳參四五六七八九","拾百千",TE,o,7);case 18:return EE(e,2406,2415,!0,i);case 20:return dE(e,1,19999,pE,3,i);case 21:return EE(e,2790,2799,!0,i);case 22:return EE(e,2662,2671,!0,i);case 22:return dE(e,1,10999,uE,3,i);case 23:return mE(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return mE(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return EE(e,3302,3311,!0,i);case 28:return mE(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return mE(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return EE(e,3792,3801,!0,i);case 37:return EE(e,6160,6169,!0,i);case 38:return EE(e,4160,4169,!0,i);case 39:return EE(e,2918,2927,!0,i);case 40:return EE(e,1776,1785,!0,i);case 43:return EE(e,3046,3055,!0,i);case 44:return EE(e,3174,3183,!0,i);case 45:return EE(e,3664,3673,!0,i);case 46:return EE(e,3872,3881,!0,i);default:return EE(e,48,57,!0,i)}},RE="data-html2canvas-ignore",PE=function(){function e(e,t,s){if(this.context=e,this.options=s,this.scrolledElements=[],this.referenceElement=t,this.counters=new hE,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var s=this,i=NE(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,n=i.contentWindow,a=n.document,l=OE(i).then((function(){return Ic(s,void 0,void 0,(function(){var e,s;return vc(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(FE),n&&(n.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===t.top&&n.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-t.left,n.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(s=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,CE(a)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,s)})).then((function(){return i}))]:[2,i]}}))}))}));return a.open(),a.write(wE(document.doctype)+""),BE(this.referenceElement.ownerDocument,r,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(kd(e,2),eE(e))return this.createCanvasClone(e);if(tE(e))return this.createVideoClone(e);if(rE(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return sE(t)&&(sE(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),lE(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return xE(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var s=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=s,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var s=e.ownerDocument.createElement("img");try{return s.src=e.toDataURL(),s}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var r=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&r)o.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var n=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(n){var a=n.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var s=t.getContext("2d");try{return s&&(s.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||s.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},e.prototype.appendChildNode=function(e,t,s){zf(t)&&("SCRIPT"===t.tagName||t.hasAttribute(RE)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&zf(t)&&rE(t)||e.appendChild(this.cloneNode(t,s))},e.prototype.cloneChildNodes=function(e,t,s){for(var i=this,r=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;r;r=r.nextSibling)if(zf(r)&&aE(r)&&"function"==typeof r.assignedNodes){var o=r.assignedNodes();o.length&&o.forEach((function(e){return i.appendChildNode(t,e,s)}))}else this.appendChildNode(t,r,s)},e.prototype.cloneNode=function(e,t){if(Wf(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var s=e.ownerDocument.defaultView;if(s&&zf(e)&&(Kf(e)||Yf(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var r=s.getComputedStyle(e),o=s.getComputedStyle(e,":before"),n=s.getComputedStyle(e,":after");this.referenceElement===e&&Kf(i)&&(this.clonedReferenceElement=i),$f(i)&&HE(i);var a=this.counters.parse(new Hd(this.context,r)),l=this.resolvePseudoContent(e,i,o,qd.BEFORE);lE(e)&&(t=!0),tE(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(e,i,n,qd.AFTER);return h&&i.appendChild(h),this.counters.pop(a),(r&&(this.options.copyStyles||Yf(e))&&!iE(e)||t)&&xE(r,i),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(oE(e)||nE(e))&&(oE(i)||nE(i))&&(i.value=e.value),i}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,s,i){var r=this;if(s){var o=s.content,n=t.ownerDocument;if(n&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==s.display){this.counters.parse(new Hd(this.context,s));var a=new Ud(this.context,s),l=n.createElement("html2canvaspseudoelement");xE(s,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(n.createTextNode(t.value));else if(22===t.type){var s=n.createElement("img");s.src=t.value,s.style.opacity="1",l.appendChild(s)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(lu);i.length&&l.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(uu),h=o[0],c=o[1];if(h&&lu(h)){var A=r.counters.getCounterValue(h.value),u=c&&lu(c)?zp.parse(r.context,c.value):3;l.appendChild(n.createTextNode(_E(A,u,!1)))}}else if("counters"===t.name){var p=t.values.filter(uu),d=(h=p[0],p[1]);c=p[2];if(h&&lu(h)){var f=r.counters.getCounterValues(h.value),E=c&&lu(c)?zp.parse(r.context,c.value):3,m=d&&0===d.type?d.value:"",y=f.map((function(e){return _E(e,E,!1)})).join(m);l.appendChild(n.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(n.createTextNode(xd(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":l.appendChild(n.createTextNode(xd(a.quotes,--r.quoteDepth,!1)));break;default:l.appendChild(n.createTextNode(t.value))}})),l.className=ME+" "+LE;var h=i===qd.BEFORE?" "+ME:" "+LE;return Yf(t)?t.className.baseValue+=h:t.className+=h,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(qd||(qd={}));var DE,NE=function(e,t){var s=e.createElement("iframe");return s.className="html2canvas-container",s.style.visibility="hidden",s.style.position="fixed",s.style.left="-10000px",s.style.top="0px",s.style.border="0",s.width=t.width.toString(),s.height=t.height.toString(),s.scrolling="no",s.setAttribute(RE,"true"),e.body.appendChild(s),s},bE=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},CE=function(e){return Promise.all([].slice.call(e.images,0).map(bE))},OE=function(e){return new Promise((function(t,s){var i=e.contentWindow;if(!i)return s("No window assigned for iframe");var r=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var s=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(s),t(e))}),50)}}))},SE=["all","d","content"],xE=function(e,t){for(var s=e.length-1;s>=0;s--){var i=e.item(s);-1===SE.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},wE=function(e){var t="";return e&&(t+=""),t},BE=function(e,t,s){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||s!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,s)},FE=function(e){var t=e[0],s=e[1],i=e[2];t.scrollLeft=s,t.scrollTop=i},ME="___html2canvas___pseudoelement_before",LE="___html2canvas___pseudoelement_after",UE='{\n content: "" !important;\n display: none !important;\n}',HE=function(e){GE(e,"."+ME+":before"+UE+"\n ."+LE+":after"+UE)},GE=function(e,t){var s=e.ownerDocument;if(s){var i=s.createElement("style");i.textContent=t,e.appendChild(i)}},kE=function(){function e(){}return e.getOrigin=function(t){var s=e._link;return s?(s.href=t,s.href=s.href,s.protocol+s.hostname+s.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),VE=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:XE(e)||zE(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return Ic(this,void 0,void 0,(function(){var t,s,i,r,o=this;return vc(this,(function(n){switch(n.label){case 0:return t=kE.isSameOrigin(e),s=!KE(e)&&!0===this._options.useCORS&&uf.SUPPORT_CORS_IMAGES&&!t,i=!KE(e)&&!t&&!XE(e)&&"string"==typeof this._options.proxy&&uf.SUPPORT_CORS_XHR&&!s,t||!1!==this._options.allowTaint||KE(e)||XE(e)||i||s?(r=e,i?[4,this.proxy(r)]:[3,2]):[2];case 1:r=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(YE(r)||s)&&(i.crossOrigin="anonymous"),i.src=r,!0===i.complete&&setTimeout((function(){return e(i)}),500),o._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,s=this._options.proxy;if(!s)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(r,o){var n=uf.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===n)r(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return r(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(a.response)}else o("Failed to proxy resource "+i+" with status code "+a.status)},a.onerror=o;var l=s.indexOf("?")>-1?"&":"?";if(a.open("GET",""+s+l+"url="+encodeURIComponent(e)+"&responseType="+n),"text"!==n&&a instanceof XMLHttpRequest&&(a.responseType=n),t._options.imageTimeout){var h=t._options.imageTimeout;a.timeout=h,a.ontimeout=function(){return o("Timed out ("+h+"ms) proxying "+i)}}a.send()}))},e}(),jE=/^data:image\/svg\+xml/i,QE=/^data:image\/.*;base64,/i,WE=/^data:image\/.*/i,zE=function(e){return uf.SUPPORT_SVG_DRAWING||!ZE(e)},KE=function(e){return WE.test(e)},YE=function(e){return QE.test(e)},XE=function(e){return"blob"===e.substr(0,4)},ZE=function(e){return"svg"===e.substr(-3).toLowerCase()||jE.test(e)},qE=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,s){return new e(this.x+t,this.y+s)},e}(),JE=function(e,t,s){return new qE(e.x+(t.x-e.x)*s,e.y+(t.y-e.y)*s)},$E=function(){function e(e,t,s,i){this.type=1,this.start=e,this.startControl=t,this.endControl=s,this.end=i}return e.prototype.subdivide=function(t,s){var i=JE(this.start,this.startControl,t),r=JE(this.startControl,this.endControl,t),o=JE(this.endControl,this.end,t),n=JE(i,r,t),a=JE(r,o,t),l=JE(n,a,t);return s?new e(this.start,i,n,l):new e(l,a,o,this.end)},e.prototype.add=function(t,s){return new e(this.start.add(t,s),this.startControl.add(t,s),this.endControl.add(t,s),this.end.add(t,s))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),em=function(e){return 1===e.type},tm=function(e){var t=e.styles,s=e.bounds,i=vu(t.borderTopLeftRadius,s.width,s.height),r=i[0],o=i[1],n=vu(t.borderTopRightRadius,s.width,s.height),a=n[0],l=n[1],h=vu(t.borderBottomRightRadius,s.width,s.height),c=h[0],A=h[1],u=vu(t.borderBottomLeftRadius,s.width,s.height),p=u[0],d=u[1],f=[];f.push((r+a)/s.width),f.push((p+c)/s.width),f.push((o+d)/s.height),f.push((l+A)/s.height);var E=Math.max.apply(Math,f);E>1&&(r/=E,o/=E,a/=E,l/=E,c/=E,A/=E,p/=E,d/=E);var m=s.width-a,y=s.height-A,g=s.width-c,I=s.height-d,v=t.borderTopWidth,T=t.borderRightWidth,_=t.borderBottomWidth,R=t.borderLeftWidth,P=Tu(t.paddingTop,e.bounds.width),D=Tu(t.paddingRight,e.bounds.width),N=Tu(t.paddingBottom,e.bounds.width),b=Tu(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||o>0?sm(s.left+R/3,s.top+v/3,r-R/3,o-v/3,DE.TOP_LEFT):new qE(s.left+R/3,s.top+v/3),this.topRightBorderDoubleOuterBox=r>0||o>0?sm(s.left+m,s.top+v/3,a-T/3,l-v/3,DE.TOP_RIGHT):new qE(s.left+s.width-T/3,s.top+v/3),this.bottomRightBorderDoubleOuterBox=c>0||A>0?sm(s.left+g,s.top+y,c-T/3,A-_/3,DE.BOTTOM_RIGHT):new qE(s.left+s.width-T/3,s.top+s.height-_/3),this.bottomLeftBorderDoubleOuterBox=p>0||d>0?sm(s.left+R/3,s.top+I,p-R/3,d-_/3,DE.BOTTOM_LEFT):new qE(s.left+R/3,s.top+s.height-_/3),this.topLeftBorderDoubleInnerBox=r>0||o>0?sm(s.left+2*R/3,s.top+2*v/3,r-2*R/3,o-2*v/3,DE.TOP_LEFT):new qE(s.left+2*R/3,s.top+2*v/3),this.topRightBorderDoubleInnerBox=r>0||o>0?sm(s.left+m,s.top+2*v/3,a-2*T/3,l-2*v/3,DE.TOP_RIGHT):new qE(s.left+s.width-2*T/3,s.top+2*v/3),this.bottomRightBorderDoubleInnerBox=c>0||A>0?sm(s.left+g,s.top+y,c-2*T/3,A-2*_/3,DE.BOTTOM_RIGHT):new qE(s.left+s.width-2*T/3,s.top+s.height-2*_/3),this.bottomLeftBorderDoubleInnerBox=p>0||d>0?sm(s.left+2*R/3,s.top+I,p-2*R/3,d-2*_/3,DE.BOTTOM_LEFT):new qE(s.left+2*R/3,s.top+s.height-2*_/3),this.topLeftBorderStroke=r>0||o>0?sm(s.left+R/2,s.top+v/2,r-R/2,o-v/2,DE.TOP_LEFT):new qE(s.left+R/2,s.top+v/2),this.topRightBorderStroke=r>0||o>0?sm(s.left+m,s.top+v/2,a-T/2,l-v/2,DE.TOP_RIGHT):new qE(s.left+s.width-T/2,s.top+v/2),this.bottomRightBorderStroke=c>0||A>0?sm(s.left+g,s.top+y,c-T/2,A-_/2,DE.BOTTOM_RIGHT):new qE(s.left+s.width-T/2,s.top+s.height-_/2),this.bottomLeftBorderStroke=p>0||d>0?sm(s.left+R/2,s.top+I,p-R/2,d-_/2,DE.BOTTOM_LEFT):new qE(s.left+R/2,s.top+s.height-_/2),this.topLeftBorderBox=r>0||o>0?sm(s.left,s.top,r,o,DE.TOP_LEFT):new qE(s.left,s.top),this.topRightBorderBox=a>0||l>0?sm(s.left+m,s.top,a,l,DE.TOP_RIGHT):new qE(s.left+s.width,s.top),this.bottomRightBorderBox=c>0||A>0?sm(s.left+g,s.top+y,c,A,DE.BOTTOM_RIGHT):new qE(s.left+s.width,s.top+s.height),this.bottomLeftBorderBox=p>0||d>0?sm(s.left,s.top+I,p,d,DE.BOTTOM_LEFT):new qE(s.left,s.top+s.height),this.topLeftPaddingBox=r>0||o>0?sm(s.left+R,s.top+v,Math.max(0,r-R),Math.max(0,o-v),DE.TOP_LEFT):new qE(s.left+R,s.top+v),this.topRightPaddingBox=a>0||l>0?sm(s.left+Math.min(m,s.width-T),s.top+v,m>s.width+T?0:Math.max(0,a-T),Math.max(0,l-v),DE.TOP_RIGHT):new qE(s.left+s.width-T,s.top+v),this.bottomRightPaddingBox=c>0||A>0?sm(s.left+Math.min(g,s.width-R),s.top+Math.min(y,s.height-_),Math.max(0,c-T),Math.max(0,A-_),DE.BOTTOM_RIGHT):new qE(s.left+s.width-T,s.top+s.height-_),this.bottomLeftPaddingBox=p>0||d>0?sm(s.left+R,s.top+Math.min(I,s.height-_),Math.max(0,p-R),Math.max(0,d-_),DE.BOTTOM_LEFT):new qE(s.left+R,s.top+s.height-_),this.topLeftContentBox=r>0||o>0?sm(s.left+R+b,s.top+v+P,Math.max(0,r-(R+b)),Math.max(0,o-(v+P)),DE.TOP_LEFT):new qE(s.left+R+b,s.top+v+P),this.topRightContentBox=a>0||l>0?sm(s.left+Math.min(m,s.width+R+b),s.top+v+P,m>s.width+R+b?0:a-R+b,l-(v+P),DE.TOP_RIGHT):new qE(s.left+s.width-(T+D),s.top+v+P),this.bottomRightContentBox=c>0||A>0?sm(s.left+Math.min(g,s.width-(R+b)),s.top+Math.min(y,s.height+v+P),Math.max(0,c-(T+D)),A-(_+N),DE.BOTTOM_RIGHT):new qE(s.left+s.width-(T+D),s.top+s.height-(_+N)),this.bottomLeftContentBox=p>0||d>0?sm(s.left+R+b,s.top+I,Math.max(0,p-(R+b)),d-(_+N),DE.BOTTOM_LEFT):new qE(s.left+R+b,s.top+s.height-(_+N))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(DE||(DE={}));var sm=function(e,t,s,i,r){var o=(Math.sqrt(2)-1)/3*4,n=s*o,a=i*o,l=e+s,h=t+i;switch(r){case DE.TOP_LEFT:return new $E(new qE(e,h),new qE(e,h-a),new qE(l-n,t),new qE(l,t));case DE.TOP_RIGHT:return new $E(new qE(e,t),new qE(e+n,t),new qE(l,h-a),new qE(l,h));case DE.BOTTOM_RIGHT:return new $E(new qE(l,t),new qE(l,t+a),new qE(e+n,h),new qE(e,h));case DE.BOTTOM_LEFT:default:return new $E(new qE(l,h),new qE(l-n,h),new qE(e,t+a),new qE(e,t))}},im=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},rm=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},om=function(e,t,s){this.offsetX=e,this.offsetY=t,this.matrix=s,this.type=0,this.target=6},nm=function(e,t){this.path=e,this.target=t,this.type=1},am=function(e){this.opacity=e,this.type=2,this.target=6},lm=function(e){return 1===e.type},hm=function(e,t){return e.length===t.length&&e.some((function(e,s){return e===t[s]}))},cm=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Am=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new tm(this.container),this.container.styles.opacity<1&&this.effects.push(new am(this.container.styles.opacity)),null!==this.container.styles.transform){var s=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new om(s,i,r))}if(0!==this.container.styles.overflowX){var o=im(this.curves),n=rm(this.curves);hm(o,n)?this.effects.push(new nm(o,6)):(this.effects.push(new nm(o,2)),this.effects.push(new nm(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),s=this.parent,i=this.effects.slice(0);s;){var r=s.effects.filter((function(e){return!lm(e)}));if(t||0!==s.container.styles.position||!s.parent){if(i.unshift.apply(i,r),t=-1===[2,3].indexOf(s.container.styles.position),0!==s.container.styles.overflowX){var o=im(s.curves),n=rm(s.curves);hm(o,n)||i.unshift(new nm(n,6))}}else i.unshift.apply(i,r);s=s.parent}return i.filter((function(t){return Dd(t.target,e)}))},e}(),um=function(e,t,s,i){e.container.elements.forEach((function(r){var o=Dd(r.flags,4),n=Dd(r.flags,2),a=new Am(r,e);Dd(r.styles.display,2048)&&i.push(a);var l=Dd(r.flags,8)?[]:i;if(o||n){var h=o||r.styles.isPositioned()?s:t,c=new cm(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var A=r.styles.zIndex.order;if(A<0){var u=0;h.negativeZIndex.some((function(e,t){return A>e.element.container.styles.zIndex.order?(u=t,!1):u>0})),h.negativeZIndex.splice(u,0,c)}else if(A>0){var p=0;h.positiveZIndex.some((function(e,t){return A>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0})),h.positiveZIndex.splice(p,0,c)}else h.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?h.nonPositionedFloats.push(c):h.nonPositionedInlineLevel.push(c);um(a,c,o?c:s,l)}else r.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),um(a,t,s,l);Dd(r.flags,8)&&pm(r,l)}))},pm=function(e,t){for(var s=e instanceof bf?e.start:1,i=e instanceof bf&&e.reversed,r=0;r0&&e.intrinsicHeight>0){var i=ym(e),r=rm(t);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return Ic(this,void 0,void 0,(function(){var s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g;return vc(this,(function(I){switch(I.label){case 0:this.applyEffects(e.getEffects(4)),s=e.container,i=e.curves,r=s.styles,o=0,n=s.textNodes,I.label=1;case 1:return o0&&_>0&&(m=i.ctx.createPattern(d,"repeat"),i.renderRepeat(g,m,P,D))):function(e){return 2===e.type}(s)&&(y=gm(e,t,[null,null,null]),g=y[0],I=y[1],v=y[2],T=y[3],_=y[4],R=0===s.position.length?[gu]:s.position,P=Tu(R[0],T),D=Tu(R[R.length-1],_),N=function(e,t,s,i,r){var o=0,n=0;switch(e.size){case 0:0===e.shape?o=n=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-i)),n=Math.min(Math.abs(s),Math.abs(s-r)));break;case 2:if(0===e.shape)o=n=Math.min(Wu(t,s),Wu(t,s-r),Wu(t-i,s),Wu(t-i,s-r));else if(1===e.shape){var a=Math.min(Math.abs(s),Math.abs(s-r))/Math.min(Math.abs(t),Math.abs(t-i)),l=zu(i,r,t,s,!0),h=l[0],c=l[1];n=a*(o=Wu(h-t,(c-s)/a))}break;case 1:0===e.shape?o=n=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-i)),n=Math.max(Math.abs(s),Math.abs(s-r)));break;case 3:if(0===e.shape)o=n=Math.max(Wu(t,s),Wu(t,s-r),Wu(t-i,s),Wu(t-i,s-r));else if(1===e.shape){a=Math.max(Math.abs(s),Math.abs(s-r))/Math.max(Math.abs(t),Math.abs(t-i));var A=zu(i,r,t,s,!1);h=A[0],c=A[1],n=a*(o=Wu(h-t,(c-s)/a))}}return Array.isArray(e.size)&&(o=Tu(e.size[0],i),n=2===e.size.length?Tu(e.size[1],r):o),[o,n]}(s,P,D,T,_),b=N[0],C=N[1],b>0&&C>0&&(O=i.ctx.createRadialGradient(I+P,v+D,0,I+P,v+D,b),ju(s.stops,2*b).forEach((function(e){return O.addColorStop(e.stop,Su(e.color))})),i.path(g),i.ctx.fillStyle=O,b!==C?(S=e.bounds.left+.5*e.bounds.width,x=e.bounds.top+.5*e.bounds.height,B=1/(w=C/b),i.ctx.save(),i.ctx.translate(S,x),i.ctx.transform(1,0,0,w,0,0),i.ctx.translate(-S,-x),i.ctx.fillRect(I,B*(v-x)+x,T,_*B),i.ctx.restore()):i.ctx.fill())),F.label=6;case 6:return t--,[2]}}))},i=this,r=0,o=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return r0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return n++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,s,i,r){return Ic(this,void 0,void 0,(function(){var o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I;return vc(this,(function(v){return this.ctx.save(),o=function(e,t){switch(t){case 0:return fm(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return fm(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return fm(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return fm(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(i,s),n=dm(i,s),2===r&&(this.path(n),this.ctx.clip()),em(n[0])?(a=n[0].start.x,l=n[0].start.y):(a=n[0].x,l=n[0].y),em(n[1])?(h=n[1].end.x,c=n[1].end.y):(h=n[1].x,c=n[1].y),A=0===s||2===s?Math.abs(a-h):Math.abs(l-c),this.ctx.beginPath(),3===r?this.formatPath(o):this.formatPath(n.slice(0,2)),u=t<3?3*t:2*t,p=t<3?2*t:t,3===r&&(u=t,p=t),d=!0,A<=2*u?d=!1:A<=2*u+p?(u*=f=A/(2*u+p),p*=f):(E=Math.floor((A+p)/(u+p)),m=(A-E*u)/(E-1),p=(y=(A-(E+1)*u)/E)<=0||Math.abs(p-m){s=1e3*this._delayBeforeRestoreSeconds,i||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,i=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",r),this._onCameraMatrix=e.scene.camera.on("matrix",r),this._onSceneTick=e.scene.on("tick",(t=>{i&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),i=!1))}));let o=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{o=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{o=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{o&&r()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}Boolean("object"!=typeof process||"[object process]"!==String(process)||process.browser);const jm="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function Qm(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}jm&&parseFloat(jm[1]);const Wm="object"!=typeof process||"[object process]"!==String(process)||process.browser,zm="undefined"!=typeof window&&void 0!==window.orientation,Km="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function Ym(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}Km&&parseFloat(Km[1]);class Xm{constructor(e,t){Ym(this,"name",void 0),Ym(this,"workerThread",void 0),Ym(this,"isRunning",!0),Ym(this,"result",void 0),Ym(this,"_resolve",(()=>{})),Ym(this,"_reject",(()=>{})),this.name=e,this.workerThread=t,this.result=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){Qm(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Qm(this.isRunning),this.isRunning=!1,this._reject(e)}}class Zm{}const qm=new Map;function Jm(e){Qm(e.source&&!e.url||!e.source&&e.url);let t=qm.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return $m((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),qm.set(e.url,t)),e.source&&(t=$m(e.source),qm.set(e.source,t))),Qm(t),t}function $m(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function ey(e,t=!0,s){const i=s||new Set;if(e){if(ty(e))i.add(e);else if(ty(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(const s in e)ey(e[s],t,i)}else;return void 0===s?Array.from(i):[]}function ty(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const sy=()=>{};class iy{static isSupported(){return"undefined"!=typeof Worker&&Wm||void 0!==typeof Zm}constructor(e){Ym(this,"name",void 0),Ym(this,"source",void 0),Ym(this,"url",void 0),Ym(this,"terminated",!1),Ym(this,"worker",void 0),Ym(this,"onMessage",void 0),Ym(this,"onError",void 0),Ym(this,"_loadableURL","");const{name:t,source:s,url:i}=e;Qm(s||i),this.name=t,this.source=s,this.url=i,this.onMessage=sy,this.onError=e=>console.log(e),this.worker=Wm?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=sy,this.onError=sy,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||ey(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=Jm({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new Zm(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new Zm(this.source,{eval:!0})}return e.on("message",(e=>{this.onMessage(e)})),e.on("error",(e=>{this.onError(e)})),e.on("exit",(e=>{})),e}}class ry{static isSupported(){return iy.isSupported()}constructor(e){Ym(this,"name","unnamed"),Ym(this,"source",void 0),Ym(this,"url",void 0),Ym(this,"maxConcurrency",1),Ym(this,"maxMobileConcurrency",1),Ym(this,"onDebug",(()=>{})),Ym(this,"reuseWorkers",!0),Ym(this,"props",{}),Ym(this,"jobQueue",[]),Ym(this,"idleQueue",[]),Ym(this,"count",0),Ym(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach((e=>e.destroy())),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,s)=>e.done(s)),s=((e,t)=>e.error(t))){const i=new Promise((i=>(this.jobQueue.push({name:e,onMessage:t,onError:s,onStart:i}),this)));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const s=new Xm(t.name,e);e.onMessage=e=>t.onMessage(s,e.type,e.payload),e.onError=e=>t.onError(s,e),t.onStart(s);try{await s.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class ny{static isSupported(){return iy.isSupported()}static getWorkerFarm(e={}){return ny._workerFarm=ny._workerFarm||new ny({}),ny._workerFarm.setProps(e),ny._workerFarm}constructor(e){Ym(this,"props",void 0),Ym(this,"workerPools",new Map),this.props={...oy},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:s,url:i}=e;let r=this.workerPools.get(t);return r||(r=new ry({name:t,source:s,url:i}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}Ym(ny,"_workerFarm",void 0);const ay={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},ly=ay.window||ay.self||ay.global,hy=ay.process||{},cy="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",Ay=!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}();class uy{constructor(e,t,s="sessionStorage"){this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function py(e,t,s,i=600){const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const dy={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function fy(e){return"string"==typeof e?dy[e.toUpperCase()]||dy.WHITE:e}function Ey(e,t){if(!e)throw new Error(t||"Assertion failed")}function my(){let e;if(Ay&&ly.performance)e=ly.performance.now();else if(hy.hrtime){const t=hy.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const yy={debug:Ay&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},gy={enabled:!0,level:0};function Iy(){}const vy={},Ty={once:!0};function _y(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}class Ry{constructor({id:e}={id:""}){this.id=e,this.VERSION=cy,this._startTs=my(),this._deltaTs=my(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new uy("__probe-".concat(this.id,"__"),gy),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((my()-this._startTs).toPrecision(10))}getDelta(){return Number((my()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){Ey(e,t)}warn(e){return this._getLogFunction(0,e,yy.warn,arguments,Ty)}error(e){return this._getLogFunction(0,e,yy.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,yy.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,yy.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,yy.debug||yy.info,arguments,Ty)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||Iy,s&&[s],{tag:_y(t)}):Iy}image({logLevel:e,priority:t,image:s,message:i="",scale:r=1}){return this._shouldLog(e||t)?Ay?function({image:e,message:t="",scale:s=1}){if("string"==typeof e){const i=new Image;return i.onload=()=>{const e=py(i,t,s);console.log(...e)},i.src=e,Iy}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...py(e,t,s)),Iy;if("canvas"===i.toLowerCase()){const i=new Image;return i.onload=()=>console.log(...py(i,t,s)),i.src=e.toDataURL(),Iy}return Iy}({image:s,message:i,scale:r}):function({image:e,message:t="",scale:s=1}){let i=null;try{i=module.require("asciify-image")}catch(e){}if(i)return()=>i(e,{fit:"box",width:"".concat(Math.round(80*s),"%")}).then((e=>console.log(e)));return Iy}({image:s,message:i,scale:r}):Iy}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Iy)}group(e,t,s={collapsed:!1}){s=Dy({logLevel:e,message:t,opts:s});const{collapsed:i}=s;return s.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(s)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Iy)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Py(e)}_getLogFunction(e,t,s,i=[],r){if(this._shouldLog(e)){r=Dy({logLevel:e,message:t,args:i,opts:r}),Ey(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=my();const o=r.tag||r.message;if(r.once){if(vy[o])return Iy;vy[o]=my()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e,t=8){const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return Ay||"string"!=typeof e||(t&&(t=fy(t),e="[".concat(t,"m").concat(e,"")),s&&(t=fy(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return Iy}}function Py(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Ey(Number.isFinite(t)&&t>=0),t}function Dy(e){const{logLevel:t,message:s}=e;e.logLevel=Py(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(e.args=i,typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return Ey("string"===r||"object"===r),Object.assign(e,e.opts)}Ry.VERSION=cy,new Ry({id:"loaders.gl"});function Ny(){return!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}()}new class{constructor(){Ym(this,"console",void 0),this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const by={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},Cy=by.window||by.self||by.global,Oy=by.process||{},Sy="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";Ny();class xy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Ym(this,"storage",void 0),Ym(this,"id",void 0),Ym(this,"config",{}),this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function wy(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}let By;function Fy(e){return"string"==typeof e?By[e.toUpperCase()]||By.WHITE:e}function My(e,t){if(!e)throw new Error(t||"Assertion failed")}function Ly(){let e;var t,s;if(Ny&&"performance"in Cy)e=null==Cy||null===(t=Cy.performance)||void 0===t||null===(s=t.now)||void 0===s?void 0:s.call(t);else if("hrtime"in Oy){var i;const t=null==Oy||null===(i=Oy.hrtime)||void 0===i?void 0:i.call(Oy);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(By||(By={}));const Uy={debug:Ny&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Hy={enabled:!0,level:0};function Gy(){}const ky={},Vy={once:!0};class jy{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};Ym(this,"id",void 0),Ym(this,"VERSION",Sy),Ym(this,"_startTs",Ly()),Ym(this,"_deltaTs",Ly()),Ym(this,"_storage",void 0),Ym(this,"userData",{}),Ym(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new xy("__probe-".concat(this.id,"__"),Hy),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Ly()-this._startTs).toPrecision(10))}getDelta(){return Number((Ly()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){My(e,t)}warn(e){return this._getLogFunction(0,e,Uy.warn,arguments,Vy)}error(e){return this._getLogFunction(0,e,Uy.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,Uy.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,Uy.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),r=2;r{const t=wy(e,s,i);console.log(...t)},e.src=t,Gy}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...wy(t,s,i)),Gy;if("canvas"===r.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...wy(e,s,i)),e.src=t.toDataURL(),Gy}return Gy}({image:i,message:r,scale:o}):function(e){let{image:t,message:s="",scale:i=1}=e,r=null;try{r=module.require("asciify-image")}catch(e){}if(r)return()=>r(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return Gy}({image:i,message:r,scale:o}):Gy}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Gy)}group(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const i=Wy({logLevel:e,message:t,opts:s}),{collapsed:r}=s;return i.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Gy)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Qy(e)}_getLogFunction(e,t,s,i,r){if(this._shouldLog(e)){r=Wy({logLevel:e,message:t,args:i,opts:r}),My(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=Ly();const o=r.tag||r.message;if(r.once){if(ky[o])return Gy;ky[o]=Ly()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return Ny||"string"!=typeof e||(t&&(t=Fy(t),e="[".concat(t,"m").concat(e,"")),s&&(t=Fy(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return Gy}}function Qy(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return My(Number.isFinite(t)&&t>=0),t}function Wy(e){const{logLevel:t,message:s}=e;e.logLevel=Qy(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return My("string"===r||"object"===r),Object.assign(e,{args:i},e.opts)}function zy(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}var Ky,Yy,Xy,Zy,qy,Jy,$y,eg,tg;let sg;Ym(jy,"VERSION",Sy),new jy({id:"loaders.gl"}),(tg=Ky||(Ky={}))[tg.NONE=0]="NONE",tg[tg.BASISLZ=1]="BASISLZ",tg[tg.ZSTD=2]="ZSTD",tg[tg.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(Yy||(Yy={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(Xy||(Xy={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Zy||(Zy={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(qy||(qy={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Jy||(Jy={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}($y||($y={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(eg||(eg={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(sg||(sg={}));const ig={DEFAULT:{}};function rg(e,t,s={}){const i="lightgrey",r=s.hoverColor||"rgba(0,0,0,0.4)",o=500,n=o+o/3,a=n/24,l=[{boundary:[6,6,6,6],color:s.frontColor||s.color||"#55FF55"},{boundary:[18,6,6,6],color:s.backColor||s.color||"#55FF55"},{boundary:[12,6,6,6],color:s.leftColor||s.color||"#FF5555"},{boundary:[0,6,6,6],color:s.rightColor||s.color||"#FF5555"},{boundary:[6,0,6,6],color:s.topColor||s.color||"#7777FF"},{boundary:[6,12,6,6],color:s.bottomColor||s.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];s.frontColor||s.color,s.backColor||s.color,s.leftColor||s.color,s.rightColor||s.color,s.topColor||s.color,s.bottomColor||s.color;const c=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let e=0,t=h.length;e=r[0]*a&&t<=(r[0]+r[2])*a&&s>=r[1]*a&&s<=(r[1]+r[3])*a)return i}}return-1},this.setAreaHighlighted=function(e,t){var s=A[e];if(!s)throw"Area not found: "+e;s.highlighted=!!t,f()},this.getAreaDir=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const og=p.vec3(),ng=p.vec3();p.mat4();class ag extends a{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new qt(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(e){return void this.error(e)}const s=this._navCubeScene;s.clearLights(),new qe(s,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new qe(s,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new qe(s,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=s.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,s.edgeMaterial.edgeColor=[.2,.2,.2],s.edgeMaterial.edgeAlpha=.6,this._zUp=Boolean(e.camera.zUp);var i=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=function(){const e=p.mat4();return function(t,s,r){return p.identityMat4(e),p.rotationMat4v(t*i._projectNorthOffsetAngle*p.DEGTORAD,[0,1,0],e),p.transformVec3(e,s,r)}}();this._synchCamera=function(){var t=p.rotationMat4c(-90*p.DEGTORAD,1,0,0),s=p.vec3(),o=p.vec3(),n=p.vec3();return function(){var a=e.camera.eye,l=e.camera.look,h=e.camera.up;s=p.mulVec3Scalar(p.normalizeVec3(p.subVec3(a,l,s)),5),i._isProjectNorth&&i._projectNorthOffsetAngle&&(s=r(-1,s,og),h=r(-1,h,ng)),i._zUp?(p.transformVec3(t,s,o),p.transformVec3(t,h,n),i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=p.transformVec3(t,s,o),i._navCubeCamera.up=p.transformPoint3(t,h,n)):(i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=s,i._navCubeCamera.up=h)}}(),this._cubeTextureCanvas=new rg(e,s,t),this._cubeSampler=new Bi(s,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:$t,wrapT:$t}),this._cubeMesh=new Ai(s,{geometry:new ct(s,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new ft(s,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=!1===t.shadowVisible?null:new Ai(s,{geometry:new ct(s,pi({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ft(s,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",(()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())})),this._onCameraFOV=e.camera.perspective.on("fov",(e=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=e)})),this._onCameraProjection=e.camera.on("projection",(e=>{this._synchProjection&&(this._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var o=-1;function n(e){var t=[0,0];if(e){for(var s=e.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var a,l,h=null,c=null,A=!1,u=!1,d=.5;i._navCubeCanvas.addEventListener("mouseenter",i._onMouseEnter=function(e){u=!0}),i._navCubeCanvas.addEventListener("mouseleave",i._onMouseLeave=function(e){u=!1}),i._navCubeCanvas.addEventListener("mousedown",i._onMouseDown=function(e){if(1===e.which){h=e.x,c=e.y,a=e.clientX,l=e.clientY;var t=n(e),i=s.pick({canvasPos:t});A=!!i}}),document.addEventListener("mouseup",i._onMouseUp=function(e){if(1===e.which&&(A=!1,null!==h)){var t=n(e),a=s.pick({canvasPos:t,pickSurface:!0});if(a&&a.uv){var l=i._cubeTextureCanvas.getArea(a.uv);if(l>=0&&(document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0)){if(i._cubeTextureCanvas.setAreaHighlighted(l,!0),o=l,i._repaint(),e.xh+3||e.yc+3)return;var u=i._cubeTextureCanvas.getAreaDir(l);if(u){var p=i._cubeTextureCanvas.getAreaUp(l);i._isProjectNorth&&i._projectNorthOffsetAngle&&(u=r(1,u,og),p=r(1,p,ng)),f(u,p,(function(){o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0&&(i._cubeTextureCanvas.setAreaHighlighted(l,!1),o=-1,i._repaint())}))}}}}}),document.addEventListener("mousemove",i._onMouseMove=function(t){if(o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),1!==t.buttons||A){if(A){var r=t.clientX,h=t.clientY;return document.body.style.cursor="move",void function(t,s){var i=(t-a)*-d,r=(s-l)*-d;e.camera.orbitYaw(i),e.camera.orbitPitch(-r),a=t,l=s}(r,h)}if(u){var c=n(t),p=s.pick({canvasPos:c,pickSurface:!0});if(p){if(p.uv){document.body.style.cursor="pointer";var f=i._cubeTextureCanvas.getArea(p.uv);if(f===o)return;o>=0&&i._cubeTextureCanvas.setAreaHighlighted(o,!1),f>=0&&(i._cubeTextureCanvas.setAreaHighlighted(f,!0),i._repaint(),o=f)}}else document.body.style.cursor="default",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1)}}});var f=function(){var t=p.vec3();return function(s,r,o){var n=i._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,a=p.getAABB3Diag(n);p.getAABB3Center(n,t);var l=Math.abs(a/Math.tan(i._cameraFitFOV*p.DEGTORAD));e.cameraControl.pivotPos=t,i._cameraFly?e.cameraFlight.flyTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV,duration:i._cameraFlyDuration},o):e.cameraFlight.jumpTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV},o)}}();this._onUpdated=e.localeService.on("updated",(()=>{this._cubeTextureCanvas.clear(),this._repaint()})),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return!!this._navCubeCanvas&&this._cubeMesh.visible}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}p.vec3();const lg=new Float64Array([0,0,1]),hg=new Float64Array(4);class cg{constructor(e){this.id=null,this._viewer=e.viewer,this._visible=!1,this._pos=p.vec3(),this._origin=p.vec3(),this._rtcPos=p.vec3(),this._baseDir=p.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}_setSectionPlane(e){this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(()=>{this._setPos(this._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(()=>{this._ignoreNextSectionPlaneDirUpdate?this._ignoreNextSectionPlaneDirUpdate=!1:this._setDir(this._sectionPlane.dir)})))}get sectionPlane(){return this._sectionPlane}_setPos(e){this._pos.set(e),x(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}_setDir(e){this._baseDir.set(e),this._rootNode.quaternion=p.vec3PairToQuaternion(lg,e,hg)}_setSectionPlaneDir(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}setVisible(e=!0){if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}getVisible(){return this._visible}setCulled(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}_createNodes(){const e=!1,t=this._viewer.scene,s=.01;this._rootNode=new Pi(t,{position:[0,0,0],scale:[5,5,5]});const i=this._rootNode,r={arrowHead:new ct(i,pi({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new ct(i,pi({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new ct(i,pi({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new ct(i,Gi({radius:.8,tube:s,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new ct(i,Gi({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new ct(i,Gi({radius:.8,tube:s,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new ct(i,pi({radiusTop:s,radiusBottom:s,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new ct(i,pi({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},o={pickable:new ft(i,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new ft(i,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new mt(i,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new ft(i,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new mt(i,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new ft(i,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new mt(i,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new ft(i,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new mt(i,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new mt(i,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:i.addChild(new Ai(i,{geometry:new ct(i,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new ft(i,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new mt(i,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1]}),e),planeFrame:i.addChild(new Ai(i,{geometry:new ct(i,Gi({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new ft(i,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new mt(i,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45]}),e),xCurve:i.addChild(new Ai(i,{geometry:r.curve,material:o.red,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveHandle:i.addChild(new Ai(i,{geometry:r.curveHandle,material:o.pickable,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveArrow1:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,-.07,-.8,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(0*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xCurveArrow2:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,-.8,-.07,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurve:i.addChild(new Ai(i,{geometry:r.curve,material:o.green,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveHandle:i.addChild(new Ai(i,{geometry:r.curveHandle,material:o.pickable,rotation:[-90,0,0],pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveArrow1:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(.07,0,-.8,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurveArrow2:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(.8,0,-.07,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurve:i.addChild(new Ai(i,{geometry:r.curve,material:o.blue,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zCurveHandle:i.addChild(new Ai(i,{geometry:r.curveHandle,material:o.pickable,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveCurveArrow1:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(.8,-.07,0,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4());return p.mulMat4(e,t,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveArrow2:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(.05,-.8,0,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),center:i.addChild(new Ai(i,{geometry:new ct(i,di({radius:.05})),material:o.center,pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrowHandle:i.addChild(new Ai(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xAxis:i.addChild(new Ai(i,{geometry:r.axis,material:o.red,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisHandle:i.addChild(new Ai(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrowHandle:i.addChild(new Ai(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1,opacity:.2}),e),yShaft:i.addChild(new Ai(i,{geometry:r.axis,material:o.green,position:[0,-.5,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yShaftHandle:i.addChild(new Ai(i,{geometry:r.axisHandle,material:o.pickable,position:[0,-.5,0],pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrowHandle:i.addChild(new Ai(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zShaft:i.addChild(new Ai(i,{geometry:r.axis,material:o.blue,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),clippable:!1,pickable:!1,collidable:!0,visible:!1}),e),zAxisHandle:i.addChild(new Ai(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),clippable:!1,pickable:!0,collidable:!0,visible:!1}),e)},this._affordanceMeshes={planeFrame:i.addChild(new Ai(i,{geometry:new ct(i,Gi({center:[0,0,0],radius:2,tube:s,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new ft(i,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new mt(i,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45]}),e),xHoop:i.addChild(new Ai(i,{geometry:r.hoop,material:o.red,highlighted:!0,highlightMaterial:o.highlightRed,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yHoop:i.addChild(new Ai(i,{geometry:r.hoop,material:o.green,highlighted:!0,highlightMaterial:o.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zHoop:i.addChild(new Ai(i,{geometry:r.hoop,material:o.blue,highlighted:!0,highlightMaterial:o.highlightBlue,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHeadBig,material:o.red,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHeadBig,material:o.green,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new Ai(i,{geometry:r.arrowHeadBig,material:o.blue,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e)}}_bindEvents(){const e=this;var t=!1;const s=-1,i=0,r=1,o=2,n=3,a=4,l=5,h=this._rootNode;var c=null,A=null;const u=p.vec2(),d=p.vec3([1,0,0]),f=p.vec3([0,1,0]),E=p.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,y=this._viewer.camera,g=this._viewer.scene;{const e=p.vec3([0,0,0]);let t=-1;this._onCameraViewMatrix=g.camera.on("viewMatrix",(()=>{})),this._onCameraProjMatrix=g.camera.on("projMatrix",(()=>{})),this._onSceneTick=g.on("tick",(()=>{const s=Math.abs(p.lenVec3(p.subVec3(g.camera.eye,this._pos,e)));if(s!==t&&"perspective"===y.projection){const e=.07*(Math.tan(y.perspective.fov*p.DEGTORAD)*s);h.scale=[e,e,e],t=s}if("ortho"===y.projection){const e=y.ortho.scale/10;h.scale=[e,e,e],t=s}}))}const I=function(){const e=new Float64Array(2);return function(t){if(t){for(var s=t.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;e[0]=t.pageX-i,e[1]=t.pageY-r}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),v=function(){const t=p.mat4();return function(s,i){return p.quaternionToMat4(e._rootNode.quaternion,t),p.transformVec3(t,s,i),p.normalizeVec3(i),i}}();var T=function(){const e=p.vec3();return function(t){const s=Math.abs(t[0]);return s>Math.abs(t[1])&&s>Math.abs(t[2])?p.cross3Vec3(t,[0,1,0],e):p.cross3Vec3(t,[1,0,0],e),p.cross3Vec3(e,t,e),p.normalizeVec3(e),e}}();const _=function(){const t=p.vec3(),s=p.vec3(),i=p.vec4();return function(r,o,n){v(r,i);const a=T(i,o,n);P(o,a,t),P(n,a,s),p.subVec3(s,t);const l=p.dotVec3(s,i);e._pos[0]+=i[0]*l,e._pos[1]+=i[1]*l,e._pos[2]+=i[2]*l,e._rootNode.position=e._pos,e._sectionPlane&&(e._sectionPlane.pos=e._pos)}}();var R=function(){const t=p.vec4(),s=p.vec4(),i=p.vec4(),r=p.vec4();return function(o,n,a){v(o,r);if(!(P(n,r,t)&&P(a,r,s))){const e=T(r,n,a);P(n,e,t,1),P(a,e,s,1);var l=p.dotVec3(t,r);t[0]-=l*r[0],t[1]-=l*r[1],t[2]-=l*r[2],l=p.dotVec3(s,r),s[0]-=l*r[0],s[1]-=l*r[1],s[2]-=l*r[2]}p.normalizeVec3(t),p.normalizeVec3(s),l=p.dotVec3(t,s),l=p.clamp(l,-1,1);var h=Math.acos(l)*p.RADTODEG;p.cross3Vec3(t,s,i),p.dotVec3(i,r)<0&&(h=-h),e._rootNode.rotate(o,h),D()}}(),P=function(){const t=p.vec4([0,0,0,1]),s=p.mat4();return function(i,r,o,n){n=n||0,t[0]=i[0]/m.width*2-1,t[1]=-(i[1]/m.height*2-1),t[2]=0,t[3]=1,p.mulMat4(y.projMatrix,y.viewMatrix,s),p.inverseMat4(s),p.transformVec4(s,t,t),p.mulVec4Scalar(t,1/t[3]);var a=y.eye;p.subVec4(t,a,t);const l=e._sectionPlane.pos;var h=-p.dotVec3(l,r)-n,c=p.dotVec3(r,t);if(Math.abs(c)>.005){var A=-(p.dotVec3(r,a)+h)/c;return p.mulVec3Scalar(t,A,o),p.addVec3(o,a),p.subVec3(o,l,o),!0}return!1}}();const D=function(){const t=p.vec3(),s=p.mat4();return function(){e.sectionPlane&&(p.quaternionToMat4(h.quaternion,s),p.transformVec3(s,[0,0,1],t),e._setSectionPlaneDir(t))}}();var N,b=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(e=>{if(!this._visible)return;if(b)return;var h;t=!1,N&&(N.visible=!1);switch(e.entity.id){case this._displayMeshes.xAxisArrowHandle.id:case this._displayMeshes.xAxisHandle.id:h=this._affordanceMeshes.xAxisArrow,c=i;break;case this._displayMeshes.yAxisArrowHandle.id:case this._displayMeshes.yShaftHandle.id:h=this._affordanceMeshes.yAxisArrow,c=r;break;case this._displayMeshes.zAxisArrowHandle.id:case this._displayMeshes.zAxisHandle.id:h=this._affordanceMeshes.zAxisArrow,c=o;break;case this._displayMeshes.xCurveHandle.id:h=this._affordanceMeshes.xHoop,c=n;break;case this._displayMeshes.yCurveHandle.id:h=this._affordanceMeshes.yHoop,c=a;break;case this._displayMeshes.zCurveHandle.id:h=this._affordanceMeshes.zHoop,c=l;break;default:return void(c=s)}h&&(h.visible=!0),N=h,t=!0})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOutEntity",(e=>{this._visible&&(N&&(N.visible=!1),N=null,c=s)})),m.addEventListener("mousedown",this._canvasMouseDownListener=e=>{if(e.preventDefault(),this._visible&&t&&(this._viewer.cameraControl.pointerEnabled=!1,1===e.which)){b=!0;var s=I(e);A=c,u[0]=s[0],u[1]=s[1]}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=e=>{if(!this._visible)return;if(!b)return;var t=I(e);const s=t[0],h=t[1];switch(A){case i:_(d,u,t);break;case r:_(f,u,t);break;case o:_(E,u,t);break;case n:R(d,u,t);break;case a:R(f,u,t);break;case l:R(E,u,t)}u[0]=s,u[1]=h}),m.addEventListener("mouseup",this._canvasMouseUpListener=e=>{this._visible&&(this._viewer.cameraControl.pointerEnabled=!0,b&&(e.which,b=!1,t=!1))}),m.addEventListener("wheel",this._canvasWheelListener=e=>{if(this._visible)Math.max(-1,Math.min(1,40*-e.deltaY))})}_destroy(){this._unbindEvents(),this._destroyNodes()}_unbindEvents(){const e=this._viewer,t=e.scene,s=t.canvas.canvas,i=e.camera,r=e.cameraControl;t.off(this._onSceneTick),s.removeEventListener("mousedown",this._canvasMouseDownListener),s.removeEventListener("mousemove",this._canvasMouseMoveListener),s.removeEventListener("mouseup",this._canvasMouseUpListener),s.removeEventListener("wheel",this._canvasWheelListener),i.off(this._onCameraViewMatrix),i.off(this._onCameraProjMatrix),r.off(this._onCameraControlHover),r.off(this._onCameraControlHoverLeave)}_destroyNodes(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}class Ag{constructor(e,t,s){this.id=s.id,this._sectionPlane=s,this._mesh=new Ai(t,{id:s.id,geometry:new ct(t,At({xSize:.5,ySize:.5,zSize:.001})),material:new ft(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new gt(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new mt(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new mt(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const e=p.vec3([0,0,0]),t=p.vec3(),s=p.vec3([0,0,1]),i=p.vec4(4),r=p.vec3(),o=()=>{const o=this._sectionPlane.scene.center,n=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];p.subVec3(o,this._sectionPlane.pos,e);const a=-p.dotVec3(n,e);p.normalizeVec3(n),p.mulVec3Scalar(n,a,t);const l=p.vec3PairToQuaternion(s,this._sectionPlane.dir,i);r[0]=.1*t[0],r[1]=.1*t[1],r[2]=.1*t[2],this._mesh.quaternion=l,this._mesh.position=r};this._onSectionPlanePos=this._sectionPlane.on("pos",o),this._onSectionPlaneDir=this._sectionPlane.on("dir",o)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}class ug{constructor(e,t){if(!(t.onHoverEnterPlane&&t.onHoverLeavePlane&&t.onClickedNothing&&t.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new qt(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new qe(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new qe(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new qe(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const e=this._scene.camera,t=p.rotationMat4c(-90*p.DEGTORAD,1,0,0),s=p.vec3(),i=p.vec3(),r=p.vec3();this._synchCamera=()=>{const o=this._viewer.camera.eye,n=this._viewer.camera.look,a=this._viewer.camera.up;p.mulVec3Scalar(p.normalizeVec3(p.subVec3(o,n,s)),7),this._zUp?(p.transformVec3(t,s,i),p.transformVec3(t,a,r),e.look=[0,0,0],e.eye=p.transformVec3(t,s,i),e.up=p.transformPoint3(t,a,r)):(e.look=[0,0,0],e.eye=s,e.up=a)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(e=>{this._scene.camera.perspective.fov=e}));var s=null;this._onInputMouseMove=this._scene.input.on("mousemove",(e=>{const t=this._scene.pick({canvasPos:e});if(t){if(!s||t.entity.id!==s.id){if(s){this._planes[s.id]&&this._onHoverLeavePlane(s.id)}s=t.entity;this._planes[s.id]&&this._onHoverEnterPlane(s.id)}}else s&&(this._onHoverLeavePlane(s.id),s=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{if(s){this._planes[s.id]&&this._onClickedPlane(s.id)}else this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{s&&(this._onHoverLeavePlane(s.id),s=null)}),this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new Ag(this,this._scene,e)}setPlaneHighlighted(e,t){const s=this._planes[e];s&&s.setHighlighted(t)}setPlaneSelected(e,t){const s=this._planes[e];s&&s.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const pg=p.AABB3(),dg=p.vec3();class fg extends a{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,null!==t.overviewCanvasId&&void 0!==t.overviewCanvasId){const e=document.getElementById(t.overviewCanvasId);e?this._overview=new ug(this,{overviewCanvas:e,visible:t.overviewVisible,onHoverEnterPlane:e=>{this._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:e=>{this._overview.setPlaneHighlighted(e,!1)},onClickedPlane:e=>{if(this.getShownControl()===e)return void this.hideControl();this.showControl(e);const t=this.sectionPlanes[e].pos;pg.set(this.viewer.scene.aabb),p.getAABB3Center(pg,dg),pg[0]+=t[0]-dg[0],pg[1]+=t[1]-dg[1],pg[2]+=t[2]-dg[2],pg[3]+=t[0]-dg[0],pg[4]+=t[1]-dg[1],pg[5]+=t[2]-dg[2],this.viewer.cameraFlight.flyTo({aabb:pg,fitFOV:65})},onClickedNothing:()=>{this.hideControl()}}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",(e=>{this._sectionPlaneCreated(e)}))}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id);return new fi(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():new cg(this);t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(()=>{this._sectionPlaneDestroyed(e)}))}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].flipDir()}}showControl(e){const t=this._controls[e];t?(this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e):this.error("Control not found: "+e)}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)):this.error("SectionPlane not found: "+e)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,s=e.length;t{e.preventDefault()},this._onObjectVisibility=this._viewer.scene.on("objectVisibility",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;const i=e.visible;if(!(i!==s.checked))return;this._muteTreeEvents=!0,s.checked=i,i?s.numVisibleEntities++:s.numVisibleEntities--;const r=document.getElementById(`checkbox-${s.nodeId}`);r&&(r.checked=i);let o=s.parent;for(;o;){o.checked=i,i?o.numVisibleEntities++:o.numVisibleEntities--;const e=document.getElementById(`checkbox-${o.nodeId}`);if(e){const t=o.numVisibleEntities>0;t!==e.checked&&(e.checked=t)}o=o.parent}this._muteTreeEvents=!1})),this._onObjectXrayed=this._viewer.scene.on("objectXRayed",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;this._muteTreeEvents=!0;const i=e.xrayed;if(!(i!==s.xrayed))return;s.xrayed=i;const r=s.nodeId,o=document.getElementById(r);null!==o&&(i?o.classList.add("xrayed-node"):o.classList.remove("xrayed-node")),this._muteTreeEvents=!1})),this._switchExpandHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._expandSwitchElement(t)},this._switchCollapseHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._collapseSwitchElement(t)},this._checkboxChangeHandler=e=>{if(this._muteTreeEvents)return;this._muteSceneEvents=!0;const t=e.target,s=t.checked,i=t.id.replace("checkbox-",""),r=this._nodeNodes[i],o=this._viewer.scene.objects;let n=0;this._withNodeTree(r,(e=>{const t=e.objectId,i=`checkbox-${e.nodeId}`,r=o[t],a=0===e.children.length;e.numVisibleEntities=s?e.numEntities:0,a&&s!==e.checked&&n++,e.checked=s;const l=document.getElementById(i);l&&(l.checked=s),r&&(r.visible=s)}));let a=r.parent;for(;a;){a.checked=s;const e=document.getElementById(`checkbox-${a.nodeId}`);s?a.numVisibleEntities+=n:a.numVisibleEntities-=n;const t=a.numVisibleEntities>0;t!==e.checked&&(e.checked=t),a=a.parent}this._muteSceneEvents=!1},this._hierarchy=t.hierarchy||"containment",this._autoExpandDepth=t.autoExpandDepth||0,this._autoAddModels){const e=Object.keys(this.viewer.metaScene.metaModels);for(let t=0,s=e.length;t{this.viewer.metaScene.metaModels[e]&&this.addModel(e)}))}this.hierarchy=t.hierarchy}else this.error("Config expected: containerElement")}set hierarchy(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}get hierarchy(){return this._hierarchy}addModel(e,t={}){if(!this._containerElement)return;const s=this.viewer.scene.models[e];if(!s)throw"Model not found: "+e;const i=this.viewer.metaScene.metaModels[e];i?this._metaModels[e]?this.warn("Model already added: "+e):(this._metaModels[e]=i,s.on("destroyed",(()=>{this.removeModel(s.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}removeModel(e){if(!this._containerElement)return;this._metaModels[e]&&(delete this._metaModels[e],this._createNodes())}showNode(e){this._showListItemElementId&&this.unShowNode();const t=this._objectNodes[e];if(!t)return;const s=t.nodeId,i="switch-"+s,r=document.getElementById(i);if(r)return this._expandSwitchElement(r),void r.scrollIntoView();const o=[];o.unshift(t);let n=t.parent;for(;n;)o.unshift(n),n=n.parent;for(let e=0,t=o.length;e{if(i===e)return;const r="switch-"+s.nodeId,o=document.getElementById(r);if(o){this._expandSwitchElement(o);const e=s.children;for(var n=0,a=e.length;n0;return this.valid}_validateMetaModelForStoreysHierarchy(e=0,t,s){return!0}_createEnabledNodes(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this._createTrees(),this.expandToDepth(this._autoExpandDepth)}_createDisabledNodes(){const e=document.createElement("ul");this._rootElement=e,this._containerElement.appendChild(e);const t=this._viewer.metaScene.rootMetaObjects;for(let s in t){const i=t[s],r=i.type,o=i.name,n=o&&""!==o&&"Undefined"!==o&&"Default"!==o?o:r,a=document.createElement("li");e.appendChild(a);const l=document.createElement("a");l.href="#",l.textContent="!",l.classList.add("warn"),l.classList.add("warning"),a.appendChild(l);const h=document.createElement("span");h.textContent=n,a.appendChild(h)}}_findEmptyNodes(){const e=this._viewer.metaScene.rootMetaObjects;for(let t in e)this._findEmptyNodes2(e[t])}_findEmptyNodes2(e,t=0){const s=this.viewer.scene,i=e.children,r=e.id,o=s.objects[r];if(e._countEntities=0,o&&e._countEntities++,i)for(let t=0,s=i.length;t{e.aabb&&r.aabb||(e.aabb||(e.aabb=t.getAABB(i.getObjectIDsInSubtree(e.objectId))),r.aabb||(r.aabb=t.getAABB(i.getObjectIDsInSubtree(r.objectId))));let o=0;return o=s.xUp?0:s.yUp?1:2,e.aabb[o]>r.aabb[o]?-1:e.aabb[o]i?1:0}_synchNodesToEntities(){const e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,s=this._viewer.scene.objects;for(let i=0,r=e.length;ithis._createNodeElement(e))),t=document.createElement("ul");e.forEach((e=>{t.appendChild(e)})),this._containerElement.appendChild(t),this._rootElement=t}_createNodeElement(e){const t=document.createElement("li"),s=e.nodeId;if(e.xrayed&&t.classList.add("xrayed-node"),t.id=s,e.children.length>0){const e="switch-"+s,i=document.createElement("a");i.href="#",i.id=e,i.textContent="+",i.classList.add("plus"),i.addEventListener("click",this._switchExpandHandler),t.appendChild(i)}const i=document.createElement("input");i.id=`checkbox-${s}`,i.type="checkbox",i.checked=e.checked,i.style["pointer-events"]="all",i.addEventListener("change",this._checkboxChangeHandler),t.appendChild(i);const r=document.createElement("span");return r.textContent=e.title,t.appendChild(r),r.oncontextmenu=t=>{this.fire("contextmenu",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},r.onclick=t=>{this.fire("nodeTitleClicked",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},t}_expandSwitchElement(e){const t=e.parentElement;if(t.getElementsByTagName("li")[0])return;const s=t.id,i=this._nodeNodes[s].children.map((e=>this._createNodeElement(e))),r=document.createElement("ul");i.forEach((e=>{r.appendChild(e)})),t.appendChild(r),e.classList.remove("plus"),e.classList.add("minus"),e.textContent="-",e.removeEventListener("click",this._switchExpandHandler),e.addEventListener("click",this._switchCollapseHandler)}_collapseNode(e){const t="switch-"+e,s=document.getElementById(t);this._collapseSwitchElement(s)}_collapseSwitchElement(e){if(!e)return;const t=e.parentElement;if(!t)return;const s=t.querySelector("ul");s&&(t.removeChild(s),e.classList.remove("minus"),e.classList.add("plus"),e.textContent="+",e.removeEventListener("click",this._switchCollapseHandler),e.addEventListener("click",this._switchExpandHandler))}}class yg{constructor(){}getManifest(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getMetaModel(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getXKT(e,t,s){var i=()=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=0;)e[t]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);t(n);const a=new Array(60);t(a);const l=new Array(512);t(l);const h=new Array(256);t(h);const c=new Array(29);t(c);const A=new Array(30);function u(e,t,s,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}let p,d,f;function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(A);const m=e=>e<256?l[e]:l[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},g=(e,t,s)=>{e.bi_valid>16-s?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=s-16):(e.bi_buf|=t<{g(e,s[2*t],s[2*t+1])},v=(e,t)=>{let s=0;do{s|=1&e,e>>>=1,s<<=1}while(--t>0);return s>>>1},T=(e,t,s)=>{const i=new Array(16);let r,o,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=v(i[t]++,t))}},_=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},R=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},P=(e,t,s,i)=>{const r=2*t,o=2*s;return e[r]{const i=e.heap[s];let r=s<<1;for(;r<=e.heap_len&&(r{let o,n,a,l,u=0;if(0!==e.sym_next)do{o=255&e.pending_buf[e.sym_buf+u++],o+=(255&e.pending_buf[e.sym_buf+u++])<<8,n=e.pending_buf[e.sym_buf+u++],0===o?I(e,n,t):(a=h[n],I(e,a+256+1,t),l=s[a],0!==l&&(n-=c[a],g(e,n,l)),o--,a=m(o),I(e,a,r),l=i[a],0!==l&&(o-=A[a],g(e,o,l)))}while(u{const s=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems;let n,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,n=0;n>1;n>=1;n--)D(e,s,n);l=o;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,s,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,s[2*l]=s[2*n]+s[2*a],e.depth[l]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,s[2*n+1]=s[2*a+1]=l,e.heap[1]=l++,D(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const s=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,n=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,A,u,p,d,f=0;for(u=0;u<=15;u++)e.bl_count[u]=0;for(s[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],u=s[2*s[2*c+1]+1]+1,u>l&&(u=l,f++),s[2*c+1]=u,c>i||(e.bl_count[u]++,p=0,c>=a&&(p=n[c-a]),d=s[2*c],e.opt_len+=d*(u+p),o&&(e.static_len+=d*(r[2*c+1]+p)));if(0!==f){do{for(u=l-1;0===e.bl_count[u];)u--;e.bl_count[u]--,e.bl_count[u+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(u=l;0!==u;u--)for(c=e.bl_count[u];0!==c;)A=e.heap[--h],A>i||(s[2*A+1]!==u&&(e.opt_len+=(u-s[2*A+1])*s[2*A],s[2*A+1]=u),c--)}})(e,t),T(s,h,e.bl_count)},C=(e,t,s)=>{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),t[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=t[2*(i+1)+1],++a{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),i=0;i<=s;i++)if(r=n,n=t[2*(i+1)+1],!(++a{g(e,0+(i?1:0),3),R(e),y(e,s),y(e,~s),s&&e.pending_buf.set(e.window.subarray(t,t+s),e.pending),e.pending+=s};var w={_tr_init:e=>{S||((()=>{let e,t,o,E,m;const y=new Array(16);for(o=0,E=0;E<28;E++)for(c[E]=o,e=0;e<1<>=7;E<30;E++)for(A[E]=m<<7,e=0;e<1<{let r,l,h=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,s=4093624447;for(t=0;t<=31;t++,s>>>=1)if(1&s&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),b(e,e.l_desc),b(e,e.d_desc),h=(e=>{let t;for(C(e,e.dyn_ltree,e.l_desc.max_code),C(e,e.dyn_dtree,e.d_desc.max_code),b(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*o[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,l=e.static_len+3+7>>>3,l<=r&&(r=l)):r=l=s+5,s+4<=r&&-1!==t?x(e,t,s,i):4===e.strategy||l===r?(g(e,2+(i?1:0),3),N(e,n,a)):(g(e,4+(i?1:0),3),((e,t,s,i)=>{let r;for(g(e,t-257,5),g(e,s-1,5),g(e,i-4,4),r=0;r(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=s,0===t?e.dyn_ltree[2*s]++:(e.matches++,t--,e.dyn_ltree[2*(h[s]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{g(e,2,3),I(e,256,n),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},B=(e,t,s,i)=>{let r=65535&e|0,o=e>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+t[i++]|0,o=o+r|0}while(--n);r%=65521,o%=65521}return r|o<<16|0};const F=new Uint32Array((()=>{let e,t=[];for(var s=0;s<256;s++){e=s;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[s]=e}return t})());var M=(e,t,s,i)=>{const r=F,o=i+s;e^=-1;for(let s=i;s>>8^r[255&(e^t[s])];return-1^e},L={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},U={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:G,_tr_flush_block:k,_tr_tally:V,_tr_align:j}=w,{Z_NO_FLUSH:Q,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:z,Z_FINISH:K,Z_BLOCK:Y,Z_OK:X,Z_STREAM_END:Z,Z_STREAM_ERROR:q,Z_DATA_ERROR:J,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:te,Z_HUFFMAN_ONLY:se,Z_RLE:ie,Z_FIXED:re,Z_DEFAULT_STRATEGY:oe,Z_UNKNOWN:ne,Z_DEFLATED:ae}=U,le=258,he=262,ce=42,Ae=113,ue=666,pe=(e,t)=>(e.msg=L[t],t),de=e=>2*e-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ee=e=>{let t,s,i,r=e.w_size;t=e.hash_size,i=t;do{s=e.head[--i],e.head[i]=s>=r?s-r:0}while(--t);t=r,i=t;do{s=e.prev[--i],e.prev[i]=s>=r?s-r:0}while(--t)};let me=(e,t,s)=>(t<{const t=e.state;let s=t.pending;s>e.avail_out&&(s=e.avail_out),0!==s&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+s),e.next_out),e.next_out+=s,t.pending_out+=s,e.total_out+=s,e.avail_out-=s,t.pending-=s,0===t.pending&&(t.pending_out=0))},ge=(e,t)=>{k(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ye(e.strm)},Ie=(e,t)=>{e.pending_buf[e.pending++]=t},ve=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Te=(e,t,s,i)=>{let r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),s),1===e.state.wrap?e.adler=B(e.adler,t,r,s):2===e.state.wrap&&(e.adler=M(e.adler,t,r,s)),e.next_in+=r,e.total_in+=r,r)},_e=(e,t)=>{let s,i,r=e.max_chain_length,o=e.strstart,n=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-he?e.strstart-(e.w_size-he):0,h=e.window,c=e.w_mask,A=e.prev,u=e.strstart+le;let p=h[o+n-1],d=h[o+n];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(s=t,h[s+n]===d&&h[s+n-1]===p&&h[s]===h[o]&&h[++s]===h[o+1]){o+=2,s++;do{}while(h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&on){if(e.match_start=t,n=i,i>=a)break;p=h[o+n-1],d=h[o+n]}}}while((t=A[t&c])>l&&0!=--r);return n<=e.lookahead?n:e.lookahead},Re=e=>{const t=e.w_size;let s,i,r;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-he)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ee(e),i+=t),0===e.strm.avail_in)break;if(s=Te(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=s,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=me(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=me(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let s,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n=0,a=e.strm.avail_in;do{if(s=65535,r=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(s=i+e.strm.avail_in),s>r&&(s=r),s>8,e.pending_buf[e.pending-2]=~s,e.pending_buf[e.pending-1]=~s>>8,ye(e.strm),i&&(i>s&&(i=s),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,s-=i),s&&(Te(e.strm,e.strm.output,e.strm.next_out,s),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s)}while(0===n);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waterr&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(Te(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,o=r>e.w_size?e.w_size:r,i=e.strstart-e.block_start,(i>=o||(i||t===K)&&t!==Q&&0===e.strm.avail_in&&i<=r)&&(s=i>r?r:i,n=t===K&&0===e.strm.avail_in&&s===i?1:0,G(e,e.block_start,s,n),e.block_start+=s,ye(e.strm)),n?3:1)},De=(e,t)=>{let s,i;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==s&&e.strstart-s<=e.w_size-he&&(e.match_length=_e(e,s)),e.match_length>=3)if(i=V(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=me(e,e.ins_h,e.window[e.strstart+1]);else i=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2},Ne=(e,t)=>{let s,i,r;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==s&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=V(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(ge(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=V(e,0,e.window[e.strstart-1]),i&&ge(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=V(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2};function be(e,t,s,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=s,this.max_chain=i,this.func=r}const Ce=[new be(0,0,0,0,Pe),new be(4,4,8,4,De),new be(4,5,16,8,De),new be(4,6,32,32,De),new be(4,4,16,16,Ne),new be(8,16,32,32,Ne),new be(8,16,128,128,Ne),new be(8,32,128,256,Ne),new be(32,128,258,1024,Ne),new be(32,258,258,4096,Ne)];function Oe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ae,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Se=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ce&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ae&&t.status!==ue?1:0},xe=e=>{if(Se(e))return pe(e,q);e.total_in=e.total_out=0,e.data_type=ne;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ce:Ae,e.adler=2===t.wrap?0:1,t.last_flush=-2,H(t),X},we=e=>{const t=xe(e);var s;return t===X&&((s=e.state).window_size=2*s.w_size,fe(s.head),s.max_lazy_match=Ce[s.level].max_lazy,s.good_match=Ce[s.level].good_length,s.nice_match=Ce[s.level].nice_length,s.max_chain_length=Ce[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),t},Be=(e,t,s,i,r,o)=>{if(!e)return q;let n=1;if(t===ee&&(t=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==ae||i<8||i>15||t<0||t>9||o<0||o>re||8===i&&1!==n)return pe(e,q);8===i&&(i=9);const a=new Oe;return e.state=a,a.strm=e,a.status=ce,a.wrap=n,a.gzhead=null,a.w_bits=i,a.w_size=1<Se(e)||2!==e.state.wrap?q:(e.state.gzhead=t,X),Le=(e,t)=>{if(Se(e)||t>Y||t<0)return e?pe(e,q):q;const s=e.state;if(!e.output||0!==e.avail_in&&!e.input||s.status===ue&&t!==K)return pe(e,0===e.avail_out?$:q);const i=s.last_flush;if(s.last_flush=t,0!==s.pending){if(ye(e),0===e.avail_out)return s.last_flush=-1,X}else if(0===e.avail_in&&de(t)<=de(i)&&t!==K)return pe(e,$);if(s.status===ue&&0!==e.avail_in)return pe(e,$);if(s.status===ce&&0===s.wrap&&(s.status=Ae),s.status===ce){let t=ae+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=se||s.level<2?0:s.level<6?1:6===s.level?2:3,t|=i<<6,0!==s.strstart&&(t|=32),t+=31-t%31,ve(s,t),0!==s.strstart&&(ve(s,e.adler>>>16),ve(s,65535&e.adler)),e.adler=1,s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(57===s.status)if(e.adler=0,Ie(s,31),Ie(s,139),Ie(s,8),s.gzhead)Ie(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),Ie(s,255&s.gzhead.time),Ie(s,s.gzhead.time>>8&255),Ie(s,s.gzhead.time>>16&255),Ie(s,s.gzhead.time>>24&255),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(Ie(s,255&s.gzhead.extra.length),Ie(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=M(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,3),s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X;if(69===s.status){if(s.gzhead.extra){let t=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex+=r,ye(e),0!==s.pending)return s.last_flush=-1,X;t=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(ye(e),0!==s.pending))return s.last_flush=-1,X;Ie(s,255&e.adler),Ie(s,e.adler>>8&255),e.adler=0}if(s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(0!==e.avail_in||0!==s.lookahead||t!==Q&&s.status!==ue){let i=0===s.level?Pe(s,t):s.strategy===se?((e,t)=>{let s;for(;;){if(0===e.lookahead&&(Re(e),0===e.lookahead)){if(t===Q)return 1;break}if(e.match_length=0,s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):s.strategy===ie?((e,t)=>{let s,i,r,o;const n=e.window;for(;;){if(e.lookahead<=le){if(Re(e),e.lookahead<=le&&t===Q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,i=n[r],i===n[++r]&&i===n[++r]&&i===n[++r])){o=e.strstart+le;do{}while(i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(s=V(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):Ce[s.level].func(s,t);if(3!==i&&4!==i||(s.status=ue),1===i||3===i)return 0===e.avail_out&&(s.last_flush=-1),X;if(2===i&&(t===W?j(s):t!==Y&&(G(s,0,0,!1),t===z&&(fe(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),ye(e),0===e.avail_out))return s.last_flush=-1,X}return t!==K?X:s.wrap<=0?Z:(2===s.wrap?(Ie(s,255&e.adler),Ie(s,e.adler>>8&255),Ie(s,e.adler>>16&255),Ie(s,e.adler>>24&255),Ie(s,255&e.total_in),Ie(s,e.total_in>>8&255),Ie(s,e.total_in>>16&255),Ie(s,e.total_in>>24&255)):(ve(s,e.adler>>>16),ve(s,65535&e.adler)),ye(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?X:Z)},Ue=e=>{if(Se(e))return q;const t=e.state.status;return e.state=null,t===Ae?pe(e,J):X},He=(e,t)=>{let s=t.length;if(Se(e))return q;const i=e.state,r=i.wrap;if(2===r||1===r&&i.status!==ce||i.lookahead)return q;if(1===r&&(e.adler=B(e.adler,t,s,0)),i.wrap=0,s>=i.w_size){0===r&&(fe(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(s-i.w_size,s),0),t=e,s=i.w_size}const o=e.avail_in,n=e.next_in,a=e.input;for(e.avail_in=s,e.next_in=0,e.input=t,Re(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=me(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Re(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=n,e.input=a,e.avail_in=o,i.wrap=r,X};const Ge=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ke=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const s=t.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(const t in s)Ge(s,t)&&(e[t]=s[t])}}return e},Ve=e=>{let t=0;for(let s=0,i=e.length;s=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qe[254]=Qe[254]=1;var We=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,s,i,r,o,n=e.length,a=0;for(r=0;r>>6,t[o++]=128|63&s):s<65536?(t[o++]=224|s>>>12,t[o++]=128|s>>>6&63,t[o++]=128|63&s):(t[o++]=240|s>>>18,t[o++]=128|s>>>12&63,t[o++]=128|s>>>6&63,t[o++]=128|63&s);return t},ze=(e,t)=>{const s=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,r;const o=new Array(2*s);for(r=0,i=0;i4)o[r++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&je)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let s="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let s=t-1;for(;s>=0&&128==(192&e[s]);)s--;return s<0||0===s?t:s+Qe[e[s]]>t?s:t},Ye=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Xe=Object.prototype.toString,{Z_NO_FLUSH:Ze,Z_SYNC_FLUSH:qe,Z_FULL_FLUSH:Je,Z_FINISH:$e,Z_OK:et,Z_STREAM_END:tt,Z_DEFAULT_COMPRESSION:st,Z_DEFAULT_STRATEGY:it,Z_DEFLATED:rt}=U;function ot(e){this.options=ke({level:st,method:rt,chunkSize:16384,windowBits:15,memLevel:8,strategy:it},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Fe(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(s!==et)throw new Error(L[s]);if(t.header&&Me(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?We(t.dictionary):"[object ArrayBuffer]"===Xe.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,s=He(this.strm,e),s!==et)throw new Error(L[s]);this._dict_set=!0}}function nt(e,t){const s=new ot(t);if(s.push(e,!0),s.err)throw s.msg||L[s.err];return s.result}ot.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize;let r,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?$e:Ze,"string"==typeof e?s.input=We(e):"[object ArrayBuffer]"===Xe.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),(o===qe||o===Je)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(r=Le(s,o),r===tt)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),r=Ue(this.strm),this.onEnd(r),this.ended=!0,r===et;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},ot.prototype.onData=function(e){this.chunks.push(e)},ot.prototype.onEnd=function(e){e===et&&(this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var at={Deflate:ot,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:U};const lt=16209;var ht=function(e,t){let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P;const D=e.state;s=e.next_in,R=e.input,i=s+(e.avail_in-5),r=e.next_out,P=e.output,o=r-(t-e.avail_out),n=r+(e.avail_out-257),a=D.dmax,l=D.wsize,h=D.whave,c=D.wnext,A=D.window,u=D.hold,p=D.bits,d=D.lencode,f=D.distcode,E=(1<>>24,u>>>=g,p-=g,g=y>>>16&255,0===g)P[r++]=65535&y;else{if(!(16&g)){if(0==(64&g)){y=d[(65535&y)+(u&(1<>>=g,p-=g),p<15&&(u+=R[s++]<>>24,u>>>=g,p-=g,g=y>>>16&255,!(16&g)){if(0==(64&g)){y=f[(65535&y)+(u&(1<a){e.msg="invalid distance too far back",D.mode=lt;break e}if(u>>>=g,p-=g,g=r-o,v>g){if(g=v-g,g>h&&D.sane){e.msg="invalid distance too far back",D.mode=lt;break e}if(T=0,_=A,0===c){if(T+=l-g,g2;)P[r++]=_[T++],P[r++]=_[T++],P[r++]=_[T++],I-=3;I&&(P[r++]=_[T++],I>1&&(P[r++]=_[T++]))}else{T=r-v;do{P[r++]=P[T++],P[r++]=P[T++],P[r++]=P[T++],I-=3}while(I>2);I&&(P[r++]=P[T++],I>1&&(P[r++]=P[T++]))}break}}break}}while(s>3,s-=I,p-=I<<3,u&=(1<{const l=a.bits;let h,c,A,u,p,d,f=0,E=0,m=0,y=0,g=0,I=0,v=0,T=0,_=0,R=0,P=null;const D=new Uint16Array(16),N=new Uint16Array(16);let b,C,O,S=null;for(f=0;f<=15;f++)D[f]=0;for(E=0;E=1&&0===D[y];y--);if(g>y&&(g=y),0===y)return r[o++]=20971520,r[o++]=20971520,a.bits=1,0;for(m=1;m0&&(0===e||1!==y))return-1;for(N[1]=0,f=1;f<15;f++)N[f+1]=N[f]+D[f];for(E=0;E852||2===e&&_>592)return 1;for(;;){b=f-v,n[E]+1=d?(C=S[n[E]-d],O=P[n[E]-d]):(C=96,O=0),h=1<>v)+c]=b<<24|C<<16|O|0}while(0!==c);for(h=1<>=1;if(0!==h?(R&=h-1,R+=h):R=0,E++,0==--D[f]){if(f===y)break;f=t[s+n[E]]}if(f>g&&(R&u)!==A){for(0===v&&(v=g),p+=m,I=f-v,T=1<852||2===e&&_>592)return 1;A=R&u,r[A]=g<<24|I<<16|p-o|0}}return 0!==R&&(r[p+R]=f-v<<24|64<<16|0),a.bits=g,0};const{Z_FINISH:ft,Z_BLOCK:Et,Z_TREES:mt,Z_OK:yt,Z_STREAM_END:gt,Z_NEED_DICT:It,Z_STREAM_ERROR:vt,Z_DATA_ERROR:Tt,Z_MEM_ERROR:_t,Z_BUF_ERROR:Rt,Z_DEFLATED:Pt}=U,Dt=16180,Nt=16190,bt=16191,Ct=16192,Ot=16194,St=16199,xt=16200,wt=16206,Bt=16209,Ft=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Mt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Lt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Ut=e=>{if(Lt(e))return vt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,yt},Ht=e=>{if(Lt(e))return vt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Ut(e)},Gt=(e,t)=>{let s;if(Lt(e))return vt;const i=e.state;return t<0?(s=0,t=-t):(s=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?vt:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=s,i.wbits=t,Ht(e))},kt=(e,t)=>{if(!e)return vt;const s=new Mt;e.state=s,s.strm=e,s.window=null,s.mode=Dt;const i=Gt(e,t);return i!==yt&&(e.state=null),i};let Vt,jt,Qt=!0;const Wt=e=>{if(Qt){Vt=new Int32Array(512),jt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dt(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dt(2,e.lens,0,32,jt,0,e.work,{bits:5}),Qt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=jt,e.distbits=5},zt=(e,t,s,i)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(s-o.wsize,s),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),o.window.set(t.subarray(s-i,s-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(s-i,s),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave{let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R=0;const P=new Uint8Array(4);let D,N;const b=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Lt(e)||!e.output||!e.input&&0!==e.avail_in)return vt;s=e.state,s.mode===bt&&(s.mode=Ct),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,A=a,u=l,_=yt;e:for(;;)switch(s.mode){case Dt:if(0===s.wrap){s.mode=Ct;break}for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0),h=0,c=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",s.mode=Bt;break}if((15&h)!==Pt){e.msg="unknown compression method",s.mode=Bt;break}if(h>>>=4,c-=4,T=8+(15&h),0===s.wbits&&(s.wbits=T),T>15||T>s.wbits){e.msg="invalid window size",s.mode=Bt;break}s.dmax=1<>8&1),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>8&255,P[2]=h>>>16&255,P[3]=h>>>24&255,s.check=M(s.check,P,4,0)),h=0,c=0,s.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>8),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16184;case 16184:if(1024&s.flags){for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(p=s.length,p>a&&(p=a),p&&(s.head&&(T=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(i.subarray(o,o+p),T)),512&s.flags&&4&s.wrap&&(s.check=M(s.check,i,p,o)),a-=p,o+=p,s.length-=p),s.length))break e;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===a)break e;p=0;do{T=i[o+p++],s.head&&T&&s.length<65536&&(s.head.name+=String.fromCharCode(T))}while(T&&p>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=bt;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>=7&c,c-=7&c,s.mode=wt;break}for(;c<3;){if(0===a)break e;a--,h+=i[o++]<>>=1,c-=1,3&h){case 0:s.mode=16193;break;case 1:if(Wt(s),s.mode=St,t===mt){h>>>=2,c-=2;break e}break;case 2:s.mode=16196;break;case 3:e.msg="invalid block type",s.mode=Bt}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",s.mode=Bt;break}if(s.length=65535&h,h=0,c=0,s.mode=Ot,t===mt)break e;case Ot:s.mode=16195;case 16195:if(p=s.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;r.set(i.subarray(o,o+p),n),a-=p,o+=p,l-=p,n+=p,s.length-=p;break}s.mode=bt;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=i[o++]<>>=5,c-=5,s.ndist=1+(31&h),h>>>=5,c-=5,s.ncode=4+(15&h),h>>>=4,c-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=Bt;break}s.have=0,s.mode=16197;case 16197:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[b[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,D={bits:s.lenbits},_=dt(0,s.lens,0,19,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid code lengths set",s.mode=Bt;break}s.have=0,s.mode=16198;case 16198:for(;s.have>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=E,c-=E,s.lens[s.have++]=y;else{if(16===y){for(N=E+2;c>>=E,c-=E,0===s.have){e.msg="invalid bit length repeat",s.mode=Bt;break}T=s.lens[s.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===y){for(N=E+3;c>>=E,c-=E,T=0,p=3+(7&h),h>>>=3,c-=3}else{for(N=E+7;c>>=E,c-=E,T=0,p=11+(127&h),h>>>=7,c-=7}if(s.have+p>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=Bt;break}for(;p--;)s.lens[s.have++]=T}}if(s.mode===Bt)break;if(0===s.lens[256]){e.msg="invalid code -- missing end-of-block",s.mode=Bt;break}if(s.lenbits=9,D={bits:s.lenbits},_=dt(1,s.lens,0,s.nlen,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid literal/lengths set",s.mode=Bt;break}if(s.distbits=6,s.distcode=s.distdyn,D={bits:s.distbits},_=dt(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,D),s.distbits=D.bits,_){e.msg="invalid distances set",s.mode=Bt;break}if(s.mode=St,t===mt)break e;case St:s.mode=xt;case xt:if(a>=6&&l>=258){e.next_out=n,e.avail_out=l,e.next_in=o,e.avail_in=a,s.hold=h,s.bits=c,ht(e,u),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,s.mode===bt&&(s.back=-1);break}for(s.back=0;R=s.lencode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,s.length=y,0===m){s.mode=16205;break}if(32&m){s.back=-1,s.mode=bt;break}if(64&m){e.msg="invalid literal/length code",s.mode=Bt;break}s.extra=15&m,s.mode=16201;case 16201:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;R=s.distcode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,64&m){e.msg="invalid distance code",s.mode=Bt;break}s.offset=y,s.extra=15&m,s.mode=16203;case 16203:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=Bt;break}s.mode=16204;case 16204:if(0===l)break e;if(p=u-l,s.offset>p){if(p=s.offset-p,p>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=Bt;break}p>s.wnext?(p-=s.wnext,d=s.wsize-p):d=s.wnext-p,p>s.length&&(p=s.length),f=s.window}else f=r,d=n-s.offset,p=s.length;p>l&&(p=l),l-=p,s.length-=p;do{r[n++]=f[d++]}while(--p);0===s.length&&(s.mode=xt);break;case 16205:if(0===l)break e;r[n++]=s.length,l--,s.mode=xt;break;case wt:if(s.wrap){for(;c<32;){if(0===a)break e;a--,h|=i[o++]<{if(Lt(e))return vt;let t=e.state;return t.window&&(t.window=null),e.state=null,yt},qt=(e,t)=>{if(Lt(e))return vt;const s=e.state;return 0==(2&s.wrap)?vt:(s.head=t,t.done=!1,yt)},Jt=(e,t)=>{const s=t.length;let i,r,o;return Lt(e)?vt:(i=e.state,0!==i.wrap&&i.mode!==Nt?vt:i.mode===Nt&&(r=1,r=B(r,t,s,0),r!==i.check)?Tt:(o=zt(e,t,s,s),o?(i.mode=16210,_t):(i.havedict=1,yt)))},$t=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const es=Object.prototype.toString,{Z_NO_FLUSH:ts,Z_FINISH:ss,Z_OK:is,Z_STREAM_END:rs,Z_NEED_DICT:os,Z_STREAM_ERROR:ns,Z_DATA_ERROR:as,Z_MEM_ERROR:ls}=U;function hs(e){this.options=ke({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Yt(this.strm,t.windowBits);if(s!==is)throw new Error(L[s]);if(this.header=new $t,qt(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=We(t.dictionary):"[object ArrayBuffer]"===es.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(s=Jt(this.strm,t.dictionary),s!==is)))throw new Error(L[s])}function cs(e,t){const s=new hs(t);if(s.push(e),s.err)throw s.msg||L[s.err];return s.result}hs.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let o,n,a;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:ts,"[object ArrayBuffer]"===es.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),o=Xt(s,n),o===os&&r&&(o=Jt(s,r),o===is?o=Xt(s,n):o===as&&(o=os));s.avail_in>0&&o===rs&&s.state.wrap>0&&0!==e[s.next_in];)Kt(s),o=Xt(s,n);switch(o){case ns:case as:case os:case ls:return this.onEnd(o),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||o===rs))if("string"===this.options.to){let e=Ke(s.output,s.next_out),t=s.next_out-e,r=ze(s.output,e);s.next_out=t,s.avail_out=i-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==is||0!==a){if(o===rs)return o=Zt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},hs.prototype.onData=function(e){this.chunks.push(e)},hs.prototype.onEnd=function(e){e===is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:hs,inflate:cs,inflateRaw:function(e,t){return(t=t||{}).raw=!0,cs(e,t)},ungzip:cs,constants:U};const{Deflate:us,deflate:ps,deflateRaw:ds,gzip:fs}=at,{Inflate:Es,inflate:ms,inflateRaw:ys,ungzip:gs}=As;var Is=us,vs=ps,Ts=ds,_s=fs,Rs=Es,Ps=ms,Ds=ys,Ns=gs,bs=U,Cs={Deflate:Is,deflate:vs,deflateRaw:Ts,gzip:_s,Inflate:Rs,inflate:Ps,inflateRaw:Ds,ungzip:Ns,constants:bs};e.Deflate=Is,e.Inflate=Rs,e.constants=bs,e.default=Cs,e.deflate=vs,e.deflateRaw=Ts,e.gzip=_s,e.inflate=Ps,e.inflateRaw=Ds,e.ungzip=Ns,Object.defineProperty(e,"__esModule",{value:!0})}));var gg=Object.freeze({__proto__:null});let Ig=window.pako||gg;Ig.inflate||(Ig=Ig.default);const vg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Tg={version:1,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],meshPositions:e[4],meshIndices:e[5],meshEdgesIndices:e[6],meshColors:e[7],entityIDs:e[8],entityMeshes:e[9],entityIsObjects:e[10],positionsDecodeMatrix:e[11]}}(s),a=function(e){return{positions:new Uint16Array(Ig.inflate(e.positions).buffer),normals:new Int8Array(Ig.inflate(e.normals).buffer),indices:new Uint32Array(Ig.inflate(e.indices).buffer),edgeIndices:new Uint32Array(Ig.inflate(e.edgeIndices).buffer),meshPositions:new Uint32Array(Ig.inflate(e.meshPositions).buffer),meshIndices:new Uint32Array(Ig.inflate(e.meshIndices).buffer),meshEdgesIndices:new Uint32Array(Ig.inflate(e.meshEdgesIndices).buffer),meshColors:new Uint8Array(Ig.inflate(e.meshColors).buffer),entityIDs:Ig.inflate(e.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(Ig.inflate(e.entityMeshes).buffer),entityIsObjects:new Uint8Array(Ig.inflate(e.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(Ig.inflate(e.positionsDecodeMatrix).buffer)}}(n);!function(e,t,s,i,r,o){o.getNextId(),i.positionsCompression="precompressed",i.normalsCompression="precompressed";const n=s.positions,a=s.normals,l=s.indices,h=s.edgeIndices,c=s.meshPositions,A=s.meshIndices,u=s.meshEdgesIndices,d=s.meshColors,f=JSON.parse(s.entityIDs),E=s.entityMeshes,m=s.entityIsObjects,g=c.length,I=E.length;for(let r=0;rE[e]E[t]?1:0));for(let e=0;e1||(b[s]=e)}}for(let e=0;e<_;e++){const t=D[e],s=t===_-1,r=P[t]>1,o=Og(m.subarray(4*t,4*t+3)),u=m[4*t+3]/255,g=a.subarray(p[t],s?a.length:p[t+1]),v=l.subarray(p[t],s?l.length:p[t+1]),T=h.subarray(d[t],s?h.length:d[t+1]),R=c.subarray(f[t],s?c.length:f[t+1]),N=A.subarray(E[t],E[t]+16);if(r){const e=`${n}-geometry.${t}`;i.createGeometry({id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N})}else{const e=`${n}-${t}`;I[b[t]];const s={};i.createMesh(y.apply(s,{id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N,color:o,opacity:u}))}}let C=0;for(let e=0;e1){const t={},r=`${n}-instance.${C++}`,o=`${n}-geometry.${s}`,a=16*T[e],h=u.subarray(a,a+16);i.createMesh(y.apply(t,{id:r,geometryId:o,matrix:h})),l.push(r)}else l.push(s)}if(l.length>0){const e={};i.createEntity(y.apply(e,{id:r,isObject:!0,meshIds:l}))}}}(0,0,a,i,0,o)}};let xg=window.pako||gg;xg.inflate||(xg=xg.default);const wg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Bg={version:5,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],eachPrimitivePositionsAndNormalsPortion:e[5],eachPrimitiveIndicesPortion:e[6],eachPrimitiveEdgeIndicesPortion:e[7],eachPrimitiveColor:e[8],primitiveInstances:e[9],eachEntityId:e[10],eachEntityPrimitiveInstancesPortion:e[11],eachEntityMatricesPortion:e[12]}}(s),a=function(e){return{positions:new Float32Array(xg.inflate(e.positions).buffer),normals:new Int8Array(xg.inflate(e.normals).buffer),indices:new Uint32Array(xg.inflate(e.indices).buffer),edgeIndices:new Uint32Array(xg.inflate(e.edgeIndices).buffer),matrices:new Float32Array(xg.inflate(e.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(xg.inflate(e.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(xg.inflate(e.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(xg.inflate(e.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(xg.inflate(e.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(xg.inflate(e.primitiveInstances).buffer),eachEntityId:xg.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(xg.inflate(e.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(xg.inflate(e.eachEntityMatricesPortion).buffer)}}(n);!function(e,t,s,i,r,o){const n=o.getNextId();i.positionsCompression="disabled",i.normalsCompression="precompressed";const a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.eachPrimitivePositionsAndNormalsPortion,p=s.eachPrimitiveIndicesPortion,d=s.eachPrimitiveEdgeIndicesPortion,f=s.eachPrimitiveColor,E=s.primitiveInstances,m=JSON.parse(s.eachEntityId),g=s.eachEntityPrimitiveInstancesPortion,I=s.eachEntityMatricesPortion,v=u.length,T=E.length,_=new Uint8Array(v),R=m.length;for(let e=0;e1||(P[s]=e)}}for(let e=0;e1,r=wg(f.subarray(4*e,4*e+3)),o=f[4*e+3]/255,A=a.subarray(u[e],t?a.length:u[e+1]),E=l.subarray(u[e],t?l.length:u[e+1]),g=h.subarray(p[e],t?h.length:p[e+1]),I=c.subarray(d[e],t?c.length:d[e+1]);if(s){const t=`${n}-geometry.${e}`;i.createGeometry({id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I})}else{const t=e;m[P[e]];const s={};i.createMesh(y.apply(s,{id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I,color:r,opacity:o}))}}let D=0;for(let e=0;e1){const t={},r="instance."+D++,o="geometry"+s,n=16*I[e],l=A.subarray(n,n+16);i.createMesh(y.apply(t,{id:r,geometryId:o,matrix:l})),a.push(r)}else a.push(s)}if(a.length>0){const e={};i.createEntity(y.apply(e,{id:r,isObject:!0,meshIds:a}))}}}(0,0,a,i,0,o)}};let Fg=window.pako||gg;Fg.inflate||(Fg=Fg.default);const Mg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Lg={version:6,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],reusedPrimitivesDecodeMatrix:e[5],eachPrimitivePositionsAndNormalsPortion:e[6],eachPrimitiveIndicesPortion:e[7],eachPrimitiveEdgeIndicesPortion:e[8],eachPrimitiveColorAndOpacity:e[9],primitiveInstances:e[10],eachEntityId:e[11],eachEntityPrimitiveInstancesPortion:e[12],eachEntityMatricesPortion:e[13],eachTileAABB:e[14],eachTileEntitiesPortion:e[15]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Fg.inflate(e,t).buffer}return{positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(t(e.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(t(e.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(t(e.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(t(e.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(t(e.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(t(e.primitiveInstances)),eachEntityId:Fg.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(t(e.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(t(e.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.reusedPrimitivesDecodeMatrix,d=s.eachPrimitivePositionsAndNormalsPortion,f=s.eachPrimitiveIndicesPortion,E=s.eachPrimitiveEdgeIndicesPortion,m=s.eachPrimitiveColorAndOpacity,g=s.primitiveInstances,I=JSON.parse(s.eachEntityId),v=s.eachEntityPrimitiveInstancesPortion,T=s.eachEntityMatricesPortion,_=s.eachTileAABB,R=s.eachTileEntitiesPortion,P=d.length,D=g.length,N=I.length,b=R.length,C=new Uint32Array(P);for(let e=0;e1,A=t===P-1,p=a.subarray(d[t],A?a.length:d[t+1]),I=l.subarray(d[t],A?l.length:d[t+1]),v=h.subarray(f[t],A?h.length:f[t+1]),T=c.subarray(E[t],A?c.length:E[t+1]),_=Mg(m.subarray(4*t,4*t+3)),R=m[4*t+3]/255,D=o.getNextId();if(r){const e=`${n}-geometry.${s}.${t}`;M[e]||(i.createGeometry({id:e,primitive:"triangles",positionsCompressed:p,indices:v,edgeIndices:T,positionsDecodeMatrix:u}),M[e]=!0),i.createMesh(y.apply(H,{id:D,geometryId:e,origin:O,matrix:b,color:_,opacity:R})),B.push(D)}else i.createMesh(y.apply(H,{id:D,origin:O,primitive:"triangles",positionsCompressed:p,normalsCompressed:I,indices:v,edgeIndices:T,positionsDecodeMatrix:F,color:_,opacity:R})),B.push(D)}B.length>0&&i.createEntity(y.apply(U,{id:R,isObject:!0,meshIds:B}))}}}(e,t,a,i,0,o)}};let Ug=window.pako||gg;Ug.inflate||(Ug=Ug.default);const Hg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Gg(e){const t=[];for(let s=0,i=e.length;s1,p=t===C-1,P=Hg(R.subarray(6*e,6*e+3)),D=R[6*e+3]/255,N=R[6*e+4]/255,b=R[6*e+5]/255,O=o.getNextId();if(r){const r=_[e],o=u.slice(r,r+16),T=`${n}-geometry.${s}.${t}`;if(!G[T]){let e,s,r,o,n,u;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],p?a.length:E[t+1]),o=Gg(h.subarray(g[t],p?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],p?a.length:E[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]);break;default:continue}i.createGeometry({id:T,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:u,positionsDecodeMatrix:d}),G[T]=!0}i.createMesh(y.apply(k,{id:O,geometryId:T,origin:B,matrix:o,color:P,metallic:N,roughness:b,opacity:D})),M.push(O)}else{let e,s,r,o,n,u;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],p?a.length:E[t+1]),o=Gg(h.subarray(g[t],p?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],p?a.length:E[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]);break;default:continue}i.createMesh(y.apply(k,{id:O,origin:B,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:u,positionsDecodeMatrix:H,color:P,metallic:N,roughness:b,opacity:D})),M.push(O)}}M.length>0&&i.createEntity(y.apply(U,{id:b,isObject:!0,meshIds:M}))}}}(e,t,a,i,0,o)}};let Vg=window.pako||gg;Vg.inflate||(Vg=Vg.default);const jg=p.vec4(),Qg=p.vec4();const Wg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function zg(e){const t=[];for(let s=0,i=e.length;s1,l=r===F-1,h=Wg(C.subarray(6*e,6*e+3)),c=C[6*e+3]/255,A=C[6*e+4]/255,O=C[6*e+5]/255,S=o.getNextId();if(a){const o=b[e],a=g.slice(o,o+16),N=`${n}-geometry.${s}.${r}`;let C=V[N];if(!C){C={batchThisMesh:!t.reuseGeometries};let e=!1;switch(v[r]){case 0:C.primitiveName="solid",C.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),C.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),C.geometryEdgeIndices=m.subarray(D[r],l?m.length:D[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 1:C.primitiveName="surface",C.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),C.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),C.geometryEdgeIndices=m.subarray(D[r],l?m.length:D[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 2:C.primitiveName="points",C.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),C.geometryColors=zg(f.subarray(R[r],l?f.length:R[r+1])),e=C.geometryPositions.length>0;break;case 3:C.primitiveName="lines",C.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),C.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;default:continue}if(e||(C=null),C&&(C.geometryPositions.length,C.batchThisMesh)){C.decompressedPositions=new Float32Array(C.geometryPositions.length);const e=C.geometryPositions,t=C.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=u.subarray(T[r],l?u.length:T[r+1]),s=d.subarray(_[r],l?d.length:_[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),a=m.subarray(D[r],l?m.length:D[r+1]),p=t.length>0&&n.length>0;break;case 2:e="points",t=u.subarray(T[r],l?u.length:T[r+1]),o=zg(f.subarray(R[r],l?f.length:R[r+1])),p=t.length>0;break;case 3:e="lines",t=u.subarray(T[r],l?u.length:T[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),p=t.length>0&&n.length>0;break;default:continue}p&&(i.createMesh(y.apply(Q,{id:S,origin:G,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:B,color:h,metallic:A,roughness:O,opacity:c})),w.push(S))}}w.length>0&&i.createEntity(y.apply(j,{id:h,isObject:!0,meshIds:w}))}}}(e,t,a,i,r,o)}};let Yg=window.pako||gg;Yg.inflate||(Yg=Yg.default);const Xg=p.vec4(),Zg=p.vec4();const qg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Jg={version:9,parse:function(e,t,s,i,r,o){const n=function(e){return{metadata:e[0],positions:e[1],normals:e[2],colors:e[3],indices:e[4],edgeIndices:e[5],matrices:e[6],reusedGeometriesDecodeMatrix:e[7],eachGeometryPrimitiveType:e[8],eachGeometryPositionsPortion:e[9],eachGeometryNormalsPortion:e[10],eachGeometryColorsPortion:e[11],eachGeometryIndicesPortion:e[12],eachGeometryEdgeIndicesPortion:e[13],eachMeshGeometriesPortion:e[14],eachMeshMatricesPortion:e[15],eachMeshMaterial:e[16],eachEntityId:e[17],eachEntityMeshesPortion:e[18],eachTileAABB:e[19],eachTileEntitiesPortion:e[20]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Yg.inflate(e,t).buffer}return{metadata:JSON.parse(Yg.inflate(e.metadata,{to:"string"})),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(t(e.eachMeshMaterial)),eachEntityId:JSON.parse(Yg.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.metadata,l=s.positions,h=s.normals,c=s.colors,A=s.indices,u=s.edgeIndices,d=s.matrices,f=s.reusedGeometriesDecodeMatrix,E=s.eachGeometryPrimitiveType,m=s.eachGeometryPositionsPortion,g=s.eachGeometryNormalsPortion,I=s.eachGeometryColorsPortion,v=s.eachGeometryIndicesPortion,T=s.eachGeometryEdgeIndicesPortion,_=s.eachMeshGeometriesPortion,R=s.eachMeshMatricesPortion,P=s.eachMeshMaterial,D=s.eachEntityId,N=s.eachEntityMeshesPortion,b=s.eachTileAABB,C=s.eachTileEntitiesPortion,O=m.length,S=_.length,x=N.length,w=C.length;r&&r.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});const B=new Uint32Array(O);for(let e=0;e1,D=r===O-1,N=qg(P.subarray(6*e,6*e+3)),b=P[6*e+3]/255,C=P[6*e+4]/255,S=P[6*e+5]/255,x=o.getNextId();if(a){const o=R[e],a=d.slice(o,o+16),_=`${n}-geometry.${s}.${r}`;let P=L[_];if(!P){P={batchThisMesh:!t.reuseGeometries};let e=!1;switch(E[r]){case 0:P.primitiveName="solid",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=u.subarray(T[r],D?u.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 1:P.primitiveName="surface",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=u.subarray(T[r],D?u.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 2:P.primitiveName="points",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryColors=c.subarray(I[r],D?c.length:I[r+1]),e=P.geometryPositions.length>0;break;case 3:P.primitiveName="lines",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;default:continue}if(e||(P=null),P&&(P.geometryPositions.length,P.batchThisMesh)){P.decompressedPositions=new Float32Array(P.geometryPositions.length),P.transformedAndRecompressedPositions=new Uint16Array(P.geometryPositions.length);const e=P.geometryPositions,t=P.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=l.subarray(m[r],D?l.length:m[r+1]),s=h.subarray(g[r],D?h.length:g[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),a=u.subarray(T[r],D?u.length:T[r+1]),p=t.length>0&&n.length>0;break;case 2:e="points",t=l.subarray(m[r],D?l.length:m[r+1]),o=c.subarray(I[r],D?c.length:I[r+1]),p=t.length>0;break;case 3:e="lines",t=l.subarray(m[r],D?l.length:m[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),p=t.length>0&&n.length>0;break;default:continue}p&&(i.createMesh(y.apply(j,{id:x,origin:F,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:G,color:N,metallic:C,roughness:S,opacity:b})),U.push(x))}}U.length>0&&i.createEntity(y.apply(V,{id:b,isObject:!0,meshIds:U}))}}}(e,t,a,i,r,o)}};let $g=window.pako||gg;$g.inflate||($g=$g.default);const eI=p.vec4(),tI=p.vec4();const sI=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function iI(e,t){const s=[];if(t.length>1)for(let e=0,i=t.length-1;e1)for(let t=0,i=e.length/3-1;t0,a=9*e,A=1===c[a+0],u=c[a+1];c[a+2],c[a+3];const p=c[a+4],d=c[a+5],f=c[a+6],E=c[a+7],m=c[a+8];if(o){const t=new Uint8Array(l.subarray(s,r)).buffer,o=`${n}-texture-${e}`;if(A)i.createTexture({id:o,buffers:[t],minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m});else{const e=new Blob([t],{type:10001===u?"image/jpeg":10002===u?"image/png":"image/gif"}),s=(window.URL||window.webkitURL).createObjectURL(e),r=document.createElement("img");r.src=s,i.createTexture({id:o,image:r,minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m})}}}for(let e=0;e=0?`${n}-texture-${r}`:null,normalsTextureId:a>=0?`${n}-texture-${a}`:null,metallicRoughnessTextureId:o>=0?`${n}-texture-${o}`:null,emissiveTextureId:l>=0?`${n}-texture-${l}`:null,occlusionTextureId:h>=0?`${n}-texture-${h}`:null})}const j=new Uint32Array(H);for(let e=0;e1,l=r===H-1,h=S[e],c=h>=0?`${n}-textureSet-${h}`:null,w=sI(x.subarray(6*e,6*e+3)),B=x[6*e+3]/255,F=x[6*e+4]/255,U=x[6*e+5]/255,G=o.getNextId();if(a){const o=O[e],a=I.slice(o,o+16),h=`${n}-geometry.${s}.${r}`;let C=z[h];if(!C){C={batchThisMesh:!t.reuseGeometries};let e=!1;switch(T[r]){case 0:C.primitiveName="solid",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryNormals=u.subarray(R[r],l?u.length:R[r+1]),C.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),C.geometryEdgeIndices=m.subarray(b[r],l?m.length:b[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 1:C.primitiveName="surface",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryNormals=u.subarray(R[r],l?u.length:R[r+1]),C.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),C.geometryEdgeIndices=m.subarray(b[r],l?m.length:b[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 2:C.primitiveName="points",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryColors=d.subarray(P[r],l?d.length:P[r+1]),e=C.geometryPositions.length>0;break;case 3:C.primitiveName="lines",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;case 4:C.primitiveName="lines",C.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),C.geometryIndices=iI(C.geometryPositions,E.subarray(N[r],l?E.length:N[r+1])),e=C.geometryPositions.length>0&&C.geometryIndices.length>0;break;default:continue}if(e||(C=null),C&&(C.geometryPositions.length,C.batchThisMesh)){C.decompressedPositions=new Float32Array(C.geometryPositions.length),C.transformedAndRecompressedPositions=new Uint16Array(C.geometryPositions.length);const e=C.geometryPositions,t=C.decompressedPositions;for(let s=0,i=e.length;s0&&a.length>0;break;case 1:e="surface",t=A.subarray(_[r],l?A.length:_[r+1]),s=u.subarray(R[r],l?u.length:R[r+1]),o=f.subarray(D[r],l?f.length:D[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),h=m.subarray(b[r],l?m.length:b[r+1]),p=t.length>0&&a.length>0;break;case 2:e="points",t=A.subarray(_[r],l?A.length:_[r+1]),n=d.subarray(P[r],l?d.length:P[r+1]),p=t.length>0;break;case 3:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),p=t.length>0&&a.length>0;break;case 4:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=iI(t,E.subarray(N[r],l?E.length:N[r+1])),p=t.length>0&&a.length>0;break;default:continue}p&&(i.createMesh(y.apply(V,{id:G,textureSetId:c,origin:Q,primitive:e,positionsCompressed:t,normalsCompressed:s,uv:o&&o.length>0?o:null,colorsCompressed:n,indices:a,edgeIndices:h,positionsDecodeMatrix:g,color:w,metallic:F,roughness:U,opacity:B})),M.push(G))}}M.length>0&&i.createEntity(y.apply(G,{id:l,isObject:!0,meshIds:M}))}}}(e,t,a,i,r,o)}},oI={};oI[Tg.version]=Tg,oI[Pg.version]=Pg,oI[bg.version]=bg,oI[Sg.version]=Sg,oI[Bg.version]=Bg,oI[Lg.version]=Lg,oI[kg.version]=kg,oI[Kg.version]=Kg,oI[Jg.version]=Jg,oI[rI.version]=rI;class nI extends a{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(oI)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new yg}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||ig}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=!1!==e}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc)return this.error("load() param expected: src, xkt or manifestSrc"),o;const t={},s=e.includeTypes||this._includeTypes,i=e.excludeTypes||this._excludeTypes,r=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=null!==e.reuseGeometries&&void 0!==e.reuseGeometries?e.reuseGeometries:!1!==this._reuseGeometries,s){t.includeTypesMap={};for(let e=0,i=s.length;e{o.finalize(),a.finalize(),this.viewer.scene.canvas.spinner.processes--,o.once("destroyed",(()=>{this.viewer.metaScene.destroyMetaModel(a.id)})),o.scene.once("tick",(()=>{o.destroyed||(o.scene.fire("modelLoaded",o.id),o.fire("loaded",!0,!1))}))},h=e=>{this.viewer.scene.canvas.spinner.processes--,this.error(e),o.fire("error",e)};let c=0;const A={getNextId:()=>`${n}.${c++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const r=e.metaModelSrc;this._dataSource.getMetaModel(r,(r=>{o.destroyed||(a.loadData(r,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()))}),(e=>{h(`load(): Failed to load model metadata for model '${n} from '${r}' - ${e}`)}))}else e.metaModelData&&(a.loadData(e.metaModelData,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()));else if(e.src)this._loadModel(e.src,e,t,o,a,A,l,h);else if(e.xkt)this._parseModel(e.xkt,e,t,o,a,A),l();else if(e.manifestSrc){const r=function(e){const t=e.split("/");return t.pop(),t.join("/")+"/"}(e.manifestSrc),n=(e,o,n)=>{let l=0;const h=()=>{l>=e.length?o():this._dataSource.getMetaModel(`${r}${e[l]}`,(e=>{a.loadData(e,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),l++,h()}),n)};h()},c=(s,i,n)=>{let l=0;const h=()=>{l>=s.length?i():this._dataSource.getXKT(`${r}${s[l]}`,(s=>{this._parseModel(s,e,t,o,a,A),l++,h()}),n)};h()};this._dataSource.getManifest(e.manifestSrc,(e=>{if(o.destroyed)return;const t=e.xktFiles;if(!t||0===t.length)return void h("load(): Failed to load model manifest - manifest not valid");const s=e.metaModelFiles;s?n(s,(()=>{c(t,l,h)}),h):c(t,l,h)}),h)}return o}_loadModel(e,t,s,i,r,o,n,a){this._dataSource.getXKT(t.src,(e=>{this._parseModel(e,t,s,i,r,o),n()}),a)}_parseModel(e,t,s,i,r,o){if(i.destroyed)return;const n=new DataView(e),a=new Uint8Array(e),l=n.getUint32(0,!0),h=oI[l];if(!h)return void this.error("Unsupported .XKT file version: "+l+" - this XKTLoaderPlugin supports versions "+Object.keys(oI));this.log("Loading .xkt V"+l);const c=n.getUint32(4,!0),A=[];let u=4*(c+2);for(let e=0;ee.size)throw new RangeError("offset:"+t+", length:"+s+", size:"+e.size);return e.slice?e.slice(t,t+s):e.webkitSlice?e.webkitSlice(t,t+s):e.mozSlice?e.mozSlice(t,t+s):e.msSlice?e.msSlice(t,t+s):void 0}(e,t,s))}catch(e){r(e)}}}function d(){}function f(e){var s,i=this;i.init=function(e){s=new Blob([],{type:n}),e()},i.writeUint8Array=function(e,i){s=new Blob([s,t?e:e.buffer],{type:n}),i()},i.getData=function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=i,r.readAsText(s,e)}}function E(t){var s=this,i="",r="";s.init=function(e){i+="data:"+(t||"")+";base64,",e()},s.writeUint8Array=function(t,s){var o,n=r.length,a=r;for(r="",o=0;o<3*Math.floor((n+t.length)/3)-n;o++)a+=String.fromCharCode(t[o]);for(;o2?i+=e.btoa(a):r=a,s()},s.getData=function(t){t(i+e.btoa(r))}}function m(e){var s,i=this;i.init=function(t){s=new Blob([],{type:e}),t()},i.writeUint8Array=function(i,r){s=new Blob([s,t?i:i.buffer],{type:e}),r()},i.getData=function(e){e(s)}}function y(e,t,s,i,r,n,a,l,h,c){var A,u,p,d=0,f=t.sn;function E(){e.removeEventListener("message",m,!1),l(u,p)}function m(t){var s=t.data,r=s.data,o=s.error;if(o)return o.toString=function(){return"Error: "+this.message},void h(o);if(s.sn===f)switch("number"==typeof s.codecTime&&(e.codecTime+=s.codecTime),"number"==typeof s.crcTime&&(e.crcTime+=s.crcTime),s.type){case"append":r?(u+=r.length,i.writeUint8Array(r,(function(){y()}),c)):y();break;case"flush":p=s.crc,r?(u+=r.length,i.writeUint8Array(r,(function(){E()}),c)):E();break;case"progress":a&&a(A+s.loaded,n);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",s)}}function y(){(A=d*o)<=n?s.readUint8Array(r+A,Math.min(o,n-A),(function(s){a&&a(A,n);var i=0===A?t:{sn:f};i.type="append",i.data=s;try{e.postMessage(i,[s.buffer])}catch(t){e.postMessage(i)}d++}),h):e.postMessage({sn:f,type:"flush"})}u=0,e.addEventListener("message",m,!1),y()}function g(e,t,s,i,r,n,l,h,c,A){var u,p=0,d=0,f="input"===n,E="output"===n,m=new a;!function n(){var a;if((u=p*o)127?r[s-128]:String.fromCharCode(s);return i}function T(e){return decodeURIComponent(escape(e))}function _(e){var t,s="";for(t=0;t>16,s=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&s)>>11,(2016&s)>>5,2*(31&s),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((i||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(s+10,!0),e.compressedSize=t.view.getUint32(s+14,!0),e.uncompressedSize=t.view.getUint32(s+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(s+22,!0),e.extraFieldLength=t.view.getUint16(s+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function P(t,o,n){var a=0;function l(){}l.prototype.getData=function(i,o,l,c){var A=this;function u(e,t){c&&!function(e){var t=h(4);return t.view.setUint32(0,e),A.crc32==t.view.getUint32(0)}(t)?n("CRC failed."):i.getData((function(e){o(e)}))}function p(e){n(e||r)}function d(e){n(e||"Error while writing file data.")}t.readUint8Array(A.offset,30,(function(r){var o,f=h(r.length,r);1347093252==f.view.getUint32(0)?(R(A,f,4,!1,n),o=A.offset+30+A.filenameLength+A.extraFieldLength,i.init((function(){0===A.compressionMethod?I(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d):function(t,s,i,r,o,n,a,l,h,c,A){var u=a?"output":"none";e.zip.useWebWorkers?y(t,{sn:s,codecClass:"Inflater",crcType:u},i,r,o,n,h,l,c,A):g(new e.zip.Inflater,i,r,o,n,u,h,l,c,A)}(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d)}),d)):n(s)}),p)};var c={getEntries:function(e){var r=this._worker;!function(e){t.size<22?n(s):r(22,(function(){r(Math.min(65558,t.size),(function(){n(s)}))}));function r(s,r){t.readUint8Array(t.size-s,s,(function(t){for(var s=t.length-22;s>=0;s--)if(80===t[s]&&75===t[s+1]&&5===t[s+2]&&6===t[s+3])return void e(new DataView(t.buffer,s,22));r()}),(function(){n(i)}))}}((function(o){var a,c;a=o.getUint32(16,!0),c=o.getUint16(8,!0),a<0||a>=t.size?n(s):t.readUint8Array(a,t.size-a,(function(t){var i,o,a,A,u=0,p=[],d=h(t.length,t);for(i=0;i>>8^s[255&(t^e[i])];this.crc=t},a.prototype.get=function(){return~this.crc},a.prototype.table=function(){var e,t,s,i=[];for(e=0;e<256;e++){for(s=e,t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;i[e]=s}return i}(),l.prototype.append=function(e,t){return e},l.prototype.flush=function(){},A.prototype=new c,A.prototype.constructor=A,u.prototype=new c,u.prototype.constructor=u,p.prototype=new c,p.prototype.constructor=p,d.prototype.getData=function(e){e(this.data)},f.prototype=new d,f.prototype.constructor=f,E.prototype=new d,E.prototype.constructor=E,m.prototype=new d,m.prototype.constructor=m;var C={deflater:["z-worker.js","deflate.js"],inflater:["z-worker.js","inflate.js"]};function O(t,s,i){if(null===e.zip.workerScripts||null===e.zip.workerScriptsPath){var r;if(e.zip.workerScripts){if(r=e.zip.workerScripts[t],!Array.isArray(r))return void i(new Error("zip.workerScripts."+t+" is not an array!"));r=function(e){var t=document.createElement("a");return e.map((function(e){return t.href=e,t.href}))}(r)}else(r=C[t].slice(0))[0]=(e.zip.workerScriptsPath||"")+r[0];var o=new Worker(r[0]);o.codecTime=o.crcTime=0,o.postMessage({type:"importScripts",scripts:r.slice(1)}),o.addEventListener("message",(function e(t){var r=t.data;if(r.error)return o.terminate(),void i(r.error);"importScripts"===r.type&&(o.removeEventListener("message",e),o.removeEventListener("error",n),s(o))})),o.addEventListener("error",n)}else i(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));function n(e){o.terminate(),i(e)}}function S(e){console.error(e)}e.zip={Reader:c,Writer:d,BlobReader:p,Data64URIReader:u,TextReader:A,BlobWriter:m,Data64URIWriter:E,TextWriter:f,createReader:function(e,t,s){s=s||S,e.init((function(){P(e,t,s)}),s)},createWriter:function(e,t,s,i){s=s||S,i=!!i,e.init((function(){b(e,t,s,i)}),s)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null}}(aI);!function(e){var t,s,i=e.Reader,r=e.Writer;try{s=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(e){}function o(e){var t=this;function s(s,i){var r;t.data?s():((r=new XMLHttpRequest).addEventListener("load",(function(){t.size||(t.size=Number(r.getResponseHeader("Content-Length"))||Number(r.response.byteLength)),t.data=new Uint8Array(r.response),s()}),!1),r.addEventListener("error",i,!1),r.open("GET",e),r.responseType="arraybuffer",r.send())}t.size=0,t.init=function(i,r){if(function(e){var t=document.createElement("a");return t.href=e,"http:"===t.protocol||"https:"===t.protocol}(e)){var o=new XMLHttpRequest;o.addEventListener("load",(function(){t.size=Number(o.getResponseHeader("Content-Length")),t.size?i():s(i,r)}),!1),o.addEventListener("error",r,!1),o.open("HEAD",e),o.send()}else s(i,r)},t.readUint8Array=function(e,i,r,o){s((function(){r(new Uint8Array(t.data.subarray(e,e+i)))}),o)}}function n(e){var t=this;t.size=0,t.init=function(s,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(){t.size=Number(r.getResponseHeader("Content-Length")),"bytes"==r.getResponseHeader("Accept-Ranges")?s():i("HTTP Range not supported.")}),!1),r.addEventListener("error",i,!1),r.open("HEAD",e),r.send()},t.readUint8Array=function(t,s,i,r){!function(t,s,i,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="arraybuffer",o.setRequestHeader("Range","bytes="+t+"-"+(t+s-1)),o.addEventListener("load",(function(){i(o.response)}),!1),o.addEventListener("error",r,!1),o.send()}(t,s,(function(e){i(new Uint8Array(e))}),r)}}function a(e){var t=this;t.size=0,t.init=function(s,i){t.size=e.byteLength,s()},t.readUint8Array=function(t,s,i,r){i(new Uint8Array(e.slice(t,t+s)))}}function l(){var e,t=this;t.init=function(t,s){e=new Uint8Array,t()},t.writeUint8Array=function(t,s,i){var r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length),e=r,s()},t.getData=function(t){t(e.buffer)}}function h(e,t){var i,r=this;r.init=function(t,s){e.createWriter((function(e){i=e,t()}),s)},r.writeUint8Array=function(e,r,o){var n=new Blob([s?e:e.buffer],{type:t});i.onwrite=function(){i.onwrite=null,r()},i.onerror=o,i.write(n)},r.getData=function(t){e.file(t)}}o.prototype=new i,o.prototype.constructor=o,n.prototype=new i,n.prototype.constructor=n,a.prototype=new i,a.prototype.constructor=a,l.prototype=new r,l.prototype.constructor=l,h.prototype=new r,h.prototype.constructor=h,e.FileWriter=h,e.HttpReader=o,e.HttpRangeReader=n,e.ArrayBufferReader=a,e.ArrayBufferWriter=l,e.fs&&((t=e.fs.ZipDirectoryEntry).prototype.addHttpContent=function(s,i,r){return function(s,i,r,o){if(s.directory)return o?new t(s.fs,i,r,s):new e.fs.ZipFileEntry(s.fs,i,r,s);throw"Parent entry is not a directory."}(this,s,{data:i,Reader:r?n:o})},t.prototype.importHttpContent=function(e,t,s,i){this.importZip(t?new n(e):new o(e),s,i)},e.fs.FS.prototype.importHttpContent=function(e,s,i,r){this.entries=[],this.root=new t(this),this.root.importHttpContent(e,s,i,r)})}(aI.zip);var lI,hI,cI,AI,uI,pI,dI,fI=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},EI=fI({"dist/web-ifc-mt.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return N.buffer!=w.buffer&&z(),w}function i(){return N.buffer!=w.buffer&&z(),B}function r(){return N.buffer!=w.buffer&&z(),F}function o(){return N.buffer!=w.buffer&&z(),M}function n(){return N.buffer!=w.buffer&&z(),L}function a(){return N.buffer!=w.buffer&&z(),U}function l(){return N.buffer!=w.buffer&&z(),G}var h,c,A=void 0!==e?e:{};A.ready=new Promise((function(e,t){h=e,c=t}));var u,p,d,f=Object.assign({},A),E="./this.program",m=(e,t)=>{throw t},y="object"==typeof window,g="function"==typeof importScripts,I="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=A.ENVIRONMENT_IS_PTHREAD||!1,T="";function _(e){return A.locateFile?A.locateFile(e,T):T+e}(y||g)&&(g?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),s&&(T=s),T=0!==T.indexOf("blob:")?T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g&&(d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)});var R,P=A.print||console.log.bind(console),D=A.printErr||console.warn.bind(console);Object.assign(A,f),f=null,A.arguments,A.thisProgram&&(E=A.thisProgram),A.quit&&(m=A.quit),A.wasmBinary&&(R=A.wasmBinary);var N,b,C=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&ae("no native wasm support detected");var O,S=!1;function x(e,t){e||ae(t)}var w,B,F,M,L,U,H,G,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function V(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&k)return k.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,r):e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function j(e,t){return(e>>>=0)?V(i(),e,t):""}function Q(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function W(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function z(){var e=N.buffer;A.HEAP8=w=new Int8Array(e),A.HEAP16=F=new Int16Array(e),A.HEAP32=L=new Int32Array(e),A.HEAPU8=B=new Uint8Array(e),A.HEAPU16=M=new Uint16Array(e),A.HEAPU32=U=new Uint32Array(e),A.HEAPF32=H=new Float32Array(e),A.HEAPF64=G=new Float64Array(e)}var K,Y=A.INITIAL_MEMORY||16777216;if(x(Y>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Y+"! (STACK_SIZE=5242880)"),v)N=A.wasmMemory;else if(A.wasmMemory)N=A.wasmMemory;else if(!((N=new WebAssembly.Memory({initial:Y/65536,maximum:65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw D("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),I&&D("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");z(),Y=N.buffer.byteLength;var X=[],Z=[],q=[];function J(){return C}function $(){v||(A.noFSInit||ye.init.initialized||ye.init(),ye.ignorePermissions=!1,_e(Z))}var ee,te,se,ie=0,re=null;function oe(e){ie++,A.monitorRunDependencies&&A.monitorRunDependencies(ie)}function ne(e){if(ie--,A.monitorRunDependencies&&A.monitorRunDependencies(ie),0==ie&&re){var t=re;re=null,t()}}function ae(e){A.onAbort&&A.onAbort(e),D(e="Aborted("+e+")"),S=!0,O=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw c(t),t}function le(e){return e.startsWith("data:application/octet-stream;base64,")}function he(e){try{if(e==ee&&R)return new Uint8Array(R);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){ae(e)}}function ce(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ae(e){var t=Te.pthreads[e];x(t),Te.returnWorkerToPool(t)}le(ee="web-ifc-mt.wasm")||(ee=_(ee));var ue={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=ue.isAbs(e),s="/"===e.substr(-1);return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ue.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ue.normalize(e.join("/"))},join2:(e,t)=>ue.normalize(e+"/"+t)},pe={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:ye.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=ue.isAbs(i)}return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=pe.resolve(e).substr(1),t=pe.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:W(e)+1,r=new Array(i),o=Q(e,r,0,r.length);return t&&(r.length=o),r}var fe={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){fe.ttys[e]={input:[],output:[],ops:t},ye.registerDevice(e,fe.stream_ops)},stream_ops:{open:function(e){var t=fe.ttys[e.node.rdev];if(!t)throw new ye.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new ye.ErrnoError(60);for(var o=0,n=0;n0&&(P(V(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(D(V(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(D(V(e.output,0)),e.output=[])}}};function Ee(e){ae()}var me={ops_table:null,mount:function(e){return me.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(ye.isBlkdev(s)||ye.isFIFO(s))throw new ye.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:ye.chrdev_stream_ops}});var r=ye.createNode(e,t,s,i);return ye.isDir(r.mode)?(r.node_ops=me.ops_table.dir.node,r.stream_ops=me.ops_table.dir.stream,r.contents={}):ye.isFile(r.mode)?(r.node_ops=me.ops_table.file.node,r.stream_ops=me.ops_table.file.stream,r.usedBytes=0,r.contents=null):ye.isLink(r.mode)?(r.node_ops=me.ops_table.link.node,r.stream_ops=me.ops_table.link.stream):ye.isChrdev(r.mode)&&(r.node_ops=me.ops_table.chrdev.node,r.stream_ops=me.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=ye.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,ye.isDir(e.mode)?t.size=4096:ye.isFile(e.mode)?t.size=e.usedBytes:ye.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup:function(e,t){throw ye.genericErrors[44]},mknod:function(e,t,s,i){return me.createNode(e,t,s,i)},rename:function(e,t,s){if(ye.isDir(e.mode)){var i;try{i=ye.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new ye.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=ye.lookupNode(e,t);for(var i in s.contents)throw new ye.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=me.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!ye.isLink(e.mode))throw new ye.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||i+s>>=0,t().set(l,n>>>0)}else a=!1,n=l.byteOffset;return{ptr:n,allocated:a}},msync:function(e,t,s,i,r){return me.stream_ops.write(e,t,0,i,s,!1),0}}},ye={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=pe.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new ye.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=ye.root,r="/",o=0;o40)throw new ye.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(ye.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%ye.nameTable.length},hashAddNode:e=>{var t=ye.hashName(e.parent.id,e.name);e.name_next=ye.nameTable[t],ye.nameTable[t]=e},hashRemoveNode:e=>{var t=ye.hashName(e.parent.id,e.name);if(ye.nameTable[t]===e)ye.nameTable[t]=e.name_next;else for(var s=ye.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=ye.mayLookup(e);if(s)throw new ye.ErrnoError(s,e);for(var i=ye.hashName(e.id,t),r=ye.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return ye.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new ye.FSNode(e,t,s,i);return ye.hashAddNode(r),r},destroyNode:e=>{ye.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=ye.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>ye.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=ye.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return ye.lookupNode(e,t),20}catch(e){}return ye.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=ye.lookupNode(e,t)}catch(e){return e.errno}var r=ye.nodePermissions(e,"wx");if(r)return r;if(s){if(!ye.isDir(i.mode))return 54;if(ye.isRoot(i)||ye.getPath(i)===ye.cwd())return 10}else if(ye.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?ye.isLink(e.mode)?32:ye.isDir(e.mode)&&("r"!==ye.flagsToPermissionString(t)||512&t)?31:ye.nodePermissions(e,ye.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=ye.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!ye.streams[s])return s;throw new ye.ErrnoError(33)},getStream:e=>ye.streams[e],createStream:(e,t,s)=>{ye.FSStream||(ye.FSStream=function(){this.shared={}},ye.FSStream.prototype={},Object.defineProperties(ye.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new ye.FSStream,e);var i=ye.nextfd(t,s);return e.fd=i,ye.streams[i]=e,e},closeStream:e=>{ye.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=ye.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new ye.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{ye.devices[e]={stream_ops:t}},getDevice:e=>ye.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),ye.syncFSRequests++,ye.syncFSRequests>1&&D("warning: "+ye.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=ye.getMounts(ye.root.mount),i=0;function r(e){return ye.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&ye.root)throw new ye.ErrnoError(10);if(!r&&!o){var n=ye.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,ye.isMountpoint(i))throw new ye.ErrnoError(10);if(!ye.isDir(i.mode))throw new ye.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?ye.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=ye.lookupPath(e,{follow_mount:!1});if(!ye.isMountpoint(t.node))throw new ye.ErrnoError(28);var s=t.node,i=s.mounted,r=ye.getMounts(i);Object.keys(ye.nameTable).forEach((e=>{for(var t=ye.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&ye.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=ye.lookupPath(e,{parent:!0}).node,r=ue.basename(e);if(!r||"."===r||".."===r)throw new ye.ErrnoError(28);var o=ye.mayCreate(i,r);if(o)throw new ye.ErrnoError(o);if(!i.node_ops.mknod)throw new ye.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,ye.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,ye.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,ye.mknod(e,t,s)),symlink:(e,t)=>{if(!pe.resolve(e))throw new ye.ErrnoError(44);var s=ye.lookupPath(t,{parent:!0}).node;if(!s)throw new ye.ErrnoError(44);var i=ue.basename(t),r=ye.mayCreate(s,i);if(r)throw new ye.ErrnoError(r);if(!s.node_ops.symlink)throw new ye.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=ue.dirname(e),o=ue.dirname(t),n=ue.basename(e),a=ue.basename(t);if(s=ye.lookupPath(e,{parent:!0}).node,i=ye.lookupPath(t,{parent:!0}).node,!s||!i)throw new ye.ErrnoError(44);if(s.mount!==i.mount)throw new ye.ErrnoError(75);var l,h=ye.lookupNode(s,n),c=pe.relative(e,o);if("."!==c.charAt(0))throw new ye.ErrnoError(28);if("."!==(c=pe.relative(t,r)).charAt(0))throw new ye.ErrnoError(55);try{l=ye.lookupNode(i,a)}catch(e){}if(h!==l){var A=ye.isDir(h.mode),u=ye.mayDelete(s,n,A);if(u)throw new ye.ErrnoError(u);if(u=l?ye.mayDelete(i,a,A):ye.mayCreate(i,a))throw new ye.ErrnoError(u);if(!s.node_ops.rename)throw new ye.ErrnoError(63);if(ye.isMountpoint(h)||l&&ye.isMountpoint(l))throw new ye.ErrnoError(10);if(i!==s&&(u=ye.nodePermissions(s,"w")))throw new ye.ErrnoError(u);ye.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{ye.hashAddNode(h)}}},rmdir:e=>{var t=ye.lookupPath(e,{parent:!0}).node,s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!0);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.rmdir)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.rmdir(t,s),ye.destroyNode(i)},readdir:e=>{var t=ye.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new ye.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=ye.lookupPath(e,{parent:!0}).node;if(!t)throw new ye.ErrnoError(44);var s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!1);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.unlink)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.unlink(t,s),ye.destroyNode(i)},readlink:e=>{var t=ye.lookupPath(e).node;if(!t)throw new ye.ErrnoError(44);if(!t.node_ops.readlink)throw new ye.ErrnoError(28);return pe.resolve(ye.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=ye.lookupPath(e,{follow:!t}).node;if(!s)throw new ye.ErrnoError(44);if(!s.node_ops.getattr)throw new ye.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>ye.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?ye.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{ye.chmod(e,t,!0)},fchmod:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);ye.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?ye.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{ye.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=ye.getStream(e);if(!i)throw new ye.ErrnoError(8);ye.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new ye.ErrnoError(28);var s;if(!(s="string"==typeof e?ye.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);if(ye.isDir(s.mode))throw new ye.ErrnoError(31);if(!ye.isFile(s.mode))throw new ye.ErrnoError(28);var i=ye.nodePermissions(s,"w");if(i)throw new ye.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);if(0==(2097155&s.flags))throw new ye.ErrnoError(28);ye.truncate(s.node,t)},utime:(e,t,s)=>{var i=ye.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new ye.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?ye.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=ue.normalize(e);try{i=ye.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var r=!1;if(64&t)if(i){if(128&t)throw new ye.ErrnoError(20)}else i=ye.mknod(e,s,0),r=!0;if(!i)throw new ye.ErrnoError(44);if(ye.isChrdev(i.mode)&&(t&=-513),65536&t&&!ye.isDir(i.mode))throw new ye.ErrnoError(54);if(!r){var o=ye.mayOpen(i,t);if(o)throw new ye.ErrnoError(o)}512&t&&!r&&ye.truncate(i,0),t&=-131713;var n=ye.createStream({node:i,path:ye.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return n.stream_ops.open&&n.stream_ops.open(n),!A.logReadFiles||1&t||(ye.readFiles||(ye.readFiles={}),e in ye.readFiles||(ye.readFiles[e]=1)),n},close:e=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ye.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ye.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new ye.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(1==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.read)throw new ye.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.write)throw new ye.ErrnoError(28);e.seekable&&1024&e.flags&&ye.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(t<0||s<=0)throw new ye.ErrnoError(28);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(!ye.isFile(e.node.mode)&&!ye.isDir(e.node.mode))throw new ye.ErrnoError(43);if(!e.stream_ops.allocate)throw new ye.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new ye.ErrnoError(2);if(1==(2097155&e.flags))throw new ye.ErrnoError(2);if(!e.stream_ops.mmap)throw new ye.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new ye.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=ye.open(e,t.flags),r=ye.stat(e).size,o=new Uint8Array(r);return ye.read(i,o,0,r,0),"utf8"===t.encoding?s=V(o,0):"binary"===t.encoding&&(s=o),ye.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=ye.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(W(t)+1),o=Q(t,r,0,r.length);ye.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");ye.write(i,t,0,t.byteLength,void 0,s.canOwn)}ye.close(i)},cwd:()=>ye.currentPath,chdir:e=>{var t=ye.lookupPath(e,{follow:!0});if(null===t.node)throw new ye.ErrnoError(44);if(!ye.isDir(t.node.mode))throw new ye.ErrnoError(54);var s=ye.nodePermissions(t.node,"x");if(s)throw new ye.ErrnoError(s);ye.currentPath=t.path},createDefaultDirectories:()=>{ye.mkdir("/tmp"),ye.mkdir("/home"),ye.mkdir("/home/web_user")},createDefaultDevices:()=>{ye.mkdir("/dev"),ye.registerDevice(ye.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),ye.mkdev("/dev/null",ye.makedev(1,3)),fe.register(ye.makedev(5,0),fe.default_tty_ops),fe.register(ye.makedev(6,0),fe.default_tty1_ops),ye.mkdev("/dev/tty",ye.makedev(5,0)),ye.mkdev("/dev/tty1",ye.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>ae("randomDevice")}();ye.createDevice("/dev","random",e),ye.createDevice("/dev","urandom",e),ye.mkdir("/dev/shm"),ye.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ye.mkdir("/proc");var e=ye.mkdir("/proc/self");ye.mkdir("/proc/self/fd"),ye.mount({mount:()=>{var t=ye.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=ye.getStream(s);if(!i)throw new ye.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{A.stdin?ye.createDevice("/dev","stdin",A.stdin):ye.symlink("/dev/tty","/dev/stdin"),A.stdout?ye.createDevice("/dev","stdout",null,A.stdout):ye.symlink("/dev/tty","/dev/stdout"),A.stderr?ye.createDevice("/dev","stderr",null,A.stderr):ye.symlink("/dev/tty1","/dev/stderr"),ye.open("/dev/stdin",0),ye.open("/dev/stdout",1),ye.open("/dev/stderr",1)},ensureErrnoError:()=>{ye.ErrnoError||(ye.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ye.ErrnoError.prototype=new Error,ye.ErrnoError.prototype.constructor=ye.ErrnoError,[44].forEach((e=>{ye.genericErrors[e]=new ye.ErrnoError(e),ye.genericErrors[e].stack=""})))},staticInit:()=>{ye.ensureErrnoError(),ye.nameTable=new Array(4096),ye.mount(me,{},"/"),ye.createDefaultDirectories(),ye.createDefaultDevices(),ye.createSpecialDirectories(),ye.filesystems={MEMFS:me}},init:(e,t,s)=>{ye.init.initialized=!0,ye.ensureErrnoError(),A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=s||A.stderr,ye.createStandardStreams()},quit:()=>{ye.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=ye.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=ye.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=ye.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=ue.basename(e),i=ye.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:ye.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=ue.join2(e,o);try{ye.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=ue.join2("string"==typeof e?e:ye.getPath(e),t),n=ye.getMode(i,r);return ye.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:ye.getPath(e),n=t?ue.join2(e,t):e);var a=ye.getMode(i,r),l=ye.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=ue.join2("string"==typeof e?e:ye.getPath(e),t),o=ye.getMode(!!s,!!i);ye.createDevice.major||(ye.createDevice.major=64);var n=ye.makedev(ye.createDevice.major++,0);return ye.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=de(u(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ye.ErrnoError(29)}},createLazyFile:(e,s,i,r,o)=>{function n(){this.lengthKnown=!1,this.chunks=[]}if(n.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,s=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=s);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,s-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>s-1)throw new Error("only "+s+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),s!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):de(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&s||(n=s=1,s=this.getter(0).length,n=s,P("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=s,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!g)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:a}}else l={isDevice:!1,url:i};var h=ye.createFile(e,s,l,r,o);l.contents?h.contents=l.contents:l.url&&(h.contents=null,h.url=l.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var c={};function A(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=h.stream_ops[e];c[e]=function(){return ye.forceLoadFile(h),t.apply(null,arguments)}})),c.read=(e,t,s,i,r)=>(ye.forceLoadFile(h),A(e,t,s,i,r)),c.mmap=(e,s,i,r,o)=>{ye.forceLoadFile(h);var n=Ee();if(!n)throw new ye.ErrnoError(48);return A(e,t(),n,s,i),{ptr:n,allocated:!0}},h.stream_ops=c,h},createPreloadedFile:(e,t,s,i,r,o,n,a,l,h)=>{var c=t?pe.resolve(ue.join2(e,t)):e;function A(s){function A(s){h&&h(),a||ye.createDataFile(e,t,s,i,r,l),o&&o(),ne()}Browser.handledByPreloadPlugin(s,c,A,(()=>{n&&n(),ne()}))||A(s)}oe(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;p(e,(s=>{x(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&ne()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&oe()}(s,(e=>A(e)),n):A(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{P("creating db"),r.result.createObjectStore(ye.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([ye.DB_STORE_NAME],"readwrite"),o=i.objectStore(ye.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(ye.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([ye.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(ye.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{ye.analyzePath(e).exists&&ye.unlink(e),ye.createDataFile(ue.dirname(e),ue.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},ge={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(ue.isAbs(t))return t;var i;if(i=-100===e?ye.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!s)throw new ye.ErrnoError(44);return i}return ue.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&ue.normalize(t)!==ue.normalize(ye.getPath(e.node)))return-54;throw e}n()[s>>>2]=i.dev,n()[s+8>>>2]=i.ino,n()[s+12>>>2]=i.mode,a()[s+16>>>2]=i.nlink,n()[s+20>>>2]=i.uid,n()[s+24>>>2]=i.gid,n()[s+28>>>2]=i.rdev,se=[i.size>>>0,(te=i.size,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+40>>>2]=se[0],n()[s+44>>>2]=se[1],n()[s+48>>>2]=4096,n()[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),l=i.ctime.getTime();return se=[Math.floor(r/1e3)>>>0,(te=Math.floor(r/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+56>>>2]=se[0],n()[s+60>>>2]=se[1],a()[s+64>>>2]=r%1e3*1e3,se=[Math.floor(o/1e3)>>>0,(te=Math.floor(o/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+72>>>2]=se[0],n()[s+76>>>2]=se[1],a()[s+80>>>2]=o%1e3*1e3,se=[Math.floor(l/1e3)>>>0,(te=Math.floor(l/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+88>>>2]=se[0],n()[s+92>>>2]=se[1],a()[s+96>>>2]=l%1e3*1e3,se=[i.ino>>>0,(te=i.ino,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+104>>>2]=se[0],n()[s+108>>>2]=se[1],0},doMsync:function(e,t,s,r,o){if(!ye.isFile(t.node.mode))throw new ye.ErrnoError(43);if(2&r)return 0;e>>>=0;var n=i().slice(e,e+s);ye.msync(t,n,o,s,r)},varargs:void 0,get:function(){return ge.varargs+=4,n()[ge.varargs-4>>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=ye.getStream(e);if(!t)throw new ye.ErrnoError(8);return t}};function Ie(e){if(v)return ls(1,1,e);O=e,J()||(Te.terminateAllThreads(),A.onExit&&A.onExit(e),S=!0),m(e,new ce(e))}var ve=function(e,t){if(O=e,!t&&v)throw Re(e),"unwind";Ie(e)},Te={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){v?Te.initWorker():Te.initMainThread()},initMainThread:function(){for(var e=navigator.hardwareConcurrency;e--;)Te.allocateUnusedWorker()},initWorker:function(){C=!1},setExitStatus:function(e){O=e},terminateAllThreads:function(){for(var e of Object.values(Te.pthreads))Te.returnWorkerToPool(e);for(var e of Te.unusedWorkers)e.terminate();Te.unusedWorkers=[]},returnWorkerToPool:function(e){var t=e.pthread_ptr;delete Te.pthreads[t],Te.unusedWorkers.push(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Fs(t)},receiveObjectTransfer:function(e){},threadInitTLS:function(){Te.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=s=>{var i,r=s.data,o=r.cmd;if(e.pthread_ptr&&(Te.currentProxiedOperationCallerThread=e.pthread_ptr),r.targetThread&&r.targetThread!=Cs()){var n=Te.pthreads[r.targetThread];return n?n.postMessage(r,r.transferList):D('Internal error! Worker sent a message "'+o+'" to target pthread '+r.targetThread+", but that thread no longer exists!"),void(Te.currentProxiedOperationCallerThread=void 0)}"processProxyingQueue"===o?ts(r.queue):"spawnThread"===o?function(e){var t=Te.getNewWorker();if(!t)return 6;Te.runningWorkers.push(t),Te.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var s={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};t.postMessage(s,e.transferList)}(r):"cleanupThread"===o?Ae(r.thread):"killThread"===o?function(e){var t=Te.pthreads[e];delete Te.pthreads[e],t.terminate(),Fs(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(t),1),t.pthread_ptr=0}(r.thread):"cancelThread"===o?(i=r.thread,Te.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"print"===o?P("Thread "+r.threadId+": "+r.text):"printErr"===o?D("Thread "+r.threadId+": "+r.text):"alert"===o?alert("Thread "+r.threadId+": "+r.text):"setimmediate"===r.target?e.postMessage(r):"callHandler"===o?A[r.handler](...r.args):o&&D("worker sent an unknown command "+o),Te.currentProxiedOperationCallerThread=void 0},e.onerror=e=>{throw D("worker sent an error! "+e.filename+":"+e.lineno+": "+e.message),e};var i=[];for(var r of["onExit","onAbort","print","printErr"])A.hasOwnProperty(r)&&i.push(r);e.postMessage({cmd:"load",handlers:i,urlOrBlob:A.mainScriptUrlOrBlob||s,wasmMemory:N,wasmModule:b})})),loadWasmModuleToAllWorkers:function(e){if(v)return e();Promise.all(Te.unusedWorkers.map(Te.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker:function(){var e,t=_("web-ifc-mt.worker.js");e=new Worker(t),Te.unusedWorkers.push(e)},getNewWorker:function(){return 0==Te.unusedWorkers.length&&(Te.allocateUnusedWorker(),Te.loadWasmModuleToWorker(Te.unusedWorkers[0])),Te.unusedWorkers.pop()}};function _e(e){for(;e.length>0;)e.shift()(A)}function Re(e){if(v)return ls(2,0,e);try{ve(e)}catch(e){!function(e){if(e instanceof ce||"unwind"==e)return O;m(1,e)}(e)}}A.PThread=Te,A.establishStackSpace=function(){var e=Cs(),t=n()[e+52>>>2],s=n()[e+56>>>2];Us(t,t-s),Gs(t)};var Pe=[];function De(e){var t=Pe[e];return t||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=t=K.get(e)),t}function Ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){a()[this.ptr+4>>>2]=e},this.get_type=function(){return a()[this.ptr+4>>>2]},this.set_destructor=function(e){a()[this.ptr+8>>>2]=e},this.get_destructor=function(){return a()[this.ptr+8>>>2]},this.set_refcount=function(e){n()[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){Atomics.add(n(),this.ptr+0>>2,1)},this.release_ref=function(){return 1===Atomics.sub(n(),this.ptr+0>>2,1)},this.set_adjusted_ptr=function(e){a()[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return a()[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Vs(this.get_type()))return a()[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}A.invokeEntryPoint=function(e,t){var s=De(e)(t);J()?Te.setExitStatus(s):Ms(s)};var be="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",Ce={};function Oe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Se(e){return this.fromWireType(n()[e>>>2])}var xe={},we={},Be={};function Fe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function Me(e,t){return e=Fe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Le(e,t){var s=Me(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var Ue=void 0;function He(e){throw new Ue(e)}function Ge(e,t,s){function i(t){var i=s(t);i.length!==e.length&&He("Mismatched type converter count");for(var r=0;r{we.hasOwnProperty(e)?r[t]=we[e]:(o.push(e),xe.hasOwnProperty(e)||(xe[e]=[]),xe[e].push((()=>{r[t]=we[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var ke={};function Ve(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var je=void 0;function Qe(e){for(var t="",s=e;i()[s>>>0];)t+=je[i()[s++>>>0]];return t}var We=void 0;function ze(e){throw new We(e)}function Ke(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ze('type "'+i+'" must have a positive integer typeid pointer'),we.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ze("Cannot register type '"+i+"' twice")}if(we[e]=t,delete Be[e],xe.hasOwnProperty(e)){var r=xe[e];delete xe[e],r.forEach((e=>e()))}}function Ye(e){if(!(this instanceof mt))return!1;if(!(e instanceof mt))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function Xe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ze(e){ze(e.$$.ptrType.registeredClass.name+" instance already deleted")}var qe=!1;function Je(e){}function $e(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function et(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=et(e,t,s.baseClass);return null===i?null:s.downcast(i)}var tt={};function st(){return Object.keys(lt).length}function it(){var e=[];for(var t in lt)lt.hasOwnProperty(t)&&e.push(lt[t]);return e}var rt=[];function ot(){for(;rt.length;){var e=rt.pop();e.$$.deleteScheduled=!1,e.delete()}}var nt=void 0;function at(e){nt=e,rt.length&&nt&&nt(ot)}var lt={};function ht(e,t){return t=function(e,t){for(void 0===t&&ze("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),lt[t]}function ct(e,t){return t.ptrType&&t.ptr||He("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&He("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ut(Object.create(e,{$$:{value:t}}))}function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=ht(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?ct(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ct(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=tt[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=et(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function ut(e){return"undefined"==typeof FinalizationRegistry?(ut=e=>e,e):(qe=new FinalizationRegistry((e=>{$e(e.$$)})),Je=e=>qe.unregister(e),(ut=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};qe.register(e,s,e)}return e})(e))}function pt(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ut(Object.create(Object.getPrototypeOf(this),{$$:{value:Xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function dt(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),Je(this),$e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ft(){return!this.$$.ptr}function Et(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),rt.push(this),1===rt.length&&nt&&nt(ot),this.$$.deleteScheduled=!0,this}function mt(){}function yt(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ze("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function gt(e,t,s){A.hasOwnProperty(e)?((void 0===s||void 0!==A[e].overloadTable&&void 0!==A[e].overloadTable[s])&&ze("Cannot register public name '"+e+"' twice"),yt(A,e,e),A.hasOwnProperty(s)&&ze("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),A[e].overloadTable[s]=t):(A[e]=t,void 0!==s&&(A[e].numArguments=s))}function It(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function vt(e,t,s){for(;t!==s;)t.upcast||ze("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Tt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function _t(e,t){var s;if(null===t)return this.isReference&&ze("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=vt(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ze("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,Vt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ze("Unsupporting sharing policy")}return s}function Rt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function Pt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Dt(e){this.rawDestructor&&this.rawDestructor(e)}function Nt(e){null!==e&&e.delete()}function bt(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=_t:i?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=Rt,this.destructorFunction=null)}function Ct(e,t,s){A.hasOwnProperty(e)||He("Replacing nonexistant public symbol"),void 0!==A[e].overloadTable&&void 0!==s?A[e].overloadTable[s]=t:(A[e]=t,A[e].argCount=s)}function Ot(e,t,s){return e.includes("j")?function(e,t,s){var i=A["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):De(t).apply(null,s)}function St(e,t){var s,i,r,o=(e=Qe(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ot(s,i,r)}):De(t);return"function"!=typeof o&&ze("unknown function pointer with signature "+e+": "+t),o}var xt=void 0;function wt(e){var t=Os(e),s=Qe(t);return Ls(t),s}function Bt(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||we[t]||(Be[t]?Be[t].forEach(e):(s.push(t),i[t]=!0))})),new xt(e+": "+s.map(wt).join([", "]))}function Ft(e,t){for(var s=[],i=0;i>>2]);return s}function Mt(e,t,s,i,r){var o=t.length;o<2&&ze("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--Ut[e].refcount&&(Ut[e]=void 0,Lt.push(e))}function Gt(){for(var e=0,t=5;t(e||ze("Cannot use deleted val. handle = "+e),Ut[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Lt.length?Lt.pop():Ut.length;return Ut[t]={refcount:1,value:e},t}}};function jt(e,s,l){switch(s){case 0:return function(e){var s=l?t():i();return this.fromWireType(s[e>>>0])};case 1:return function(e){var t=l?r():o();return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=l?n():a();return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Qt(e,t){var s=we[e];return void 0===s&&ze(t+" has unknown type "+wt(e)),s}function Wt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function zt(e,t){switch(t){case 2:return function(e){return this.fromWireType((N.buffer!=w.buffer&&z(),H)[e>>>2])};case 3:return function(e){return this.fromWireType(l()[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Kt(e,s,l){switch(s){case 0:return l?function(e){return t()[e>>>0]}:function(e){return i()[e>>>0]};case 1:return l?function(e){return r()[e>>>1]}:function(e){return o()[e>>>1]};case 2:return l?function(e){return n()[e>>>2]}:function(e){return a()[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Yt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Xt(e,t){for(var s=e,n=s>>1,a=n+t/2;!(n>=a)&&o()[n>>>0];)++n;if((s=n<<1)-e>32&&Yt)return Yt.decode(i().slice(e,s));for(var l="",h=0;!(h>=t/2);++h){var c=r()[e+2*h>>>1];if(0==c)break;l+=String.fromCharCode(c)}return l}function Zt(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,o=(s-=2)<2*e.length?s/2:e.length,n=0;n>>1]=a,t+=2}return r()[t>>>1]=0,t-i}function qt(e){return 2*e.length}function Jt(e,t){for(var s=0,i="";!(s>=t/4);){var r=n()[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function $t(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),n()[t>>>2]=a,(t+=4)+4>r)break}return n()[t>>>2]=0,t-i}function es(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}function ts(e){Atomics.store(n(),e>>2,1),Cs()&&Bs(e),Atomics.compareExchange(n(),e>>2,1,0)}A.executeNotifiedProxyingQueue=ts;var ss,is={};function rs(e){var t=is[e];return void 0===t?Qe(e):t}function os(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ns(e){ns.shown||(ns.shown={}),ns.shown[e]||(ns.shown[e]=1,D(e))}function as(e){var t=Hs(),s=e();return Gs(t),s}function ls(e,t){var s=arguments.length-2,i=arguments;return as((()=>{for(var r=s,o=ks(8*r),n=o>>3,a=0;a>>0]=h}return ws(e,r,o,t)}))}ss=()=>performance.timeOrigin+performance.now();var hs=[];function cs(e){var t=N.buffer;try{return N.grow(e-t.byteLength+65535>>>16),z(),1}catch(e){}}var As={};function us(){if(!us.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:E||"./this.program"};for(var t in As)void 0===As[t]?delete e[t]:e[t]=As[t];var s=[];for(var t in e)s.push(t+"="+e[t]);us.strings=s}return us.strings}function ps(e,s){if(v)return ls(3,1,e,s);var i=0;return us().forEach((function(r,o){var n=s+i;a()[e+4*o>>>2]=n,function(e,s,i){for(var r=0;r>>0]=e.charCodeAt(r);i||(t()[s>>>0]=0)}(r,n),i+=r.length+1})),0}function ds(e,t){if(v)return ls(4,1,e,t);var s=us();a()[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),a()[t>>>2]=i,0}function fs(e){if(v)return ls(5,1,e);try{var t=ge.getStreamFromFD(e);return ye.close(t),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function Es(e,s,i,r){if(v)return ls(6,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.read(e,t(),l,h,r);if(c<0)return-1;if(o+=c,c>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function ms(e,t,s,i,r){if(v)return ls(7,1,e,t,s,i,r);try{var o=(h=s)+2097152>>>0<4194305-!!(l=t)?(l>>>0)+4294967296*h:NaN;if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return ye.llseek(a,o,i),se=[a.position>>>0,(te=a.position,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[r>>>2]=se[0],n()[r+4>>>2]=se[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}var l,h}function ys(e,s,i,r){if(v)return ls(8,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.write(e,t(),l,h,r);if(c<0)return-1;o+=c,void 0!==r&&(r+=c)}return o}(ge.getStreamFromFD(e),s,i);return a()[r>>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function gs(e){return e%4==0&&(e%100!=0||e%400==0)}var Is=[31,29,31,30,31,30,31,31,30,31,30,31],vs=[31,28,31,30,31,30,31,31,30,31,30,31];function Ts(e,s,i,r){var o=n()[r+40>>>2],a={tm_sec:n()[r>>>2],tm_min:n()[r+4>>>2],tm_hour:n()[r+8>>>2],tm_mday:n()[r+12>>>2],tm_mon:n()[r+16>>>2],tm_year:n()[r+20>>>2],tm_wday:n()[r+24>>>2],tm_yday:n()[r+28>>>2],tm_isdst:n()[r+32>>>2],tm_gmtoff:n()[r+36>>>2],tm_zone:o?j(o):""},l=j(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in h)l=l.replace(new RegExp(c,"g"),h[c]);var A=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function E(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=gs(s.getFullYear()),r=s.getMonth(),o=(i?Is:vs)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=E(s),o=E(i);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(e){return A[e.tm_wday].substring(0,3)},"%A":function(e){return A[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return p(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(gs(e.tm_year+1900)?Is:vs,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&gs(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&gs(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in l=l.replace(/%%/g,"\0\0"),y)l.includes(c)&&(l=l.replace(new RegExp(c,"g"),y[c](a)));var g,I,v=de(l=l.replace(/\0\0/g,"%"),!1);return v.length>s?0:(g=v,I=e,t().set(g,I>>>0),v.length-1)}Te.init();var _s=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ye.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Rs=365,Ps=146;Object.defineProperties(_s.prototype,{read:{get:function(){return(this.mode&Rs)===Rs},set:function(e){e?this.mode|=Rs:this.mode&=-366}},write:{get:function(){return(this.mode&Ps)===Ps},set:function(e){e?this.mode|=Ps:this.mode&=-147}},isFolder:{get:function(){return ye.isDir(this.mode)}},isDevice:{get:function(){return ye.isChrdev(this.mode)}}}),ye.FSNode=_s,ye.staticInit(),Ue=A.InternalError=Le(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);je=e}(),We=A.BindingError=Le(Error,"BindingError"),mt.prototype.isAliasOf=Ye,mt.prototype.clone=pt,mt.prototype.delete=dt,mt.prototype.isDeleted=ft,mt.prototype.deleteLater=Et,A.getInheritedInstanceCount=st,A.getLiveInheritedInstances=it,A.flushPendingDeletes=ot,A.setDelayFunction=at,bt.prototype.getPointee=Pt,bt.prototype.destructor=Dt,bt.prototype.argPackAdvance=8,bt.prototype.readValueFromPointer=Se,bt.prototype.deleteObject=Nt,bt.prototype.fromWireType=At,xt=A.UnboundTypeError=Le(Error,"UnboundTypeError"),A.count_emval_handles=Gt,A.get_first_emval=kt;var Ds=[null,Ie,Re,ps,ds,fs,Es,ms,ys],Ns={g:function(e,t,s){throw new Ne(e).init(t,s),e},T:function(e){Ss(e,!g,1,!y),Te.threadInitTLS()},J:function(e){v?postMessage({cmd:"cleanupThread",thread:e}):Ae(e)},X:function(e){},_:function(e){ae(be)},Z:function(e,t){ae(be)},da:function(e){var t=Ce[e];delete Ce[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;Ge([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Oe(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>l])},destructorFunction:null})},p:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=Qe(c),o=St(r,o),a&&(a=St(n,a)),h&&(h=St(l,h)),u=St(A,u);var p=Fe(c);gt(p,(function(){Bt("Cannot construct "+c+" due to unbound types",[i])})),Ge([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:mt.prototype;var n=Me(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new We("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new We(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new It(c,n,l,u,s,o,a,h),d=new bt(c,A,!0,!1,!1),f=new bt(c+"*",A,!1,!1,!1),E=new bt(c+" const*",A,!1,!0,!1);return tt[e]={pointerType:f,constPointerType:E},Ct(p,n),[d,f,E]}))},o:function(e,t,s,i,r,o){x(t>0);var n=Ft(t,s);r=St(i,r),Ge([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Bt("Cannot construct "+e.name+" due to unbound types",n)},Ge([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Mt(s,i,null,r,o),[]})),[]}))},c:function(e,t,s,i,r,o,n,a){var l=Ft(s,i);t=Qe(t),o=St(r,o),Ge([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){Bt("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(yt(h,t,i),h[t].overloadTable[s-2]=r),Ge([],l,(function(r){var a=Mt(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},aa:function(e,t){Ke(e,{name:t=Qe(t),fromWireType:function(e){var t=Vt.toValue(e);return Ht(e),t},toWireType:function(e,t){return Vt.toHandle(t)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},D:function(e,t,s,i){var r=Ve(s);function o(){}t=Qe(t),o.values={},Ke(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:jt(t,r,i),destructorFunction:null}),gt(t,o)},t:function(e,t,s){var i=Qt(e,"enum");t=Qe(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:Me(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},B:function(e,t,s){var i=Ve(s);Ke(e,{name:t=Qe(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,i),destructorFunction:null})},d:function(e,t,s,i,r,o){var n=Ft(t,s);e=Qe(e),r=St(i,r),gt(e,(function(){Bt("Cannot call "+e+" due to unbound types",n)}),t-1),Ge([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ct(e,Mt(e,i,null,r,o),t-1),[]}))},s:function(e,t,s,i,r){t=Qe(t);var o=Ve(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ke(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Kt(t,o,0!==i),destructorFunction:null})},i:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){e>>=2;var t=a(),s=t[e>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ke(e,{name:s=Qe(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},C:function(e,t){var s="std::string"===(t=Qe(t));Ke(e,{name:t,fromWireType:function(e){var t,r=a()[e>>>2],o=e+4;if(s)for(var n=o,l=0;l<=r;++l){var h=o+l;if(l==r||0==i()[h>>>0]){var c=j(n,h-n);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),n=h+1}}else{var A=new Array(r);for(l=0;l>>0]);t=A.join("")}return Ls(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ze("Cannot pass non-string to std::string"),r=s&&o?W(t):t.length;var n,l,h=bs(4+r+1),c=h+4;if(c>>>=0,a()[h>>>2]=r,s&&o)n=c,l=r+1,Q(t,i(),n,l);else if(o)for(var A=0;A255&&(Ls(c),ze("String has UTF-16 code units that do not fit in 8 bits")),i()[c+A>>>0]=u}else for(A=0;A>>0]=t[A];return null!==e&&e.push(Ls,h),h},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},x:function(e,t,s){var i,r,n,l,h;s=Qe(s),2===t?(i=Xt,r=Zt,l=qt,n=()=>o(),h=1):4===t&&(i=Jt,r=$t,l=es,n=()=>a(),h=2),Ke(e,{name:s,fromWireType:function(e){for(var s,r=a()[e>>>2],o=n(),l=e+4,c=0;c<=r;++c){var A=e+4+c*t;if(c==r||0==o[A>>>h]){var u=i(l,A-l);void 0===s?s=u:(s+=String.fromCharCode(0),s+=u),l=A+t}}return Ls(e),s},toWireType:function(e,i){"string"!=typeof i&&ze("Cannot pass non-string to C++ string type "+s);var o=l(i),n=bs(4+o+t);return n>>>=0,a()[n>>>2]=o>>h,r(i,n+4,o+t),null!==e&&e.push(Ls,n),n},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},ea:function(e,t,s,i,r,o){Ce[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),elements:[]}},j:function(e,t,s,i,r,o,n,a,l){Ce[e].elements.push({getterReturnType:t,getter:St(s,i),getterContext:r,setterArgumentType:o,setter:St(n,a),setterContext:l})},r:function(e,t,s,i,r,o){ke[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),fields:[]}},f:function(e,t,s,i,r,o,n,a,l,h){ke[e].fields.push({fieldName:Qe(t),getterReturnType:s,getter:St(i,r),getterContext:o,setterArgumentType:n,setter:St(a,l),setterContext:h})},ca:function(e,t){Ke(e,{isVoid:!0,name:t=Qe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},Y:function(e){D(j(e))},V:function(e,t,s,i){if(e==t)setTimeout((()=>ts(i)));else if(v)postMessage({targetThread:e,cmd:"processProxyingQueue",queue:i});else{var r=Te.pthreads[e];if(!r)return;r.postMessage({cmd:"processProxyingQueue",queue:i})}return 1},S:function(e,t,s){return-1},n:function(e,t,s){e=Vt.toValue(e),t=Qt(t,"emval::as");var i=[],r=Vt.toHandle(i);return a()[s>>>2]=r,t.toWireType(i,e)},z:function(e,t,s,i){e=Vt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(Ut[e].refcount+=1)},ga:function(e,t){return(e=Vt.toValue(e))instanceof(t=Vt.toValue(t))},y:function(e){return"number"==typeof(e=Vt.toValue(e))},E:function(e){return"string"==typeof(e=Vt.toValue(e))},fa:function(){return Vt.toHandle([])},h:function(e){return Vt.toHandle(rs(e))},w:function(){return Vt.toHandle({})},m:function(e){Oe(Vt.toValue(e)),Ht(e)},k:function(e,t,s){e=Vt.toValue(e),t=Vt.toValue(t),s=Vt.toValue(s),e[t]=s},e:function(e,t){var s=(e=Qt(e,"_emval_take_value")).readValueFromPointer(t);return Vt.toHandle(s)},A:function(){ae("")},U:function(){g||ns("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},v:ss,W:function(e,t,s){i().copyWithin(e>>>0,t>>>0,t+s>>>0)},R:function(e,t,s){hs.length=t;for(var i=s>>3,r=0;r>>0];return Ds[e].apply(null,hs)},P:function(e){var t=i().length;if((e>>>=0)<=t)return!1;var s,r,o=4294901760;if(e>o)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);if(a=Math.min(a,e+100663296),cs(Math.min(o,(s=Math.max(e,a))+((r=65536)-s%r)%r)))return!0}return!1},$:function(){throw"unwind"},L:ps,M:ds,I:ve,N:fs,O:Es,G:ms,Q:ys,a:N||A.wasmMemory,K:function(e,t,s,i,r){return Ts(e,t,s,i)}};!function(){var e={a:Ns};function t(e,t){var s,i,r=e.exports;A.asm=r,s=A.asm.ka,Te.tlsInitFunctions.push(s),K=A.asm.ia,i=A.asm.ha,Z.unshift(i),b=t,Te.loadWasmModuleToAllWorkers((()=>ne()))}function s(e){t(e.instance,e.module)}function i(t){return(R||!y&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return he(ee)})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return he(ee)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){D("failed to asynchronously prepare wasm: "+e),ae(e)}))}if(oe(),A.instantiateWasm)try{return A.instantiateWasm(e,t)}catch(e){D("Module.instantiateWasm callback failed with error: "+e),c(e)}(R||"function"!=typeof WebAssembly.instantiateStreaming||le(ee)||"function"!=typeof fetch?i(s):fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return D("wasm streaming compile failed: "+e),D("falling back to ArrayBuffer instantiation"),i(s)}))}))).catch(c)}();var bs=function(){return(bs=A.asm.ja).apply(null,arguments)};A.__emscripten_tls_init=function(){return(A.__emscripten_tls_init=A.asm.ka).apply(null,arguments)};var Cs=A._pthread_self=function(){return(Cs=A._pthread_self=A.asm.la).apply(null,arguments)},Os=A.___getTypeName=function(){return(Os=A.___getTypeName=A.asm.ma).apply(null,arguments)};A.__embind_initialize_bindings=function(){return(A.__embind_initialize_bindings=A.asm.na).apply(null,arguments)};var Ss=A.__emscripten_thread_init=function(){return(Ss=A.__emscripten_thread_init=A.asm.oa).apply(null,arguments)};A.__emscripten_thread_crashed=function(){return(A.__emscripten_thread_crashed=A.asm.pa).apply(null,arguments)};var xs,ws=function(){return(ws=A.asm.qa).apply(null,arguments)},Bs=A.__emscripten_proxy_execute_task_queue=function(){return(Bs=A.__emscripten_proxy_execute_task_queue=A.asm.ra).apply(null,arguments)},Fs=function(){return(Fs=A.asm.sa).apply(null,arguments)},Ms=A.__emscripten_thread_exit=function(){return(Ms=A.__emscripten_thread_exit=A.asm.ta).apply(null,arguments)},Ls=function(){return(Ls=A.asm.ua).apply(null,arguments)},Us=function(){return(Us=A.asm.va).apply(null,arguments)},Hs=function(){return(Hs=A.asm.wa).apply(null,arguments)},Gs=function(){return(Gs=A.asm.xa).apply(null,arguments)},ks=function(){return(ks=A.asm.ya).apply(null,arguments)},Vs=function(){return(Vs=A.asm.za).apply(null,arguments)};function js(){if(!(ie>0)){if(v)return h(A),$(),void startWorker(A);!function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)e=A.preRun.shift(),X.unshift(e);var e;_e(X)}(),ie>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e())}function e(){xs||(xs=!0,A.calledRun=!0,S||($(),h(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(!v){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)e=A.postRun.shift(),q.unshift(e);var e;_e(q)}}()))}}if(A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.Aa).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.Ba).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.Ca).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.Da).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.Ea).apply(null,arguments)},A.keepRuntimeAlive=J,A.wasmMemory=N,A.ExitStatus=ce,A.PThread=Te,re=function e(){xs||js(),xs||(re=e)},A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return js(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),mI=fI({"dist/web-ifc.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,i,r=void 0!==e?e:{};r.ready=new Promise((function(e,s){t=e,i=s}));var o,n,a=Object.assign({},r),l="./this.program",h="";"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),s&&(h=s),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},n=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)};var c,A,u=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments,r.thisProgram&&(l=r.thisProgram),r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var d=!1;function f(e,t){e||V(t)}var E,m,y,g,I,v,T,_,R,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&P)return P.decode(e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function N(e,t){return(e>>>=0)?D(m,e,t):""}function b(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function C(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function O(){var e=A.buffer;r.HEAP8=E=new Int8Array(e),r.HEAP16=y=new Int16Array(e),r.HEAP32=I=new Int32Array(e),r.HEAPU8=m=new Uint8Array(e),r.HEAPU16=g=new Uint16Array(e),r.HEAPU32=v=new Uint32Array(e),r.HEAPF32=T=new Float32Array(e),r.HEAPF64=_=new Float64Array(e)}var S,x,w,B,F=[],M=[],L=[],U=0,H=null;function G(e){U++,r.monitorRunDependencies&&r.monitorRunDependencies(U)}function k(e){if(U--,r.monitorRunDependencies&&r.monitorRunDependencies(U),0==U&&H){var t=H;H=null,t()}}function V(e){r.onAbort&&r.onAbort(e),p(e="Aborted("+e+")"),d=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}function j(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){try{if(e==S&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function W(e){for(;e.length>0;)e.shift()(r)}function z(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){v[this.ptr+4>>>2]=e},this.get_type=function(){return v[this.ptr+4>>>2]},this.set_destructor=function(e){v[this.ptr+8>>>2]=e},this.get_destructor=function(){return v[this.ptr+8>>>2]},this.set_refcount=function(e){I[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=I[this.ptr>>>2];I[this.ptr>>>2]=e+1},this.release_ref=function(){var e=I[this.ptr>>>2];return I[this.ptr>>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){v[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return v[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Kt(this.get_type()))return v[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}j(S="web-ifc.wasm")||(x=S,S=r.locateFile?r.locateFile(x,h):h+x);var K={};function Y(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function X(e){return this.fromWireType(I[e>>>2])}var Z={},q={},J={};function $(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function ee(e,t){return e=$(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function te(e,t){var s=ee(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var se=void 0;function ie(e){throw new se(e)}function re(e,t,s){function i(t){var i=s(t);i.length!==e.length&&ie("Mismatched type converter count");for(var r=0;r{q.hasOwnProperty(e)?r[t]=q[e]:(o.push(e),Z.hasOwnProperty(e)||(Z[e]=[]),Z[e].push((()=>{r[t]=q[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var oe={};function ne(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ae=void 0;function le(e){for(var t="",s=e;m[s>>>0];)t+=ae[m[s++>>>0]];return t}var he=void 0;function ce(e){throw new he(e)}function Ae(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ce('type "'+i+'" must have a positive integer typeid pointer'),q.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ce("Cannot register type '"+i+"' twice")}if(q[e]=t,delete J[e],Z.hasOwnProperty(e)){var r=Z[e];delete Z[e],r.forEach((e=>e()))}}function ue(e){if(!(this instanceof Fe))return!1;if(!(e instanceof Fe))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function pe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function de(e){ce(e.$$.ptrType.registeredClass.name+" instance already deleted")}var fe=!1;function Ee(e){}function me(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function ye(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=ye(e,t,s.baseClass);return null===i?null:s.downcast(i)}var ge={};function Ie(){return Object.keys(De).length}function ve(){var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e}var Te=[];function _e(){for(;Te.length;){var e=Te.pop();e.$$.deleteScheduled=!1,e.delete()}}var Re=void 0;function Pe(e){Re=e,Te.length&&Re&&Re(_e)}var De={};function Ne(e,t){return t=function(e,t){for(void 0===t&&ce("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),De[t]}function be(e,t){return t.ptrType&&t.ptr||ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Oe(Object.create(e,{$$:{value:t}}))}function Ce(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=Ne(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?be(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):be(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=ge[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=ye(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function Oe(e){return"undefined"==typeof FinalizationRegistry?(Oe=e=>e,e):(fe=new FinalizationRegistry((e=>{me(e.$$)})),Ee=e=>fe.unregister(e),(Oe=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};fe.register(e,s,e)}return e})(e))}function Se(){if(this.$$.ptr||de(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Oe(Object.create(Object.getPrototypeOf(this),{$$:{value:pe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function xe(){this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Ee(this),me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function we(){return!this.$$.ptr}function Be(){return this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Te.push(this),1===Te.length&&Re&&Re(_e),this.$$.deleteScheduled=!0,this}function Fe(){}function Me(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ce("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function Le(e,t,s){r.hasOwnProperty(e)?((void 0===s||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[s])&&ce("Cannot register public name '"+e+"' twice"),Me(r,e,e),r.hasOwnProperty(s)&&ce("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),r[e].overloadTable[s]=t):(r[e]=t,void 0!==s&&(r[e].numArguments=s))}function Ue(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function He(e,t,s){for(;t!==s;)t.upcast||ce("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Ge(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function ke(e,t){var s;if(null===t)return this.isReference&&ce("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=He(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,lt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ce("Unsupporting sharing policy")}return s}function Ve(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function je(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Qe(e){this.rawDestructor&&this.rawDestructor(e)}function We(e){null!==e&&e.delete()}function ze(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=ke:i?(this.toWireType=Ge,this.destructorFunction=null):(this.toWireType=Ve,this.destructorFunction=null)}function Ke(e,t,s){r.hasOwnProperty(e)||ie("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==s?r[e].overloadTable[s]=t:(r[e]=t,r[e].argCount=s)}var Ye=[];function Xe(e){var t=Ye[e];return t||(e>=Ye.length&&(Ye.length=e+1),Ye[e]=t=R.get(e)),t}function Ze(e,t,s){return e.includes("j")?function(e,t,s){var i=r["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):Xe(t).apply(null,s)}function qe(e,t){var s,i,r,o=(e=le(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ze(s,i,r)}):Xe(t);return"function"!=typeof o&&ce("unknown function pointer with signature "+e+": "+t),o}var Je=void 0;function $e(e){var t=Qt(e),s=le(t);return zt(t),s}function et(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||q[t]||(J[t]?J[t].forEach(e):(s.push(t),i[t]=!0))})),new Je(e+": "+s.map($e).join([", "]))}function tt(e,t){for(var s=[],i=0;i>>2]);return s}function st(e,t,s,i,r){var o=t.length;o<2&&ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--rt[e].refcount&&(rt[e]=void 0,it.push(e))}function nt(){for(var e=0,t=5;t(e||ce("Cannot use deleted val. handle = "+e),rt[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=it.length?it.pop():rt.length;return rt[t]={refcount:1,value:e},t}}};function ht(e,t,s){switch(t){case 0:return function(e){var t=s?E:m;return this.fromWireType(t[e>>>0])};case 1:return function(e){var t=s?y:g;return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=s?I:v;return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e,t){var s=q[e];return void 0===s&&ce(t+" has unknown type "+$e(e)),s}function At(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function ut(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>>2])};case 3:return function(e){return this.fromWireType(_[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function pt(e,t,s){switch(t){case 0:return s?function(e){return E[e>>>0]}:function(e){return m[e>>>0]};case 1:return s?function(e){return y[e>>>1]}:function(e){return g[e>>>1]};case 2:return s?function(e){return I[e>>>2]}:function(e){return v[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var dt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ft(e,t){for(var s=e,i=s>>1,r=i+t/2;!(i>=r)&&g[i>>>0];)++i;if((s=i<<1)-e>32&&dt)return dt.decode(m.subarray(e>>>0,s>>>0));for(var o="",n=0;!(n>=t/2);++n){var a=y[e+2*n>>>1];if(0==a)break;o+=String.fromCharCode(a)}return o}function Et(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,r=(s-=2)<2*e.length?s/2:e.length,o=0;o>>1]=n,t+=2}return y[t>>>1]=0,t-i}function mt(e){return 2*e.length}function yt(e,t){for(var s=0,i="";!(s>=t/4);){var r=I[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function gt(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++o)),I[t>>>2]=n,(t+=4)+4>r)break}return I[t>>>2]=0,t-i}function It(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}var vt={};function Tt(e){var t=vt[e];return void 0===t?le(e):t}function _t(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Rt(e){var t=A.buffer;try{return A.grow(e-t.byteLength+65535>>>16),O(),1}catch(e){}}var Pt={};function Dt(){if(!Dt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in Pt)void 0===Pt[t]?delete e[t]:e[t]=Pt[t];var s=[];for(var t in e)s.push(t+"="+e[t]);Dt.strings=s}return Dt.strings}var Nt={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=Nt.isAbs(e),s="/"===e.substr(-1);return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Nt.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Nt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Nt.normalize(e.join("/"))},join2:(e,t)=>Nt.normalize(e+"/"+t)},bt={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:wt.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=Nt.isAbs(i)}return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=bt.resolve(e).substr(1),t=bt.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:C(e)+1,r=new Array(i),o=b(e,r,0,r.length);return t&&(r.length=o),r}var Ot={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){Ot.ttys[e]={input:[],output:[],ops:t},wt.registerDevice(e,Ot.stream_ops)},stream_ops:{open:function(e){var t=Ot.ttys[e.node.rdev];if(!t)throw new wt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new wt.ErrnoError(60);for(var o=0,n=0;n0&&(u(D(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(D(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(p(D(e.output,0)),e.output=[])}}};function St(e){V()}var xt={ops_table:null,mount:function(e){return xt.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(wt.isBlkdev(s)||wt.isFIFO(s))throw new wt.ErrnoError(63);xt.ops_table||(xt.ops_table={dir:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,lookup:xt.node_ops.lookup,mknod:xt.node_ops.mknod,rename:xt.node_ops.rename,unlink:xt.node_ops.unlink,rmdir:xt.node_ops.rmdir,readdir:xt.node_ops.readdir,symlink:xt.node_ops.symlink},stream:{llseek:xt.stream_ops.llseek}},file:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:{llseek:xt.stream_ops.llseek,read:xt.stream_ops.read,write:xt.stream_ops.write,allocate:xt.stream_ops.allocate,mmap:xt.stream_ops.mmap,msync:xt.stream_ops.msync}},link:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr,readlink:xt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:xt.node_ops.getattr,setattr:xt.node_ops.setattr},stream:wt.chrdev_stream_ops}});var r=wt.createNode(e,t,s,i);return wt.isDir(r.mode)?(r.node_ops=xt.ops_table.dir.node,r.stream_ops=xt.ops_table.dir.stream,r.contents={}):wt.isFile(r.mode)?(r.node_ops=xt.ops_table.file.node,r.stream_ops=xt.ops_table.file.stream,r.usedBytes=0,r.contents=null):wt.isLink(r.mode)?(r.node_ops=xt.ops_table.link.node,r.stream_ops=xt.ops_table.link.stream):wt.isChrdev(r.mode)&&(r.node_ops=xt.ops_table.chrdev.node,r.stream_ops=xt.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=wt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,wt.isDir(e.mode)?t.size=4096:wt.isFile(e.mode)?t.size=e.usedBytes:wt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&xt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw wt.genericErrors[44]},mknod:function(e,t,s,i){return xt.createNode(e,t,s,i)},rename:function(e,t,s){if(wt.isDir(e.mode)){var i;try{i=wt.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new wt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=wt.lookupNode(e,t);for(var i in s.contents)throw new wt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=xt.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!wt.isLink(e.mode))throw new wt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||s+t>>=0,E.set(a,o>>>0)}else n=!1,o=a.byteOffset;return{ptr:o,allocated:n}},msync:function(e,t,s,i,r){return xt.stream_ops.write(e,t,0,i,s,!1),0}}},wt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=bt.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new wt.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=wt.root,r="/",o=0;o40)throw new wt.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(wt.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%wt.nameTable.length},hashAddNode:e=>{var t=wt.hashName(e.parent.id,e.name);e.name_next=wt.nameTable[t],wt.nameTable[t]=e},hashRemoveNode:e=>{var t=wt.hashName(e.parent.id,e.name);if(wt.nameTable[t]===e)wt.nameTable[t]=e.name_next;else for(var s=wt.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=wt.mayLookup(e);if(s)throw new wt.ErrnoError(s,e);for(var i=wt.hashName(e.id,t),r=wt.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return wt.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new wt.FSNode(e,t,s,i);return wt.hashAddNode(r),r},destroyNode:e=>{wt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=wt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>wt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=wt.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return wt.lookupNode(e,t),20}catch(e){}return wt.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=wt.lookupNode(e,t)}catch(e){return e.errno}var r=wt.nodePermissions(e,"wx");if(r)return r;if(s){if(!wt.isDir(i.mode))return 54;if(wt.isRoot(i)||wt.getPath(i)===wt.cwd())return 10}else if(wt.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?wt.isLink(e.mode)?32:wt.isDir(e.mode)&&("r"!==wt.flagsToPermissionString(t)||512&t)?31:wt.nodePermissions(e,wt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=wt.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!wt.streams[s])return s;throw new wt.ErrnoError(33)},getStream:e=>wt.streams[e],createStream:(e,t,s)=>{wt.FSStream||(wt.FSStream=function(){this.shared={}},wt.FSStream.prototype={},Object.defineProperties(wt.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new wt.FSStream,e);var i=wt.nextfd(t,s);return e.fd=i,wt.streams[i]=e,e},closeStream:e=>{wt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=wt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new wt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{wt.devices[e]={stream_ops:t}},getDevice:e=>wt.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),wt.syncFSRequests++,wt.syncFSRequests>1&&p("warning: "+wt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=wt.getMounts(wt.root.mount),i=0;function r(e){return wt.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&wt.root)throw new wt.ErrnoError(10);if(!r&&!o){var n=wt.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,wt.isMountpoint(i))throw new wt.ErrnoError(10);if(!wt.isDir(i.mode))throw new wt.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?wt.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=wt.lookupPath(e,{follow_mount:!1});if(!wt.isMountpoint(t.node))throw new wt.ErrnoError(28);var s=t.node,i=s.mounted,r=wt.getMounts(i);Object.keys(wt.nameTable).forEach((e=>{for(var t=wt.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&wt.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=wt.lookupPath(e,{parent:!0}).node,r=Nt.basename(e);if(!r||"."===r||".."===r)throw new wt.ErrnoError(28);var o=wt.mayCreate(i,r);if(o)throw new wt.ErrnoError(o);if(!i.node_ops.mknod)throw new wt.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,wt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,wt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,wt.mknod(e,t,s)),symlink:(e,t)=>{if(!bt.resolve(e))throw new wt.ErrnoError(44);var s=wt.lookupPath(t,{parent:!0}).node;if(!s)throw new wt.ErrnoError(44);var i=Nt.basename(t),r=wt.mayCreate(s,i);if(r)throw new wt.ErrnoError(r);if(!s.node_ops.symlink)throw new wt.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=Nt.dirname(e),o=Nt.dirname(t),n=Nt.basename(e),a=Nt.basename(t);if(s=wt.lookupPath(e,{parent:!0}).node,i=wt.lookupPath(t,{parent:!0}).node,!s||!i)throw new wt.ErrnoError(44);if(s.mount!==i.mount)throw new wt.ErrnoError(75);var l,h=wt.lookupNode(s,n),c=bt.relative(e,o);if("."!==c.charAt(0))throw new wt.ErrnoError(28);if("."!==(c=bt.relative(t,r)).charAt(0))throw new wt.ErrnoError(55);try{l=wt.lookupNode(i,a)}catch(e){}if(h!==l){var A=wt.isDir(h.mode),u=wt.mayDelete(s,n,A);if(u)throw new wt.ErrnoError(u);if(u=l?wt.mayDelete(i,a,A):wt.mayCreate(i,a))throw new wt.ErrnoError(u);if(!s.node_ops.rename)throw new wt.ErrnoError(63);if(wt.isMountpoint(h)||l&&wt.isMountpoint(l))throw new wt.ErrnoError(10);if(i!==s&&(u=wt.nodePermissions(s,"w")))throw new wt.ErrnoError(u);wt.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{wt.hashAddNode(h)}}},rmdir:e=>{var t=wt.lookupPath(e,{parent:!0}).node,s=Nt.basename(e),i=wt.lookupNode(t,s),r=wt.mayDelete(t,s,!0);if(r)throw new wt.ErrnoError(r);if(!t.node_ops.rmdir)throw new wt.ErrnoError(63);if(wt.isMountpoint(i))throw new wt.ErrnoError(10);t.node_ops.rmdir(t,s),wt.destroyNode(i)},readdir:e=>{var t=wt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new wt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=wt.lookupPath(e,{parent:!0}).node;if(!t)throw new wt.ErrnoError(44);var s=Nt.basename(e),i=wt.lookupNode(t,s),r=wt.mayDelete(t,s,!1);if(r)throw new wt.ErrnoError(r);if(!t.node_ops.unlink)throw new wt.ErrnoError(63);if(wt.isMountpoint(i))throw new wt.ErrnoError(10);t.node_ops.unlink(t,s),wt.destroyNode(i)},readlink:e=>{var t=wt.lookupPath(e).node;if(!t)throw new wt.ErrnoError(44);if(!t.node_ops.readlink)throw new wt.ErrnoError(28);return bt.resolve(wt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=wt.lookupPath(e,{follow:!t}).node;if(!s)throw new wt.ErrnoError(44);if(!s.node_ops.getattr)throw new wt.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>wt.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?wt.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{wt.chmod(e,t,!0)},fchmod:(e,t)=>{var s=wt.getStream(e);if(!s)throw new wt.ErrnoError(8);wt.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?wt.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{wt.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=wt.getStream(e);if(!i)throw new wt.ErrnoError(8);wt.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new wt.ErrnoError(28);var s;if(!(s="string"==typeof e?wt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new wt.ErrnoError(63);if(wt.isDir(s.mode))throw new wt.ErrnoError(31);if(!wt.isFile(s.mode))throw new wt.ErrnoError(28);var i=wt.nodePermissions(s,"w");if(i)throw new wt.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=wt.getStream(e);if(!s)throw new wt.ErrnoError(8);if(0==(2097155&s.flags))throw new wt.ErrnoError(28);wt.truncate(s.node,t)},utime:(e,t,s)=>{var i=wt.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new wt.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?wt.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=Nt.normalize(e);try{i=wt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new wt.ErrnoError(20)}else i=wt.mknod(e,s,0),o=!0;if(!i)throw new wt.ErrnoError(44);if(wt.isChrdev(i.mode)&&(t&=-513),65536&t&&!wt.isDir(i.mode))throw new wt.ErrnoError(54);if(!o){var n=wt.mayOpen(i,t);if(n)throw new wt.ErrnoError(n)}512&t&&!o&&wt.truncate(i,0),t&=-131713;var a=wt.createStream({node:i,path:wt.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!r.logReadFiles||1&t||(wt.readFiles||(wt.readFiles={}),e in wt.readFiles||(wt.readFiles[e]=1)),a},close:e=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{wt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new wt.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new wt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new wt.ErrnoError(28);if(wt.isClosed(e))throw new wt.ErrnoError(8);if(1==(2097155&e.flags))throw new wt.ErrnoError(8);if(wt.isDir(e.node.mode))throw new wt.ErrnoError(31);if(!e.stream_ops.read)throw new wt.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new wt.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new wt.ErrnoError(28);if(wt.isClosed(e))throw new wt.ErrnoError(8);if(0==(2097155&e.flags))throw new wt.ErrnoError(8);if(wt.isDir(e.node.mode))throw new wt.ErrnoError(31);if(!e.stream_ops.write)throw new wt.ErrnoError(28);e.seekable&&1024&e.flags&&wt.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new wt.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(wt.isClosed(e))throw new wt.ErrnoError(8);if(t<0||s<=0)throw new wt.ErrnoError(28);if(0==(2097155&e.flags))throw new wt.ErrnoError(8);if(!wt.isFile(e.node.mode)&&!wt.isDir(e.node.mode))throw new wt.ErrnoError(43);if(!e.stream_ops.allocate)throw new wt.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new wt.ErrnoError(2);if(1==(2097155&e.flags))throw new wt.ErrnoError(2);if(!e.stream_ops.mmap)throw new wt.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new wt.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=wt.open(e,t.flags),r=wt.stat(e).size,o=new Uint8Array(r);return wt.read(i,o,0,r,0),"utf8"===t.encoding?s=D(o,0):"binary"===t.encoding&&(s=o),wt.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=wt.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(C(t)+1),o=b(t,r,0,r.length);wt.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");wt.write(i,t,0,t.byteLength,void 0,s.canOwn)}wt.close(i)},cwd:()=>wt.currentPath,chdir:e=>{var t=wt.lookupPath(e,{follow:!0});if(null===t.node)throw new wt.ErrnoError(44);if(!wt.isDir(t.node.mode))throw new wt.ErrnoError(54);var s=wt.nodePermissions(t.node,"x");if(s)throw new wt.ErrnoError(s);wt.currentPath=t.path},createDefaultDirectories:()=>{wt.mkdir("/tmp"),wt.mkdir("/home"),wt.mkdir("/home/web_user")},createDefaultDevices:()=>{wt.mkdir("/dev"),wt.registerDevice(wt.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),wt.mkdev("/dev/null",wt.makedev(1,3)),Ot.register(wt.makedev(5,0),Ot.default_tty_ops),Ot.register(wt.makedev(6,0),Ot.default_tty1_ops),wt.mkdev("/dev/tty",wt.makedev(5,0)),wt.mkdev("/dev/tty1",wt.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>V("randomDevice")}();wt.createDevice("/dev","random",e),wt.createDevice("/dev","urandom",e),wt.mkdir("/dev/shm"),wt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{wt.mkdir("/proc");var e=wt.mkdir("/proc/self");wt.mkdir("/proc/self/fd"),wt.mount({mount:()=>{var t=wt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=wt.getStream(s);if(!i)throw new wt.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?wt.createDevice("/dev","stdin",r.stdin):wt.symlink("/dev/tty","/dev/stdin"),r.stdout?wt.createDevice("/dev","stdout",null,r.stdout):wt.symlink("/dev/tty","/dev/stdout"),r.stderr?wt.createDevice("/dev","stderr",null,r.stderr):wt.symlink("/dev/tty1","/dev/stderr"),wt.open("/dev/stdin",0),wt.open("/dev/stdout",1),wt.open("/dev/stderr",1)},ensureErrnoError:()=>{wt.ErrnoError||(wt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},wt.ErrnoError.prototype=new Error,wt.ErrnoError.prototype.constructor=wt.ErrnoError,[44].forEach((e=>{wt.genericErrors[e]=new wt.ErrnoError(e),wt.genericErrors[e].stack=""})))},staticInit:()=>{wt.ensureErrnoError(),wt.nameTable=new Array(4096),wt.mount(xt,{},"/"),wt.createDefaultDirectories(),wt.createDefaultDevices(),wt.createSpecialDirectories(),wt.filesystems={MEMFS:xt}},init:(e,t,s)=>{wt.init.initialized=!0,wt.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=s||r.stderr,wt.createStandardStreams()},quit:()=>{wt.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=wt.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=wt.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=wt.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=Nt.basename(e),i=wt.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:wt.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=Nt.join2(e,o);try{wt.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=Nt.join2("string"==typeof e?e:wt.getPath(e),t),n=wt.getMode(i,r);return wt.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:wt.getPath(e),n=t?Nt.join2(e,t):e);var a=wt.getMode(i,r),l=wt.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=Nt.join2("string"==typeof e?e:wt.getPath(e),t),o=wt.getMode(!!s,!!i);wt.createDevice.major||(wt.createDevice.major=64);var n=wt.makedev(wt.createDevice.major++,0);return wt.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ct(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new wt.ErrnoError(29)}},createLazyFile:(e,t,s,i,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",s,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+s+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=i);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",s,!1),i!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+s+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Ct(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&i||(n=i=1,i=this.getter(0).length,n=i,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n={isDevice:!1,url:s},a=wt.createFile(e,t,n,i,r);n.contents?a.contents=n.contents:n.url&&(a.contents=null,a.url=n.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function h(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=a.stream_ops[e];l[e]=function(){return wt.forceLoadFile(a),t.apply(null,arguments)}})),l.read=(e,t,s,i,r)=>(wt.forceLoadFile(a),h(e,t,s,i,r)),l.mmap=(e,t,s,i,r)=>{wt.forceLoadFile(a);var o=St();if(!o)throw new wt.ErrnoError(48);return h(e,E,o,t,s),{ptr:o,allocated:!0}},a.stream_ops=l,a},createPreloadedFile:(e,t,s,i,r,o,a,l,h,c)=>{var A=t?bt.resolve(Nt.join2(e,t)):e;function u(s){function n(s){c&&c(),l||wt.createDataFile(e,t,s,i,r,h),o&&o(),k()}Browser.handledByPreloadPlugin(s,A,n,(()=>{a&&a(),k()}))||n(s)}G(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;n(e,(s=>{f(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&k()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&G()}(s,(e=>u(e)),a):u(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=wt.indexedDB();try{var r=i.open(wt.DB_NAME(),wt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{u("creating db"),r.result.createObjectStore(wt.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([wt.DB_STORE_NAME],"readwrite"),o=i.objectStore(wt.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(wt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=wt.indexedDB();try{var r=i.open(wt.DB_NAME(),wt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([wt.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(wt.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{wt.analyzePath(e).exists&&wt.unlink(e),wt.createDataFile(Nt.dirname(e),Nt.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},Bt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(Nt.isAbs(t))return t;var i;if(i=-100===e?wt.cwd():Bt.getStreamFromFD(e).path,0==t.length){if(!s)throw new wt.ErrnoError(44);return i}return Nt.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&Nt.normalize(t)!==Nt.normalize(wt.getPath(e.node)))return-54;throw e}I[s>>>2]=i.dev,I[s+8>>>2]=i.ino,I[s+12>>>2]=i.mode,v[s+16>>>2]=i.nlink,I[s+20>>>2]=i.uid,I[s+24>>>2]=i.gid,I[s+28>>>2]=i.rdev,B=[i.size>>>0,(w=i.size,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+40>>>2]=B[0],I[s+44>>>2]=B[1],I[s+48>>>2]=4096,I[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),n=i.ctime.getTime();return B=[Math.floor(r/1e3)>>>0,(w=Math.floor(r/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+56>>>2]=B[0],I[s+60>>>2]=B[1],v[s+64>>>2]=r%1e3*1e3,B=[Math.floor(o/1e3)>>>0,(w=Math.floor(o/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+72>>>2]=B[0],I[s+76>>>2]=B[1],v[s+80>>>2]=o%1e3*1e3,B=[Math.floor(n/1e3)>>>0,(w=Math.floor(n/1e3),+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+88>>>2]=B[0],I[s+92>>>2]=B[1],v[s+96>>>2]=n%1e3*1e3,B=[i.ino>>>0,(w=i.ino,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[s+104>>>2]=B[0],I[s+108>>>2]=B[1],0},doMsync:function(e,t,s,i,r){if(!wt.isFile(t.node.mode))throw new wt.ErrnoError(43);if(2&i)return 0;e>>>=0;var o=m.slice(e,e+s);wt.msync(t,o,r,s,i)},varargs:void 0,get:function(){return Bt.varargs+=4,I[Bt.varargs-4>>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=wt.getStream(e);if(!t)throw new wt.ErrnoError(8);return t}};function Ft(e){return e%4==0&&(e%100!=0||e%400==0)}var Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Lt=[31,28,31,30,31,30,31,31,30,31,30,31];function Ut(e,t,s,i){var r=I[i+40>>>2],o={tm_sec:I[i>>>2],tm_min:I[i+4>>>2],tm_hour:I[i+8>>>2],tm_mday:I[i+12>>>2],tm_mon:I[i+16>>>2],tm_year:I[i+20>>>2],tm_wday:I[i+24>>>2],tm_yday:I[i+28>>>2],tm_isdst:I[i+32>>>2],tm_gmtoff:I[i+36>>>2],tm_zone:r?N(r):""},n=N(s),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in a)n=n.replace(new RegExp(l,"g"),a[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function A(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function f(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=Ft(s.getFullYear()),r=s.getMonth(),o=(i?Mt:Lt)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=d(s),o=d(i);return p(r,t)<=0?p(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return h[e.tm_wday].substring(0,3)},"%A":function(e){return h[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return u((e.tm_year+1900)/100|0,2)},"%d":function(e){return u(e.tm_mday,2)},"%e":function(e){return A(e.tm_mday,2," ")},"%g":function(e){return f(e).toString().substring(2)},"%G":function(e){return f(e)},"%H":function(e){return u(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),u(t,2)},"%j":function(e){return u(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(Ft(e.tm_year+1900)?Mt:Lt,e.tm_mon-1),3)},"%m":function(e){return u(e.tm_mon+1,2)},"%M":function(e){return u(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return u(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return u(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&Ft(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Ft(e.tm_year%400-1))&&t++}return u(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return u(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in n=n.replace(/%%/g,"\0\0"),m)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),m[l](o)));var y,g,v=Ct(n=n.replace(/\0\0/g,"%"),!1);return v.length>t?0:(y=v,g=e,E.set(y,g>>>0),v.length-1)}se=r.InternalError=te(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ae=e}(),he=r.BindingError=te(Error,"BindingError"),Fe.prototype.isAliasOf=ue,Fe.prototype.clone=Se,Fe.prototype.delete=xe,Fe.prototype.isDeleted=we,Fe.prototype.deleteLater=Be,r.getInheritedInstanceCount=Ie,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=_e,r.setDelayFunction=Pe,ze.prototype.getPointee=je,ze.prototype.destructor=Qe,ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=X,ze.prototype.deleteObject=We,ze.prototype.fromWireType=Ce,Je=r.UnboundTypeError=te(Error,"UnboundTypeError"),r.count_emval_handles=nt,r.get_first_emval=at;var Ht=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=wt.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Gt=365,kt=146;Object.defineProperties(Ht.prototype,{read:{get:function(){return(this.mode&Gt)===Gt},set:function(e){e?this.mode|=Gt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(e){e?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return wt.isDir(this.mode)}},isDevice:{get:function(){return wt.isChrdev(this.mode)}}}),wt.FSNode=Ht,wt.staticInit();var Vt={f:function(e,t,s){throw new z(e).init(t,s),e},R:function(e){var t=K[e];delete K[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;re([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Y(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>o])},destructorFunction:null})},o:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=le(c),o=qe(r,o),a&&(a=qe(n,a)),h&&(h=qe(l,h)),u=qe(A,u);var p=$(c);Le(p,(function(){et("Cannot construct "+c+" due to unbound types",[i])})),re([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:Fe.prototype;var n=ee(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new he("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new he(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new he("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new Ue(c,n,l,u,s,o,a,h),d=new ze(c,A,!0,!1,!1),f=new ze(c+"*",A,!1,!1,!1),E=new ze(c+" const*",A,!1,!0,!1);return ge[e]={pointerType:f,constPointerType:E},Ke(p,n),[d,f,E]}))},n:function(e,t,s,i,r,o){f(t>0);var n=tt(t,s);r=qe(i,r),re([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new he("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{et("Cannot construct "+e.name+" due to unbound types",n)},re([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=st(s,i,null,r,o),[]})),[]}))},b:function(e,t,s,i,r,o,n,a){var l=tt(s,i);t=le(t),o=qe(r,o),re([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){et("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(Me(h,t,i),h[t].overloadTable[s-2]=r),re([],l,(function(r){var a=st(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},O:function(e,t){Ae(e,{name:t=le(t),fromWireType:function(e){var t=lt.toValue(e);return ot(e),t},toWireType:function(e,t){return lt.toHandle(t)},argPackAdvance:8,readValueFromPointer:X,destructorFunction:null})},B:function(e,t,s,i){var r=ne(s);function o(){}t=le(t),o.values={},Ae(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ht(t,r,i),destructorFunction:null}),Le(t,o)},s:function(e,t,s){var i=ct(e,"enum");t=le(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:ee(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},z:function(e,t,s){var i=ne(s);Ae(e,{name:t=le(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:ut(t,i),destructorFunction:null})},c:function(e,t,s,i,r,o){var n=tt(t,s);e=le(e),r=qe(i,r),Le(e,(function(){et("Cannot call "+e+" due to unbound types",n)}),t-1),re([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ke(e,st(e,i,null,r,o),t-1),[]}))},r:function(e,t,s,i,r){t=le(t);var o=ne(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ae(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:pt(t,o,0!==i),destructorFunction:null})},h:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=v,s=t[(e>>=2)>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ae(e,{name:s=le(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},A:function(e,t){var s="std::string"===(t=le(t));Ae(e,{name:t,fromWireType:function(e){var t,i=v[e>>>2],r=e+4;if(s)for(var o=r,n=0;n<=i;++n){var a=r+n;if(n==i||0==m[a>>>0]){var l=N(o,a-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=a+1}}else{var h=new Array(i);for(n=0;n>>0]);t=h.join("")}return zt(e),t},toWireType:function(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ce("Cannot pass non-string to std::string"),i=s&&r?C(t):t.length;var o=jt(4+i+1),n=o+4;if(n>>>=0,v[o>>>2]=i,s&&r)b(t,m,n,i+1);else if(r)for(var a=0;a255&&(zt(n),ce("String has UTF-16 code units that do not fit in 8 bits")),m[n+a>>>0]=l}else for(a=0;a>>0]=t[a];return null!==e&&e.push(zt,o),o},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},v:function(e,t,s){var i,r,o,n,a;s=le(s),2===t?(i=ft,r=Et,n=mt,o=()=>g,a=1):4===t&&(i=yt,r=gt,n=It,o=()=>v,a=2),Ae(e,{name:s,fromWireType:function(e){for(var s,r=v[e>>>2],n=o(),l=e+4,h=0;h<=r;++h){var c=e+4+h*t;if(h==r||0==n[c>>>a]){var A=i(l,c-l);void 0===s?s=A:(s+=String.fromCharCode(0),s+=A),l=c+t}}return zt(e),s},toWireType:function(e,i){"string"!=typeof i&&ce("Cannot pass non-string to C++ string type "+s);var o=n(i),l=jt(4+o+t);return v[(l>>>=0)>>>2]=o>>a,r(i,l+4,o+t),null!==e&&e.push(zt,l),l},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},S:function(e,t,s,i,r,o){K[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),elements:[]}},i:function(e,t,s,i,r,o,n,a,l){K[e].elements.push({getterReturnType:t,getter:qe(s,i),getterContext:r,setterArgumentType:o,setter:qe(n,a),setterContext:l})},q:function(e,t,s,i,r,o){oe[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),fields:[]}},e:function(e,t,s,i,r,o,n,a,l,h){oe[e].fields.push({fieldName:le(t),getterReturnType:s,getter:qe(i,r),getterContext:o,setterArgumentType:n,setter:qe(a,l),setterContext:h})},Q:function(e,t){Ae(e,{isVoid:!0,name:t=le(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,s){e=lt.toValue(e),t=ct(t,"emval::as");var i=[],r=lt.toHandle(i);return v[s>>>2]=r,t.toWireType(i,e)},x:function(e,t,s,i){e=lt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(rt[e].refcount+=1)},U:function(e,t){return(e=lt.toValue(e))instanceof(t=lt.toValue(t))},w:function(e){return"number"==typeof(e=lt.toValue(e))},C:function(e){return"string"==typeof(e=lt.toValue(e))},T:function(){return lt.toHandle([])},g:function(e){return lt.toHandle(Tt(e))},u:function(){return lt.toHandle({})},l:function(e){Y(lt.toValue(e)),ot(e)},j:function(e,t,s){e=lt.toValue(e),t=lt.toValue(t),s=lt.toValue(s),e[t]=s},d:function(e,t){var s=(e=ct(e,"_emval_take_value")).readValueFromPointer(t);return lt.toHandle(s)},y:function(){V("")},N:function(e,t,s){m.copyWithin(e>>>0,t>>>0,t+s>>>0)},L:function(e){var t,s,i=m.length,r=4294901760;if((e>>>=0)>r)return!1;for(var o=1;o<=4;o*=2){var n=i*(1+.2/o);if(n=Math.min(n,e+100663296),Rt(Math.min(r,(t=Math.max(e,n))+((s=65536)-t%s)%s)))return!0}return!1},H:function(e,t){var s=0;return Dt().forEach((function(i,r){var o=t+s;v[e+4*r>>>2]=o,function(e,t,s){for(var i=0;i>>0]=e.charCodeAt(i);s||(E[t>>>0]=0)}(i,o),s+=i.length+1})),0},I:function(e,t){var s=Dt();v[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),v[t>>>2]=i,0},J:function(e){try{var t=Bt.getStreamFromFD(e);return wt.close(t),0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},K:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=wt.read(e,E,n,a,i);if(l<0)return-1;if(r+=l,l>>2]=r,0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},E:function(e,t,s,i,r){try{var o=(l=s)+2097152>>>0<4194305-!!(a=t)?(a>>>0)+4294967296*l:NaN;if(isNaN(o))return 61;var n=Bt.getStreamFromFD(e);return wt.llseek(n,o,i),B=[n.position>>>0,(w=n.position,+Math.abs(w)>=1?w>0?(0|Math.min(+Math.floor(w/4294967296),4294967295))>>>0:~~+Math.ceil((w-+(~~w>>>0))/4294967296)>>>0:0)],I[r>>>2]=B[0],I[r+4>>>2]=B[1],n.getdents&&0===o&&0===i&&(n.getdents=null),0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}var a,l},M:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=wt.write(e,E,n,a,i);if(l<0)return-1;r+=l,void 0!==i&&(i+=l)}return r}(Bt.getStreamFromFD(e),t,s);return v[i>>>2]=r,0}catch(e){if(void 0===wt||!(e instanceof wt.ErrnoError))throw e;return e.errno}},G:function(e,t,s,i,r){return Ut(e,t,s,i)}};!function(){var e={a:Vt};function t(e,t){var s,i=e.exports;r.asm=i,A=r.asm.V,O(),R=r.asm.X,s=r.asm.W,M.unshift(s),k()}function s(e){t(e.instance)}function o(t){return(c||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(S)})):fetch(S,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()})).catch((function(){return Q(S)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),V(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){p("Module.instantiateWasm callback failed with error: "+e),i(e)}(c||"function"!=typeof WebAssembly.instantiateStreaming||j(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(i)}();var jt=function(){return(jt=r.asm.Y).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.Z).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm._).apply(null,arguments)};var Wt,zt=function(){return(zt=r.asm.$).apply(null,arguments)},Kt=function(){return(Kt=r.asm.aa).apply(null,arguments)};function Yt(){function e(){Wt||(Wt=!0,r.calledRun=!0,d||(r.noFSInit||wt.init.initialized||wt.init(),wt.ignorePermissions=!1,W(M),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),L.unshift(e);var e;W(L)}()))}U>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),F.unshift(e);var e;W(F)}(),U>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}if(r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.ba).apply(null,arguments)},r.dynCall_viijii=function(){return(r.dynCall_viijii=r.asm.ca).apply(null,arguments)},r.dynCall_iiiiij=function(){return(r.dynCall_iiiiij=r.asm.da).apply(null,arguments)},r.dynCall_iiiiijj=function(){return(r.dynCall_iiiiijj=r.asm.ea).apply(null,arguments)},r.dynCall_iiiiiijj=function(){return(r.dynCall_iiiiiijj=r.asm.fa).apply(null,arguments)},H=function e(){Wt||Yt(),Wt||(H=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Yt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),yI=class{constructor(e){this.value=e,this.type=5}},gI=class{constructor(e){this.expressID=e,this.type=0}};if((hI=lI||(lI={})).IFC2X3="IFC2X3",hI.IFC4="IFC4",hI.IFC4X3="IFC4X3",function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDaylightSavingHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHourInDay=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMinuteInHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSecondInMinute=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},s.COMPLETION_G1={type:3,value:"COMPLETION_G1"},s.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},s.SNOW_S={type:3,value:"SNOW_S"},s.WIND_W={type:3,value:"WIND_W"},s.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},s.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},s.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},s.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},s.FIRE={type:3,value:"FIRE"},s.IMPULSE={type:3,value:"IMPULSE"},s.IMPACT={type:3,value:"IMPACT"},s.TRANSPORT={type:3,value:"TRANSPORT"},s.ERECTION={type:3,value:"ERECTION"},s.PROPPING={type:3,value:"PROPPING"},s.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},s.SHRINKAGE={type:3,value:"SHRINKAGE"},s.CREEP={type:3,value:"CREEP"},s.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},s.BUOYANCY={type:3,value:"BUOYANCY"},s.ICE={type:3,value:"ICE"},s.CURRENT={type:3,value:"CURRENT"},s.WAVE={type:3,value:"WAVE"},s.RAIN={type:3,value:"RAIN"},s.BRAKES={type:3,value:"BRAKES"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=s;class i{}i.PERMANENT_G={type:3,value:"PERMANENT_G"},i.VARIABLE_Q={type:3,value:"VARIABLE_Q"},i.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=i;class r{}r.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},r.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},r.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},r.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},r.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=r;class o{}o.OFFICE={type:3,value:"OFFICE"},o.SITE={type:3,value:"SITE"},o.HOME={type:3,value:"HOME"},o.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},o.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=o;class n{}n.AHEAD={type:3,value:"AHEAD"},n.BEHIND={type:3,value:"BEHIND"},e.IfcAheadOrBehind=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.GRILLE={type:3,value:"GRILLE"},l.REGISTER={type:3,value:"REGISTER"},l.DIFFUSER={type:3,value:"DIFFUSER"},l.EYEBALL={type:3,value:"EYEBALL"},l.IRIS={type:3,value:"IRIS"},l.LINEARGRILLE={type:3,value:"LINEARGRILLE"},l.LINEARDIFFUSER={type:3,value:"LINEARDIFFUSER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},f.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},f.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},f.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},f.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},f.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=f;class E{}E.BEAM={type:3,value:"BEAM"},E.JOIST={type:3,value:"JOIST"},E.LINTEL={type:3,value:"LINTEL"},E.T_BEAM={type:3,value:"T_BEAM"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=E;class m{}m.GREATERTHAN={type:3,value:"GREATERTHAN"},m.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},m.LESSTHAN={type:3,value:"LESSTHAN"},m.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},m.EQUALTO={type:3,value:"EQUALTO"},m.NOTEQUALTO={type:3,value:"NOTEQUALTO"},e.IfcBenchmarkEnum=m;class y{}y.WATER={type:3,value:"WATER"},y.STEAM={type:3,value:"STEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=y;class g{}g.UNION={type:3,value:"UNION"},g.INTERSECTION={type:3,value:"INTERSECTION"},g.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=g;class I{}I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=I;class v{}v.BEND={type:3,value:"BEND"},v.CROSS={type:3,value:"CROSS"},v.REDUCER={type:3,value:"REDUCER"},v.TEE={type:3,value:"TEE"},v.USERDEFINED={type:3,value:"USERDEFINED"},v.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=v;class T{}T.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},T.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},T.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},T.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=T;class _{}_.CABLESEGMENT={type:3,value:"CABLESEGMENT"},_.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=_;class R{}R.NOCHANGE={type:3,value:"NOCHANGE"},R.MODIFIED={type:3,value:"MODIFIED"},R.ADDED={type:3,value:"ADDED"},R.DELETED={type:3,value:"DELETED"},R.MODIFIEDADDED={type:3,value:"MODIFIEDADDED"},R.MODIFIEDDELETED={type:3,value:"MODIFIEDDELETED"},e.IfcChangeActionEnum=R;class P{}P.AIRCOOLED={type:3,value:"AIRCOOLED"},P.WATERCOOLED={type:3,value:"WATERCOOLED"},P.HEATRECOVERY={type:3,value:"HEATRECOVERY"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=P;class D{}D.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},D.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},D.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},D.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},D.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},D.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=D;class N{}N.COLUMN={type:3,value:"COLUMN"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=N;class b{}b.DYNAMIC={type:3,value:"DYNAMIC"},b.RECIPROCATING={type:3,value:"RECIPROCATING"},b.ROTARY={type:3,value:"ROTARY"},b.SCROLL={type:3,value:"SCROLL"},b.TROCHOIDAL={type:3,value:"TROCHOIDAL"},b.SINGLESTAGE={type:3,value:"SINGLESTAGE"},b.BOOSTER={type:3,value:"BOOSTER"},b.OPENTYPE={type:3,value:"OPENTYPE"},b.HERMETIC={type:3,value:"HERMETIC"},b.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},b.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},b.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},b.ROTARYVANE={type:3,value:"ROTARYVANE"},b.SINGLESCREW={type:3,value:"SINGLESCREW"},b.TWINSCREW={type:3,value:"TWINSCREW"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=b;class C{}C.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},C.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},C.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},C.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},C.AIRCOOLED={type:3,value:"AIRCOOLED"},C.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=C;class O{}O.ATPATH={type:3,value:"ATPATH"},O.ATSTART={type:3,value:"ATSTART"},O.ATEND={type:3,value:"ATEND"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=O;class S{}S.HARD={type:3,value:"HARD"},S.SOFT={type:3,value:"SOFT"},S.ADVISORY={type:3,value:"ADVISORY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=S;class x{}x.FLOATING={type:3,value:"FLOATING"},x.PROPORTIONAL={type:3,value:"PROPORTIONAL"},x.PROPORTIONALINTEGRAL={type:3,value:"PROPORTIONALINTEGRAL"},x.PROPORTIONALINTEGRALDERIVATIVE={type:3,value:"PROPORTIONALINTEGRALDERIVATIVE"},x.TIMEDTWOPOSITION={type:3,value:"TIMEDTWOPOSITION"},x.TWOPOSITION={type:3,value:"TWOPOSITION"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=x;class w{}w.ACTIVE={type:3,value:"ACTIVE"},w.PASSIVE={type:3,value:"PASSIVE"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=w;class B{}B.NATURALDRAFT={type:3,value:"NATURALDRAFT"},B.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},B.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=B;class F{}F.BUDGET={type:3,value:"BUDGET"},F.COSTPLAN={type:3,value:"COSTPLAN"},F.ESTIMATE={type:3,value:"ESTIMATE"},F.TENDER={type:3,value:"TENDER"},F.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},F.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},F.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=F;class M{}M.CEILING={type:3,value:"CEILING"},M.FLOORING={type:3,value:"FLOORING"},M.CLADDING={type:3,value:"CLADDING"},M.ROOFING={type:3,value:"ROOFING"},M.INSULATION={type:3,value:"INSULATION"},M.MEMBRANE={type:3,value:"MEMBRANE"},M.SLEEVING={type:3,value:"SLEEVING"},M.WRAPPING={type:3,value:"WRAPPING"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=M;class L{}L.AED={type:3,value:"AED"},L.AES={type:3,value:"AES"},L.ATS={type:3,value:"ATS"},L.AUD={type:3,value:"AUD"},L.BBD={type:3,value:"BBD"},L.BEG={type:3,value:"BEG"},L.BGL={type:3,value:"BGL"},L.BHD={type:3,value:"BHD"},L.BMD={type:3,value:"BMD"},L.BND={type:3,value:"BND"},L.BRL={type:3,value:"BRL"},L.BSD={type:3,value:"BSD"},L.BWP={type:3,value:"BWP"},L.BZD={type:3,value:"BZD"},L.CAD={type:3,value:"CAD"},L.CBD={type:3,value:"CBD"},L.CHF={type:3,value:"CHF"},L.CLP={type:3,value:"CLP"},L.CNY={type:3,value:"CNY"},L.CYS={type:3,value:"CYS"},L.CZK={type:3,value:"CZK"},L.DDP={type:3,value:"DDP"},L.DEM={type:3,value:"DEM"},L.DKK={type:3,value:"DKK"},L.EGL={type:3,value:"EGL"},L.EST={type:3,value:"EST"},L.EUR={type:3,value:"EUR"},L.FAK={type:3,value:"FAK"},L.FIM={type:3,value:"FIM"},L.FJD={type:3,value:"FJD"},L.FKP={type:3,value:"FKP"},L.FRF={type:3,value:"FRF"},L.GBP={type:3,value:"GBP"},L.GIP={type:3,value:"GIP"},L.GMD={type:3,value:"GMD"},L.GRX={type:3,value:"GRX"},L.HKD={type:3,value:"HKD"},L.HUF={type:3,value:"HUF"},L.ICK={type:3,value:"ICK"},L.IDR={type:3,value:"IDR"},L.ILS={type:3,value:"ILS"},L.INR={type:3,value:"INR"},L.IRP={type:3,value:"IRP"},L.ITL={type:3,value:"ITL"},L.JMD={type:3,value:"JMD"},L.JOD={type:3,value:"JOD"},L.JPY={type:3,value:"JPY"},L.KES={type:3,value:"KES"},L.KRW={type:3,value:"KRW"},L.KWD={type:3,value:"KWD"},L.KYD={type:3,value:"KYD"},L.LKR={type:3,value:"LKR"},L.LUF={type:3,value:"LUF"},L.MTL={type:3,value:"MTL"},L.MUR={type:3,value:"MUR"},L.MXN={type:3,value:"MXN"},L.MYR={type:3,value:"MYR"},L.NLG={type:3,value:"NLG"},L.NZD={type:3,value:"NZD"},L.OMR={type:3,value:"OMR"},L.PGK={type:3,value:"PGK"},L.PHP={type:3,value:"PHP"},L.PKR={type:3,value:"PKR"},L.PLN={type:3,value:"PLN"},L.PTN={type:3,value:"PTN"},L.QAR={type:3,value:"QAR"},L.RUR={type:3,value:"RUR"},L.SAR={type:3,value:"SAR"},L.SCR={type:3,value:"SCR"},L.SEK={type:3,value:"SEK"},L.SGD={type:3,value:"SGD"},L.SKP={type:3,value:"SKP"},L.THB={type:3,value:"THB"},L.TRL={type:3,value:"TRL"},L.TTD={type:3,value:"TTD"},L.TWD={type:3,value:"TWD"},L.USD={type:3,value:"USD"},L.VEB={type:3,value:"VEB"},L.VND={type:3,value:"VND"},L.XEU={type:3,value:"XEU"},L.ZAR={type:3,value:"ZAR"},L.ZWD={type:3,value:"ZWD"},L.NOK={type:3,value:"NOK"},e.IfcCurrencyEnum=L;class U{}U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=U;class H{}H.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},H.FIREDAMPER={type:3,value:"FIREDAMPER"},H.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},H.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},H.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},H.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},H.BLASTDAMPER={type:3,value:"BLASTDAMPER"},H.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},H.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},H.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},H.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=H;class G{}G.MEASURED={type:3,value:"MEASURED"},G.PREDICTED={type:3,value:"PREDICTED"},G.SIMULATED={type:3,value:"SIMULATED"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=G;class k{}k.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},k.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},k.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},k.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},k.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},k.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},k.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},k.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},k.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},k.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},k.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},k.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},k.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},k.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},k.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},k.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},k.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},k.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},k.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},k.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},k.TORQUEUNIT={type:3,value:"TORQUEUNIT"},k.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},k.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},k.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},k.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},k.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},k.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},k.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},k.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},k.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},k.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},k.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},k.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},k.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},k.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},k.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},k.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},k.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},k.PHUNIT={type:3,value:"PHUNIT"},k.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},k.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},k.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},k.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},k.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},k.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},k.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},k.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},k.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},k.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=k;class V{}V.ORIGIN={type:3,value:"ORIGIN"},V.TARGET={type:3,value:"TARGET"},e.IfcDimensionExtentUsage=V;class j{}j.POSITIVE={type:3,value:"POSITIVE"},j.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=j;class Q{}Q.FORMEDDUCT={type:3,value:"FORMEDDUCT"},Q.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},Q.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},Q.MANHOLE={type:3,value:"MANHOLE"},Q.METERCHAMBER={type:3,value:"METERCHAMBER"},Q.SUMP={type:3,value:"SUMP"},Q.TRENCH={type:3,value:"TRENCH"},Q.VALVECHAMBER={type:3,value:"VALVECHAMBER"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=Q;class W{}W.PUBLIC={type:3,value:"PUBLIC"},W.RESTRICTED={type:3,value:"RESTRICTED"},W.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},W.PERSONAL={type:3,value:"PERSONAL"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=W;class z{}z.DRAFT={type:3,value:"DRAFT"},z.FINALDRAFT={type:3,value:"FINALDRAFT"},z.FINAL={type:3,value:"FINAL"},z.REVISION={type:3,value:"REVISION"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=z;class K{}K.SWINGING={type:3,value:"SWINGING"},K.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},K.SLIDING={type:3,value:"SLIDING"},K.FOLDING={type:3,value:"FOLDING"},K.REVOLVING={type:3,value:"REVOLVING"},K.ROLLINGUP={type:3,value:"ROLLINGUP"},K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=K;class Y{}Y.LEFT={type:3,value:"LEFT"},Y.MIDDLE={type:3,value:"MIDDLE"},Y.RIGHT={type:3,value:"RIGHT"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Y;class X{}X.ALUMINIUM={type:3,value:"ALUMINIUM"},X.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},X.STEEL={type:3,value:"STEEL"},X.WOOD={type:3,value:"WOOD"},X.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},X.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},X.PLASTIC={type:3,value:"PLASTIC"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=X;class Z{}Z.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Z.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Z.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},Z.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Z.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Z.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},Z.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Z.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Z.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},Z.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Z.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Z.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},Z.REVOLVING={type:3,value:"REVOLVING"},Z.ROLLINGUP={type:3,value:"ROLLINGUP"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=Z;class q{}q.BEND={type:3,value:"BEND"},q.CONNECTOR={type:3,value:"CONNECTOR"},q.ENTRY={type:3,value:"ENTRY"},q.EXIT={type:3,value:"EXIT"},q.JUNCTION={type:3,value:"JUNCTION"},q.OBSTRUCTION={type:3,value:"OBSTRUCTION"},q.TRANSITION={type:3,value:"TRANSITION"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=q;class J{}J.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},J.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=J;class ${}$.FLATOVAL={type:3,value:"FLATOVAL"},$.RECTANGULAR={type:3,value:"RECTANGULAR"},$.ROUND={type:3,value:"ROUND"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=$;class ee{}ee.COMPUTER={type:3,value:"COMPUTER"},ee.DIRECTWATERHEATER={type:3,value:"DIRECTWATERHEATER"},ee.DISHWASHER={type:3,value:"DISHWASHER"},ee.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ee.ELECTRICHEATER={type:3,value:"ELECTRICHEATER"},ee.FACSIMILE={type:3,value:"FACSIMILE"},ee.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ee.FREEZER={type:3,value:"FREEZER"},ee.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ee.HANDDRYER={type:3,value:"HANDDRYER"},ee.INDIRECTWATERHEATER={type:3,value:"INDIRECTWATERHEATER"},ee.MICROWAVE={type:3,value:"MICROWAVE"},ee.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ee.PRINTER={type:3,value:"PRINTER"},ee.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ee.RADIANTHEATER={type:3,value:"RADIANTHEATER"},ee.SCANNER={type:3,value:"SCANNER"},ee.TELEPHONE={type:3,value:"TELEPHONE"},ee.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ee.TV={type:3,value:"TV"},ee.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ee.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ee.WATERHEATER={type:3,value:"WATERHEATER"},ee.WATERCOOLER={type:3,value:"WATERCOOLER"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ee;class te{}te.ALTERNATING={type:3,value:"ALTERNATING"},te.DIRECT={type:3,value:"DIRECT"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricCurrentEnum=te;class se{}se.ALARMPANEL={type:3,value:"ALARMPANEL"},se.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},se.CONTROLPANEL={type:3,value:"CONTROLPANEL"},se.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},se.GASDETECTORPANEL={type:3,value:"GASDETECTORPANEL"},se.INDICATORPANEL={type:3,value:"INDICATORPANEL"},se.MIMICPANEL={type:3,value:"MIMICPANEL"},se.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},se.SWITCHBOARD={type:3,value:"SWITCHBOARD"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionPointFunctionEnum=se;class ie{}ie.BATTERY={type:3,value:"BATTERY"},ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},ie.UPS={type:3,value:"UPS"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=ie;class re{}re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=re;class oe{}oe.ELECTRICPOINTHEATER={type:3,value:"ELECTRICPOINTHEATER"},oe.ELECTRICCABLEHEATER={type:3,value:"ELECTRICCABLEHEATER"},oe.ELECTRICMATHEATER={type:3,value:"ELECTRICMATHEATER"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricHeaterTypeEnum=oe;class ne{}ne.DC={type:3,value:"DC"},ne.INDUCTION={type:3,value:"INDUCTION"},ne.POLYPHASE={type:3,value:"POLYPHASE"},ne.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},ne.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=ne;class ae{}ae.TIMECLOCK={type:3,value:"TIMECLOCK"},ae.TIMEDELAY={type:3,value:"TIMEDELAY"},ae.RELAY={type:3,value:"RELAY"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=ae;class le{}le.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},le.ARCH={type:3,value:"ARCH"},le.BEAM_GRID={type:3,value:"BEAM_GRID"},le.BRACED_FRAME={type:3,value:"BRACED_FRAME"},le.GIRDER={type:3,value:"GIRDER"},le.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},le.RIGID_FRAME={type:3,value:"RIGID_FRAME"},le.SLAB_FIELD={type:3,value:"SLAB_FIELD"},le.TRUSS={type:3,value:"TRUSS"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=le;class he{}he.COMPLEX={type:3,value:"COMPLEX"},he.ELEMENT={type:3,value:"ELEMENT"},he.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=he;class ce{}ce.PRIMARY={type:3,value:"PRIMARY"},ce.SECONDARY={type:3,value:"SECONDARY"},ce.TERTIARY={type:3,value:"TERTIARY"},ce.AUXILIARY={type:3,value:"AUXILIARY"},ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnergySequenceEnum=ce;class Ae{}Ae.COMBINEDVALUE={type:3,value:"COMBINEDVALUE"},Ae.DISPOSAL={type:3,value:"DISPOSAL"},Ae.EXTRACTION={type:3,value:"EXTRACTION"},Ae.INSTALLATION={type:3,value:"INSTALLATION"},Ae.MANUFACTURE={type:3,value:"MANUFACTURE"},Ae.TRANSPORTATION={type:3,value:"TRANSPORTATION"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnvironmentalImpactCategoryEnum=Ae;class ue{}ue.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},ue.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},ue.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},ue.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},ue.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},ue.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},ue.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=ue;class pe{}pe.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},pe.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},pe.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},pe.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},pe.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=pe;class de{}de.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},de.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},de.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},de.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},de.TUBEAXIAL={type:3,value:"TUBEAXIAL"},de.VANEAXIAL={type:3,value:"VANEAXIAL"},de.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=de;class fe{}fe.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},fe.ODORFILTER={type:3,value:"ODORFILTER"},fe.OILFILTER={type:3,value:"OILFILTER"},fe.STRAINER={type:3,value:"STRAINER"},fe.WATERFILTER={type:3,value:"WATERFILTER"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=fe;class Ee{}Ee.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Ee.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Ee.HOSEREEL={type:3,value:"HOSEREEL"},Ee.SPRINKLER={type:3,value:"SPRINKLER"},Ee.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Ee;class me{}me.SOURCE={type:3,value:"SOURCE"},me.SINK={type:3,value:"SINK"},me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=me;class ye{}ye.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},ye.THERMOMETER={type:3,value:"THERMOMETER"},ye.AMMETER={type:3,value:"AMMETER"},ye.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},ye.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},ye.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},ye.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},ye.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=ye;class ge{}ge.ELECTRICMETER={type:3,value:"ELECTRICMETER"},ge.ENERGYMETER={type:3,value:"ENERGYMETER"},ge.FLOWMETER={type:3,value:"FLOWMETER"},ge.GASMETER={type:3,value:"GASMETER"},ge.OILMETER={type:3,value:"OILMETER"},ge.WATERMETER={type:3,value:"WATERMETER"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=ge;class Ie{}Ie.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},Ie.PAD_FOOTING={type:3,value:"PAD_FOOTING"},Ie.PILE_CAP={type:3,value:"PILE_CAP"},Ie.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=Ie;class ve{}ve.GASAPPLIANCE={type:3,value:"GASAPPLIANCE"},ve.GASBOOSTER={type:3,value:"GASBOOSTER"},ve.GASBURNER={type:3,value:"GASBURNER"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGasTerminalTypeEnum=ve;class Te{}Te.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Te.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Te.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Te.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Te.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Te.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Te.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Te;class _e{}_e.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},_e.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=_e;class Re{}Re.PLATE={type:3,value:"PLATE"},Re.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=Re;class Pe{}Pe.STEAMINJECTION={type:3,value:"STEAMINJECTION"},Pe.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},Pe.ADIABATICPAN={type:3,value:"ADIABATICPAN"},Pe.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},Pe.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},Pe.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},Pe.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},Pe.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},Pe.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},Pe.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},Pe.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},Pe.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},Pe.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=Pe;class De{}De.INTERNAL={type:3,value:"INTERNAL"},De.EXTERNAL={type:3,value:"EXTERNAL"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=De;class Ne{}Ne.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Ne.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Ne.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Ne;class be{}be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=be;class Ce{}Ce.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},Ce.FLUORESCENT={type:3,value:"FLUORESCENT"},Ce.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},Ce.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},Ce.METALHALIDE={type:3,value:"METALHALIDE"},Ce.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=Ce;class Oe{}Oe.AXIS1={type:3,value:"AXIS1"},Oe.AXIS2={type:3,value:"AXIS2"},Oe.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=Oe;class Se{}Se.TYPE_A={type:3,value:"TYPE_A"},Se.TYPE_B={type:3,value:"TYPE_B"},Se.TYPE_C={type:3,value:"TYPE_C"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Se;class xe{}xe.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},xe.FLUORESCENT={type:3,value:"FLUORESCENT"},xe.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},xe.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},xe.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},xe.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},xe.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},xe.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},xe.METALHALIDE={type:3,value:"METALHALIDE"},xe.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=xe;class we{}we.POINTSOURCE={type:3,value:"POINTSOURCE"},we.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=we;class Be{}Be.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Be.LOAD_CASE={type:3,value:"LOAD_CASE"},Be.LOAD_COMBINATION_GROUP={type:3,value:"LOAD_COMBINATION_GROUP"},Be.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Be;class Fe{}Fe.LOGICALAND={type:3,value:"LOGICALAND"},Fe.LOGICALOR={type:3,value:"LOGICALOR"},e.IfcLogicalOperatorEnum=Fe;class Me{}Me.BRACE={type:3,value:"BRACE"},Me.CHORD={type:3,value:"CHORD"},Me.COLLAR={type:3,value:"COLLAR"},Me.MEMBER={type:3,value:"MEMBER"},Me.MULLION={type:3,value:"MULLION"},Me.PLATE={type:3,value:"PLATE"},Me.POST={type:3,value:"POST"},Me.PURLIN={type:3,value:"PURLIN"},Me.RAFTER={type:3,value:"RAFTER"},Me.STRINGER={type:3,value:"STRINGER"},Me.STRUT={type:3,value:"STRUT"},Me.STUD={type:3,value:"STUD"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=Me;class Le{}Le.BELTDRIVE={type:3,value:"BELTDRIVE"},Le.COUPLING={type:3,value:"COUPLING"},Le.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Le;class Ue{}Ue.NULL={type:3,value:"NULL"},e.IfcNullStyle=Ue;class He{}He.PRODUCT={type:3,value:"PRODUCT"},He.PROCESS={type:3,value:"PROCESS"},He.CONTROL={type:3,value:"CONTROL"},He.RESOURCE={type:3,value:"RESOURCE"},He.ACTOR={type:3,value:"ACTOR"},He.GROUP={type:3,value:"GROUP"},He.PROJECT={type:3,value:"PROJECT"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=He;class Ge{}Ge.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ge.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ge.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ge.REQUIREMENT={type:3,value:"REQUIREMENT"},Ge.SPECIFICATION={type:3,value:"SPECIFICATION"},Ge.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ge;class ke{}ke.ASSIGNEE={type:3,value:"ASSIGNEE"},ke.ASSIGNOR={type:3,value:"ASSIGNOR"},ke.LESSEE={type:3,value:"LESSEE"},ke.LESSOR={type:3,value:"LESSOR"},ke.LETTINGAGENT={type:3,value:"LETTINGAGENT"},ke.OWNER={type:3,value:"OWNER"},ke.TENANT={type:3,value:"TENANT"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=ke;class Ve{}Ve.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},Ve.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},Ve.POWEROUTLET={type:3,value:"POWEROUTLET"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=Ve;class je{}je.GRILL={type:3,value:"GRILL"},je.LOUVER={type:3,value:"LOUVER"},je.SCREEN={type:3,value:"SCREEN"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=je;class Qe{}Qe.PHYSICAL={type:3,value:"PHYSICAL"},Qe.VIRTUAL={type:3,value:"VIRTUAL"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=Qe;class We{}We.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},We.COMPOSITE={type:3,value:"COMPOSITE"},We.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},We.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=We;class ze{}ze.COHESION={type:3,value:"COHESION"},ze.FRICTION={type:3,value:"FRICTION"},ze.SUPPORT={type:3,value:"SUPPORT"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=ze;class Ke{}Ke.BEND={type:3,value:"BEND"},Ke.CONNECTOR={type:3,value:"CONNECTOR"},Ke.ENTRY={type:3,value:"ENTRY"},Ke.EXIT={type:3,value:"EXIT"},Ke.JUNCTION={type:3,value:"JUNCTION"},Ke.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ke.TRANSITION={type:3,value:"TRANSITION"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Ke;class Ye{}Ye.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ye.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ye.GUTTER={type:3,value:"GUTTER"},Ye.SPOOL={type:3,value:"SPOOL"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Ye;class Xe{}Xe.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Xe.SHEET={type:3,value:"SHEET"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Xe;class Ze{}Ze.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Ze.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Ze.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Ze.CALIBRATION={type:3,value:"CALIBRATION"},Ze.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Ze.SHUTDOWN={type:3,value:"SHUTDOWN"},Ze.STARTUP={type:3,value:"STARTUP"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Ze;class qe{}qe.CURVE={type:3,value:"CURVE"},qe.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=qe;class Je{}Je.CHANGE={type:3,value:"CHANGE"},Je.MAINTENANCE={type:3,value:"MAINTENANCE"},Je.MOVE={type:3,value:"MOVE"},Je.PURCHASE={type:3,value:"PURCHASE"},Je.WORK={type:3,value:"WORK"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderRecordTypeEnum=Je;class $e{}$e.CHANGEORDER={type:3,value:"CHANGEORDER"},$e.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},$e.MOVEORDER={type:3,value:"MOVEORDER"},$e.PURCHASEORDER={type:3,value:"PURCHASEORDER"},$e.WORKORDER={type:3,value:"WORKORDER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=$e;class et{}et.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},et.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=et;class tt{}tt.DESIGN={type:3,value:"DESIGN"},tt.DESIGNMAXIMUM={type:3,value:"DESIGNMAXIMUM"},tt.DESIGNMINIMUM={type:3,value:"DESIGNMINIMUM"},tt.SIMULATED={type:3,value:"SIMULATED"},tt.ASBUILT={type:3,value:"ASBUILT"},tt.COMMISSIONING={type:3,value:"COMMISSIONING"},tt.MEASURED={type:3,value:"MEASURED"},tt.USERDEFINED={type:3,value:"USERDEFINED"},tt.NOTKNOWN={type:3,value:"NOTKNOWN"},e.IfcPropertySourceEnum=tt;class st{}st.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},st.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},st.EARTHFAILUREDEVICE={type:3,value:"EARTHFAILUREDEVICE"},st.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},st.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},st.VARISTOR={type:3,value:"VARISTOR"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=st;class it{}it.CIRCULATOR={type:3,value:"CIRCULATOR"},it.ENDSUCTION={type:3,value:"ENDSUCTION"},it.SPLITCASE={type:3,value:"SPLITCASE"},it.VERTICALINLINE={type:3,value:"VERTICALINLINE"},it.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=it;class rt{}rt.HANDRAIL={type:3,value:"HANDRAIL"},rt.GUARDRAIL={type:3,value:"GUARDRAIL"},rt.BALUSTRADE={type:3,value:"BALUSTRADE"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=rt;class ot{}ot.STRAIGHT={type:3,value:"STRAIGHT"},ot.SPIRAL={type:3,value:"SPIRAL"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=ot;class nt{}nt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},nt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},nt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},nt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},nt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},nt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=nt;class at{}at.BLINN={type:3,value:"BLINN"},at.FLAT={type:3,value:"FLAT"},at.GLASS={type:3,value:"GLASS"},at.MATT={type:3,value:"MATT"},at.METAL={type:3,value:"METAL"},at.MIRROR={type:3,value:"MIRROR"},at.PHONG={type:3,value:"PHONG"},at.PLASTIC={type:3,value:"PLASTIC"},at.STRAUSS={type:3,value:"STRAUSS"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=at;class lt{}lt.MAIN={type:3,value:"MAIN"},lt.SHEAR={type:3,value:"SHEAR"},lt.LIGATURE={type:3,value:"LIGATURE"},lt.STUD={type:3,value:"STUD"},lt.PUNCHING={type:3,value:"PUNCHING"},lt.EDGE={type:3,value:"EDGE"},lt.RING={type:3,value:"RING"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=lt;class ht{}ht.PLAIN={type:3,value:"PLAIN"},ht.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=ht;class ct{}ct.CONSUMED={type:3,value:"CONSUMED"},ct.PARTIALLYCONSUMED={type:3,value:"PARTIALLYCONSUMED"},ct.NOTCONSUMED={type:3,value:"NOTCONSUMED"},ct.OCCUPIED={type:3,value:"OCCUPIED"},ct.PARTIALLYOCCUPIED={type:3,value:"PARTIALLYOCCUPIED"},ct.NOTOCCUPIED={type:3,value:"NOTOCCUPIED"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcResourceConsumptionEnum=ct;class At{}At.DIRECTION_X={type:3,value:"DIRECTION_X"},At.DIRECTION_Y={type:3,value:"DIRECTION_Y"},e.IfcRibPlateDirectionEnum=At;class ut{}ut.SUPPLIER={type:3,value:"SUPPLIER"},ut.MANUFACTURER={type:3,value:"MANUFACTURER"},ut.CONTRACTOR={type:3,value:"CONTRACTOR"},ut.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},ut.ARCHITECT={type:3,value:"ARCHITECT"},ut.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},ut.COSTENGINEER={type:3,value:"COSTENGINEER"},ut.CLIENT={type:3,value:"CLIENT"},ut.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},ut.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},ut.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},ut.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},ut.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},ut.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},ut.CIVILENGINEER={type:3,value:"CIVILENGINEER"},ut.COMISSIONINGENGINEER={type:3,value:"COMISSIONINGENGINEER"},ut.ENGINEER={type:3,value:"ENGINEER"},ut.OWNER={type:3,value:"OWNER"},ut.CONSULTANT={type:3,value:"CONSULTANT"},ut.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},ut.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},ut.RESELLER={type:3,value:"RESELLER"},ut.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=ut;class pt{}pt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},pt.SHED_ROOF={type:3,value:"SHED_ROOF"},pt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},pt.HIP_ROOF={type:3,value:"HIP_ROOF"},pt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},pt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},pt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},pt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},pt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},pt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},pt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},pt.DOME_ROOF={type:3,value:"DOME_ROOF"},pt.FREEFORM={type:3,value:"FREEFORM"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=pt;class dt{}dt.EXA={type:3,value:"EXA"},dt.PETA={type:3,value:"PETA"},dt.TERA={type:3,value:"TERA"},dt.GIGA={type:3,value:"GIGA"},dt.MEGA={type:3,value:"MEGA"},dt.KILO={type:3,value:"KILO"},dt.HECTO={type:3,value:"HECTO"},dt.DECA={type:3,value:"DECA"},dt.DECI={type:3,value:"DECI"},dt.CENTI={type:3,value:"CENTI"},dt.MILLI={type:3,value:"MILLI"},dt.MICRO={type:3,value:"MICRO"},dt.NANO={type:3,value:"NANO"},dt.PICO={type:3,value:"PICO"},dt.FEMTO={type:3,value:"FEMTO"},dt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=dt;class ft{}ft.AMPERE={type:3,value:"AMPERE"},ft.BECQUEREL={type:3,value:"BECQUEREL"},ft.CANDELA={type:3,value:"CANDELA"},ft.COULOMB={type:3,value:"COULOMB"},ft.CUBIC_METRE={type:3,value:"CUBIC_METRE"},ft.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},ft.FARAD={type:3,value:"FARAD"},ft.GRAM={type:3,value:"GRAM"},ft.GRAY={type:3,value:"GRAY"},ft.HENRY={type:3,value:"HENRY"},ft.HERTZ={type:3,value:"HERTZ"},ft.JOULE={type:3,value:"JOULE"},ft.KELVIN={type:3,value:"KELVIN"},ft.LUMEN={type:3,value:"LUMEN"},ft.LUX={type:3,value:"LUX"},ft.METRE={type:3,value:"METRE"},ft.MOLE={type:3,value:"MOLE"},ft.NEWTON={type:3,value:"NEWTON"},ft.OHM={type:3,value:"OHM"},ft.PASCAL={type:3,value:"PASCAL"},ft.RADIAN={type:3,value:"RADIAN"},ft.SECOND={type:3,value:"SECOND"},ft.SIEMENS={type:3,value:"SIEMENS"},ft.SIEVERT={type:3,value:"SIEVERT"},ft.SQUARE_METRE={type:3,value:"SQUARE_METRE"},ft.STERADIAN={type:3,value:"STERADIAN"},ft.TESLA={type:3,value:"TESLA"},ft.VOLT={type:3,value:"VOLT"},ft.WATT={type:3,value:"WATT"},ft.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=ft;class Et{}Et.BATH={type:3,value:"BATH"},Et.BIDET={type:3,value:"BIDET"},Et.CISTERN={type:3,value:"CISTERN"},Et.SHOWER={type:3,value:"SHOWER"},Et.SINK={type:3,value:"SINK"},Et.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Et.TOILETPAN={type:3,value:"TOILETPAN"},Et.URINAL={type:3,value:"URINAL"},Et.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Et.WCSEAT={type:3,value:"WCSEAT"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Et;class mt{}mt.UNIFORM={type:3,value:"UNIFORM"},mt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=mt;class yt{}yt.CO2SENSOR={type:3,value:"CO2SENSOR"},yt.FIRESENSOR={type:3,value:"FIRESENSOR"},yt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},yt.GASSENSOR={type:3,value:"GASSENSOR"},yt.HEATSENSOR={type:3,value:"HEATSENSOR"},yt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},yt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},yt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},yt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},yt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},yt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},yt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},yt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=yt;class gt{}gt.START_START={type:3,value:"START_START"},gt.START_FINISH={type:3,value:"START_FINISH"},gt.FINISH_START={type:3,value:"FINISH_START"},gt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=gt;class It{}It.A_QUALITYOFCOMPONENTS={type:3,value:"A_QUALITYOFCOMPONENTS"},It.B_DESIGNLEVEL={type:3,value:"B_DESIGNLEVEL"},It.C_WORKEXECUTIONLEVEL={type:3,value:"C_WORKEXECUTIONLEVEL"},It.D_INDOORENVIRONMENT={type:3,value:"D_INDOORENVIRONMENT"},It.E_OUTDOORENVIRONMENT={type:3,value:"E_OUTDOORENVIRONMENT"},It.F_INUSECONDITIONS={type:3,value:"F_INUSECONDITIONS"},It.G_MAINTENANCELEVEL={type:3,value:"G_MAINTENANCELEVEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcServiceLifeFactorTypeEnum=It;class vt{}vt.ACTUALSERVICELIFE={type:3,value:"ACTUALSERVICELIFE"},vt.EXPECTEDSERVICELIFE={type:3,value:"EXPECTEDSERVICELIFE"},vt.OPTIMISTICREFERENCESERVICELIFE={type:3,value:"OPTIMISTICREFERENCESERVICELIFE"},vt.PESSIMISTICREFERENCESERVICELIFE={type:3,value:"PESSIMISTICREFERENCESERVICELIFE"},vt.REFERENCESERVICELIFE={type:3,value:"REFERENCESERVICELIFE"},e.IfcServiceLifeTypeEnum=vt;class Tt{}Tt.FLOOR={type:3,value:"FLOOR"},Tt.ROOF={type:3,value:"ROOF"},Tt.LANDING={type:3,value:"LANDING"},Tt.BASESLAB={type:3,value:"BASESLAB"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Tt;class _t{}_t.DBA={type:3,value:"DBA"},_t.DBB={type:3,value:"DBB"},_t.DBC={type:3,value:"DBC"},_t.NC={type:3,value:"NC"},_t.NR={type:3,value:"NR"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSoundScaleEnum=_t;class Rt{}Rt.SECTIONALRADIATOR={type:3,value:"SECTIONALRADIATOR"},Rt.PANELRADIATOR={type:3,value:"PANELRADIATOR"},Rt.TUBULARRADIATOR={type:3,value:"TUBULARRADIATOR"},Rt.CONVECTOR={type:3,value:"CONVECTOR"},Rt.BASEBOARDHEATER={type:3,value:"BASEBOARDHEATER"},Rt.FINNEDTUBEUNIT={type:3,value:"FINNEDTUBEUNIT"},Rt.UNITHEATER={type:3,value:"UNITHEATER"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Rt;class Pt{}Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Pt;class Dt{}Dt.BIRDCAGE={type:3,value:"BIRDCAGE"},Dt.COWL={type:3,value:"COWL"},Dt.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=Dt;class Nt{}Nt.STRAIGHT={type:3,value:"STRAIGHT"},Nt.WINDER={type:3,value:"WINDER"},Nt.SPIRAL={type:3,value:"SPIRAL"},Nt.CURVED={type:3,value:"CURVED"},Nt.FREEFORM={type:3,value:"FREEFORM"},Nt.USERDEFINED={type:3,value:"USERDEFINED"},Nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Nt;class bt{}bt.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},bt.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},bt.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},bt.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},bt.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},bt.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},bt.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},bt.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},bt.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},bt.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},bt.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},bt.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},bt.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},bt.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=bt;class Ct{}Ct.READWRITE={type:3,value:"READWRITE"},Ct.READONLY={type:3,value:"READONLY"},Ct.LOCKED={type:3,value:"LOCKED"},Ct.READWRITELOCKED={type:3,value:"READWRITELOCKED"},Ct.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=Ct;class Ot{}Ot.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},Ot.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},Ot.CABLE={type:3,value:"CABLE"},Ot.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},Ot.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveTypeEnum=Ot;class St{}St.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},St.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},St.SHELL={type:3,value:"SHELL"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceTypeEnum=St;class xt{}xt.POSITIVE={type:3,value:"POSITIVE"},xt.NEGATIVE={type:3,value:"NEGATIVE"},xt.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=xt;class wt{}wt.BUMP={type:3,value:"BUMP"},wt.OPACITY={type:3,value:"OPACITY"},wt.REFLECTION={type:3,value:"REFLECTION"},wt.SELFILLUMINATION={type:3,value:"SELFILLUMINATION"},wt.SHININESS={type:3,value:"SHININESS"},wt.SPECULAR={type:3,value:"SPECULAR"},wt.TEXTURE={type:3,value:"TEXTURE"},wt.TRANSPARENCYMAP={type:3,value:"TRANSPARENCYMAP"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceTextureEnum=wt;class Bt{}Bt.CONTACTOR={type:3,value:"CONTACTOR"},Bt.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Bt.STARTER={type:3,value:"STARTER"},Bt.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Bt.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Bt;class Ft{}Ft.PREFORMED={type:3,value:"PREFORMED"},Ft.SECTIONAL={type:3,value:"SECTIONAL"},Ft.EXPANSION={type:3,value:"EXPANSION"},Ft.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=Ft;class Mt{}Mt.STRAND={type:3,value:"STRAND"},Mt.WIRE={type:3,value:"WIRE"},Mt.BAR={type:3,value:"BAR"},Mt.COATED={type:3,value:"COATED"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Mt;class Lt{}Lt.LEFT={type:3,value:"LEFT"},Lt.RIGHT={type:3,value:"RIGHT"},Lt.UP={type:3,value:"UP"},Lt.DOWN={type:3,value:"DOWN"},e.IfcTextPath=Lt;class Ut{}Ut.PEOPLE={type:3,value:"PEOPLE"},Ut.LIGHTING={type:3,value:"LIGHTING"},Ut.EQUIPMENT={type:3,value:"EQUIPMENT"},Ut.VENTILATIONINDOORAIR={type:3,value:"VENTILATIONINDOORAIR"},Ut.VENTILATIONOUTSIDEAIR={type:3,value:"VENTILATIONOUTSIDEAIR"},Ut.RECIRCULATEDAIR={type:3,value:"RECIRCULATEDAIR"},Ut.EXHAUSTAIR={type:3,value:"EXHAUSTAIR"},Ut.AIREXCHANGERATE={type:3,value:"AIREXCHANGERATE"},Ut.DRYBULBTEMPERATURE={type:3,value:"DRYBULBTEMPERATURE"},Ut.RELATIVEHUMIDITY={type:3,value:"RELATIVEHUMIDITY"},Ut.INFILTRATION={type:3,value:"INFILTRATION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadSourceEnum=Ut;class Ht{}Ht.SENSIBLE={type:3,value:"SENSIBLE"},Ht.LATENT={type:3,value:"LATENT"},Ht.RADIANT={type:3,value:"RADIANT"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadTypeEnum=Ht;class Gt{}Gt.CONTINUOUS={type:3,value:"CONTINUOUS"},Gt.DISCRETE={type:3,value:"DISCRETE"},Gt.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Gt.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Gt.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Gt.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Gt;class kt{}kt.ANNUAL={type:3,value:"ANNUAL"},kt.MONTHLY={type:3,value:"MONTHLY"},kt.WEEKLY={type:3,value:"WEEKLY"},kt.DAILY={type:3,value:"DAILY"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesScheduleTypeEnum=kt;class Vt{}Vt.CURRENT={type:3,value:"CURRENT"},Vt.FREQUENCY={type:3,value:"FREQUENCY"},Vt.VOLTAGE={type:3,value:"VOLTAGE"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Vt;class jt{}jt.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},jt.CONTINUOUS={type:3,value:"CONTINUOUS"},jt.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},jt.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=jt;class Qt{}Qt.ELEVATOR={type:3,value:"ELEVATOR"},Qt.ESCALATOR={type:3,value:"ESCALATOR"},Qt.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Qt;class Wt{}Wt.CARTESIAN={type:3,value:"CARTESIAN"},Wt.PARAMETER={type:3,value:"PARAMETER"},Wt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Wt;class zt{}zt.FINNED={type:3,value:"FINNED"},zt.USERDEFINED={type:3,value:"USERDEFINED"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=zt;class Kt{}Kt.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Kt.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Kt.AREAUNIT={type:3,value:"AREAUNIT"},Kt.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Kt.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Kt.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Kt.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Kt.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Kt.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Kt.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Kt.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Kt.FORCEUNIT={type:3,value:"FORCEUNIT"},Kt.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Kt.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Kt.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Kt.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Kt.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Kt.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Kt.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Kt.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Kt.MASSUNIT={type:3,value:"MASSUNIT"},Kt.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Kt.POWERUNIT={type:3,value:"POWERUNIT"},Kt.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Kt.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Kt.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Kt.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Kt.TIMEUNIT={type:3,value:"TIMEUNIT"},Kt.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Kt;class Yt{}Yt.AIRHANDLER={type:3,value:"AIRHANDLER"},Yt.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Yt.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Yt.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Yt;class Xt{}Xt.AIRRELEASE={type:3,value:"AIRRELEASE"},Xt.ANTIVACUUM={type:3,value:"ANTIVACUUM"},Xt.CHANGEOVER={type:3,value:"CHANGEOVER"},Xt.CHECK={type:3,value:"CHECK"},Xt.COMMISSIONING={type:3,value:"COMMISSIONING"},Xt.DIVERTING={type:3,value:"DIVERTING"},Xt.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},Xt.DOUBLECHECK={type:3,value:"DOUBLECHECK"},Xt.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},Xt.FAUCET={type:3,value:"FAUCET"},Xt.FLUSHING={type:3,value:"FLUSHING"},Xt.GASCOCK={type:3,value:"GASCOCK"},Xt.GASTAP={type:3,value:"GASTAP"},Xt.ISOLATING={type:3,value:"ISOLATING"},Xt.MIXING={type:3,value:"MIXING"},Xt.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},Xt.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},Xt.REGULATING={type:3,value:"REGULATING"},Xt.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},Xt.STEAMTRAP={type:3,value:"STEAMTRAP"},Xt.STOPCOCK={type:3,value:"STOPCOCK"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=Xt;class Zt{}Zt.COMPRESSION={type:3,value:"COMPRESSION"},Zt.SPRING={type:3,value:"SPRING"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Zt;class qt{}qt.STANDARD={type:3,value:"STANDARD"},qt.POLYGONAL={type:3,value:"POLYGONAL"},qt.SHEAR={type:3,value:"SHEAR"},qt.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},qt.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=qt;class Jt{}Jt.FLOORTRAP={type:3,value:"FLOORTRAP"},Jt.FLOORWASTE={type:3,value:"FLOORWASTE"},Jt.GULLYSUMP={type:3,value:"GULLYSUMP"},Jt.GULLYTRAP={type:3,value:"GULLYTRAP"},Jt.GREASEINTERCEPTOR={type:3,value:"GREASEINTERCEPTOR"},Jt.OILINTERCEPTOR={type:3,value:"OILINTERCEPTOR"},Jt.PETROLINTERCEPTOR={type:3,value:"PETROLINTERCEPTOR"},Jt.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Jt.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Jt.WASTETRAP={type:3,value:"WASTETRAP"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Jt;class $t{}$t.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},$t.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},$t.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},$t.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},$t.TOPHUNG={type:3,value:"TOPHUNG"},$t.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},$t.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},$t.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},$t.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},$t.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},$t.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},$t.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},$t.OTHEROPERATION={type:3,value:"OTHEROPERATION"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=$t;class es{}es.LEFT={type:3,value:"LEFT"},es.MIDDLE={type:3,value:"MIDDLE"},es.RIGHT={type:3,value:"RIGHT"},es.BOTTOM={type:3,value:"BOTTOM"},es.TOP={type:3,value:"TOP"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=es;class ts{}ts.ALUMINIUM={type:3,value:"ALUMINIUM"},ts.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},ts.STEEL={type:3,value:"STEEL"},ts.WOOD={type:3,value:"WOOD"},ts.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},ts.PLASTIC={type:3,value:"PLASTIC"},ts.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=ts;class ss{}ss.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ss.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ss.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ss.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ss.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ss.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ss.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ss.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ss.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ss;class is{}is.ACTUAL={type:3,value:"ACTUAL"},is.BASELINE={type:3,value:"BASELINE"},is.PLANNED={type:3,value:"PLANNED"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkControlTypeEnum=is;e.IfcActorRole=class extends gI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class rs extends gI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=rs;e.IfcApplication=class extends gI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class os extends gI{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.type=411424972}}e.IfcAppliedValue=os;e.IfcAppliedValueRelationship=class extends gI{constructor(e,t,s,i,r,o){super(e),this.ComponentOfTotal=t,this.Components=s,this.ArithmeticOperator=i,this.Name=r,this.Description=o,this.type=1110488051}};e.IfcApproval=class extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.Description=t,this.ApprovalDateTime=s,this.ApprovalStatus=i,this.ApprovalLevel=r,this.ApprovalQualifier=o,this.Name=n,this.Identifier=a,this.type=130549933}};e.IfcApprovalActorRelationship=class extends gI{constructor(e,t,s,i){super(e),this.Actor=t,this.Approval=s,this.Role=i,this.type=2080292479}};e.IfcApprovalPropertyRelationship=class extends gI{constructor(e,t,s){super(e),this.ApprovedProperties=t,this.Approval=s,this.type=390851274}};e.IfcApprovalRelationship=class extends gI{constructor(e,t,s,i,r){super(e),this.RelatedApproval=t,this.RelatingApproval=s,this.Description=i,this.Name=r,this.type=3869604511}};class ns extends gI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=ns;e.IfcBoundaryEdgeCondition=class extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessByLengthX=s,this.LinearStiffnessByLengthY=i,this.LinearStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends ns{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.LinearStiffnessByAreaX=s,this.LinearStiffnessByAreaY=i,this.LinearStiffnessByAreaZ=r,this.type=3367102660}};class as extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=as;e.IfcBoundaryNodeConditionWarping=class extends as{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};e.IfcCalendarDate=class extends gI{constructor(e,t,s,i){super(e),this.DayComponent=t,this.MonthComponent=s,this.YearComponent=i,this.type=622194075}};e.IfcClassification=class extends gI{constructor(e,t,s,i,r){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.type=747523909}};e.IfcClassificationItem=class extends gI{constructor(e,t,s,i){super(e),this.Notation=t,this.ItemOf=s,this.Title=i,this.type=1767535486}};e.IfcClassificationItemRelationship=class extends gI{constructor(e,t,s){super(e),this.RelatingItem=t,this.RelatedItems=s,this.type=1098599126}};e.IfcClassificationNotation=class extends gI{constructor(e,t){super(e),this.NotationFacets=t,this.type=938368621}};e.IfcClassificationNotationFacet=class extends gI{constructor(e,t){super(e),this.NotationValue=t,this.type=3639012971}};class ls extends gI{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=ls;class hs extends gI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=hs;class cs extends hs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=cs;e.IfcConnectionPortGeometry=class extends hs{constructor(e,t,s,i){super(e),this.LocationAtRelatingElement=t,this.LocationAtRelatedElement=s,this.ProfileOfPort=i,this.type=4257277454}};e.IfcConnectionSurfaceGeometry=class extends hs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};class As extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=As;e.IfcConstraintAggregationRelationship=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.LogicalAggregator=o,this.type=1658513725}};e.IfcConstraintClassificationRelationship=class extends gI{constructor(e,t,s){super(e),this.ClassifiedConstraint=t,this.RelatedClassifications=s,this.type=613356794}};e.IfcConstraintRelationship=class extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.type=347226245}};e.IfcCoordinatedUniversalTimeOffset=class extends gI{constructor(e,t,s,i){super(e),this.HourOffset=t,this.MinuteOffset=s,this.Sense=i,this.type=1065062679}};e.IfcCostValue=class extends os{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.CostType=a,this.Condition=l,this.type=602808272}};e.IfcCurrencyRelationship=class extends gI{constructor(e,t,s,i,r,o){super(e),this.RelatingMonetaryUnit=t,this.RelatedMonetaryUnit=s,this.ExchangeRate=i,this.RateDateTime=r,this.RateSource=o,this.type=539742890}};e.IfcCurveStyleFont=class extends gI{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends gI{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};e.IfcDateAndTime=class extends gI{constructor(e,t,s){super(e),this.DateComponent=t,this.TimeComponent=s,this.type=1072939445}};e.IfcDerivedUnit=class extends gI{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends gI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};e.IfcDocumentElectronicFormat=class extends gI{constructor(e,t,s,i){super(e),this.FileExtension=t,this.MimeContentType=s,this.MimeSubtype=i,this.type=1376555844}};e.IfcDocumentInformation=class extends gI{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.DocumentId=t,this.Name=s,this.Description=i,this.DocumentReferences=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends gI{constructor(e,t,s,i){super(e),this.RelatingDocument=t,this.RelatedDocuments=s,this.RelationshipType=i,this.type=770865208}};class us extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=3796139169}}e.IfcDraughtingCalloutRelationship=us;e.IfcEnvironmentalImpactValue=class extends os{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.ImpactType=a,this.Category=l,this.UserDefinedCategory=h,this.type=1648886627}};class ps extends gI{constructor(e,t,s,i){super(e),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ps;e.IfcExternallyDefinedHatchStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedSymbol=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3207319532}};e.IfcExternallyDefinedTextFont=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends gI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends gI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.LibraryReference=o,this.type=2655187982}};e.IfcLibraryReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3452421091}};e.IfcLightDistributionData=class extends gI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends gI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcLocalTime=class extends gI{constructor(e,t,s,i,r,o){super(e),this.HourComponent=t,this.MinuteComponent=s,this.SecondComponent=i,this.Zone=r,this.DaylightSavingOffset=o,this.type=30780891}};e.IfcMaterial=class extends gI{constructor(e,t){super(e),this.Name=t,this.type=1838606355}};e.IfcMaterialClassificationRelationship=class extends gI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};e.IfcMaterialLayer=class extends gI{constructor(e,t,s,i){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.type=248100487}};e.IfcMaterialLayerSet=class extends gI{constructor(e,t,s){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.type=3303938423}};e.IfcMaterialLayerSetUsage=class extends gI{constructor(e,t,s,i,r){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.type=1303795690}};e.IfcMaterialList=class extends gI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ds extends gI{constructor(e,t){super(e),this.Material=t,this.type=3265635763}}e.IfcMaterialProperties=ds;e.IfcMeasureWithUnit=class extends gI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};class fs extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.type=4256014907}}e.IfcMechanicalMaterialProperties=fs;e.IfcMechanicalSteelMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.YieldStress=a,this.UltimateStress=l,this.UltimateStrain=h,this.HardeningModule=c,this.ProportionalStress=A,this.PlasticStrain=u,this.Relaxations=p,this.type=677618848}};e.IfcMetric=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.type=3368373690}};e.IfcMonetaryUnit=class extends gI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Es extends gI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Es;class ms extends gI{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=ms;e.IfcObjective=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.ResultValues=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOpticalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t),this.Material=t,this.VisibleTransmittance=s,this.SolarTransmittance=i,this.ThermalIrTransmittance=r,this.ThermalIrEmissivityBack=o,this.ThermalIrEmissivityFront=n,this.VisibleReflectanceBack=a,this.VisibleReflectanceFront=l,this.SolarReflectanceFront=h,this.SolarReflectanceBack=c,this.type=1227763645}};e.IfcOrganization=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Id=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOrganizationRelationship=class extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOwnerHistory=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Id=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends gI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ys extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ys;class gs extends ys{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=gs;e.IfcPostalAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class Is extends gI{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=Is;class vs extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=990879717}}e.IfcPreDefinedSymbol=vs;e.IfcPreDefinedTerminatorSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=3213052703}};class Ts extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=Ts;class _s extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=_s;e.IfcPresentationLayerWithStyle=class extends _s{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class Rs extends gI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=Rs;e.IfcPresentationStyleAssignment=class extends gI{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class Ps extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=Ps;e.IfcProductsOfCombustionProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.N20Content=i,this.COContent=r,this.CO2Content=o,this.type=2267347899}};class Ds extends gI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ds;class Ns extends gI{constructor(e,t,s){super(e),this.ProfileName=t,this.ProfileDefinition=s,this.type=2802850158}}e.IfcProfileProperties=Ns;class bs extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=bs;e.IfcPropertyConstraintRelationship=class extends gI{constructor(e,t,s,i,r){super(e),this.RelatingConstraint=t,this.RelatedProperties=s,this.Name=i,this.Description=r,this.type=3896028662}};e.IfcPropertyDependencyRelationship=class extends gI{constructor(e,t,s,i,r,o){super(e),this.DependingProperty=t,this.DependantProperty=s,this.Name=i,this.Description=r,this.Expression=o,this.type=148025276}};e.IfcPropertyEnumeration=class extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.type=2044713172}};e.IfcQuantityCount=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.type=2093928680}};e.IfcQuantityLength=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.type=931644368}};e.IfcQuantityTime=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.type=3252649465}};e.IfcQuantityVolume=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.type=2405470396}};e.IfcQuantityWeight=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.type=825690147}};e.IfcReferencesValueDocument=class extends gI{constructor(e,t,s,i,r){super(e),this.ReferencedDocument=t,this.ReferencingValues=s,this.Name=i,this.Description=r,this.type=2692823254}};e.IfcReinforcementBarProperties=class extends gI{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};e.IfcRelaxation=class extends gI{constructor(e,t,s){super(e),this.RelaxationValue=t,this.InitialStress=s,this.type=1222501353}};class Cs extends gI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=Cs;class Os extends gI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=Os;class Ss extends gI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ss;e.IfcRepresentationMap=class extends gI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};e.IfcRibPlateProfileProperties=class extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.Thickness=i,this.RibHeight=r,this.RibWidth=o,this.RibSpacing=n,this.Direction=a,this.type=3679540991}};class xs extends gI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=xs;e.IfcSIUnit=class extends Es{constructor(e,t,s,i){super(e,new yI(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};e.IfcSectionProperties=class extends gI{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends gI{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcShapeAspect=class extends gI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ws extends Cs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ws;e.IfcShapeRepresentation=class extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Bs extends bs{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=Bs;class Fs extends gI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Fs;class Ms extends gI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Ms;class Ls extends Ms{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ls;e.IfcStructuralLoadTemperature=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaT_Constant=s,this.DeltaT_Y=i,this.DeltaT_Z=r,this.type=3408363356}};class Us extends Cs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Us;class Hs extends Ss{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}}e.IfcStyledItem=Hs;e.IfcStyledRepresentation=class extends Us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceStyle=class extends Rs{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends gI{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends gI{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Gs extends gI{constructor(e,t){super(e),this.SurfaceColour=t,this.type=846575682}}e.IfcSurfaceStyleShading=Gs;e.IfcSurfaceStyleWithTextures=class extends gI{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class ks extends gI{constructor(e,t,s,i,r){super(e),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.type=626085974}}e.IfcSurfaceTexture=ks;e.IfcSymbolStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.StyleOfSymbol=s,this.type=1290481447}};e.IfcTable=class extends gI{constructor(e,t,s){super(e),this.Name=t,this.Rows=s,this.type=985171141}};e.IfcTableRow=class extends gI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};e.IfcTelecomAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.type=912023232}};e.IfcTextStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.type=1447204868}};e.IfcTextStyleFontModel=class extends Ts{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTextStyleForDefinedFont=class extends gI{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};e.IfcTextStyleWithBoxCharacteristics=class extends gI{constructor(e,t,s,i,r,o){super(e),this.BoxHeight=t,this.BoxWidth=s,this.BoxSlantAngle=i,this.BoxRotateAngle=r,this.CharacterSpacing=o,this.type=1484833681}};class Vs extends gI{constructor(e){super(e),this.type=280115917}}e.IfcTextureCoordinate=Vs;e.IfcTextureCoordinateGenerator=class extends Vs{constructor(e,t,s){super(e),this.Mode=t,this.Parameter=s,this.type=1742049831}};e.IfcTextureMap=class extends Vs{constructor(e,t){super(e),this.TextureMaps=t,this.type=2552916305}};e.IfcTextureVertex=class extends gI{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcThermalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.BoilingPoint=i,this.FreezingPoint=r,this.ThermalConductivity=o,this.type=3317419933}};class js extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=js;e.IfcTimeSeriesReferenceRelationship=class extends gI{constructor(e,t,s){super(e),this.ReferencedTimeSeries=t,this.TimeSeriesReferences=s,this.type=1718945513}};e.IfcTimeSeriesValue=class extends gI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Qs extends Ss{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Qs;e.IfcTopologyRepresentation=class extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends gI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Ws extends Qs{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Ws;e.IfcVertexBasedTextureMap=class extends gI{constructor(e,t,s){super(e),this.TextureVertices=t,this.TexturePoints=s,this.type=3304826586}};e.IfcVertexPoint=class extends Ws{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends gI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWaterProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l){super(e,t),this.Material=t,this.IsPotable=s,this.Hardness=i,this.AlkalinityConcentration=r,this.AcidityConcentration=o,this.ImpuritiesContent=n,this.PHLevel=a,this.DissolvedSolidsContent=l,this.type=1065908215}};class zs extends Hs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2442683028}}e.IfcAnnotationOccurrence=zs;e.IfcAnnotationSurfaceOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=962685235}};class Ks extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3612888222}}e.IfcAnnotationSymbolOccurrence=Ks;e.IfcAnnotationTextOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2297822566}};class Ys extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Ys;class Xs extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Xs;e.IfcArbitraryProfileDefWithVoids=class extends Ys{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends ks{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.RasterFormat=o,this.RasterCode=n,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Xs{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassificationReference=class extends ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.ReferencedSource=r,this.type=647927063}};e.IfcColourRgb=class extends ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};e.IfcCompositeProfileDef=class extends Ds{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Zs extends Qs{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Zs;e.IfcConnectionCurveGeometry=class extends hs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends cs{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Es{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};e.IfcConversionBasedUnit=class extends Es{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}};e.IfcCurveStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.type=3800577675}};e.IfcDerivedProfileDef=class extends Ds{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}};e.IfcDimensionCalloutRelationship=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=2273265877}};e.IfcDimensionPair=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=1694125774}};e.IfcDocumentReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3732053477}};e.IfcDraughtingPreDefinedTextFont=class extends Ts{constructor(e,t){super(e,t),this.Name=t,this.type=4170525392}};class qs extends Qs{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=qs;e.IfcEdgeCurve=class extends qs{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcExtendedMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.ExtendedProperties=s,this.Description=i,this.Name=r,this.type=1860660968}};class Js extends Qs{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Js;class $s extends Qs{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=$s;e.IfcFaceOuterBound=class extends $s{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};e.IfcFaceSurface=class extends Js{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}};e.IfcFailureConnectionCondition=class extends Fs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.FillStyles=s,this.type=738692330}};e.IfcFuelProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.CombustionTemperature=s,this.CarbonContent=i,this.LowerHeatingValue=r,this.HigherHeatingValue=o,this.type=3857492461}};e.IfcGeneralMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.MolecularWeight=s,this.Porosity=i,this.MassDensity=r,this.type=803998398}};class ei extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.type=1446786286}}e.IfcGeneralProfileProperties=ei;class ti extends Os{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=ti;class si extends Ss{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=si;e.IfcGeometricRepresentationSubContext=class extends ti{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new yI(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class ii extends si{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=ii;e.IfcGridPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class ri extends si{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=ri;e.IfcHygroscopicMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.UpperVaporResistanceFactor=s,this.LowerVaporResistanceFactor=i,this.IsothermalMoistureCapacity=r,this.VaporPermeability=o,this.MoistureDiffusivity=n,this.type=2445078500}};e.IfcImageTexture=class extends ks{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.UrlReference=o,this.type=3905492369}};e.IfcIrregularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};class oi extends si{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=oi;e.IfcLightSourceAmbient=class extends oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends oi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class ni extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=ni;e.IfcLightSourceSpot=class extends ni{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class ai extends Qs{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=ai;e.IfcMappedItem=class extends Ss{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterialDefinitionRepresentation=class extends Ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMechanicalConcreteMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.CompressiveStrength=a,this.MaxAggregateSize=l,this.AdmixturesDescription=h,this.Workability=c,this.ProtectivePoreRatio=A,this.WaterImpermeability=u,this.type=1430189142}};class li extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=li;class hi extends si{constructor(e,t){super(e),this.RepeatFactor=t,this.type=2833995503}}e.IfcOneDirectionRepeatFactor=hi;e.IfcOpenShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrientedEdge=class extends qs{constructor(e,t,s){super(e,new yI(0),new yI(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class ci extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=ci;e.IfcPath=class extends Qs{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ys{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends ks{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.Width=o,this.Height=n,this.ColourComponents=a,this.Pixel=l,this.type=597895409}};class Ai extends si{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Ai;class ui extends si{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=ui;class pi extends si{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=pi;e.IfcPointOnCurve=class extends pi{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends pi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends ai{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends ri{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class di extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=di;class fi extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=fi;e.IfcPreDefinedDimensionSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=433424934}};e.IfcPreDefinedPointMarkerSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=179317114}};e.IfcProductDefinitionShape=class extends Ps{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcPropertyBoundedValue=class extends Bs{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.type=871118103}};class Ei extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=Ei;e.IfcPropertyEnumeratedValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};class mi extends Ei{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=mi;e.IfcPropertySingleValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends Bs{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.type=110355661}};class yi extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=yi;e.IfcRegularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementDefinitionProperties=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class gi extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=gi;e.IfcRoundedRectangleProfileDef=class extends yi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionedSpine=class extends si{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcServiceLifeFactor=class extends mi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PredefinedType=o,this.UpperValue=n,this.MostUsedValue=a,this.LowerValue=l,this.type=2411513650}};e.IfcShellBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};e.IfcSlippageConnectionCondition=class extends Fs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class Ii extends si{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=Ii;e.IfcSoundProperties=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.IsAttenuating=o,this.SoundScale=n,this.SoundValues=a,this.type=2485662743}};e.IfcSoundValue=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.SoundLevelTimeSeries=o,this.Frequency=n,this.SoundLevelSingleValue=a,this.type=1202362311}};e.IfcSpaceThermalLoadProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableValueRatio=o,this.ThermalLoadSource=n,this.PropertySource=a,this.SourceDescription=l,this.MaximumValue=h,this.MinimumValue=c,this.ThermalLoadTimeSeriesValues=A,this.UserDefinedThermalLoadSource=u,this.UserDefinedPropertySource=p,this.ThermalLoadType=d,this.type=390701378}};e.IfcStructuralLoadLinearForce=class extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class vi extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=vi;e.IfcStructuralLoadSingleDisplacementDistortion=class extends vi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ti extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ti;e.IfcStructuralLoadSingleForceWarping=class extends Ti{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};class _i extends ei{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o,n,a),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.type=3843319758}}e.IfcStructuralProfileProperties=_i;e.IfcStructuralSteelProfileProperties=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P,D,N){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.ShearAreaZ=R,this.ShearAreaY=P,this.PlasticShapeFactorY=D,this.PlasticShapeFactorZ=N,this.type=3653947884}};e.IfcSubedge=class extends qs{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Ri extends si{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Ri;e.IfcSurfaceStyleRendering=class extends Gs{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class Pi extends Ii{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=Pi;e.IfcSweptDiskSolid=class extends Ii{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}};class Di extends Ri{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Di;e.IfcTShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.CentreOfGravityInY=p,this.type=3071757647}};class Ni extends Ks{constructor(e,t,s,i,r){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.type=3028897424}}e.IfcTerminatorSymbol=Ni;class bi extends si{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=bi;e.IfcTextLiteralWithExtent=class extends bi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTrapeziumProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};e.IfcTwoDirectionRepeatFactor=class extends hi{constructor(e,t,s){super(e,t),this.RepeatFactor=t,this.SecondRepeatFactor=s,this.type=1345879162}};class Ci extends li{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Ci;class Oi extends Ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=Oi;e.IfcUShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.CentreOfGravityInX=A,this.type=427810014}};e.IfcVector=class extends si{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends ai{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.type=336235671}};e.IfcWindowPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};e.IfcWindowStyle=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};class Si extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3288037868}}e.IfcAnnotationCurveOccurrence=Si;e.IfcAnnotationFillArea=class extends si{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAnnotationFillAreaOccurrence=class extends zs{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.FillStyleTarget=r,this.GlobalOrLocal=o,this.type=2265737646}};e.IfcAnnotationSurface=class extends si{constructor(e,t,s){super(e),this.Item=t,this.TextureCoordinates=s,this.type=1302238472}};e.IfcAxis1Placement=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Ai{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class xi extends si{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=xi;class wi extends Ri{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=wi;e.IfcBoundingBox=class extends si{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends ri{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.CentreOfGravityInX=h,this.type=2898889636}};e.IfcCartesianPoint=class extends pi{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Bi extends si{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Bi;class Fi extends Bi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Fi;e.IfcCartesianTransformationOperator2DnonUniform=class extends Fi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Mi extends Bi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Mi;e.IfcCartesianTransformationOperator3DnonUniform=class extends Mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Li extends ci{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Li;e.IfcClosedShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcCompositeCurveSegment=class extends si{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}};e.IfcCraneRailAShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.BaseWidth2=o,this.Radius=n,this.HeadWidth=a,this.HeadDepth2=l,this.HeadDepth3=h,this.WebThickness=c,this.BaseWidth4=A,this.BaseDepth1=u,this.BaseDepth2=p,this.BaseDepth3=d,this.CentreOfGravityInY=f,this.type=4133800736}};e.IfcCraneRailFShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.HeadWidth=o,this.Radius=n,this.HeadDepth2=a,this.HeadDepth3=l,this.WebThickness=h,this.BaseDepth1=c,this.BaseDepth2=A,this.CentreOfGravityInY=u,this.type=194851669}};class Ui extends si{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Ui;e.IfcCsgSolid=class extends Ii{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Hi extends si{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Hi;e.IfcCurveBoundedPlane=class extends wi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcDefinedSymbol=class extends si{constructor(e,t,s){super(e),this.Definition=t,this.Target=s,this.type=693772133}};e.IfcDimensionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=606661476}};e.IfcDimensionCurveTerminator=class extends Ni{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.Role=o,this.type=4054601972}};e.IfcDirection=class extends si{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.type=2963535650}};e.IfcDoorPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorStyle=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};class Gi extends si{constructor(e,t){super(e),this.Contents=t,this.type=3073041342}}e.IfcDraughtingCallout=Gi;e.IfcDraughtingPreDefinedColour=class extends di{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends fi{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};e.IfcEdgeLoop=class extends ai{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class ki extends Oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=ki;class Vi extends Ri{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Vi;e.IfcEllipseProfileDef=class extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};class ji extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.type=80994333}}e.IfcEnergyProperties=ji;e.IfcExtrudedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}};e.IfcFaceBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends si{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTileSymbolWithStyle=class extends si{constructor(e,t){super(e),this.Symbol=t,this.type=4203026998}};e.IfcFillAreaStyleTiles=class extends si{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFluidFlowProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PropertySource=o,this.FlowConditionTimeSeries=n,this.VelocityTimeSeries=a,this.FlowrateTimeSeries=l,this.Fluid=h,this.PressureTimeSeries=c,this.UserDefinedPropertySource=A,this.TemperatureSingleValue=u,this.WetBulbTemperatureSingleValue=p,this.WetBulbTemperatureTimeSeries=d,this.TemperatureTimeSeries=f,this.FlowrateSingleValue=E,this.FlowConditionSingleValue=m,this.VelocitySingleValue=y,this.PressureSingleValue=g,this.type=3455213021}};class Qi extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Qi;e.IfcFurnitureType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.type=1268542332}};e.IfcGeometricCurveSet=class extends ii{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};class Wi extends ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.type=1484403080}}e.IfcIShapeProfileDef=Wi;e.IfcLShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.CentreOfGravityInX=c,this.CentreOfGravityInY=A,this.type=572779678}};e.IfcLine=class extends Hi{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class zi extends Ii{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=zi;class Ki extends li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Ki;e.IfcOffsetCurve2D=class extends Hi{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Hi{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPermeableCoveringProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPlanarBox=class extends ui{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Vi{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class Yi extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2945172077}}e.IfcProcess=Yi;class Xi extends Ki{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xi;e.IfcProject=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=4194566429}};e.IfcPropertySet=class extends mi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcProxy=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends wi{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};class Zi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=Zi;class qi extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}}e.IfcRelAssignsToActor=qi;class Ji extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}}e.IfcRelAssignsToControl=Ji;e.IfcRelAssignsToGroup=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}};e.IfcRelAssignsToProcess=class extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToProjectOrder=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=3372526763}};e.IfcRelAssignsToResource=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $i extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$i;e.IfcRelAssociatesAppliedValue=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingAppliedValue=n,this.type=1327628568}};e.IfcRelAssociatesApproval=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileProperties=class extends $i{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileProperties=n,this.ProfileSectionLocation=a,this.ProfileOrientation=l,this.type=2851387026}};class er extends gi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=er;class tr extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tr;e.IfcRelConnectsPathElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};e.IfcRelConnectsStructuralElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralMember=n,this.type=3912681535}};class sr extends er{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sr;e.IfcRelConnectsWithEccentricity=class extends sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedSpace=o,this.RelatedCoverings=n,this.type=2802773753}};class ir extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=2551354335}}e.IfcRelDecomposes=ir;class rr extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=693640335}}e.IfcRelDefines=rr;class or extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}}e.IfcRelDefinesByProperties=or;e.IfcRelDefinesByType=class extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInteractionRequirements=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DailyInteraction=o,this.ImportanceRating=n,this.LocationOfInteraction=a,this.RelatedSpaceProgram=l,this.RelatingSpaceProgram=h,this.type=4189434867}};e.IfcRelNests=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelOccupiesSpaces=class extends qi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=2051452291}};e.IfcRelOverridesProperties=class extends or{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.OverridingProperties=a,this.type=202636808}};e.IfcRelProjectsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSchedulesCostItems=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=1058617721}};e.IfcRelSequence=class extends er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.type=4122056220}};e.IfcRelServicesBuildings=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};e.IfcRelSpaceBoundary=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}};e.IfcRelVoidsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};class nr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2914609552}}e.IfcResource=nr;e.IfcRevolvedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}};e.IfcRightCircularCone=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class ar extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=ar;class lr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=lr;e.IfcSphere=class extends Ui{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};class hr extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=hr;class cr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=cr;class Ar extends cr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=Ar;class ur extends hr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=ur;class pr extends Ar{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=pr;e.IfcStructuralSurfaceMemberVarying=class extends pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.SubsequentThickness=c,this.VaryingThicknessLocation=A,this.type=2218152070}};e.IfcStructuredDimensionCallout=class extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=4070609034}};e.IfcSurfaceCurveSweptAreaSolid=class extends Pi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Di{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Di{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1580310250}};class dr extends Yi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.type=3473067441}}e.IfcTask=dr;e.IfcTransportElementType=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class fr extends Ki{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=fr;e.IfcAnnotation=class extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};e.IfcAsymmetricIShapeProfileDef=class extends Wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.CentreOfGravityInY=u,this.type=3207858831}};e.IfcBlock=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends xi{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Er extends Hi{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Er;e.IfcBuilding=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class mr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=mr;e.IfcBuildingStorey=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcCircleHollowProfileDef=class extends Li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcColumnType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};class yr extends Er{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=yr;class gr extends Hi{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=gr;class Ir extends nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=2559216714}}e.IfcConstructionResource=Ir;class vr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3293443760}}e.IfcControl=vr;e.IfcCostItem=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3895139033}};e.IfcCostSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SubmittedBy=n,this.PreparedBy=a,this.SubmittedOn=l,this.Status=h,this.TargetUsers=c,this.UpdateDate=A,this.ID=u,this.PredefinedType=p,this.type=1419761937}};e.IfcCoveringType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3295246426}};e.IfcCurtainWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};class Tr extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=681481545}}e.IfcDimensionCurveDirectedCallout=Tr;class _r extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=_r;class Rr extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Rr;e.IfcElectricalBaseProperties=class extends ji{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.ElectricCurrentType=a,this.InputVoltage=l,this.InputFrequency=h,this.FullLoadCurrent=c,this.MinimumCircuitCurrent=A,this.MaximumPowerInput=u,this.RatedPowerInput=p,this.InputPhase=d,this.type=360485395}};class Pr extends Xi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Pr;e.IfcElementAssembly=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};class Dr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Dr;class Nr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Nr;e.IfcEllipse=class extends gr{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=br;e.IfcEquipmentElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1962604670}};e.IfcEquipmentStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3272907226}};e.IfcEvaporativeCoolerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcFacetedBrep=class extends zi{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}};e.IfcFacetedBrepWithVoids=class extends zi{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Cr extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=647756555}}e.IfcFastener=Cr;class Or extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2489546625}}e.IfcFastenerType=Or;class Sr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Sr;class xr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=xr;class wr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=wr;class Br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Br;class Fr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Fr;e.IfcFlowMeterType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Mr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Mr;class Lr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Lr;class Ur extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=Ur;class Hr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=Hr;class Gr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=Gr;e.IfcFurnishingElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}};e.IfcFurnitureStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=814719939}};e.IfcGasTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=200128114}};e.IfcGrid=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.type=3009204131}};class kr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=kr;e.IfcHeatExchangerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcInventory=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.InventoryType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SkillSet=c,this.type=3827777499}};e.IfcLampType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcLinearDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2506943328}};e.IfcMechanicalFastener=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2108223431}};e.IfcMemberType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcMove=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.MoveFrom=A,this.MoveTo=u,this.PunchList=p,this.type=1916936684}};e.IfcOccupant=class extends fr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3588315303}};e.IfcOrderAction=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.ActionID=A,this.type=3425660407}};e.IfcOutletType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LifeCyclePhase=n,this.type=2382730787}};e.IfcPermit=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PermitID=n,this.type=3327091369}};e.IfcPipeFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolyline=class extends Er{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class Vr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=Vr;e.IfcProcedure=class extends Yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ProcedureID=n,this.ProcedureType=a,this.UserDefinedProcedureType=l,this.type=2744685151}};e.IfcProjectOrder=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ID=n,this.PredefinedType=a,this.Status=l,this.type=2904328755}};e.IfcProjectOrderRecord=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Records=n,this.PredefinedType=a,this.type=3642467123}};e.IfcProjectionElement=class extends xr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRadiusDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=3248260540}};e.IfcRailingType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRelAggregates=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRelAssignsTasks=class extends Ji{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.TimeForTask=l,this.type=2863920197}};e.IfcSanitaryTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcScheduleTimeControl=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ActualStart=n,this.EarlyStart=a,this.LateStart=l,this.ScheduleStart=h,this.ActualFinish=c,this.EarlyFinish=A,this.LateFinish=u,this.ScheduleFinish=p,this.ScheduleDuration=d,this.ActualDuration=f,this.RemainingTime=E,this.FreeFloat=m,this.TotalFloat=y,this.IsCritical=g,this.StatusTime=I,this.StartFloat=v,this.FinishFloat=T,this.Completion=_,this.type=3517283431}};e.IfcServiceLife=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ServiceLifeType=n,this.ServiceLifeDuration=a,this.type=4105383287}};e.IfcSite=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSpace=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.InteriorOrExteriorSpace=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceProgram=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SpaceProgramIdentifier=n,this.MaxRequiredArea=a,this.MinRequiredArea=l,this.RequestedLocation=h,this.StandardRequiredArea=c,this.type=652456506}};e.IfcSpaceType=class extends lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3812236995}};e.IfcStackTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};class jr extends hr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=682877961}}e.IfcStructuralAction=jr;class Qr extends cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=Qr;e.IfcStructuralCurveConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=4243806635}};class Wr extends Ar{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=214636428}}e.IfcStructuralCurveMember=Wr;e.IfcStructuralCurveMemberVarying=class extends Wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=2445595289}};class zr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1807405624}}e.IfcStructuralLinearAction=zr;e.IfcStructuralLinearActionVarying=class extends zr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=1721250024}};e.IfcStructuralLoadGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}};class Kr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1621171031}}e.IfcStructuralPlanarAction=Kr;e.IfcStructuralPlanarActionVarying=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=3987759626}};e.IfcStructuralPointAction=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=2082059205}};e.IfcStructuralPointConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=734778138}};e.IfcStructuralPointReaction=class extends ur{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};e.IfcStructuralSurfaceConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SubContractor=c,this.JobDescription=A,this.type=148013059}};e.IfcSwitchingDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class Yr extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=Yr;e.IfcTankType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTimeSeriesSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ApplicableDates=n,this.TimeSeriesScheduleType=a,this.TimeSeries=l,this.type=1637806684}};e.IfcTransformerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OperationType=h,this.CapacityByWeight=c,this.CapacityByNumber=A,this.type=1620046519}};e.IfcTrimmedCurve=class extends Er{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVirtualElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};class Xr extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=1028945134}}e.IfcWorkControl=Xr;e.IfcWorkPlan=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=4218914973}};e.IfcWorkSchedule=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=3342526732}};e.IfcZone=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1033361043}};e.Ifc2DCompositeCurve=class extends yr{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1213861670}};e.IfcActionRequest=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.RequestID=n,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAngularDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2470393545}};e.IfcAsset=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.AssetID=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};class Zr extends Er{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Zr;e.IfcBeamType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};class qr extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1916977116}}e.IfcBezierCurve=qr;e.IfcBoilerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Jr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=Jr;class $r extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=52481810}}e.IfcBuildingElementComponent=$r;e.IfcBuildingElementPart=class extends $r{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2979338954}};e.IfcBuildingElementProxy=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.CompositionType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcCableCarrierFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcCircle=class extends gr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCoilType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=843113511}};e.IfcCompressorType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcCondition=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2188551683}};e.IfcConditionCriterion=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Criterion=n,this.CriterionDateTime=a,this.type=1163958913}};e.IfcConstructionEquipmentResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.Suppliers=c,this.UsageRatio=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=488727124}};e.IfcCooledBeamType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3495092785}};e.IfcDamperType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiameterDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=4147604152}};e.IfcDiscreteAccessory=class extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1335981549}};class eo extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2635815018}}e.IfcDiscreteAccessoryType=eo;e.IfcDistributionChamberElementType=class extends Rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class to extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=to;class so extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=so;class io extends so{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=io;e.IfcDistributionPort=class extends Vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.type=3041715199}};e.IfcDoor=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=395920057}};e.IfcDuctFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};class ro extends wr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.type=855621170}}e.IfcEdgeFeature=ro;e.IfcElectricApplianceType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricFlowStorageDeviceType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricHeaterType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1365060375}};e.IfcElectricMotorType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};e.IfcElectricalCircuit=class extends Yr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1634875225}};e.IfcElectricalElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=857184966}};e.IfcEnergyConversionDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}};e.IfcFanType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class oo extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=oo;e.IfcFlowFitting=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}};e.IfcFlowInstrumentType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMovingDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}};e.IfcFlowSegment=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}};e.IfcFlowStorageDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}};e.IfcFlowTerminal=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}};e.IfcFlowTreatmentDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}};e.IfcFooting=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcMember=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1073191201}};e.IfcPile=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPlate=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3171933400}};e.IfcRailing=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=3024970846}};e.IfcRampFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3283111854}};e.IfcRationalBezierCurve=class extends qr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.WeightsData=n,this.type=3055160366}};class no extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=no;e.IfcReinforcingMesh=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.type=2320036040}};e.IfcRoof=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=2016517767}};e.IfcRoundedEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Radius=c,this.type=1376911519}};e.IfcSensorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcSlab=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcStair=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=331165859}};e.IfcStairFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRiser=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends Yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.type=2515109513}};e.IfcTendon=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=2347447852}};e.IfcVibrationIsolatorType=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};class ao extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2391406946}}e.IfcWall=ao;e.IfcWallStandardCase=class extends ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3512223829}};e.IfcWindow=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=3304561284}};e.IfcActuatorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAlarmType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcBeam=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=753842376}};e.IfcChamferEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Width=c,this.Height=A,this.type=2454782716}};e.IfcControllerType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcDistributionChamberElement=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1052013943}};e.IfcDistributionControlElement=class extends so{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ControlElementId=h,this.type=1062813311}};e.IfcElectricDistributionPoint=class extends oo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.DistributionPointFunction=h,this.UserDefinedFunction=c,this.type=3700593921}};e.IfcReinforcingBar=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.BarRole=p,this.BarSurface=d,this.type=979691226}}}(cI||(cI={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.SNOW_S={type:3,value:"SNOW_S"},i.WIND_W={type:3,value:"WIND_W"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.FIRE={type:3,value:"FIRE"},i.IMPULSE={type:3,value:"IMPULSE"},i.IMPACT={type:3,value:"IMPACT"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.ERECTION={type:3,value:"ERECTION"},i.PROPPING={type:3,value:"PROPPING"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.CREEP={type:3,value:"CREEP"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.ICE={type:3,value:"ICE"},i.CURRENT={type:3,value:"CURRENT"},i.WAVE={type:3,value:"WAVE"},i.RAIN={type:3,value:"RAIN"},i.BRAKES={type:3,value:"BRAKES"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.HOME={type:3,value:"HOME"},n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.AMPLIFIER={type:3,value:"AMPLIFIER"},f.CAMERA={type:3,value:"CAMERA"},f.DISPLAY={type:3,value:"DISPLAY"},f.MICROPHONE={type:3,value:"MICROPHONE"},f.PLAYER={type:3,value:"PLAYER"},f.PROJECTOR={type:3,value:"PROJECTOR"},f.RECEIVER={type:3,value:"RECEIVER"},f.SPEAKER={type:3,value:"SPEAKER"},f.SWITCHER={type:3,value:"SWITCHER"},f.TELEPHONE={type:3,value:"TELEPHONE"},f.TUNER={type:3,value:"TUNER"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=f;class E{}E.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},E.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},E.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},E.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},E.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},E.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=E;class m{}m.PLANE_SURF={type:3,value:"PLANE_SURF"},m.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},m.CONICAL_SURF={type:3,value:"CONICAL_SURF"},m.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},m.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},m.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},m.RULED_SURF={type:3,value:"RULED_SURF"},m.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},m.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},m.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},m.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=m;class y{}y.BEAM={type:3,value:"BEAM"},y.JOIST={type:3,value:"JOIST"},y.HOLLOWCORE={type:3,value:"HOLLOWCORE"},y.LINTEL={type:3,value:"LINTEL"},y.SPANDREL={type:3,value:"SPANDREL"},y.T_BEAM={type:3,value:"T_BEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=y;class g{}g.GREATERTHAN={type:3,value:"GREATERTHAN"},g.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},g.LESSTHAN={type:3,value:"LESSTHAN"},g.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},g.EQUALTO={type:3,value:"EQUALTO"},g.NOTEQUALTO={type:3,value:"NOTEQUALTO"},g.INCLUDES={type:3,value:"INCLUDES"},g.NOTINCLUDES={type:3,value:"NOTINCLUDES"},g.INCLUDEDIN={type:3,value:"INCLUDEDIN"},g.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},e.IfcBenchmarkEnum=g;class I{}I.WATER={type:3,value:"WATER"},I.STEAM={type:3,value:"STEAM"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=I;class v{}v.UNION={type:3,value:"UNION"},v.INTERSECTION={type:3,value:"INTERSECTION"},v.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=v;class T{}T.INSULATION={type:3,value:"INSULATION"},T.PRECASTPANEL={type:3,value:"PRECASTPANEL"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=T;class _{}_.COMPLEX={type:3,value:"COMPLEX"},_.ELEMENT={type:3,value:"ELEMENT"},_.PARTIAL={type:3,value:"PARTIAL"},_.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},_.PROVISIONFORSPACE={type:3,value:"PROVISIONFORSPACE"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=_;class R{}R.FENESTRATION={type:3,value:"FENESTRATION"},R.FOUNDATION={type:3,value:"FOUNDATION"},R.LOADBEARING={type:3,value:"LOADBEARING"},R.OUTERSHELL={type:3,value:"OUTERSHELL"},R.SHADING={type:3,value:"SHADING"},R.TRANSPORT={type:3,value:"TRANSPORT"},R.USERDEFINED={type:3,value:"USERDEFINED"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=R;class P{}P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=P;class D{}D.BEND={type:3,value:"BEND"},D.CROSS={type:3,value:"CROSS"},D.REDUCER={type:3,value:"REDUCER"},D.TEE={type:3,value:"TEE"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=D;class N{}N.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},N.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},N.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},N.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=N;class b{}b.CONNECTOR={type:3,value:"CONNECTOR"},b.ENTRY={type:3,value:"ENTRY"},b.EXIT={type:3,value:"EXIT"},b.JUNCTION={type:3,value:"JUNCTION"},b.TRANSITION={type:3,value:"TRANSITION"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=b;class C{}C.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},C.CABLESEGMENT={type:3,value:"CABLESEGMENT"},C.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},C.CORESEGMENT={type:3,value:"CORESEGMENT"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=C;class O{}O.NOCHANGE={type:3,value:"NOCHANGE"},O.MODIFIED={type:3,value:"MODIFIED"},O.ADDED={type:3,value:"ADDED"},O.DELETED={type:3,value:"DELETED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=O;class S{}S.AIRCOOLED={type:3,value:"AIRCOOLED"},S.WATERCOOLED={type:3,value:"WATERCOOLED"},S.HEATRECOVERY={type:3,value:"HEATRECOVERY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=S;class x{}x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=x;class w{}w.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},w.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},w.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},w.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},w.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},w.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},w.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=w;class B{}B.COLUMN={type:3,value:"COLUMN"},B.PILASTER={type:3,value:"PILASTER"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=B;class F{}F.ANTENNA={type:3,value:"ANTENNA"},F.COMPUTER={type:3,value:"COMPUTER"},F.FAX={type:3,value:"FAX"},F.GATEWAY={type:3,value:"GATEWAY"},F.MODEM={type:3,value:"MODEM"},F.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},F.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},F.NETWORKHUB={type:3,value:"NETWORKHUB"},F.PRINTER={type:3,value:"PRINTER"},F.REPEATER={type:3,value:"REPEATER"},F.ROUTER={type:3,value:"ROUTER"},F.SCANNER={type:3,value:"SCANNER"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=F;class M{}M.P_COMPLEX={type:3,value:"P_COMPLEX"},M.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=M;class L{}L.DYNAMIC={type:3,value:"DYNAMIC"},L.RECIPROCATING={type:3,value:"RECIPROCATING"},L.ROTARY={type:3,value:"ROTARY"},L.SCROLL={type:3,value:"SCROLL"},L.TROCHOIDAL={type:3,value:"TROCHOIDAL"},L.SINGLESTAGE={type:3,value:"SINGLESTAGE"},L.BOOSTER={type:3,value:"BOOSTER"},L.OPENTYPE={type:3,value:"OPENTYPE"},L.HERMETIC={type:3,value:"HERMETIC"},L.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},L.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},L.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},L.ROTARYVANE={type:3,value:"ROTARYVANE"},L.SINGLESCREW={type:3,value:"SINGLESCREW"},L.TWINSCREW={type:3,value:"TWINSCREW"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=L;class U{}U.AIRCOOLED={type:3,value:"AIRCOOLED"},U.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},U.WATERCOOLED={type:3,value:"WATERCOOLED"},U.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},U.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},U.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},U.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=U;class H{}H.ATPATH={type:3,value:"ATPATH"},H.ATSTART={type:3,value:"ATSTART"},H.ATEND={type:3,value:"ATEND"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=H;class G{}G.HARD={type:3,value:"HARD"},G.SOFT={type:3,value:"SOFT"},G.ADVISORY={type:3,value:"ADVISORY"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=G;class k{}k.DEMOLISHING={type:3,value:"DEMOLISHING"},k.EARTHMOVING={type:3,value:"EARTHMOVING"},k.ERECTING={type:3,value:"ERECTING"},k.HEATING={type:3,value:"HEATING"},k.LIGHTING={type:3,value:"LIGHTING"},k.PAVING={type:3,value:"PAVING"},k.PUMPING={type:3,value:"PUMPING"},k.TRANSPORTING={type:3,value:"TRANSPORTING"},k.USERDEFINED={type:3,value:"USERDEFINED"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=k;class V{}V.AGGREGATES={type:3,value:"AGGREGATES"},V.CONCRETE={type:3,value:"CONCRETE"},V.DRYWALL={type:3,value:"DRYWALL"},V.FUEL={type:3,value:"FUEL"},V.GYPSUM={type:3,value:"GYPSUM"},V.MASONRY={type:3,value:"MASONRY"},V.METAL={type:3,value:"METAL"},V.PLASTIC={type:3,value:"PLASTIC"},V.WOOD={type:3,value:"WOOD"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},V.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=V;class j{}j.ASSEMBLY={type:3,value:"ASSEMBLY"},j.FORMWORK={type:3,value:"FORMWORK"},j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=j;class Q{}Q.FLOATING={type:3,value:"FLOATING"},Q.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},Q.PROPORTIONAL={type:3,value:"PROPORTIONAL"},Q.MULTIPOSITION={type:3,value:"MULTIPOSITION"},Q.TWOPOSITION={type:3,value:"TWOPOSITION"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=Q;class W{}W.ACTIVE={type:3,value:"ACTIVE"},W.PASSIVE={type:3,value:"PASSIVE"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=W;class z{}z.NATURALDRAFT={type:3,value:"NATURALDRAFT"},z.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},z.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=z;class K{}K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=K;class Y{}Y.BUDGET={type:3,value:"BUDGET"},Y.COSTPLAN={type:3,value:"COSTPLAN"},Y.ESTIMATE={type:3,value:"ESTIMATE"},Y.TENDER={type:3,value:"TENDER"},Y.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},Y.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},Y.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=Y;class X{}X.CEILING={type:3,value:"CEILING"},X.FLOORING={type:3,value:"FLOORING"},X.CLADDING={type:3,value:"CLADDING"},X.ROOFING={type:3,value:"ROOFING"},X.MOLDING={type:3,value:"MOLDING"},X.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},X.INSULATION={type:3,value:"INSULATION"},X.MEMBRANE={type:3,value:"MEMBRANE"},X.SLEEVING={type:3,value:"SLEEVING"},X.WRAPPING={type:3,value:"WRAPPING"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=X;class Z{}Z.OFFICE={type:3,value:"OFFICE"},Z.SITE={type:3,value:"SITE"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=Z;class q{}q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=q;class J{}J.LINEAR={type:3,value:"LINEAR"},J.LOG_LINEAR={type:3,value:"LOG_LINEAR"},J.LOG_LOG={type:3,value:"LOG_LOG"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=J;class ${}$.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},$.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},$.BLASTDAMPER={type:3,value:"BLASTDAMPER"},$.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},$.FIREDAMPER={type:3,value:"FIREDAMPER"},$.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},$.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},$.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},$.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},$.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},$.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=$;class ee{}ee.MEASURED={type:3,value:"MEASURED"},ee.PREDICTED={type:3,value:"PREDICTED"},ee.SIMULATED={type:3,value:"SIMULATED"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=ee;class te{}te.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},te.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},te.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},te.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},te.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},te.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},te.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},te.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},te.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},te.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},te.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},te.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},te.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},te.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},te.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},te.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},te.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},te.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},te.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},te.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},te.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},te.TORQUEUNIT={type:3,value:"TORQUEUNIT"},te.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},te.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},te.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},te.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},te.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},te.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},te.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},te.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},te.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},te.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},te.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},te.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},te.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},te.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},te.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},te.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},te.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},te.PHUNIT={type:3,value:"PHUNIT"},te.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},te.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},te.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},te.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},te.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},te.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},te.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},te.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},te.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},te.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},te.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},te.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},te.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=te;class se{}se.POSITIVE={type:3,value:"POSITIVE"},se.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=se;class ie{}ie.ANCHORPLATE={type:3,value:"ANCHORPLATE"},ie.BRACKET={type:3,value:"BRACKET"},ie.SHOE={type:3,value:"SHOE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=ie;class re{}re.FORMEDDUCT={type:3,value:"FORMEDDUCT"},re.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},re.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},re.MANHOLE={type:3,value:"MANHOLE"},re.METERCHAMBER={type:3,value:"METERCHAMBER"},re.SUMP={type:3,value:"SUMP"},re.TRENCH={type:3,value:"TRENCH"},re.VALVECHAMBER={type:3,value:"VALVECHAMBER"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=re;class oe{}oe.CABLE={type:3,value:"CABLE"},oe.CABLECARRIER={type:3,value:"CABLECARRIER"},oe.DUCT={type:3,value:"DUCT"},oe.PIPE={type:3,value:"PIPE"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=oe;class ne{}ne.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},ne.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},ne.CHEMICAL={type:3,value:"CHEMICAL"},ne.CHILLEDWATER={type:3,value:"CHILLEDWATER"},ne.COMMUNICATION={type:3,value:"COMMUNICATION"},ne.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},ne.CONDENSERWATER={type:3,value:"CONDENSERWATER"},ne.CONTROL={type:3,value:"CONTROL"},ne.CONVEYING={type:3,value:"CONVEYING"},ne.DATA={type:3,value:"DATA"},ne.DISPOSAL={type:3,value:"DISPOSAL"},ne.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},ne.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},ne.DRAINAGE={type:3,value:"DRAINAGE"},ne.EARTHING={type:3,value:"EARTHING"},ne.ELECTRICAL={type:3,value:"ELECTRICAL"},ne.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},ne.EXHAUST={type:3,value:"EXHAUST"},ne.FIREPROTECTION={type:3,value:"FIREPROTECTION"},ne.FUEL={type:3,value:"FUEL"},ne.GAS={type:3,value:"GAS"},ne.HAZARDOUS={type:3,value:"HAZARDOUS"},ne.HEATING={type:3,value:"HEATING"},ne.LIGHTING={type:3,value:"LIGHTING"},ne.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},ne.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},ne.OIL={type:3,value:"OIL"},ne.OPERATIONAL={type:3,value:"OPERATIONAL"},ne.POWERGENERATION={type:3,value:"POWERGENERATION"},ne.RAINWATER={type:3,value:"RAINWATER"},ne.REFRIGERATION={type:3,value:"REFRIGERATION"},ne.SECURITY={type:3,value:"SECURITY"},ne.SEWAGE={type:3,value:"SEWAGE"},ne.SIGNAL={type:3,value:"SIGNAL"},ne.STORMWATER={type:3,value:"STORMWATER"},ne.TELEPHONE={type:3,value:"TELEPHONE"},ne.TV={type:3,value:"TV"},ne.VACUUM={type:3,value:"VACUUM"},ne.VENT={type:3,value:"VENT"},ne.VENTILATION={type:3,value:"VENTILATION"},ne.WASTEWATER={type:3,value:"WASTEWATER"},ne.WATERSUPPLY={type:3,value:"WATERSUPPLY"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=ne;class ae{}ae.PUBLIC={type:3,value:"PUBLIC"},ae.RESTRICTED={type:3,value:"RESTRICTED"},ae.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ae.PERSONAL={type:3,value:"PERSONAL"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ae;class le{}le.DRAFT={type:3,value:"DRAFT"},le.FINALDRAFT={type:3,value:"FINALDRAFT"},le.FINAL={type:3,value:"FINAL"},le.REVISION={type:3,value:"REVISION"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=le;class he{}he.SWINGING={type:3,value:"SWINGING"},he.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},he.SLIDING={type:3,value:"SLIDING"},he.FOLDING={type:3,value:"FOLDING"},he.REVOLVING={type:3,value:"REVOLVING"},he.ROLLINGUP={type:3,value:"ROLLINGUP"},he.FIXEDPANEL={type:3,value:"FIXEDPANEL"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=he;class ce{}ce.LEFT={type:3,value:"LEFT"},ce.MIDDLE={type:3,value:"MIDDLE"},ce.RIGHT={type:3,value:"RIGHT"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=ce;class Ae{}Ae.ALUMINIUM={type:3,value:"ALUMINIUM"},Ae.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ae.STEEL={type:3,value:"STEEL"},Ae.WOOD={type:3,value:"WOOD"},Ae.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ae.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Ae.PLASTIC={type:3,value:"PLASTIC"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Ae;class ue{}ue.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},ue.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},ue.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},ue.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},ue.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},ue.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},ue.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},ue.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},ue.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},ue.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},ue.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},ue.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},ue.REVOLVING={type:3,value:"REVOLVING"},ue.ROLLINGUP={type:3,value:"ROLLINGUP"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=ue;class pe{}pe.DOOR={type:3,value:"DOOR"},pe.GATE={type:3,value:"GATE"},pe.TRAPDOOR={type:3,value:"TRAPDOOR"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=pe;class de{}de.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},de.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},de.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},de.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},de.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},de.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},de.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},de.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},de.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},de.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},de.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},de.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},de.REVOLVING={type:3,value:"REVOLVING"},de.ROLLINGUP={type:3,value:"ROLLINGUP"},de.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},de.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=de;class fe{}fe.BEND={type:3,value:"BEND"},fe.CONNECTOR={type:3,value:"CONNECTOR"},fe.ENTRY={type:3,value:"ENTRY"},fe.EXIT={type:3,value:"EXIT"},fe.JUNCTION={type:3,value:"JUNCTION"},fe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},fe.TRANSITION={type:3,value:"TRANSITION"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=fe;class Ee{}Ee.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ee.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Ee;class me{}me.FLATOVAL={type:3,value:"FLATOVAL"},me.RECTANGULAR={type:3,value:"RECTANGULAR"},me.ROUND={type:3,value:"ROUND"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=me;class ye{}ye.DISHWASHER={type:3,value:"DISHWASHER"},ye.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ye.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},ye.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ye.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},ye.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},ye.FREEZER={type:3,value:"FREEZER"},ye.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ye.HANDDRYER={type:3,value:"HANDDRYER"},ye.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},ye.MICROWAVE={type:3,value:"MICROWAVE"},ye.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ye.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ye.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ye.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ye.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ye;class ge{}ge.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},ge.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},ge.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},ge.SWITCHBOARD={type:3,value:"SWITCHBOARD"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=ge;class Ie{}Ie.BATTERY={type:3,value:"BATTERY"},Ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Ie.UPS={type:3,value:"UPS"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Ie;class ve{}ve.CHP={type:3,value:"CHP"},ve.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},ve.STANDALONE={type:3,value:"STANDALONE"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=ve;class Te{}Te.DC={type:3,value:"DC"},Te.INDUCTION={type:3,value:"INDUCTION"},Te.POLYPHASE={type:3,value:"POLYPHASE"},Te.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},Te.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=Te;class _e{}_e.TIMECLOCK={type:3,value:"TIMECLOCK"},_e.TIMEDELAY={type:3,value:"TIMEDELAY"},_e.RELAY={type:3,value:"RELAY"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=_e;class Re{}Re.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},Re.ARCH={type:3,value:"ARCH"},Re.BEAM_GRID={type:3,value:"BEAM_GRID"},Re.BRACED_FRAME={type:3,value:"BRACED_FRAME"},Re.GIRDER={type:3,value:"GIRDER"},Re.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},Re.RIGID_FRAME={type:3,value:"RIGID_FRAME"},Re.SLAB_FIELD={type:3,value:"SLAB_FIELD"},Re.TRUSS={type:3,value:"TRUSS"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=Re;class Pe{}Pe.COMPLEX={type:3,value:"COMPLEX"},Pe.ELEMENT={type:3,value:"ELEMENT"},Pe.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Pe;class De{}De.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},De.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=De;class Ne{}Ne.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Ne.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Ne.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Ne.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Ne.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Ne.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Ne.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Ne;class be{}be.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},be.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},be.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},be.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},be.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},be.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=be;class Ce{}Ce.EVENTRULE={type:3,value:"EVENTRULE"},Ce.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},Ce.EVENTTIME={type:3,value:"EVENTTIME"},Ce.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=Ce;class Oe{}Oe.STARTEVENT={type:3,value:"STARTEVENT"},Oe.ENDEVENT={type:3,value:"ENDEVENT"},Oe.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Oe;class Se{}Se.EXTERNAL={type:3,value:"EXTERNAL"},Se.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Se.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Se.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Se;class xe{}xe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},xe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},xe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},xe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},xe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},xe.VANEAXIAL={type:3,value:"VANEAXIAL"},xe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=xe;class we{}we.GLUE={type:3,value:"GLUE"},we.MORTAR={type:3,value:"MORTAR"},we.WELD={type:3,value:"WELD"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=we;class Be{}Be.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},Be.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},Be.ODORFILTER={type:3,value:"ODORFILTER"},Be.OILFILTER={type:3,value:"OILFILTER"},Be.STRAINER={type:3,value:"STRAINER"},Be.WATERFILTER={type:3,value:"WATERFILTER"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=Be;class Fe{}Fe.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Fe.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Fe.HOSEREEL={type:3,value:"HOSEREEL"},Fe.SPRINKLER={type:3,value:"SPRINKLER"},Fe.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Fe;class Me{}Me.SOURCE={type:3,value:"SOURCE"},Me.SINK={type:3,value:"SINK"},Me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=Me;class Le{}Le.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},Le.THERMOMETER={type:3,value:"THERMOMETER"},Le.AMMETER={type:3,value:"AMMETER"},Le.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},Le.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},Le.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},Le.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},Le.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=Le;class Ue{}Ue.ENERGYMETER={type:3,value:"ENERGYMETER"},Ue.GASMETER={type:3,value:"GASMETER"},Ue.OILMETER={type:3,value:"OILMETER"},Ue.WATERMETER={type:3,value:"WATERMETER"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=Ue;class He{}He.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},He.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},He.PAD_FOOTING={type:3,value:"PAD_FOOTING"},He.PILE_CAP={type:3,value:"PILE_CAP"},He.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=He;class Ge{}Ge.CHAIR={type:3,value:"CHAIR"},Ge.TABLE={type:3,value:"TABLE"},Ge.DESK={type:3,value:"DESK"},Ge.BED={type:3,value:"BED"},Ge.FILECABINET={type:3,value:"FILECABINET"},Ge.SHELF={type:3,value:"SHELF"},Ge.SOFA={type:3,value:"SOFA"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=Ge;class ke{}ke.TERRAIN={type:3,value:"TERRAIN"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=ke;class Ve{}Ve.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Ve.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Ve.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Ve.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Ve.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Ve.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Ve.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Ve;class je{}je.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},je.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=je;class Qe{}Qe.RECTANGULAR={type:3,value:"RECTANGULAR"},Qe.RADIAL={type:3,value:"RADIAL"},Qe.TRIANGULAR={type:3,value:"TRIANGULAR"},Qe.IRREGULAR={type:3,value:"IRREGULAR"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=Qe;class We{}We.PLATE={type:3,value:"PLATE"},We.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=We;class ze{}ze.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ze.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ze.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ze.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ze.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ze.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ze.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ze.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ze.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ze.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ze.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ze.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ze.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ze;class Ke{}Ke.CYCLONIC={type:3,value:"CYCLONIC"},Ke.GREASE={type:3,value:"GREASE"},Ke.OIL={type:3,value:"OIL"},Ke.PETROL={type:3,value:"PETROL"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=Ke;class Ye{}Ye.INTERNAL={type:3,value:"INTERNAL"},Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=Ye;class Xe{}Xe.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Xe.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Xe.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Xe;class Ze{}Ze.DATA={type:3,value:"DATA"},Ze.POWER={type:3,value:"POWER"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ze;class qe{}qe.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},qe.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},qe.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},qe.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=qe;class Je{}Je.ADMINISTRATION={type:3,value:"ADMINISTRATION"},Je.CARPENTRY={type:3,value:"CARPENTRY"},Je.CLEANING={type:3,value:"CLEANING"},Je.CONCRETE={type:3,value:"CONCRETE"},Je.DRYWALL={type:3,value:"DRYWALL"},Je.ELECTRIC={type:3,value:"ELECTRIC"},Je.FINISHING={type:3,value:"FINISHING"},Je.FLOORING={type:3,value:"FLOORING"},Je.GENERAL={type:3,value:"GENERAL"},Je.HVAC={type:3,value:"HVAC"},Je.LANDSCAPING={type:3,value:"LANDSCAPING"},Je.MASONRY={type:3,value:"MASONRY"},Je.PAINTING={type:3,value:"PAINTING"},Je.PAVING={type:3,value:"PAVING"},Je.PLUMBING={type:3,value:"PLUMBING"},Je.ROOFING={type:3,value:"ROOFING"},Je.SITEGRADING={type:3,value:"SITEGRADING"},Je.STEELWORK={type:3,value:"STEELWORK"},Je.SURVEYING={type:3,value:"SURVEYING"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=Je;class $e{}$e.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},$e.FLUORESCENT={type:3,value:"FLUORESCENT"},$e.HALOGEN={type:3,value:"HALOGEN"},$e.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},$e.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},$e.LED={type:3,value:"LED"},$e.METALHALIDE={type:3,value:"METALHALIDE"},$e.OLED={type:3,value:"OLED"},$e.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=$e;class et{}et.AXIS1={type:3,value:"AXIS1"},et.AXIS2={type:3,value:"AXIS2"},et.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=et;class tt{}tt.TYPE_A={type:3,value:"TYPE_A"},tt.TYPE_B={type:3,value:"TYPE_B"},tt.TYPE_C={type:3,value:"TYPE_C"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=tt;class st{}st.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},st.FLUORESCENT={type:3,value:"FLUORESCENT"},st.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},st.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},st.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},st.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},st.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},st.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},st.METALHALIDE={type:3,value:"METALHALIDE"},st.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=st;class it{}it.POINTSOURCE={type:3,value:"POINTSOURCE"},it.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},it.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=it;class rt{}rt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},rt.LOAD_CASE={type:3,value:"LOAD_CASE"},rt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=rt;class ot{}ot.LOGICALAND={type:3,value:"LOGICALAND"},ot.LOGICALOR={type:3,value:"LOGICALOR"},ot.LOGICALXOR={type:3,value:"LOGICALXOR"},ot.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},ot.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},e.IfcLogicalOperatorEnum=ot;class nt{}nt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},nt.BOLT={type:3,value:"BOLT"},nt.DOWEL={type:3,value:"DOWEL"},nt.NAIL={type:3,value:"NAIL"},nt.NAILPLATE={type:3,value:"NAILPLATE"},nt.RIVET={type:3,value:"RIVET"},nt.SCREW={type:3,value:"SCREW"},nt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},nt.STAPLE={type:3,value:"STAPLE"},nt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=nt;class at{}at.AIRSTATION={type:3,value:"AIRSTATION"},at.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},at.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},at.OXYGENPLANT={type:3,value:"OXYGENPLANT"},at.VACUUMSTATION={type:3,value:"VACUUMSTATION"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=at;class lt{}lt.BRACE={type:3,value:"BRACE"},lt.CHORD={type:3,value:"CHORD"},lt.COLLAR={type:3,value:"COLLAR"},lt.MEMBER={type:3,value:"MEMBER"},lt.MULLION={type:3,value:"MULLION"},lt.PLATE={type:3,value:"PLATE"},lt.POST={type:3,value:"POST"},lt.PURLIN={type:3,value:"PURLIN"},lt.RAFTER={type:3,value:"RAFTER"},lt.STRINGER={type:3,value:"STRINGER"},lt.STRUT={type:3,value:"STRUT"},lt.STUD={type:3,value:"STUD"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=lt;class ht{}ht.BELTDRIVE={type:3,value:"BELTDRIVE"},ht.COUPLING={type:3,value:"COUPLING"},ht.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},ht.USERDEFINED={type:3,value:"USERDEFINED"},ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=ht;class ct{}ct.NULL={type:3,value:"NULL"},e.IfcNullStyle=ct;class At{}At.PRODUCT={type:3,value:"PRODUCT"},At.PROCESS={type:3,value:"PROCESS"},At.CONTROL={type:3,value:"CONTROL"},At.RESOURCE={type:3,value:"RESOURCE"},At.ACTOR={type:3,value:"ACTOR"},At.GROUP={type:3,value:"GROUP"},At.PROJECT={type:3,value:"PROJECT"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=At;class ut{}ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},ut.CODEWAIVER={type:3,value:"CODEWAIVER"},ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},ut.EXTERNAL={type:3,value:"EXTERNAL"},ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},ut.MODELVIEW={type:3,value:"MODELVIEW"},ut.PARAMETER={type:3,value:"PARAMETER"},ut.REQUIREMENT={type:3,value:"REQUIREMENT"},ut.SPECIFICATION={type:3,value:"SPECIFICATION"},ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=ut;class pt{}pt.ASSIGNEE={type:3,value:"ASSIGNEE"},pt.ASSIGNOR={type:3,value:"ASSIGNOR"},pt.LESSEE={type:3,value:"LESSEE"},pt.LESSOR={type:3,value:"LESSOR"},pt.LETTINGAGENT={type:3,value:"LETTINGAGENT"},pt.OWNER={type:3,value:"OWNER"},pt.TENANT={type:3,value:"TENANT"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=pt;class dt{}dt.OPENING={type:3,value:"OPENING"},dt.RECESS={type:3,value:"RECESS"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=dt;class ft{}ft.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},ft.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},ft.POWEROUTLET={type:3,value:"POWEROUTLET"},ft.DATAOUTLET={type:3,value:"DATAOUTLET"},ft.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},ft.USERDEFINED={type:3,value:"USERDEFINED"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=ft;class Et{}Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=Et;class mt{}mt.GRILL={type:3,value:"GRILL"},mt.LOUVER={type:3,value:"LOUVER"},mt.SCREEN={type:3,value:"SCREEN"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=mt;class yt{}yt.ACCESS={type:3,value:"ACCESS"},yt.BUILDING={type:3,value:"BUILDING"},yt.WORK={type:3,value:"WORK"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=yt;class gt{}gt.PHYSICAL={type:3,value:"PHYSICAL"},gt.VIRTUAL={type:3,value:"VIRTUAL"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=gt;class It{}It.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},It.COMPOSITE={type:3,value:"COMPOSITE"},It.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},It.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=It;class vt{}vt.BORED={type:3,value:"BORED"},vt.DRIVEN={type:3,value:"DRIVEN"},vt.JETGROUTING={type:3,value:"JETGROUTING"},vt.COHESION={type:3,value:"COHESION"},vt.FRICTION={type:3,value:"FRICTION"},vt.SUPPORT={type:3,value:"SUPPORT"},vt.USERDEFINED={type:3,value:"USERDEFINED"},vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=vt;class Tt{}Tt.BEND={type:3,value:"BEND"},Tt.CONNECTOR={type:3,value:"CONNECTOR"},Tt.ENTRY={type:3,value:"ENTRY"},Tt.EXIT={type:3,value:"EXIT"},Tt.JUNCTION={type:3,value:"JUNCTION"},Tt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Tt.TRANSITION={type:3,value:"TRANSITION"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Tt;class _t{}_t.CULVERT={type:3,value:"CULVERT"},_t.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},_t.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},_t.GUTTER={type:3,value:"GUTTER"},_t.SPOOL={type:3,value:"SPOOL"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=_t;class Rt{}Rt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Rt.SHEET={type:3,value:"SHEET"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Rt;class Pt{}Pt.CURVE3D={type:3,value:"CURVE3D"},Pt.PCURVE_S1={type:3,value:"PCURVE_S1"},Pt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Pt;class Dt{}Dt.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Dt.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Dt.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Dt.CALIBRATION={type:3,value:"CALIBRATION"},Dt.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Dt.SHUTDOWN={type:3,value:"SHUTDOWN"},Dt.STARTUP={type:3,value:"STARTUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Dt;class Nt{}Nt.CURVE={type:3,value:"CURVE"},Nt.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=Nt;class bt{}bt.CHANGEORDER={type:3,value:"CHANGEORDER"},bt.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},bt.MOVEORDER={type:3,value:"MOVEORDER"},bt.PURCHASEORDER={type:3,value:"PURCHASEORDER"},bt.WORKORDER={type:3,value:"WORKORDER"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=bt;class Ct{}Ct.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},Ct.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=Ct;class Ot{}Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=Ot;class St{}St.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},St.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},St.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},St.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},St.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},St.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},St.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=St;class xt{}xt.ELECTRONIC={type:3,value:"ELECTRONIC"},xt.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},xt.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},xt.THERMAL={type:3,value:"THERMAL"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=xt;class wt{}wt.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},wt.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},wt.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},wt.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},wt.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},wt.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},wt.VARISTOR={type:3,value:"VARISTOR"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=wt;class Bt{}Bt.CIRCULATOR={type:3,value:"CIRCULATOR"},Bt.ENDSUCTION={type:3,value:"ENDSUCTION"},Bt.SPLITCASE={type:3,value:"SPLITCASE"},Bt.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},Bt.SUMPPUMP={type:3,value:"SUMPPUMP"},Bt.VERTICALINLINE={type:3,value:"VERTICALINLINE"},Bt.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=Bt;class Ft{}Ft.HANDRAIL={type:3,value:"HANDRAIL"},Ft.GUARDRAIL={type:3,value:"GUARDRAIL"},Ft.BALUSTRADE={type:3,value:"BALUSTRADE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=Ft;class Mt{}Mt.STRAIGHT={type:3,value:"STRAIGHT"},Mt.SPIRAL={type:3,value:"SPIRAL"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=Mt;class Lt{}Lt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},Lt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},Lt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},Lt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},Lt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},Lt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},Lt.USERDEFINED={type:3,value:"USERDEFINED"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=Lt;class Ut{}Ut.DAILY={type:3,value:"DAILY"},Ut.WEEKLY={type:3,value:"WEEKLY"},Ut.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},Ut.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},Ut.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},Ut.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},Ut.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},Ut.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=Ut;class Ht{}Ht.BLINN={type:3,value:"BLINN"},Ht.FLAT={type:3,value:"FLAT"},Ht.GLASS={type:3,value:"GLASS"},Ht.MATT={type:3,value:"MATT"},Ht.METAL={type:3,value:"METAL"},Ht.MIRROR={type:3,value:"MIRROR"},Ht.PHONG={type:3,value:"PHONG"},Ht.PLASTIC={type:3,value:"PLASTIC"},Ht.STRAUSS={type:3,value:"STRAUSS"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Ht;class Gt{}Gt.MAIN={type:3,value:"MAIN"},Gt.SHEAR={type:3,value:"SHEAR"},Gt.LIGATURE={type:3,value:"LIGATURE"},Gt.STUD={type:3,value:"STUD"},Gt.PUNCHING={type:3,value:"PUNCHING"},Gt.EDGE={type:3,value:"EDGE"},Gt.RING={type:3,value:"RING"},Gt.ANCHORING={type:3,value:"ANCHORING"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=Gt;class kt{}kt.PLAIN={type:3,value:"PLAIN"},kt.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=kt;class Vt{}Vt.ANCHORING={type:3,value:"ANCHORING"},Vt.EDGE={type:3,value:"EDGE"},Vt.LIGATURE={type:3,value:"LIGATURE"},Vt.MAIN={type:3,value:"MAIN"},Vt.PUNCHING={type:3,value:"PUNCHING"},Vt.RING={type:3,value:"RING"},Vt.SHEAR={type:3,value:"SHEAR"},Vt.STUD={type:3,value:"STUD"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=jt;class Qt{}Qt.SUPPLIER={type:3,value:"SUPPLIER"},Qt.MANUFACTURER={type:3,value:"MANUFACTURER"},Qt.CONTRACTOR={type:3,value:"CONTRACTOR"},Qt.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Qt.ARCHITECT={type:3,value:"ARCHITECT"},Qt.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Qt.COSTENGINEER={type:3,value:"COSTENGINEER"},Qt.CLIENT={type:3,value:"CLIENT"},Qt.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Qt.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Qt.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Qt.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Qt.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Qt.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Qt.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Qt.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Qt.ENGINEER={type:3,value:"ENGINEER"},Qt.OWNER={type:3,value:"OWNER"},Qt.CONSULTANT={type:3,value:"CONSULTANT"},Qt.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Qt.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Qt.RESELLER={type:3,value:"RESELLER"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Qt;class Wt{}Wt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Wt.SHED_ROOF={type:3,value:"SHED_ROOF"},Wt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Wt.HIP_ROOF={type:3,value:"HIP_ROOF"},Wt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Wt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Wt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Wt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Wt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Wt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Wt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Wt.DOME_ROOF={type:3,value:"DOME_ROOF"},Wt.FREEFORM={type:3,value:"FREEFORM"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Wt;class zt{}zt.EXA={type:3,value:"EXA"},zt.PETA={type:3,value:"PETA"},zt.TERA={type:3,value:"TERA"},zt.GIGA={type:3,value:"GIGA"},zt.MEGA={type:3,value:"MEGA"},zt.KILO={type:3,value:"KILO"},zt.HECTO={type:3,value:"HECTO"},zt.DECA={type:3,value:"DECA"},zt.DECI={type:3,value:"DECI"},zt.CENTI={type:3,value:"CENTI"},zt.MILLI={type:3,value:"MILLI"},zt.MICRO={type:3,value:"MICRO"},zt.NANO={type:3,value:"NANO"},zt.PICO={type:3,value:"PICO"},zt.FEMTO={type:3,value:"FEMTO"},zt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=zt;class Kt{}Kt.AMPERE={type:3,value:"AMPERE"},Kt.BECQUEREL={type:3,value:"BECQUEREL"},Kt.CANDELA={type:3,value:"CANDELA"},Kt.COULOMB={type:3,value:"COULOMB"},Kt.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Kt.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Kt.FARAD={type:3,value:"FARAD"},Kt.GRAM={type:3,value:"GRAM"},Kt.GRAY={type:3,value:"GRAY"},Kt.HENRY={type:3,value:"HENRY"},Kt.HERTZ={type:3,value:"HERTZ"},Kt.JOULE={type:3,value:"JOULE"},Kt.KELVIN={type:3,value:"KELVIN"},Kt.LUMEN={type:3,value:"LUMEN"},Kt.LUX={type:3,value:"LUX"},Kt.METRE={type:3,value:"METRE"},Kt.MOLE={type:3,value:"MOLE"},Kt.NEWTON={type:3,value:"NEWTON"},Kt.OHM={type:3,value:"OHM"},Kt.PASCAL={type:3,value:"PASCAL"},Kt.RADIAN={type:3,value:"RADIAN"},Kt.SECOND={type:3,value:"SECOND"},Kt.SIEMENS={type:3,value:"SIEMENS"},Kt.SIEVERT={type:3,value:"SIEVERT"},Kt.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Kt.STERADIAN={type:3,value:"STERADIAN"},Kt.TESLA={type:3,value:"TESLA"},Kt.VOLT={type:3,value:"VOLT"},Kt.WATT={type:3,value:"WATT"},Kt.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Kt;class Yt{}Yt.BATH={type:3,value:"BATH"},Yt.BIDET={type:3,value:"BIDET"},Yt.CISTERN={type:3,value:"CISTERN"},Yt.SHOWER={type:3,value:"SHOWER"},Yt.SINK={type:3,value:"SINK"},Yt.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Yt.TOILETPAN={type:3,value:"TOILETPAN"},Yt.URINAL={type:3,value:"URINAL"},Yt.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Yt.WCSEAT={type:3,value:"WCSEAT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Yt;class Xt{}Xt.UNIFORM={type:3,value:"UNIFORM"},Xt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=Xt;class Zt{}Zt.COSENSOR={type:3,value:"COSENSOR"},Zt.CO2SENSOR={type:3,value:"CO2SENSOR"},Zt.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Zt.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Zt.FIRESENSOR={type:3,value:"FIRESENSOR"},Zt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Zt.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Zt.GASSENSOR={type:3,value:"GASSENSOR"},Zt.HEATSENSOR={type:3,value:"HEATSENSOR"},Zt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Zt.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Zt.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Zt.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Zt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Zt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Zt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Zt.PHSENSOR={type:3,value:"PHSENSOR"},Zt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Zt.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Zt.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Zt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Zt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Zt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Zt.WINDSENSOR={type:3,value:"WINDSENSOR"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Zt;class qt{}qt.START_START={type:3,value:"START_START"},qt.START_FINISH={type:3,value:"START_FINISH"},qt.FINISH_START={type:3,value:"FINISH_START"},qt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=qt;class Jt{}Jt.JALOUSIE={type:3,value:"JALOUSIE"},Jt.SHUTTER={type:3,value:"SHUTTER"},Jt.AWNING={type:3,value:"AWNING"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=Jt;class $t{}$t.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},$t.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},$t.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},$t.P_LISTVALUE={type:3,value:"P_LISTVALUE"},$t.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},$t.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},$t.Q_LENGTH={type:3,value:"Q_LENGTH"},$t.Q_AREA={type:3,value:"Q_AREA"},$t.Q_VOLUME={type:3,value:"Q_VOLUME"},$t.Q_COUNT={type:3,value:"Q_COUNT"},$t.Q_WEIGHT={type:3,value:"Q_WEIGHT"},$t.Q_TIME={type:3,value:"Q_TIME"},e.IfcSimplePropertyTemplateTypeEnum=$t;class es{}es.FLOOR={type:3,value:"FLOOR"},es.ROOF={type:3,value:"ROOF"},es.LANDING={type:3,value:"LANDING"},es.BASESLAB={type:3,value:"BASESLAB"},es.USERDEFINED={type:3,value:"USERDEFINED"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=es;class ts{}ts.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},ts.SOLARPANEL={type:3,value:"SOLARPANEL"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=ts;class ss{}ss.CONVECTOR={type:3,value:"CONVECTOR"},ss.RADIATOR={type:3,value:"RADIATOR"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=ss;class is{}is.SPACE={type:3,value:"SPACE"},is.PARKING={type:3,value:"PARKING"},is.GFA={type:3,value:"GFA"},is.INTERNAL={type:3,value:"INTERNAL"},is.EXTERNAL={type:3,value:"EXTERNAL"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=is;class rs{}rs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},rs.FIRESAFETY={type:3,value:"FIRESAFETY"},rs.LIGHTING={type:3,value:"LIGHTING"},rs.OCCUPANCY={type:3,value:"OCCUPANCY"},rs.SECURITY={type:3,value:"SECURITY"},rs.THERMAL={type:3,value:"THERMAL"},rs.TRANSPORT={type:3,value:"TRANSPORT"},rs.VENTILATION={type:3,value:"VENTILATION"},rs.USERDEFINED={type:3,value:"USERDEFINED"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=rs;class os{}os.BIRDCAGE={type:3,value:"BIRDCAGE"},os.COWL={type:3,value:"COWL"},os.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=os;class ns{}ns.STRAIGHT={type:3,value:"STRAIGHT"},ns.WINDER={type:3,value:"WINDER"},ns.SPIRAL={type:3,value:"SPIRAL"},ns.CURVED={type:3,value:"CURVED"},ns.FREEFORM={type:3,value:"FREEFORM"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=ns;class as{}as.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},as.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},as.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},as.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},as.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},as.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},as.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},as.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},as.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},as.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},as.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},as.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},as.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},as.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=as;class ls{}ls.READWRITE={type:3,value:"READWRITE"},ls.READONLY={type:3,value:"READONLY"},ls.LOCKED={type:3,value:"LOCKED"},ls.READWRITELOCKED={type:3,value:"READWRITELOCKED"},ls.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=ls;class hs{}hs.CONST={type:3,value:"CONST"},hs.LINEAR={type:3,value:"LINEAR"},hs.POLYGONAL={type:3,value:"POLYGONAL"},hs.EQUIDISTANT={type:3,value:"EQUIDISTANT"},hs.SINUS={type:3,value:"SINUS"},hs.PARABOLA={type:3,value:"PARABOLA"},hs.DISCRETE={type:3,value:"DISCRETE"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=hs;class cs{}cs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},cs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},cs.CABLE={type:3,value:"CABLE"},cs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},cs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=cs;class As{}As.CONST={type:3,value:"CONST"},As.BILINEAR={type:3,value:"BILINEAR"},As.DISCRETE={type:3,value:"DISCRETE"},As.ISOCONTOUR={type:3,value:"ISOCONTOUR"},As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=As;class us{}us.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},us.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},us.SHELL={type:3,value:"SHELL"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=us;class ps{}ps.PURCHASE={type:3,value:"PURCHASE"},ps.WORK={type:3,value:"WORK"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=ps;class ds{}ds.MARK={type:3,value:"MARK"},ds.TAG={type:3,value:"TAG"},ds.TREATMENT={type:3,value:"TREATMENT"},ds.USERDEFINED={type:3,value:"USERDEFINED"},ds.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=ds;class fs{}fs.POSITIVE={type:3,value:"POSITIVE"},fs.NEGATIVE={type:3,value:"NEGATIVE"},fs.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=fs;class Es{}Es.CONTACTOR={type:3,value:"CONTACTOR"},Es.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Es.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Es.KEYPAD={type:3,value:"KEYPAD"},Es.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Es.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Es.STARTER={type:3,value:"STARTER"},Es.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Es.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Es.USERDEFINED={type:3,value:"USERDEFINED"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Es;class ms{}ms.PANEL={type:3,value:"PANEL"},ms.WORKSURFACE={type:3,value:"WORKSURFACE"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=ms;class ys{}ys.BASIN={type:3,value:"BASIN"},ys.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ys.EXPANSION={type:3,value:"EXPANSION"},ys.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ys.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ys.STORAGE={type:3,value:"STORAGE"},ys.VESSEL={type:3,value:"VESSEL"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ys;class gs{}gs.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},gs.WORKTIME={type:3,value:"WORKTIME"},gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=gs;class Is{}Is.ATTENDANCE={type:3,value:"ATTENDANCE"},Is.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Is.DEMOLITION={type:3,value:"DEMOLITION"},Is.DISMANTLE={type:3,value:"DISMANTLE"},Is.DISPOSAL={type:3,value:"DISPOSAL"},Is.INSTALLATION={type:3,value:"INSTALLATION"},Is.LOGISTIC={type:3,value:"LOGISTIC"},Is.MAINTENANCE={type:3,value:"MAINTENANCE"},Is.MOVE={type:3,value:"MOVE"},Is.OPERATION={type:3,value:"OPERATION"},Is.REMOVAL={type:3,value:"REMOVAL"},Is.RENOVATION={type:3,value:"RENOVATION"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=Is;class vs{}vs.COUPLER={type:3,value:"COUPLER"},vs.FIXED_END={type:3,value:"FIXED_END"},vs.TENSIONING_END={type:3,value:"TENSIONING_END"},vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=vs;class Ts{}Ts.BAR={type:3,value:"BAR"},Ts.COATED={type:3,value:"COATED"},Ts.STRAND={type:3,value:"STRAND"},Ts.WIRE={type:3,value:"WIRE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Ts;class _s{}_s.LEFT={type:3,value:"LEFT"},_s.RIGHT={type:3,value:"RIGHT"},_s.UP={type:3,value:"UP"},_s.DOWN={type:3,value:"DOWN"},e.IfcTextPath=_s;class Rs{}Rs.CONTINUOUS={type:3,value:"CONTINUOUS"},Rs.DISCRETE={type:3,value:"DISCRETE"},Rs.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Rs.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Rs.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Rs.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Rs;class Ps{}Ps.CURRENT={type:3,value:"CURRENT"},Ps.FREQUENCY={type:3,value:"FREQUENCY"},Ps.INVERTER={type:3,value:"INVERTER"},Ps.RECTIFIER={type:3,value:"RECTIFIER"},Ps.VOLTAGE={type:3,value:"VOLTAGE"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Ps;class Ds{}Ds.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},Ds.CONTINUOUS={type:3,value:"CONTINUOUS"},Ds.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},Ds.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=Ds;class Ns{}Ns.ELEVATOR={type:3,value:"ELEVATOR"},Ns.ESCALATOR={type:3,value:"ESCALATOR"},Ns.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ns.CRANEWAY={type:3,value:"CRANEWAY"},Ns.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ns.USERDEFINED={type:3,value:"USERDEFINED"},Ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ns;class bs{}bs.CARTESIAN={type:3,value:"CARTESIAN"},bs.PARAMETER={type:3,value:"PARAMETER"},bs.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=bs;class Cs{}Cs.FINNED={type:3,value:"FINNED"},Cs.USERDEFINED={type:3,value:"USERDEFINED"},Cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=Cs;class Os{}Os.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Os.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Os.AREAUNIT={type:3,value:"AREAUNIT"},Os.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Os.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Os.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Os.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Os.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Os.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Os.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Os.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Os.FORCEUNIT={type:3,value:"FORCEUNIT"},Os.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Os.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Os.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Os.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Os.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Os.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Os.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Os.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Os.MASSUNIT={type:3,value:"MASSUNIT"},Os.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Os.POWERUNIT={type:3,value:"POWERUNIT"},Os.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Os.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Os.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Os.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Os.TIMEUNIT={type:3,value:"TIMEUNIT"},Os.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Os.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Os;class Ss{}Ss.ALARMPANEL={type:3,value:"ALARMPANEL"},Ss.CONTROLPANEL={type:3,value:"CONTROLPANEL"},Ss.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},Ss.INDICATORPANEL={type:3,value:"INDICATORPANEL"},Ss.MIMICPANEL={type:3,value:"MIMICPANEL"},Ss.HUMIDISTAT={type:3,value:"HUMIDISTAT"},Ss.THERMOSTAT={type:3,value:"THERMOSTAT"},Ss.WEATHERSTATION={type:3,value:"WEATHERSTATION"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=Ss;class xs{}xs.AIRHANDLER={type:3,value:"AIRHANDLER"},xs.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},xs.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},xs.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},xs.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=xs;class ws{}ws.AIRRELEASE={type:3,value:"AIRRELEASE"},ws.ANTIVACUUM={type:3,value:"ANTIVACUUM"},ws.CHANGEOVER={type:3,value:"CHANGEOVER"},ws.CHECK={type:3,value:"CHECK"},ws.COMMISSIONING={type:3,value:"COMMISSIONING"},ws.DIVERTING={type:3,value:"DIVERTING"},ws.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},ws.DOUBLECHECK={type:3,value:"DOUBLECHECK"},ws.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},ws.FAUCET={type:3,value:"FAUCET"},ws.FLUSHING={type:3,value:"FLUSHING"},ws.GASCOCK={type:3,value:"GASCOCK"},ws.GASTAP={type:3,value:"GASTAP"},ws.ISOLATING={type:3,value:"ISOLATING"},ws.MIXING={type:3,value:"MIXING"},ws.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},ws.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},ws.REGULATING={type:3,value:"REGULATING"},ws.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},ws.STEAMTRAP={type:3,value:"STEAMTRAP"},ws.STOPCOCK={type:3,value:"STOPCOCK"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=ws;class Bs{}Bs.COMPRESSION={type:3,value:"COMPRESSION"},Bs.SPRING={type:3,value:"SPRING"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Bs;class Fs{}Fs.CUTOUT={type:3,value:"CUTOUT"},Fs.NOTCH={type:3,value:"NOTCH"},Fs.HOLE={type:3,value:"HOLE"},Fs.MITER={type:3,value:"MITER"},Fs.CHAMFER={type:3,value:"CHAMFER"},Fs.EDGE={type:3,value:"EDGE"},Fs.USERDEFINED={type:3,value:"USERDEFINED"},Fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Fs;class Ms{}Ms.MOVABLE={type:3,value:"MOVABLE"},Ms.PARAPET={type:3,value:"PARAPET"},Ms.PARTITIONING={type:3,value:"PARTITIONING"},Ms.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},Ms.SHEAR={type:3,value:"SHEAR"},Ms.SOLIDWALL={type:3,value:"SOLIDWALL"},Ms.STANDARD={type:3,value:"STANDARD"},Ms.POLYGONAL={type:3,value:"POLYGONAL"},Ms.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=Ms;class Ls{}Ls.FLOORTRAP={type:3,value:"FLOORTRAP"},Ls.FLOORWASTE={type:3,value:"FLOORWASTE"},Ls.GULLYSUMP={type:3,value:"GULLYSUMP"},Ls.GULLYTRAP={type:3,value:"GULLYTRAP"},Ls.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ls.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ls.WASTETRAP={type:3,value:"WASTETRAP"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ls;class Us{}Us.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Us.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Us.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Us.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Us.TOPHUNG={type:3,value:"TOPHUNG"},Us.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Us.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Us.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Us.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Us.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Us.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Us.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Us.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Us;class Hs{}Hs.LEFT={type:3,value:"LEFT"},Hs.MIDDLE={type:3,value:"MIDDLE"},Hs.RIGHT={type:3,value:"RIGHT"},Hs.BOTTOM={type:3,value:"BOTTOM"},Hs.TOP={type:3,value:"TOP"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Hs;class Gs{}Gs.ALUMINIUM={type:3,value:"ALUMINIUM"},Gs.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Gs.STEEL={type:3,value:"STEEL"},Gs.WOOD={type:3,value:"WOOD"},Gs.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Gs.PLASTIC={type:3,value:"PLASTIC"},Gs.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Gs;class ks{}ks.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ks.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ks.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ks.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ks.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ks.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ks.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ks.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ks.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ks;class Vs{}Vs.WINDOW={type:3,value:"WINDOW"},Vs.SKYLIGHT={type:3,value:"SKYLIGHT"},Vs.LIGHTDOME={type:3,value:"LIGHTDOME"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Vs;class js{}js.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},js.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},js.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},js.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},js.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},js.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},js.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},js.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},js.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=js;class Qs{}Qs.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Qs.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Qs.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Qs.USERDEFINED={type:3,value:"USERDEFINED"},Qs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Qs;class Ws{}Ws.ACTUAL={type:3,value:"ACTUAL"},Ws.BASELINE={type:3,value:"BASELINE"},Ws.PLANNED={type:3,value:"PLANNED"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=Ws;class zs{}zs.ACTUAL={type:3,value:"ACTUAL"},zs.BASELINE={type:3,value:"BASELINE"},zs.PLANNED={type:3,value:"PLANNED"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=zs;e.IfcActorRole=class extends gI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Ks extends gI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Ks;e.IfcApplication=class extends gI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Ys extends gI{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Ys;e.IfcApproval=class extends gI{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Xs extends gI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Xs;e.IfcBoundaryEdgeCondition=class extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Xs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Zs extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Zs;e.IfcBoundaryNodeConditionWarping=class extends Zs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class qs extends gI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=qs;class Js extends qs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Js;e.IfcConnectionSurfaceGeometry=class extends qs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends qs{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class $s extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=$s;class ei extends gI{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=ei;class ti extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ti;e.IfcCostValue=class extends Ys{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends gI{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends gI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class si extends gI{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=si;class ii extends gI{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ii;e.IfcExternallyDefinedHatchStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends gI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends gI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends si{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends gI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends gI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends ei{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends gI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class ri extends gI{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=ri;class oi extends ri{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=oi;e.IfcMaterialLayerSet=class extends ri{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends gI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ni extends ri{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=ni;e.IfcMaterialProfileSet=class extends ri{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends ni{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class ai extends gI{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=ai;e.IfcMeasureWithUnit=class extends gI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends gI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class li extends gI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=li;class hi extends gI{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=hi;e.IfcObjective=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends gI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ci extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ci;class Ai extends ci{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=Ai;e.IfcPostalAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class ui extends gI{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=ui;class pi extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=pi;e.IfcPresentationLayerWithStyle=class extends pi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class di extends gI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=di;e.IfcPresentationStyleAssignment=class extends gI{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class fi extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=fi;class Ei extends gI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ei;e.IfcProjectedCRS=class extends ti{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class mi extends gI{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=mi;e.IfcPropertyEnumeration=class extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityTime=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends gI{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class yi extends gI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=yi;class gi extends gI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=gi;class Ii extends gI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ii;e.IfcRepresentationMap=class extends gI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class vi extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=vi;class Ti extends gI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=Ti;e.IfcSIUnit=class extends li{constructor(e,t,s,i){super(e,new yI(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};class _i extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=_i;e.IfcShapeAspect=class extends gI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class Ri extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=Ri;e.IfcShapeRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Pi extends gI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Pi;class Di extends gI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Di;e.IfcStructuralLoadConfiguration=class extends Di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class Ni extends Di{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=Ni;class bi extends Ni{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=bi;e.IfcStructuralLoadTemperature=class extends bi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class Ci extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Ci;e.IfcStyledItem=class extends Ii{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends Ci{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends Ni{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends ui{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends ui{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Oi extends ui{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=Oi;e.IfcSurfaceStyleWithTextures=class extends ui{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class Si extends ui{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=Si;e.IfcTable=class extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends gI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class xi extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=xi;e.IfcTaskTimeRecurring=class extends xi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends ui{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends ui{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class wi extends ui{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=wi;e.IfcTextureCoordinateGenerator=class extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};e.IfcTextureMap=class extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends ui{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends ui{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends gI{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class Bi extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=Bi;e.IfcTimeSeriesValue=class extends gI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Fi extends Ii{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Fi;e.IfcTopologyRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends gI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Mi extends Fi{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Mi;e.IfcVertexPoint=class extends Mi{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends gI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends _i{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.Start=o,this.Finish=n,this.type=1236880293}};e.IfcApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Li extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Li;class Ui extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Ui;e.IfcArbitraryProfileDefWithVoids=class extends Li{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends Si{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Ui{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends si{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Location=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends ui{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Hi extends ui{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Hi;e.IfcCompositeProfileDef=class extends Ei{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Gi extends Fi{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Gi;e.IfcConnectionCurveGeometry=class extends qs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Js{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends li{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class ki extends li{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=ki;e.IfcConversionBasedUnitWithOffset=class extends ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends vi{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends ui{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends ui{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends ui{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Vi extends Ei{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Vi;e.IfcDocumentInformation=class extends si{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends ii{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class ji extends Fi{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=ji;e.IfcEdgeCurve=class extends ji{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends _i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class Qi extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=Qi;e.IfcExternalReferenceRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Wi extends Fi{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Wi;class zi extends Fi{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=zi;e.IfcFaceOuterBound=class extends zi{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Ki extends Wi{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Ki;e.IfcFailureConnectionCondition=class extends Pi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelorDraughting=i,this.type=738692330}};class Yi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Yi;class Xi extends Ii{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Xi;e.IfcGeometricRepresentationSubContext=class extends Yi{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new yI(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class Zi extends Xi{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Zi;e.IfcGridPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class qi extends Xi{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=qi;e.IfcImageTexture=class extends Si{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends ui{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class Ji extends wi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=Ji;e.IfcIndexedTriangleTextureMap=class extends Ji{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends _i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class $i extends Xi{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=$i;e.IfcLightSourceAmbient=class extends $i{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends $i{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class er extends $i{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=er;e.IfcLightSourceSpot=class extends er{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class tr extends Fi{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=tr;e.IfcMappedItem=class extends Ii{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends ri{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends fi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends ai{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class sr extends ai{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=sr;e.IfcMaterialProfileSetUsageTapering=class extends sr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.Expression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Vi{constructor(e,t,s,i,r){super(e,t,s,i,new yI(0),r),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Label=r,this.type=2998442950}};class ir extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=ir;e.IfcOpenShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends ji{constructor(e,t,s){super(e,new yI(0),new yI(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class rr extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=rr;e.IfcPath=class extends Fi{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ci{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends Si{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class or extends Xi{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=or;class nr extends Xi{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=nr;class ar extends Xi{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=ar;e.IfcPointOnCurve=class extends ar{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends ar{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends tr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends qi{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class lr extends ui{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=lr;class hr extends mi{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=hr;class cr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=cr;e.IfcProductDefinitionShape=class extends fi{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class Ar extends mi{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Ar;class ur extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=ur;e.IfcPropertyDependencyRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class pr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=pr;class dr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=dr;class fr extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=fr;class Er extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=Er;e.IfcRegularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class mr extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=mr;e.IfcResourceApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends Er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends hr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Xi{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcShellBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class yr extends Ar{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=yr;e.IfcSlippageConnectionCondition=class extends Pi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class gr extends Xi{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=gr;e.IfcStructuralLoadLinearForce=class extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends bi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class Ir extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=Ir;e.IfcStructuralLoadSingleDisplacementDistortion=class extends Ir{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class vr extends bi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=vr;e.IfcStructuralLoadSingleForceWarping=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends ji{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Tr extends Xi{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Tr;e.IfcSurfaceStyleRendering=class extends Oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class _r extends gr{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=_r;class Rr extends gr{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=Rr;e.IfcSweptDiskSolidPolygonal=class extends Rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Pr extends Tr{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Pr;e.IfcTShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class Dr extends Xi{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=Dr;class Nr extends Xi{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Nr;e.IfcTextLiteralWithExtent=class extends Nr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends cr{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class br extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=br;class Cr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Cr;class Or extends br{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=Or;class Sr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=Sr;e.IfcUShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Xi{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends tr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowStyle=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Ki{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Xi{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends or{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class xr extends Xi{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=xr;class wr extends Tr{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=wr;e.IfcBoundingBox=class extends Xi{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends qi{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends ar{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Br extends Xi{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Br;e.IfcCartesianPointList2D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=2059837836}};class Fr extends Xi{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Fr;class Mr extends Fr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Mr;e.IfcCartesianTransformationOperator2DnonUniform=class extends Mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Lr extends Fr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Lr;e.IfcCartesianTransformationOperator3DnonUniform=class extends Lr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Ur extends rr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Ur;e.IfcClosedShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Hi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Ar{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Hr extends Xi{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Hr;class Gr extends Sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=Gr;class kr extends ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=kr;e.IfcCrewResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class Vr extends Xi{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Vr;e.IfcCsgSolid=class extends gr{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class jr extends Xi{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=jr;e.IfcCurveBoundedPlane=class extends wr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends wr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcDirection=class extends Xi{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorStyle=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};e.IfcEdgeLoop=class extends tr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends fr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Qr extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Qr;class Wr extends Tr{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Wr;e.IfcEllipseProfileDef=class extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class zr extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=zr;e.IfcExtrudedAreaSolidTapered=class extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Xi{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFixedReferenceSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}};class Kr extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Kr;e.IfcFurnitureType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Zi{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class Yr extends Dr{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=Yr;e.IfcIndexedPolygonalFaceWithVoids=class extends Yr{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcLShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends jr{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Xr extends gr{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Xr;class Zr extends ir{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Zr;e.IfcOffsetCurve2D=class extends jr{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends jr{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPcurve=class extends jr{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends nr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Wr{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class qr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=qr;class Jr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=Jr;class $r extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=$r;e.IfcProcedureType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class eo extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=eo;class to extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=to;e.IfcProject=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends yr{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends pr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends dr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends yr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class so extends dr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=so;e.IfcProxy=class extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends Er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends wr{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class io extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=io;e.IfcRelAssignsToActor=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class ro extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=ro;e.IfcRelAssignsToGroupByFactor=class extends ro{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class oo extends mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=oo;e.IfcRelAssociatesApproval=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends oo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};class no extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=no;class ao extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=ao;e.IfcRelConnectsPathElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class lo extends no{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=lo;e.IfcRelConnectsWithEccentricity=class extends lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class ho extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=ho;class co extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=co;e.IfcRelDefinesByObject=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceType=l,this.ImpliedOrder=h,this.type=427948657}};e.IfcRelNests=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelProjectsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class Ao extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=Ao;class uo extends Ao{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=uo;e.IfcRelSpaceBoundary2ndLevel=class extends uo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Hr{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class po extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=po;class fo extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=fo;e.IfcRevolvedAreaSolidTapered=class extends fo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};e.IfcSimplePropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class Eo extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=Eo;class mo extends Or{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=mo;class yo extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=yo;class go extends mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=go;e.IfcSpatialZone=class extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends Vr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class Io extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=Io;class vo extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=vo;class To extends vo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=To;class _o extends Io{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=_o;class Ro extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=Ro;e.IfcStructuralSurfaceMemberVarying=class extends Ro{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class Po extends jr{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=Po;e.IfcSurfaceCurveSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Pr{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Pr{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Do extends Dr{constructor(e,t){super(e),this.Coordinates=t,this.type=2387106220}}e.IfcTessellatedFaceSet=Do;e.IfcToroidalSurface=class extends Wr{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};e.IfcTransportElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};e.IfcTriangulatedFaceSet=class extends Do{constructor(e,t,s,i,r,o){super(e,t),this.Coordinates=t,this.Normals=s,this.Closed=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}};e.IfcWindowLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class No extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=No;class bo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=bo;e.IfcAdvancedBrepWithVoids=class extends bo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};class Co extends wr{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Co;class Oo extends Co{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=Oo;e.IfcBlock=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends xr{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class So extends jr{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=So;e.IfcBuilding=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class xo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=xo;e.IfcBuildingStorey=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcChimneyType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Ur{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcColumnType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class wo extends So{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=wo;class Bo extends wo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=Bo;class Fo extends jr{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=Fo;e.IfcConstructionEquipmentResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Mo extends po{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Mo;class Lo extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Lo;e.IfcCostItem=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCoveringType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Uo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Uo;class Ho extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Ho;e.IfcDoorLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends Jr{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Go extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Go;e.IfcElementAssembly=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class ko extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=ko;class Vo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Vo;e.IfcEllipse=class extends Fo{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=jo;e.IfcEngineType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class Qo extends Eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=Qo;class Wo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Wo;e.IfcFacetedBrepWithVoids=class extends Wo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};e.IfcFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class zo extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=zo;class Ko extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Ko;class Yo extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Yo;class Xo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Xo;class Zo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Zo;e.IfcFlowMeterType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class qo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=qo;class Jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Jo;class $o extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=$o;class en extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=en;class tn extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=tn;e.IfcFootingType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class sn extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=sn;e.IfcFurniture=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};e.IfcGrid=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};class rn extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=rn;e.IfcHeatExchangerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcIndexedPolyCurve=class extends So{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcMechanicalFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcOccupant=class extends No{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};class on extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}}e.IfcOpeningElement=on;e.IfcOpeningStandardCase=class extends on{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3079942009}};e.IfcOutletType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends Lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Do{constructor(e,t,s,i,r){super(e,t),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends So{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class nn extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=nn;e.IfcProcedure=class extends eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailingType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends Oo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};class an extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=an;class ln extends Vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ln;e.IfcReinforcingMesh=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAggregates=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoofType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcShadingDeviceType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSite=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class hn extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=hn;class cn extends vo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=cn;class An extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=An;e.IfcStructuralCurveConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.Axis=h,this.type=4243806635}};class un extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=un;e.IfcStructuralCurveMemberVarying=class extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends An{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class pn extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=pn;e.IfcStructuralPointAction=class extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class dn extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=dn;e.IfcStructuralSurfaceConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends zo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class fn extends rn{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=fn;e.IfcSystemFurnitureElement=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTransformerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTrimmedCurve=class extends So{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVibrationIsolator=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcVoidingFeature=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class En extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=En;e.IfcWorkPlan=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends fn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAsset=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class mn extends So{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=yn;e.IfcBeamType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBoilerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class gn extends Bo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=gn;class In extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=In;e.IfcBuildingElementPart=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxy=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};e.IfcBurnerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends Fo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};class vn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}}e.IfcColumn=vn;e.IfcColumnStandardCase=class extends vn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=905975707}};e.IfcCommunicationsApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcCooledBeamType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiscreteAccessory=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionChamberElementType=class extends Ho{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Tn extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Tn;class _n extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=_n;class Rn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Rn;e.IfcDistributionPort=class extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Pn extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Pn;class Dn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}}e.IfcDoor=Dn;e.IfcDoorStandardCase=class extends Dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=3242481149}};e.IfcDuctFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcElectricApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Nn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Nn;e.IfcEngine=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends Qo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=bn;class Cn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=Cn;e.IfcFlowInstrumentType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class On extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=On;class Sn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Sn;class xn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=xn;class wn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=wn;class Bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=Bn;e.IfcFooting=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcHeatExchanger=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcLamp=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};e.IfcMedicalDevice=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};class Fn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}}e.IfcMember=Fn;e.IfcMemberStandardCase=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1911478936}};e.IfcMotorConnection=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcOuterBoundaryCurve=class extends gn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPile=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};class Mn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}}e.IfcPlate=Mn;e.IfcPlateStandardCase=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1156407060}};e.IfcProtectiveDevice=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRailing=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcingBar=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};class Ln extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}}e.IfcSlab=Ln;e.IfcSlabElementedCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3127900445}};e.IfcSlabStandardCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3027962421}};e.IfcSolarDevice=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTransformer=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTubeBundle=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Un extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Un;e.IfcWallElementedCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4156078855}};e.IfcWallStandardCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};class Hn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}}e.IfcWindow=Hn;e.IfcWindowStandardCase=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=486154966}};e.IfcActuatorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAudioVisualAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};class Gn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}}e.IfcBeam=Gn;e.IfcBeamStandardCase=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2906023776}};e.IfcBoiler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBurner=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcChiller=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcCooledBeam=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionChamberElement=class extends Rn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class kn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=kn;e.IfcDuctFitting=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricGenerator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcProtectiveDeviceTrippingUnit=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(AI||(AI={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.BRAKES={type:3,value:"BRAKES"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.CREEP={type:3,value:"CREEP"},i.CURRENT={type:3,value:"CURRENT"},i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.ERECTION={type:3,value:"ERECTION"},i.FIRE={type:3,value:"FIRE"},i.ICE={type:3,value:"ICE"},i.IMPACT={type:3,value:"IMPACT"},i.IMPULSE={type:3,value:"IMPULSE"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.PROPPING={type:3,value:"PROPPING"},i.RAIN={type:3,value:"RAIN"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.SNOW_S={type:3,value:"SNOW_S"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.WAVE={type:3,value:"WAVE"},i.WIND_W={type:3,value:"WIND_W"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.HOME={type:3,value:"HOME"},n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.RAILWAYCROCODILE={type:3,value:"RAILWAYCROCODILE"},c.RAILWAYDETONATOR={type:3,value:"RAILWAYDETONATOR"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.BLOSSCURVE={type:3,value:"BLOSSCURVE"},A.CONSTANTCANT={type:3,value:"CONSTANTCANT"},A.COSINECURVE={type:3,value:"COSINECURVE"},A.HELMERTCURVE={type:3,value:"HELMERTCURVE"},A.LINEARTRANSITION={type:3,value:"LINEARTRANSITION"},A.SINECURVE={type:3,value:"SINECURVE"},A.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentCantSegmentTypeEnum=A;class u{}u.BLOSSCURVE={type:3,value:"BLOSSCURVE"},u.CIRCULARARC={type:3,value:"CIRCULARARC"},u.CLOTHOID={type:3,value:"CLOTHOID"},u.COSINECURVE={type:3,value:"COSINECURVE"},u.CUBIC={type:3,value:"CUBIC"},u.HELMERTCURVE={type:3,value:"HELMERTCURVE"},u.LINE={type:3,value:"LINE"},u.SINECURVE={type:3,value:"SINECURVE"},u.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentHorizontalSegmentTypeEnum=u;class p{}p.USERDEFINED={type:3,value:"USERDEFINED"},p.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlignmentTypeEnum=p;class d{}d.CIRCULARARC={type:3,value:"CIRCULARARC"},d.CLOTHOID={type:3,value:"CLOTHOID"},d.CONSTANTGRADIENT={type:3,value:"CONSTANTGRADIENT"},d.PARABOLICARC={type:3,value:"PARABOLICARC"},e.IfcAlignmentVerticalSegmentTypeEnum=d;class f{}f.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},f.LOADING_3D={type:3,value:"LOADING_3D"},f.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=f;class E{}E.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},E.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},E.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},E.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=E;class m{}m.ASBUILTAREA={type:3,value:"ASBUILTAREA"},m.ASBUILTLINE={type:3,value:"ASBUILTLINE"},m.ASBUILTPOINT={type:3,value:"ASBUILTPOINT"},m.ASSUMEDAREA={type:3,value:"ASSUMEDAREA"},m.ASSUMEDLINE={type:3,value:"ASSUMEDLINE"},m.ASSUMEDPOINT={type:3,value:"ASSUMEDPOINT"},m.NON_PHYSICAL_SIGNAL={type:3,value:"NON_PHYSICAL_SIGNAL"},m.SUPERELEVATIONEVENT={type:3,value:"SUPERELEVATIONEVENT"},m.WIDTHEVENT={type:3,value:"WIDTHEVENT"},m.USERDEFINED={type:3,value:"USERDEFINED"},m.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnnotationTypeEnum=m;class y{}y.ADD={type:3,value:"ADD"},y.DIVIDE={type:3,value:"DIVIDE"},y.MULTIPLY={type:3,value:"MULTIPLY"},y.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=y;class g{}g.FACTORY={type:3,value:"FACTORY"},g.SITE={type:3,value:"SITE"},g.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=g;class I{}I.AMPLIFIER={type:3,value:"AMPLIFIER"},I.CAMERA={type:3,value:"CAMERA"},I.COMMUNICATIONTERMINAL={type:3,value:"COMMUNICATIONTERMINAL"},I.DISPLAY={type:3,value:"DISPLAY"},I.MICROPHONE={type:3,value:"MICROPHONE"},I.PLAYER={type:3,value:"PLAYER"},I.PROJECTOR={type:3,value:"PROJECTOR"},I.RECEIVER={type:3,value:"RECEIVER"},I.RECORDINGEQUIPMENT={type:3,value:"RECORDINGEQUIPMENT"},I.SPEAKER={type:3,value:"SPEAKER"},I.SWITCHER={type:3,value:"SWITCHER"},I.TELEPHONE={type:3,value:"TELEPHONE"},I.TUNER={type:3,value:"TUNER"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=I;class v{}v.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},v.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},v.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},v.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},v.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},v.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=v;class T{}T.CONICAL_SURF={type:3,value:"CONICAL_SURF"},T.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},T.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},T.PLANE_SURF={type:3,value:"PLANE_SURF"},T.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},T.RULED_SURF={type:3,value:"RULED_SURF"},T.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},T.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},T.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},T.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},T.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=T;class _{}_.BEAM={type:3,value:"BEAM"},_.CORNICE={type:3,value:"CORNICE"},_.DIAPHRAGM={type:3,value:"DIAPHRAGM"},_.EDGEBEAM={type:3,value:"EDGEBEAM"},_.GIRDER_SEGMENT={type:3,value:"GIRDER_SEGMENT"},_.HATSTONE={type:3,value:"HATSTONE"},_.HOLLOWCORE={type:3,value:"HOLLOWCORE"},_.JOIST={type:3,value:"JOIST"},_.LINTEL={type:3,value:"LINTEL"},_.PIERCAP={type:3,value:"PIERCAP"},_.SPANDREL={type:3,value:"SPANDREL"},_.T_BEAM={type:3,value:"T_BEAM"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=_;class R{}R.FIXED_MOVEMENT={type:3,value:"FIXED_MOVEMENT"},R.FREE_MOVEMENT={type:3,value:"FREE_MOVEMENT"},R.GUIDED_LONGITUDINAL={type:3,value:"GUIDED_LONGITUDINAL"},R.GUIDED_TRANSVERSAL={type:3,value:"GUIDED_TRANSVERSAL"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeDisplacementEnum=R;class P{}P.CYLINDRICAL={type:3,value:"CYLINDRICAL"},P.DISK={type:3,value:"DISK"},P.ELASTOMERIC={type:3,value:"ELASTOMERIC"},P.GUIDE={type:3,value:"GUIDE"},P.POT={type:3,value:"POT"},P.ROCKER={type:3,value:"ROCKER"},P.ROLLER={type:3,value:"ROLLER"},P.SPHERICAL={type:3,value:"SPHERICAL"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeEnum=P;class D{}D.EQUALTO={type:3,value:"EQUALTO"},D.GREATERTHAN={type:3,value:"GREATERTHAN"},D.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},D.INCLUDEDIN={type:3,value:"INCLUDEDIN"},D.INCLUDES={type:3,value:"INCLUDES"},D.LESSTHAN={type:3,value:"LESSTHAN"},D.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},D.NOTEQUALTO={type:3,value:"NOTEQUALTO"},D.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},D.NOTINCLUDES={type:3,value:"NOTINCLUDES"},e.IfcBenchmarkEnum=D;class N{}N.STEAM={type:3,value:"STEAM"},N.WATER={type:3,value:"WATER"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=N;class b{}b.DIFFERENCE={type:3,value:"DIFFERENCE"},b.INTERSECTION={type:3,value:"INTERSECTION"},b.UNION={type:3,value:"UNION"},e.IfcBooleanOperator=b;class C{}C.ABUTMENT={type:3,value:"ABUTMENT"},C.DECK={type:3,value:"DECK"},C.DECK_SEGMENT={type:3,value:"DECK_SEGMENT"},C.FOUNDATION={type:3,value:"FOUNDATION"},C.PIER={type:3,value:"PIER"},C.PIER_SEGMENT={type:3,value:"PIER_SEGMENT"},C.PYLON={type:3,value:"PYLON"},C.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},C.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},C.SURFACESTRUCTURE={type:3,value:"SURFACESTRUCTURE"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgePartTypeEnum=C;class O{}O.ARCHED={type:3,value:"ARCHED"},O.CABLE_STAYED={type:3,value:"CABLE_STAYED"},O.CANTILEVER={type:3,value:"CANTILEVER"},O.CULVERT={type:3,value:"CULVERT"},O.FRAMEWORK={type:3,value:"FRAMEWORK"},O.GIRDER={type:3,value:"GIRDER"},O.SUSPENSION={type:3,value:"SUSPENSION"},O.TRUSS={type:3,value:"TRUSS"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgeTypeEnum=O;class S{}S.APRON={type:3,value:"APRON"},S.ARMOURUNIT={type:3,value:"ARMOURUNIT"},S.INSULATION={type:3,value:"INSULATION"},S.PRECASTPANEL={type:3,value:"PRECASTPANEL"},S.SAFETYCAGE={type:3,value:"SAFETYCAGE"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=S;class x{}x.COMPLEX={type:3,value:"COMPLEX"},x.ELEMENT={type:3,value:"ELEMENT"},x.PARTIAL={type:3,value:"PARTIAL"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=x;class w{}w.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},w.FENESTRATION={type:3,value:"FENESTRATION"},w.FOUNDATION={type:3,value:"FOUNDATION"},w.LOADBEARING={type:3,value:"LOADBEARING"},w.OUTERSHELL={type:3,value:"OUTERSHELL"},w.PRESTRESSING={type:3,value:"PRESTRESSING"},w.REINFORCING={type:3,value:"REINFORCING"},w.SHADING={type:3,value:"SHADING"},w.TRANSPORT={type:3,value:"TRANSPORT"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=w;class B{}B.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},B.FENESTRATION={type:3,value:"FENESTRATION"},B.FOUNDATION={type:3,value:"FOUNDATION"},B.LOADBEARING={type:3,value:"LOADBEARING"},B.MOORING={type:3,value:"MOORING"},B.OUTERSHELL={type:3,value:"OUTERSHELL"},B.PRESTRESSING={type:3,value:"PRESTRESSING"},B.RAILWAYLINE={type:3,value:"RAILWAYLINE"},B.RAILWAYTRACK={type:3,value:"RAILWAYTRACK"},B.REINFORCING={type:3,value:"REINFORCING"},B.SHADING={type:3,value:"SHADING"},B.TRACKCIRCUIT={type:3,value:"TRACKCIRCUIT"},B.TRANSPORT={type:3,value:"TRANSPORT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuiltSystemTypeEnum=B;class F{}F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=F;class M{}M.BEND={type:3,value:"BEND"},M.CONNECTOR={type:3,value:"CONNECTOR"},M.CROSS={type:3,value:"CROSS"},M.JUNCTION={type:3,value:"JUNCTION"},M.TEE={type:3,value:"TEE"},M.TRANSITION={type:3,value:"TRANSITION"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=M;class L{}L.CABLEBRACKET={type:3,value:"CABLEBRACKET"},L.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},L.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},L.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},L.CATENARYWIRE={type:3,value:"CATENARYWIRE"},L.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},L.DROPPER={type:3,value:"DROPPER"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=L;class U{}U.CONNECTOR={type:3,value:"CONNECTOR"},U.ENTRY={type:3,value:"ENTRY"},U.EXIT={type:3,value:"EXIT"},U.FANOUT={type:3,value:"FANOUT"},U.JUNCTION={type:3,value:"JUNCTION"},U.TRANSITION={type:3,value:"TRANSITION"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=U;class H{}H.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},H.CABLESEGMENT={type:3,value:"CABLESEGMENT"},H.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},H.CONTACTWIRESEGMENT={type:3,value:"CONTACTWIRESEGMENT"},H.CORESEGMENT={type:3,value:"CORESEGMENT"},H.FIBERSEGMENT={type:3,value:"FIBERSEGMENT"},H.FIBERTUBE={type:3,value:"FIBERTUBE"},H.OPTICALCABLESEGMENT={type:3,value:"OPTICALCABLESEGMENT"},H.STITCHWIRE={type:3,value:"STITCHWIRE"},H.WIREPAIRSEGMENT={type:3,value:"WIREPAIRSEGMENT"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=H;class G{}G.CAISSON={type:3,value:"CAISSON"},G.WELL={type:3,value:"WELL"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCaissonFoundationTypeEnum=G;class k{}k.ADDED={type:3,value:"ADDED"},k.DELETED={type:3,value:"DELETED"},k.MODIFIED={type:3,value:"MODIFIED"},k.NOCHANGE={type:3,value:"NOCHANGE"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=k;class V{}V.AIRCOOLED={type:3,value:"AIRCOOLED"},V.HEATRECOVERY={type:3,value:"HEATRECOVERY"},V.WATERCOOLED={type:3,value:"WATERCOOLED"},V.USERDEFINED={type:3,value:"USERDEFINED"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=V;class j{}j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=j;class Q{}Q.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},Q.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},Q.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},Q.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},Q.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},Q.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},Q.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=Q;class W{}W.COLUMN={type:3,value:"COLUMN"},W.PIERSTEM={type:3,value:"PIERSTEM"},W.PIERSTEM_SEGMENT={type:3,value:"PIERSTEM_SEGMENT"},W.PILASTER={type:3,value:"PILASTER"},W.STANDCOLUMN={type:3,value:"STANDCOLUMN"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=W;class z{}z.ANTENNA={type:3,value:"ANTENNA"},z.AUTOMATON={type:3,value:"AUTOMATON"},z.COMPUTER={type:3,value:"COMPUTER"},z.FAX={type:3,value:"FAX"},z.GATEWAY={type:3,value:"GATEWAY"},z.INTELLIGENTPERIPHERAL={type:3,value:"INTELLIGENTPERIPHERAL"},z.IPNETWORKEQUIPMENT={type:3,value:"IPNETWORKEQUIPMENT"},z.LINESIDEELECTRONICUNIT={type:3,value:"LINESIDEELECTRONICUNIT"},z.MODEM={type:3,value:"MODEM"},z.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},z.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},z.NETWORKHUB={type:3,value:"NETWORKHUB"},z.OPTICALLINETERMINAL={type:3,value:"OPTICALLINETERMINAL"},z.OPTICALNETWORKUNIT={type:3,value:"OPTICALNETWORKUNIT"},z.PRINTER={type:3,value:"PRINTER"},z.RADIOBLOCKCENTER={type:3,value:"RADIOBLOCKCENTER"},z.REPEATER={type:3,value:"REPEATER"},z.ROUTER={type:3,value:"ROUTER"},z.SCANNER={type:3,value:"SCANNER"},z.TELECOMMAND={type:3,value:"TELECOMMAND"},z.TELEPHONYEXCHANGE={type:3,value:"TELEPHONYEXCHANGE"},z.TRANSITIONCOMPONENT={type:3,value:"TRANSITIONCOMPONENT"},z.TRANSPONDER={type:3,value:"TRANSPONDER"},z.TRANSPORTEQUIPMENT={type:3,value:"TRANSPORTEQUIPMENT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=z;class K{}K.P_COMPLEX={type:3,value:"P_COMPLEX"},K.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=K;class Y{}Y.BOOSTER={type:3,value:"BOOSTER"},Y.DYNAMIC={type:3,value:"DYNAMIC"},Y.HERMETIC={type:3,value:"HERMETIC"},Y.OPENTYPE={type:3,value:"OPENTYPE"},Y.RECIPROCATING={type:3,value:"RECIPROCATING"},Y.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},Y.ROTARY={type:3,value:"ROTARY"},Y.ROTARYVANE={type:3,value:"ROTARYVANE"},Y.SCROLL={type:3,value:"SCROLL"},Y.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},Y.SINGLESCREW={type:3,value:"SINGLESCREW"},Y.SINGLESTAGE={type:3,value:"SINGLESTAGE"},Y.TROCHOIDAL={type:3,value:"TROCHOIDAL"},Y.TWINSCREW={type:3,value:"TWINSCREW"},Y.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=Y;class X{}X.AIRCOOLED={type:3,value:"AIRCOOLED"},X.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},X.WATERCOOLED={type:3,value:"WATERCOOLED"},X.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},X.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},X.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},X.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=X;class Z{}Z.ATEND={type:3,value:"ATEND"},Z.ATPATH={type:3,value:"ATPATH"},Z.ATSTART={type:3,value:"ATSTART"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=Z;class q{}q.ADVISORY={type:3,value:"ADVISORY"},q.HARD={type:3,value:"HARD"},q.SOFT={type:3,value:"SOFT"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=q;class J{}J.DEMOLISHING={type:3,value:"DEMOLISHING"},J.EARTHMOVING={type:3,value:"EARTHMOVING"},J.ERECTING={type:3,value:"ERECTING"},J.HEATING={type:3,value:"HEATING"},J.LIGHTING={type:3,value:"LIGHTING"},J.PAVING={type:3,value:"PAVING"},J.PUMPING={type:3,value:"PUMPING"},J.TRANSPORTING={type:3,value:"TRANSPORTING"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=J;class ${}$.AGGREGATES={type:3,value:"AGGREGATES"},$.CONCRETE={type:3,value:"CONCRETE"},$.DRYWALL={type:3,value:"DRYWALL"},$.FUEL={type:3,value:"FUEL"},$.GYPSUM={type:3,value:"GYPSUM"},$.MASONRY={type:3,value:"MASONRY"},$.METAL={type:3,value:"METAL"},$.PLASTIC={type:3,value:"PLASTIC"},$.WOOD={type:3,value:"WOOD"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=$;class ee{}ee.ASSEMBLY={type:3,value:"ASSEMBLY"},ee.FORMWORK={type:3,value:"FORMWORK"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=ee;class te{}te.FLOATING={type:3,value:"FLOATING"},te.MULTIPOSITION={type:3,value:"MULTIPOSITION"},te.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},te.PROPORTIONAL={type:3,value:"PROPORTIONAL"},te.TWOPOSITION={type:3,value:"TWOPOSITION"},te.USERDEFINED={type:3,value:"USERDEFINED"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=te;class se{}se.BELTCONVEYOR={type:3,value:"BELTCONVEYOR"},se.BUCKETCONVEYOR={type:3,value:"BUCKETCONVEYOR"},se.CHUTECONVEYOR={type:3,value:"CHUTECONVEYOR"},se.SCREWCONVEYOR={type:3,value:"SCREWCONVEYOR"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConveyorSegmentTypeEnum=se;class ie{}ie.ACTIVE={type:3,value:"ACTIVE"},ie.PASSIVE={type:3,value:"PASSIVE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=ie;class re{}re.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},re.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},re.NATURALDRAFT={type:3,value:"NATURALDRAFT"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=re;class oe{}oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=oe;class ne{}ne.BUDGET={type:3,value:"BUDGET"},ne.COSTPLAN={type:3,value:"COSTPLAN"},ne.ESTIMATE={type:3,value:"ESTIMATE"},ne.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},ne.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},ne.TENDER={type:3,value:"TENDER"},ne.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=ne;class ae{}ae.ARMOUR={type:3,value:"ARMOUR"},ae.BALLASTBED={type:3,value:"BALLASTBED"},ae.CORE={type:3,value:"CORE"},ae.FILTER={type:3,value:"FILTER"},ae.PAVEMENT={type:3,value:"PAVEMENT"},ae.PROTECTION={type:3,value:"PROTECTION"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCourseTypeEnum=ae;class le{}le.CEILING={type:3,value:"CEILING"},le.CLADDING={type:3,value:"CLADDING"},le.COPING={type:3,value:"COPING"},le.FLOORING={type:3,value:"FLOORING"},le.INSULATION={type:3,value:"INSULATION"},le.MEMBRANE={type:3,value:"MEMBRANE"},le.MOLDING={type:3,value:"MOLDING"},le.ROOFING={type:3,value:"ROOFING"},le.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},le.SLEEVING={type:3,value:"SLEEVING"},le.TOPPING={type:3,value:"TOPPING"},le.WRAPPING={type:3,value:"WRAPPING"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=le;class he{}he.OFFICE={type:3,value:"OFFICE"},he.SITE={type:3,value:"SITE"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=he;class ce{}ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=ce;class Ae{}Ae.LINEAR={type:3,value:"LINEAR"},Ae.LOG_LINEAR={type:3,value:"LOG_LINEAR"},Ae.LOG_LOG={type:3,value:"LOG_LOG"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=Ae;class ue{}ue.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},ue.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},ue.BLASTDAMPER={type:3,value:"BLASTDAMPER"},ue.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},ue.FIREDAMPER={type:3,value:"FIREDAMPER"},ue.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},ue.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},ue.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},ue.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},ue.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},ue.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=ue;class pe{}pe.MEASURED={type:3,value:"MEASURED"},pe.PREDICTED={type:3,value:"PREDICTED"},pe.SIMULATED={type:3,value:"SIMULATED"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=pe;class de{}de.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},de.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},de.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},de.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},de.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},de.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},de.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},de.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},de.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},de.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},de.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},de.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},de.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},de.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},de.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},de.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},de.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},de.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},de.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},de.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},de.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},de.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},de.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},de.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},de.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},de.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},de.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},de.PHUNIT={type:3,value:"PHUNIT"},de.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},de.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},de.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},de.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},de.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},de.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},de.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},de.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},de.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},de.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},de.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},de.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},de.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},de.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},de.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},de.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},de.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},de.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},de.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},de.TORQUEUNIT={type:3,value:"TORQUEUNIT"},de.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},de.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},de.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},de.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},de.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=de;class fe{}fe.NEGATIVE={type:3,value:"NEGATIVE"},fe.POSITIVE={type:3,value:"POSITIVE"},e.IfcDirectionSenseEnum=fe;class Ee{}Ee.ANCHORPLATE={type:3,value:"ANCHORPLATE"},Ee.BIRDPROTECTION={type:3,value:"BIRDPROTECTION"},Ee.BRACKET={type:3,value:"BRACKET"},Ee.CABLEARRANGER={type:3,value:"CABLEARRANGER"},Ee.ELASTIC_CUSHION={type:3,value:"ELASTIC_CUSHION"},Ee.EXPANSION_JOINT_DEVICE={type:3,value:"EXPANSION_JOINT_DEVICE"},Ee.FILLER={type:3,value:"FILLER"},Ee.FLASHING={type:3,value:"FLASHING"},Ee.INSULATOR={type:3,value:"INSULATOR"},Ee.LOCK={type:3,value:"LOCK"},Ee.PANEL_STRENGTHENING={type:3,value:"PANEL_STRENGTHENING"},Ee.POINTMACHINEMOUNTINGDEVICE={type:3,value:"POINTMACHINEMOUNTINGDEVICE"},Ee.POINT_MACHINE_LOCKING_DEVICE={type:3,value:"POINT_MACHINE_LOCKING_DEVICE"},Ee.RAILBRACE={type:3,value:"RAILBRACE"},Ee.RAILPAD={type:3,value:"RAILPAD"},Ee.RAIL_LUBRICATION={type:3,value:"RAIL_LUBRICATION"},Ee.RAIL_MECHANICAL_EQUIPMENT={type:3,value:"RAIL_MECHANICAL_EQUIPMENT"},Ee.SHOE={type:3,value:"SHOE"},Ee.SLIDINGCHAIR={type:3,value:"SLIDINGCHAIR"},Ee.SOUNDABSORPTION={type:3,value:"SOUNDABSORPTION"},Ee.TENSIONINGEQUIPMENT={type:3,value:"TENSIONINGEQUIPMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=Ee;class me{}me.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},me.DISPATCHINGBOARD={type:3,value:"DISPATCHINGBOARD"},me.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},me.DISTRIBUTIONFRAME={type:3,value:"DISTRIBUTIONFRAME"},me.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},me.SWITCHBOARD={type:3,value:"SWITCHBOARD"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionBoardTypeEnum=me;class ye{}ye.FORMEDDUCT={type:3,value:"FORMEDDUCT"},ye.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},ye.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},ye.MANHOLE={type:3,value:"MANHOLE"},ye.METERCHAMBER={type:3,value:"METERCHAMBER"},ye.SUMP={type:3,value:"SUMP"},ye.TRENCH={type:3,value:"TRENCH"},ye.VALVECHAMBER={type:3,value:"VALVECHAMBER"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=ye;class ge{}ge.CABLE={type:3,value:"CABLE"},ge.CABLECARRIER={type:3,value:"CABLECARRIER"},ge.DUCT={type:3,value:"DUCT"},ge.PIPE={type:3,value:"PIPE"},ge.WIRELESS={type:3,value:"WIRELESS"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=ge;class Ie{}Ie.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},Ie.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},Ie.CATENARY_SYSTEM={type:3,value:"CATENARY_SYSTEM"},Ie.CHEMICAL={type:3,value:"CHEMICAL"},Ie.CHILLEDWATER={type:3,value:"CHILLEDWATER"},Ie.COMMUNICATION={type:3,value:"COMMUNICATION"},Ie.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},Ie.CONDENSERWATER={type:3,value:"CONDENSERWATER"},Ie.CONTROL={type:3,value:"CONTROL"},Ie.CONVEYING={type:3,value:"CONVEYING"},Ie.DATA={type:3,value:"DATA"},Ie.DISPOSAL={type:3,value:"DISPOSAL"},Ie.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},Ie.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},Ie.DRAINAGE={type:3,value:"DRAINAGE"},Ie.EARTHING={type:3,value:"EARTHING"},Ie.ELECTRICAL={type:3,value:"ELECTRICAL"},Ie.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},Ie.EXHAUST={type:3,value:"EXHAUST"},Ie.FIREPROTECTION={type:3,value:"FIREPROTECTION"},Ie.FIXEDTRANSMISSIONNETWORK={type:3,value:"FIXEDTRANSMISSIONNETWORK"},Ie.FUEL={type:3,value:"FUEL"},Ie.GAS={type:3,value:"GAS"},Ie.HAZARDOUS={type:3,value:"HAZARDOUS"},Ie.HEATING={type:3,value:"HEATING"},Ie.LIGHTING={type:3,value:"LIGHTING"},Ie.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},Ie.MOBILENETWORK={type:3,value:"MOBILENETWORK"},Ie.MONITORINGSYSTEM={type:3,value:"MONITORINGSYSTEM"},Ie.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},Ie.OIL={type:3,value:"OIL"},Ie.OPERATIONAL={type:3,value:"OPERATIONAL"},Ie.OPERATIONALTELEPHONYSYSTEM={type:3,value:"OPERATIONALTELEPHONYSYSTEM"},Ie.OVERHEAD_CONTACTLINE_SYSTEM={type:3,value:"OVERHEAD_CONTACTLINE_SYSTEM"},Ie.POWERGENERATION={type:3,value:"POWERGENERATION"},Ie.RAINWATER={type:3,value:"RAINWATER"},Ie.REFRIGERATION={type:3,value:"REFRIGERATION"},Ie.RETURN_CIRCUIT={type:3,value:"RETURN_CIRCUIT"},Ie.SECURITY={type:3,value:"SECURITY"},Ie.SEWAGE={type:3,value:"SEWAGE"},Ie.SIGNAL={type:3,value:"SIGNAL"},Ie.STORMWATER={type:3,value:"STORMWATER"},Ie.TELEPHONE={type:3,value:"TELEPHONE"},Ie.TV={type:3,value:"TV"},Ie.VACUUM={type:3,value:"VACUUM"},Ie.VENT={type:3,value:"VENT"},Ie.VENTILATION={type:3,value:"VENTILATION"},Ie.WASTEWATER={type:3,value:"WASTEWATER"},Ie.WATERSUPPLY={type:3,value:"WATERSUPPLY"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=Ie;class ve{}ve.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ve.PERSONAL={type:3,value:"PERSONAL"},ve.PUBLIC={type:3,value:"PUBLIC"},ve.RESTRICTED={type:3,value:"RESTRICTED"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ve;class Te{}Te.DRAFT={type:3,value:"DRAFT"},Te.FINAL={type:3,value:"FINAL"},Te.FINALDRAFT={type:3,value:"FINALDRAFT"},Te.REVISION={type:3,value:"REVISION"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=Te;class _e{}_e.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},_e.FIXEDPANEL={type:3,value:"FIXEDPANEL"},_e.FOLDING={type:3,value:"FOLDING"},_e.REVOLVING={type:3,value:"REVOLVING"},_e.ROLLINGUP={type:3,value:"ROLLINGUP"},_e.SLIDING={type:3,value:"SLIDING"},_e.SWINGING={type:3,value:"SWINGING"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=_e;class Re{}Re.LEFT={type:3,value:"LEFT"},Re.MIDDLE={type:3,value:"MIDDLE"},Re.RIGHT={type:3,value:"RIGHT"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Re;class Pe{}Pe.ALUMINIUM={type:3,value:"ALUMINIUM"},Pe.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Pe.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Pe.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Pe.PLASTIC={type:3,value:"PLASTIC"},Pe.STEEL={type:3,value:"STEEL"},Pe.WOOD={type:3,value:"WOOD"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Pe;class De{}De.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},De.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},De.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},De.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},De.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},De.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},De.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},De.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},De.REVOLVING={type:3,value:"REVOLVING"},De.ROLLINGUP={type:3,value:"ROLLINGUP"},De.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},De.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},De.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},De.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=De;class Ne{}Ne.BOOM_BARRIER={type:3,value:"BOOM_BARRIER"},Ne.DOOR={type:3,value:"DOOR"},Ne.GATE={type:3,value:"GATE"},Ne.TRAPDOOR={type:3,value:"TRAPDOOR"},Ne.TURNSTILE={type:3,value:"TURNSTILE"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=Ne;class be{}be.DOUBLE_PANEL_DOUBLE_SWING={type:3,value:"DOUBLE_PANEL_DOUBLE_SWING"},be.DOUBLE_PANEL_FOLDING={type:3,value:"DOUBLE_PANEL_FOLDING"},be.DOUBLE_PANEL_LIFTING_VERTICAL={type:3,value:"DOUBLE_PANEL_LIFTING_VERTICAL"},be.DOUBLE_PANEL_SINGLE_SWING={type:3,value:"DOUBLE_PANEL_SINGLE_SWING"},be.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT"},be.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT"},be.DOUBLE_PANEL_SLIDING={type:3,value:"DOUBLE_PANEL_SLIDING"},be.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},be.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},be.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},be.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},be.LIFTING_HORIZONTAL={type:3,value:"LIFTING_HORIZONTAL"},be.LIFTING_VERTICAL_LEFT={type:3,value:"LIFTING_VERTICAL_LEFT"},be.LIFTING_VERTICAL_RIGHT={type:3,value:"LIFTING_VERTICAL_RIGHT"},be.REVOLVING_HORIZONTAL={type:3,value:"REVOLVING_HORIZONTAL"},be.REVOLVING_VERTICAL={type:3,value:"REVOLVING_VERTICAL"},be.ROLLINGUP={type:3,value:"ROLLINGUP"},be.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},be.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},be.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},be.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},be.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},be.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=be;class Ce{}Ce.BEND={type:3,value:"BEND"},Ce.CONNECTOR={type:3,value:"CONNECTOR"},Ce.ENTRY={type:3,value:"ENTRY"},Ce.EXIT={type:3,value:"EXIT"},Ce.JUNCTION={type:3,value:"JUNCTION"},Ce.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ce.TRANSITION={type:3,value:"TRANSITION"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=Ce;class Oe{}Oe.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Oe.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Oe;class Se{}Se.FLATOVAL={type:3,value:"FLATOVAL"},Se.RECTANGULAR={type:3,value:"RECTANGULAR"},Se.ROUND={type:3,value:"ROUND"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=Se;class xe{}xe.BASE_EXCAVATION={type:3,value:"BASE_EXCAVATION"},xe.CUT={type:3,value:"CUT"},xe.DREDGING={type:3,value:"DREDGING"},xe.EXCAVATION={type:3,value:"EXCAVATION"},xe.OVEREXCAVATION={type:3,value:"OVEREXCAVATION"},xe.PAVEMENTMILLING={type:3,value:"PAVEMENTMILLING"},xe.STEPEXCAVATION={type:3,value:"STEPEXCAVATION"},xe.TOPSOILREMOVAL={type:3,value:"TOPSOILREMOVAL"},xe.TRENCH={type:3,value:"TRENCH"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksCutTypeEnum=xe;class we{}we.BACKFILL={type:3,value:"BACKFILL"},we.COUNTERWEIGHT={type:3,value:"COUNTERWEIGHT"},we.EMBANKMENT={type:3,value:"EMBANKMENT"},we.SLOPEFILL={type:3,value:"SLOPEFILL"},we.SUBGRADE={type:3,value:"SUBGRADE"},we.SUBGRADEBED={type:3,value:"SUBGRADEBED"},we.TRANSITIONSECTION={type:3,value:"TRANSITIONSECTION"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksFillTypeEnum=we;class Be{}Be.DISHWASHER={type:3,value:"DISHWASHER"},Be.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},Be.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},Be.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},Be.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},Be.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},Be.FREEZER={type:3,value:"FREEZER"},Be.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},Be.HANDDRYER={type:3,value:"HANDDRYER"},Be.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},Be.MICROWAVE={type:3,value:"MICROWAVE"},Be.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},Be.REFRIGERATOR={type:3,value:"REFRIGERATOR"},Be.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},Be.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},Be.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=Be;class Fe{}Fe.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},Fe.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},Fe.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},Fe.SWITCHBOARD={type:3,value:"SWITCHBOARD"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=Fe;class Me{}Me.BATTERY={type:3,value:"BATTERY"},Me.CAPACITOR={type:3,value:"CAPACITOR"},Me.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Me.COMPENSATOR={type:3,value:"COMPENSATOR"},Me.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Me.INDUCTOR={type:3,value:"INDUCTOR"},Me.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Me.RECHARGER={type:3,value:"RECHARGER"},Me.UPS={type:3,value:"UPS"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Me;class Le{}Le.ELECTRONICFILTER={type:3,value:"ELECTRONICFILTER"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowTreatmentDeviceTypeEnum=Le;class Ue{}Ue.CHP={type:3,value:"CHP"},Ue.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},Ue.STANDALONE={type:3,value:"STANDALONE"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=Ue;class He{}He.DC={type:3,value:"DC"},He.INDUCTION={type:3,value:"INDUCTION"},He.POLYPHASE={type:3,value:"POLYPHASE"},He.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},He.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=He;class Ge{}Ge.RELAY={type:3,value:"RELAY"},Ge.TIMECLOCK={type:3,value:"TIMECLOCK"},Ge.TIMEDELAY={type:3,value:"TIMEDELAY"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=Ge;class ke{}ke.ABUTMENT={type:3,value:"ABUTMENT"},ke.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},ke.ARCH={type:3,value:"ARCH"},ke.BEAM_GRID={type:3,value:"BEAM_GRID"},ke.BRACED_FRAME={type:3,value:"BRACED_FRAME"},ke.CROSS_BRACING={type:3,value:"CROSS_BRACING"},ke.DECK={type:3,value:"DECK"},ke.DILATATIONPANEL={type:3,value:"DILATATIONPANEL"},ke.ENTRANCEWORKS={type:3,value:"ENTRANCEWORKS"},ke.GIRDER={type:3,value:"GIRDER"},ke.GRID={type:3,value:"GRID"},ke.MAST={type:3,value:"MAST"},ke.PIER={type:3,value:"PIER"},ke.PYLON={type:3,value:"PYLON"},ke.RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY={type:3,value:"RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY"},ke.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},ke.RIGID_FRAME={type:3,value:"RIGID_FRAME"},ke.SHELTER={type:3,value:"SHELTER"},ke.SIGNALASSEMBLY={type:3,value:"SIGNALASSEMBLY"},ke.SLAB_FIELD={type:3,value:"SLAB_FIELD"},ke.SUMPBUSTER={type:3,value:"SUMPBUSTER"},ke.SUPPORTINGASSEMBLY={type:3,value:"SUPPORTINGASSEMBLY"},ke.SUSPENSIONASSEMBLY={type:3,value:"SUSPENSIONASSEMBLY"},ke.TRACKPANEL={type:3,value:"TRACKPANEL"},ke.TRACTION_SWITCHING_ASSEMBLY={type:3,value:"TRACTION_SWITCHING_ASSEMBLY"},ke.TRAFFIC_CALMING_DEVICE={type:3,value:"TRAFFIC_CALMING_DEVICE"},ke.TRUSS={type:3,value:"TRUSS"},ke.TURNOUTPANEL={type:3,value:"TURNOUTPANEL"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=ke;class Ve{}Ve.COMPLEX={type:3,value:"COMPLEX"},Ve.ELEMENT={type:3,value:"ELEMENT"},Ve.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Ve;class je{}je.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},je.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=je;class Qe{}Qe.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Qe.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Qe.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Qe.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Qe.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Qe.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Qe.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Qe;class We{}We.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},We.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},We.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},We.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},We.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},We.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=We;class ze{}ze.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},ze.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},ze.EVENTRULE={type:3,value:"EVENTRULE"},ze.EVENTTIME={type:3,value:"EVENTTIME"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=ze;class Ke{}Ke.ENDEVENT={type:3,value:"ENDEVENT"},Ke.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Ke.STARTEVENT={type:3,value:"STARTEVENT"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Ke;class Ye{}Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Ye;class Xe{}Xe.ABOVEGROUND={type:3,value:"ABOVEGROUND"},Xe.BELOWGROUND={type:3,value:"BELOWGROUND"},Xe.JUNCTION={type:3,value:"JUNCTION"},Xe.LEVELCROSSING={type:3,value:"LEVELCROSSING"},Xe.SEGMENT={type:3,value:"SEGMENT"},Xe.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},Xe.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},Xe.TERMINAL={type:3,value:"TERMINAL"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityPartCommonTypeEnum=Xe;class Ze{}Ze.LATERAL={type:3,value:"LATERAL"},Ze.LONGITUDINAL={type:3,value:"LONGITUDINAL"},Ze.REGION={type:3,value:"REGION"},Ze.VERTICAL={type:3,value:"VERTICAL"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityUsageEnum=Ze;class qe{}qe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},qe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},qe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},qe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},qe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},qe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},qe.VANEAXIAL={type:3,value:"VANEAXIAL"},qe.USERDEFINED={type:3,value:"USERDEFINED"},qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=qe;class Je{}Je.GLUE={type:3,value:"GLUE"},Je.MORTAR={type:3,value:"MORTAR"},Je.WELD={type:3,value:"WELD"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=Je;class $e{}$e.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},$e.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},$e.ODORFILTER={type:3,value:"ODORFILTER"},$e.OILFILTER={type:3,value:"OILFILTER"},$e.STRAINER={type:3,value:"STRAINER"},$e.WATERFILTER={type:3,value:"WATERFILTER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=$e;class et{}et.BREECHINGINLET={type:3,value:"BREECHINGINLET"},et.FIREHYDRANT={type:3,value:"FIREHYDRANT"},et.FIREMONITOR={type:3,value:"FIREMONITOR"},et.HOSEREEL={type:3,value:"HOSEREEL"},et.SPRINKLER={type:3,value:"SPRINKLER"},et.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},et.USERDEFINED={type:3,value:"USERDEFINED"},et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=et;class tt{}tt.SINK={type:3,value:"SINK"},tt.SOURCE={type:3,value:"SOURCE"},tt.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=tt;class st{}st.AMMETER={type:3,value:"AMMETER"},st.COMBINED={type:3,value:"COMBINED"},st.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},st.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},st.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},st.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},st.THERMOMETER={type:3,value:"THERMOMETER"},st.VOLTMETER={type:3,value:"VOLTMETER"},st.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},st.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=st;class it{}it.ENERGYMETER={type:3,value:"ENERGYMETER"},it.GASMETER={type:3,value:"GASMETER"},it.OILMETER={type:3,value:"OILMETER"},it.WATERMETER={type:3,value:"WATERMETER"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=it;class rt{}rt.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},rt.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},rt.PAD_FOOTING={type:3,value:"PAD_FOOTING"},rt.PILE_CAP={type:3,value:"PILE_CAP"},rt.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=rt;class ot{}ot.BED={type:3,value:"BED"},ot.CHAIR={type:3,value:"CHAIR"},ot.DESK={type:3,value:"DESK"},ot.FILECABINET={type:3,value:"FILECABINET"},ot.SHELF={type:3,value:"SHELF"},ot.SOFA={type:3,value:"SOFA"},ot.TABLE={type:3,value:"TABLE"},ot.TECHNICALCABINET={type:3,value:"TECHNICALCABINET"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=ot;class nt{}nt.SOIL_BORING_POINT={type:3,value:"SOIL_BORING_POINT"},nt.TERRAIN={type:3,value:"TERRAIN"},nt.VEGETATION={type:3,value:"VEGETATION"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=nt;class at{}at.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},at.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},at.MODEL_VIEW={type:3,value:"MODEL_VIEW"},at.PLAN_VIEW={type:3,value:"PLAN_VIEW"},at.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},at.SECTION_VIEW={type:3,value:"SECTION_VIEW"},at.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=at;class lt{}lt.SOLID={type:3,value:"SOLID"},lt.VOID={type:3,value:"VOID"},lt.WATER={type:3,value:"WATER"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeotechnicalStratumTypeEnum=lt;class ht{}ht.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},ht.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=ht;class ct{}ct.IRREGULAR={type:3,value:"IRREGULAR"},ct.RADIAL={type:3,value:"RADIAL"},ct.RECTANGULAR={type:3,value:"RECTANGULAR"},ct.TRIANGULAR={type:3,value:"TRIANGULAR"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=ct;class At{}At.PLATE={type:3,value:"PLATE"},At.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},At.TURNOUTHEATING={type:3,value:"TURNOUTHEATING"},At.USERDEFINED={type:3,value:"USERDEFINED"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=At;class ut{}ut.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ut.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ut.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ut.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ut.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ut.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ut.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ut.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ut.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ut.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ut.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ut.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ut.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ut;class pt{}pt.BUMPER={type:3,value:"BUMPER"},pt.CRASHCUSHION={type:3,value:"CRASHCUSHION"},pt.DAMPINGSYSTEM={type:3,value:"DAMPINGSYSTEM"},pt.FENDER={type:3,value:"FENDER"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcImpactProtectionDeviceTypeEnum=pt;class dt{}dt.CYCLONIC={type:3,value:"CYCLONIC"},dt.GREASE={type:3,value:"GREASE"},dt.OIL={type:3,value:"OIL"},dt.PETROL={type:3,value:"PETROL"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=dt;class ft{}ft.EXTERNAL={type:3,value:"EXTERNAL"},ft.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},ft.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},ft.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},ft.INTERNAL={type:3,value:"INTERNAL"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=ft;class Et{}Et.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Et.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Et.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Et;class mt{}mt.DATA={type:3,value:"DATA"},mt.POWER={type:3,value:"POWER"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=mt;class yt{}yt.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},yt.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},yt.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},yt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=yt;class gt{}gt.ADMINISTRATION={type:3,value:"ADMINISTRATION"},gt.CARPENTRY={type:3,value:"CARPENTRY"},gt.CLEANING={type:3,value:"CLEANING"},gt.CONCRETE={type:3,value:"CONCRETE"},gt.DRYWALL={type:3,value:"DRYWALL"},gt.ELECTRIC={type:3,value:"ELECTRIC"},gt.FINISHING={type:3,value:"FINISHING"},gt.FLOORING={type:3,value:"FLOORING"},gt.GENERAL={type:3,value:"GENERAL"},gt.HVAC={type:3,value:"HVAC"},gt.LANDSCAPING={type:3,value:"LANDSCAPING"},gt.MASONRY={type:3,value:"MASONRY"},gt.PAINTING={type:3,value:"PAINTING"},gt.PAVING={type:3,value:"PAVING"},gt.PLUMBING={type:3,value:"PLUMBING"},gt.ROOFING={type:3,value:"ROOFING"},gt.SITEGRADING={type:3,value:"SITEGRADING"},gt.STEELWORK={type:3,value:"STEELWORK"},gt.SURVEYING={type:3,value:"SURVEYING"},gt.USERDEFINED={type:3,value:"USERDEFINED"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=gt;class It{}It.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},It.FLUORESCENT={type:3,value:"FLUORESCENT"},It.HALOGEN={type:3,value:"HALOGEN"},It.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},It.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},It.LED={type:3,value:"LED"},It.METALHALIDE={type:3,value:"METALHALIDE"},It.OLED={type:3,value:"OLED"},It.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=It;class vt{}vt.AXIS1={type:3,value:"AXIS1"},vt.AXIS2={type:3,value:"AXIS2"},vt.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=vt;class Tt{}Tt.TYPE_A={type:3,value:"TYPE_A"},Tt.TYPE_B={type:3,value:"TYPE_B"},Tt.TYPE_C={type:3,value:"TYPE_C"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Tt;class _t{}_t.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},_t.FLUORESCENT={type:3,value:"FLUORESCENT"},_t.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},_t.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},_t.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},_t.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},_t.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},_t.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},_t.METALHALIDE={type:3,value:"METALHALIDE"},_t.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=_t;class Rt{}Rt.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},Rt.POINTSOURCE={type:3,value:"POINTSOURCE"},Rt.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=Rt;class Pt{}Pt.HOSEREEL={type:3,value:"HOSEREEL"},Pt.LOADINGARM={type:3,value:"LOADINGARM"},Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLiquidTerminalTypeEnum=Pt;class Dt{}Dt.LOAD_CASE={type:3,value:"LOAD_CASE"},Dt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Dt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Dt;class Nt{}Nt.LOGICALAND={type:3,value:"LOGICALAND"},Nt.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},Nt.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},Nt.LOGICALOR={type:3,value:"LOGICALOR"},Nt.LOGICALXOR={type:3,value:"LOGICALXOR"},e.IfcLogicalOperatorEnum=Nt;class bt{}bt.BARRIERBEACH={type:3,value:"BARRIERBEACH"},bt.BREAKWATER={type:3,value:"BREAKWATER"},bt.CANAL={type:3,value:"CANAL"},bt.DRYDOCK={type:3,value:"DRYDOCK"},bt.FLOATINGDOCK={type:3,value:"FLOATINGDOCK"},bt.HYDROLIFT={type:3,value:"HYDROLIFT"},bt.JETTY={type:3,value:"JETTY"},bt.LAUNCHRECOVERY={type:3,value:"LAUNCHRECOVERY"},bt.MARINEDEFENCE={type:3,value:"MARINEDEFENCE"},bt.NAVIGATIONALCHANNEL={type:3,value:"NAVIGATIONALCHANNEL"},bt.PORT={type:3,value:"PORT"},bt.QUAY={type:3,value:"QUAY"},bt.REVETMENT={type:3,value:"REVETMENT"},bt.SHIPLIFT={type:3,value:"SHIPLIFT"},bt.SHIPLOCK={type:3,value:"SHIPLOCK"},bt.SHIPYARD={type:3,value:"SHIPYARD"},bt.SLIPWAY={type:3,value:"SLIPWAY"},bt.WATERWAY={type:3,value:"WATERWAY"},bt.WATERWAYSHIPLIFT={type:3,value:"WATERWAYSHIPLIFT"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarineFacilityTypeEnum=bt;class Ct{}Ct.ABOVEWATERLINE={type:3,value:"ABOVEWATERLINE"},Ct.ANCHORAGE={type:3,value:"ANCHORAGE"},Ct.APPROACHCHANNEL={type:3,value:"APPROACHCHANNEL"},Ct.BELOWWATERLINE={type:3,value:"BELOWWATERLINE"},Ct.BERTHINGSTRUCTURE={type:3,value:"BERTHINGSTRUCTURE"},Ct.CHAMBER={type:3,value:"CHAMBER"},Ct.CILL_LEVEL={type:3,value:"CILL_LEVEL"},Ct.COPELEVEL={type:3,value:"COPELEVEL"},Ct.CORE={type:3,value:"CORE"},Ct.CREST={type:3,value:"CREST"},Ct.GATEHEAD={type:3,value:"GATEHEAD"},Ct.GUDINGSTRUCTURE={type:3,value:"GUDINGSTRUCTURE"},Ct.HIGHWATERLINE={type:3,value:"HIGHWATERLINE"},Ct.LANDFIELD={type:3,value:"LANDFIELD"},Ct.LEEWARDSIDE={type:3,value:"LEEWARDSIDE"},Ct.LOWWATERLINE={type:3,value:"LOWWATERLINE"},Ct.MANUFACTURING={type:3,value:"MANUFACTURING"},Ct.NAVIGATIONALAREA={type:3,value:"NAVIGATIONALAREA"},Ct.PROTECTION={type:3,value:"PROTECTION"},Ct.SHIPTRANSFER={type:3,value:"SHIPTRANSFER"},Ct.STORAGEAREA={type:3,value:"STORAGEAREA"},Ct.VEHICLESERVICING={type:3,value:"VEHICLESERVICING"},Ct.WATERFIELD={type:3,value:"WATERFIELD"},Ct.WEATHERSIDE={type:3,value:"WEATHERSIDE"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarinePartTypeEnum=Ct;class Ot{}Ot.ANCHORBOLT={type:3,value:"ANCHORBOLT"},Ot.BOLT={type:3,value:"BOLT"},Ot.CHAIN={type:3,value:"CHAIN"},Ot.COUPLER={type:3,value:"COUPLER"},Ot.DOWEL={type:3,value:"DOWEL"},Ot.NAIL={type:3,value:"NAIL"},Ot.NAILPLATE={type:3,value:"NAILPLATE"},Ot.RAILFASTENING={type:3,value:"RAILFASTENING"},Ot.RAILJOINT={type:3,value:"RAILJOINT"},Ot.RIVET={type:3,value:"RIVET"},Ot.ROPE={type:3,value:"ROPE"},Ot.SCREW={type:3,value:"SCREW"},Ot.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},Ot.STAPLE={type:3,value:"STAPLE"},Ot.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=Ot;class St{}St.AIRSTATION={type:3,value:"AIRSTATION"},St.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},St.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},St.OXYGENPLANT={type:3,value:"OXYGENPLANT"},St.VACUUMSTATION={type:3,value:"VACUUMSTATION"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=St;class xt{}xt.ARCH_SEGMENT={type:3,value:"ARCH_SEGMENT"},xt.BRACE={type:3,value:"BRACE"},xt.CHORD={type:3,value:"CHORD"},xt.COLLAR={type:3,value:"COLLAR"},xt.MEMBER={type:3,value:"MEMBER"},xt.MULLION={type:3,value:"MULLION"},xt.PLATE={type:3,value:"PLATE"},xt.POST={type:3,value:"POST"},xt.PURLIN={type:3,value:"PURLIN"},xt.RAFTER={type:3,value:"RAFTER"},xt.STAY_CABLE={type:3,value:"STAY_CABLE"},xt.STIFFENING_RIB={type:3,value:"STIFFENING_RIB"},xt.STRINGER={type:3,value:"STRINGER"},xt.STRUCTURALCABLE={type:3,value:"STRUCTURALCABLE"},xt.STRUT={type:3,value:"STRUT"},xt.STUD={type:3,value:"STUD"},xt.SUSPENDER={type:3,value:"SUSPENDER"},xt.SUSPENSION_CABLE={type:3,value:"SUSPENSION_CABLE"},xt.TIEBAR={type:3,value:"TIEBAR"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=xt;class wt{}wt.ACCESSPOINT={type:3,value:"ACCESSPOINT"},wt.BASEBANDUNIT={type:3,value:"BASEBANDUNIT"},wt.BASETRANSCEIVERSTATION={type:3,value:"BASETRANSCEIVERSTATION"},wt.E_UTRAN_NODE_B={type:3,value:"E_UTRAN_NODE_B"},wt.GATEWAY_GPRS_SUPPORT_NODE={type:3,value:"GATEWAY_GPRS_SUPPORT_NODE"},wt.MASTERUNIT={type:3,value:"MASTERUNIT"},wt.MOBILESWITCHINGCENTER={type:3,value:"MOBILESWITCHINGCENTER"},wt.MSCSERVER={type:3,value:"MSCSERVER"},wt.PACKETCONTROLUNIT={type:3,value:"PACKETCONTROLUNIT"},wt.REMOTERADIOUNIT={type:3,value:"REMOTERADIOUNIT"},wt.REMOTEUNIT={type:3,value:"REMOTEUNIT"},wt.SERVICE_GPRS_SUPPORT_NODE={type:3,value:"SERVICE_GPRS_SUPPORT_NODE"},wt.SUBSCRIBERSERVER={type:3,value:"SUBSCRIBERSERVER"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMobileTelecommunicationsApplianceTypeEnum=wt;class Bt{}Bt.BOLLARD={type:3,value:"BOLLARD"},Bt.LINETENSIONER={type:3,value:"LINETENSIONER"},Bt.MAGNETICDEVICE={type:3,value:"MAGNETICDEVICE"},Bt.MOORINGHOOKS={type:3,value:"MOORINGHOOKS"},Bt.VACUUMDEVICE={type:3,value:"VACUUMDEVICE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMooringDeviceTypeEnum=Bt;class Ft{}Ft.BELTDRIVE={type:3,value:"BELTDRIVE"},Ft.COUPLING={type:3,value:"COUPLING"},Ft.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Ft;class Mt{}Mt.BEACON={type:3,value:"BEACON"},Mt.BUOY={type:3,value:"BUOY"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcNavigationElementTypeEnum=Mt;class Lt{}Lt.ACTOR={type:3,value:"ACTOR"},Lt.CONTROL={type:3,value:"CONTROL"},Lt.GROUP={type:3,value:"GROUP"},Lt.PROCESS={type:3,value:"PROCESS"},Lt.PRODUCT={type:3,value:"PRODUCT"},Lt.PROJECT={type:3,value:"PROJECT"},Lt.RESOURCE={type:3,value:"RESOURCE"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=Lt;class Ut{}Ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ut.CODEWAIVER={type:3,value:"CODEWAIVER"},Ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ut.EXTERNAL={type:3,value:"EXTERNAL"},Ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},Ut.MODELVIEW={type:3,value:"MODELVIEW"},Ut.PARAMETER={type:3,value:"PARAMETER"},Ut.REQUIREMENT={type:3,value:"REQUIREMENT"},Ut.SPECIFICATION={type:3,value:"SPECIFICATION"},Ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ut;class Ht{}Ht.ASSIGNEE={type:3,value:"ASSIGNEE"},Ht.ASSIGNOR={type:3,value:"ASSIGNOR"},Ht.LESSEE={type:3,value:"LESSEE"},Ht.LESSOR={type:3,value:"LESSOR"},Ht.LETTINGAGENT={type:3,value:"LETTINGAGENT"},Ht.OWNER={type:3,value:"OWNER"},Ht.TENANT={type:3,value:"TENANT"},Ht.USERDEFINED={type:3,value:"USERDEFINED"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=Ht;class Gt{}Gt.OPENING={type:3,value:"OPENING"},Gt.RECESS={type:3,value:"RECESS"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=Gt;class kt{}kt.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},kt.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},kt.DATAOUTLET={type:3,value:"DATAOUTLET"},kt.POWEROUTLET={type:3,value:"POWEROUTLET"},kt.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=kt;class Vt{}Vt.FLEXIBLE={type:3,value:"FLEXIBLE"},Vt.RIGID={type:3,value:"RIGID"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPavementTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=jt;class Qt{}Qt.GRILL={type:3,value:"GRILL"},Qt.LOUVER={type:3,value:"LOUVER"},Qt.SCREEN={type:3,value:"SCREEN"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=Qt;class Wt{}Wt.ACCESS={type:3,value:"ACCESS"},Wt.BUILDING={type:3,value:"BUILDING"},Wt.WORK={type:3,value:"WORK"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=Wt;class zt{}zt.PHYSICAL={type:3,value:"PHYSICAL"},zt.VIRTUAL={type:3,value:"VIRTUAL"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=zt;class Kt{}Kt.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},Kt.COMPOSITE={type:3,value:"COMPOSITE"},Kt.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},Kt.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},Kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=Kt;class Yt{}Yt.BORED={type:3,value:"BORED"},Yt.COHESION={type:3,value:"COHESION"},Yt.DRIVEN={type:3,value:"DRIVEN"},Yt.FRICTION={type:3,value:"FRICTION"},Yt.JETGROUTING={type:3,value:"JETGROUTING"},Yt.SUPPORT={type:3,value:"SUPPORT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=Yt;class Xt{}Xt.BEND={type:3,value:"BEND"},Xt.CONNECTOR={type:3,value:"CONNECTOR"},Xt.ENTRY={type:3,value:"ENTRY"},Xt.EXIT={type:3,value:"EXIT"},Xt.JUNCTION={type:3,value:"JUNCTION"},Xt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Xt.TRANSITION={type:3,value:"TRANSITION"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Xt;class Zt{}Zt.CULVERT={type:3,value:"CULVERT"},Zt.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Zt.GUTTER={type:3,value:"GUTTER"},Zt.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Zt.SPOOL={type:3,value:"SPOOL"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Zt;class qt{}qt.BASE_PLATE={type:3,value:"BASE_PLATE"},qt.COVER_PLATE={type:3,value:"COVER_PLATE"},qt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},qt.FLANGE_PLATE={type:3,value:"FLANGE_PLATE"},qt.GUSSET_PLATE={type:3,value:"GUSSET_PLATE"},qt.SHEET={type:3,value:"SHEET"},qt.SPLICE_PLATE={type:3,value:"SPLICE_PLATE"},qt.STIFFENER_PLATE={type:3,value:"STIFFENER_PLATE"},qt.WEB_PLATE={type:3,value:"WEB_PLATE"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=qt;class Jt{}Jt.CURVE3D={type:3,value:"CURVE3D"},Jt.PCURVE_S1={type:3,value:"PCURVE_S1"},Jt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Jt;class $t{}$t.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},$t.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},$t.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},$t.CALIBRATION={type:3,value:"CALIBRATION"},$t.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},$t.SHUTDOWN={type:3,value:"SHUTDOWN"},$t.STARTUP={type:3,value:"STARTUP"},$t.USERDEFINED={type:3,value:"USERDEFINED"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=$t;class es{}es.AREA={type:3,value:"AREA"},es.CURVE={type:3,value:"CURVE"},e.IfcProfileTypeEnum=es;class ts{}ts.CHANGEORDER={type:3,value:"CHANGEORDER"},ts.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},ts.MOVEORDER={type:3,value:"MOVEORDER"},ts.PURCHASEORDER={type:3,value:"PURCHASEORDER"},ts.WORKORDER={type:3,value:"WORKORDER"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=ts;class ss{}ss.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},ss.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=ss;class is{}is.BLISTER={type:3,value:"BLISTER"},is.DEVIATOR={type:3,value:"DEVIATOR"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=is;class rs{}rs.PSET_MATERIALDRIVEN={type:3,value:"PSET_MATERIALDRIVEN"},rs.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},rs.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},rs.PSET_PROFILEDRIVEN={type:3,value:"PSET_PROFILEDRIVEN"},rs.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},rs.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},rs.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},rs.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},rs.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=rs;class os{}os.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},os.ELECTRONIC={type:3,value:"ELECTRONIC"},os.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},os.THERMAL={type:3,value:"THERMAL"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=os;class ns{}ns.ANTI_ARCING_DEVICE={type:3,value:"ANTI_ARCING_DEVICE"},ns.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},ns.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},ns.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},ns.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},ns.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},ns.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},ns.SPARKGAP={type:3,value:"SPARKGAP"},ns.VARISTOR={type:3,value:"VARISTOR"},ns.VOLTAGELIMITER={type:3,value:"VOLTAGELIMITER"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=ns;class as{}as.CIRCULATOR={type:3,value:"CIRCULATOR"},as.ENDSUCTION={type:3,value:"ENDSUCTION"},as.SPLITCASE={type:3,value:"SPLITCASE"},as.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},as.SUMPPUMP={type:3,value:"SUMPPUMP"},as.VERTICALINLINE={type:3,value:"VERTICALINLINE"},as.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=as;class ls{}ls.BLADE={type:3,value:"BLADE"},ls.CHECKRAIL={type:3,value:"CHECKRAIL"},ls.GUARDRAIL={type:3,value:"GUARDRAIL"},ls.RACKRAIL={type:3,value:"RACKRAIL"},ls.RAIL={type:3,value:"RAIL"},ls.STOCKRAIL={type:3,value:"STOCKRAIL"},ls.USERDEFINED={type:3,value:"USERDEFINED"},ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailTypeEnum=ls;class hs{}hs.BALUSTRADE={type:3,value:"BALUSTRADE"},hs.FENCE={type:3,value:"FENCE"},hs.GUARDRAIL={type:3,value:"GUARDRAIL"},hs.HANDRAIL={type:3,value:"HANDRAIL"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=hs;class cs{}cs.DILATATIONSUPERSTRUCTURE={type:3,value:"DILATATIONSUPERSTRUCTURE"},cs.LINESIDESTRUCTURE={type:3,value:"LINESIDESTRUCTURE"},cs.LINESIDESTRUCTUREPART={type:3,value:"LINESIDESTRUCTUREPART"},cs.PLAINTRACKSUPERSTRUCTURE={type:3,value:"PLAINTRACKSUPERSTRUCTURE"},cs.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},cs.TRACKSTRUCTURE={type:3,value:"TRACKSTRUCTURE"},cs.TRACKSTRUCTUREPART={type:3,value:"TRACKSTRUCTUREPART"},cs.TURNOUTSUPERSTRUCTURE={type:3,value:"TURNOUTSUPERSTRUCTURE"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayPartTypeEnum=cs;class As{}As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayTypeEnum=As;class us{}us.SPIRAL={type:3,value:"SPIRAL"},us.STRAIGHT={type:3,value:"STRAIGHT"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=us;class ps{}ps.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},ps.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},ps.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},ps.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},ps.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},ps.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=ps;class ds{}ds.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},ds.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},ds.DAILY={type:3,value:"DAILY"},ds.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},ds.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},ds.WEEKLY={type:3,value:"WEEKLY"},ds.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},ds.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=ds;class fs{}fs.BOUNDARY={type:3,value:"BOUNDARY"},fs.INTERSECTION={type:3,value:"INTERSECTION"},fs.KILOPOINT={type:3,value:"KILOPOINT"},fs.LANDMARK={type:3,value:"LANDMARK"},fs.MILEPOINT={type:3,value:"MILEPOINT"},fs.POSITION={type:3,value:"POSITION"},fs.REFERENCEMARKER={type:3,value:"REFERENCEMARKER"},fs.STATION={type:3,value:"STATION"},fs.USERDEFINED={type:3,value:"USERDEFINED"},fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReferentTypeEnum=fs;class Es{}Es.BLINN={type:3,value:"BLINN"},Es.FLAT={type:3,value:"FLAT"},Es.GLASS={type:3,value:"GLASS"},Es.MATT={type:3,value:"MATT"},Es.METAL={type:3,value:"METAL"},Es.MIRROR={type:3,value:"MIRROR"},Es.PHONG={type:3,value:"PHONG"},Es.PHYSICAL={type:3,value:"PHYSICAL"},Es.PLASTIC={type:3,value:"PLASTIC"},Es.STRAUSS={type:3,value:"STRAUSS"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Es;class ms{}ms.DYNAMICALLYCOMPACTED={type:3,value:"DYNAMICALLYCOMPACTED"},ms.GROUTED={type:3,value:"GROUTED"},ms.REPLACED={type:3,value:"REPLACED"},ms.ROLLERCOMPACTED={type:3,value:"ROLLERCOMPACTED"},ms.SURCHARGEPRELOADED={type:3,value:"SURCHARGEPRELOADED"},ms.VERTICALLYDRAINED={type:3,value:"VERTICALLYDRAINED"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcedSoilTypeEnum=ms;class ys{}ys.ANCHORING={type:3,value:"ANCHORING"},ys.EDGE={type:3,value:"EDGE"},ys.LIGATURE={type:3,value:"LIGATURE"},ys.MAIN={type:3,value:"MAIN"},ys.PUNCHING={type:3,value:"PUNCHING"},ys.RING={type:3,value:"RING"},ys.SHEAR={type:3,value:"SHEAR"},ys.STUD={type:3,value:"STUD"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=ys;class gs{}gs.PLAIN={type:3,value:"PLAIN"},gs.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=gs;class Is{}Is.ANCHORING={type:3,value:"ANCHORING"},Is.EDGE={type:3,value:"EDGE"},Is.LIGATURE={type:3,value:"LIGATURE"},Is.MAIN={type:3,value:"MAIN"},Is.PUNCHING={type:3,value:"PUNCHING"},Is.RING={type:3,value:"RING"},Is.SHEAR={type:3,value:"SHEAR"},Is.SPACEBAR={type:3,value:"SPACEBAR"},Is.STUD={type:3,value:"STUD"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Is;class vs{}vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=vs;class Ts{}Ts.BICYCLECROSSING={type:3,value:"BICYCLECROSSING"},Ts.BUS_STOP={type:3,value:"BUS_STOP"},Ts.CARRIAGEWAY={type:3,value:"CARRIAGEWAY"},Ts.CENTRALISLAND={type:3,value:"CENTRALISLAND"},Ts.CENTRALRESERVE={type:3,value:"CENTRALRESERVE"},Ts.HARDSHOULDER={type:3,value:"HARDSHOULDER"},Ts.INTERSECTION={type:3,value:"INTERSECTION"},Ts.LAYBY={type:3,value:"LAYBY"},Ts.PARKINGBAY={type:3,value:"PARKINGBAY"},Ts.PASSINGBAY={type:3,value:"PASSINGBAY"},Ts.PEDESTRIAN_CROSSING={type:3,value:"PEDESTRIAN_CROSSING"},Ts.RAILWAYCROSSING={type:3,value:"RAILWAYCROSSING"},Ts.REFUGEISLAND={type:3,value:"REFUGEISLAND"},Ts.ROADSEGMENT={type:3,value:"ROADSEGMENT"},Ts.ROADSIDE={type:3,value:"ROADSIDE"},Ts.ROADSIDEPART={type:3,value:"ROADSIDEPART"},Ts.ROADWAYPLATEAU={type:3,value:"ROADWAYPLATEAU"},Ts.ROUNDABOUT={type:3,value:"ROUNDABOUT"},Ts.SHOULDER={type:3,value:"SHOULDER"},Ts.SIDEWALK={type:3,value:"SIDEWALK"},Ts.SOFTSHOULDER={type:3,value:"SOFTSHOULDER"},Ts.TOLLPLAZA={type:3,value:"TOLLPLAZA"},Ts.TRAFFICISLAND={type:3,value:"TRAFFICISLAND"},Ts.TRAFFICLANE={type:3,value:"TRAFFICLANE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadPartTypeEnum=Ts;class _s{}_s.USERDEFINED={type:3,value:"USERDEFINED"},_s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadTypeEnum=_s;class Rs{}Rs.ARCHITECT={type:3,value:"ARCHITECT"},Rs.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Rs.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Rs.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Rs.CLIENT={type:3,value:"CLIENT"},Rs.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Rs.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Rs.CONSULTANT={type:3,value:"CONSULTANT"},Rs.CONTRACTOR={type:3,value:"CONTRACTOR"},Rs.COSTENGINEER={type:3,value:"COSTENGINEER"},Rs.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Rs.ENGINEER={type:3,value:"ENGINEER"},Rs.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Rs.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Rs.MANUFACTURER={type:3,value:"MANUFACTURER"},Rs.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Rs.OWNER={type:3,value:"OWNER"},Rs.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Rs.RESELLER={type:3,value:"RESELLER"},Rs.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Rs.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Rs.SUPPLIER={type:3,value:"SUPPLIER"},Rs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Rs;class Ps{}Ps.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Ps.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Ps.DOME_ROOF={type:3,value:"DOME_ROOF"},Ps.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Ps.FREEFORM={type:3,value:"FREEFORM"},Ps.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Ps.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Ps.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Ps.HIP_ROOF={type:3,value:"HIP_ROOF"},Ps.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Ps.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Ps.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Ps.SHED_ROOF={type:3,value:"SHED_ROOF"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Ps;class Ds{}Ds.ATTO={type:3,value:"ATTO"},Ds.CENTI={type:3,value:"CENTI"},Ds.DECA={type:3,value:"DECA"},Ds.DECI={type:3,value:"DECI"},Ds.EXA={type:3,value:"EXA"},Ds.FEMTO={type:3,value:"FEMTO"},Ds.GIGA={type:3,value:"GIGA"},Ds.HECTO={type:3,value:"HECTO"},Ds.KILO={type:3,value:"KILO"},Ds.MEGA={type:3,value:"MEGA"},Ds.MICRO={type:3,value:"MICRO"},Ds.MILLI={type:3,value:"MILLI"},Ds.NANO={type:3,value:"NANO"},Ds.PETA={type:3,value:"PETA"},Ds.PICO={type:3,value:"PICO"},Ds.TERA={type:3,value:"TERA"},e.IfcSIPrefix=Ds;class Ns{}Ns.AMPERE={type:3,value:"AMPERE"},Ns.BECQUEREL={type:3,value:"BECQUEREL"},Ns.CANDELA={type:3,value:"CANDELA"},Ns.COULOMB={type:3,value:"COULOMB"},Ns.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Ns.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Ns.FARAD={type:3,value:"FARAD"},Ns.GRAM={type:3,value:"GRAM"},Ns.GRAY={type:3,value:"GRAY"},Ns.HENRY={type:3,value:"HENRY"},Ns.HERTZ={type:3,value:"HERTZ"},Ns.JOULE={type:3,value:"JOULE"},Ns.KELVIN={type:3,value:"KELVIN"},Ns.LUMEN={type:3,value:"LUMEN"},Ns.LUX={type:3,value:"LUX"},Ns.METRE={type:3,value:"METRE"},Ns.MOLE={type:3,value:"MOLE"},Ns.NEWTON={type:3,value:"NEWTON"},Ns.OHM={type:3,value:"OHM"},Ns.PASCAL={type:3,value:"PASCAL"},Ns.RADIAN={type:3,value:"RADIAN"},Ns.SECOND={type:3,value:"SECOND"},Ns.SIEMENS={type:3,value:"SIEMENS"},Ns.SIEVERT={type:3,value:"SIEVERT"},Ns.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Ns.STERADIAN={type:3,value:"STERADIAN"},Ns.TESLA={type:3,value:"TESLA"},Ns.VOLT={type:3,value:"VOLT"},Ns.WATT={type:3,value:"WATT"},Ns.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Ns;class bs{}bs.BATH={type:3,value:"BATH"},bs.BIDET={type:3,value:"BIDET"},bs.CISTERN={type:3,value:"CISTERN"},bs.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},bs.SHOWER={type:3,value:"SHOWER"},bs.SINK={type:3,value:"SINK"},bs.TOILETPAN={type:3,value:"TOILETPAN"},bs.URINAL={type:3,value:"URINAL"},bs.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},bs.WCSEAT={type:3,value:"WCSEAT"},bs.USERDEFINED={type:3,value:"USERDEFINED"},bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=bs;class Cs{}Cs.TAPERED={type:3,value:"TAPERED"},Cs.UNIFORM={type:3,value:"UNIFORM"},e.IfcSectionTypeEnum=Cs;class Os{}Os.CO2SENSOR={type:3,value:"CO2SENSOR"},Os.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Os.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Os.COSENSOR={type:3,value:"COSENSOR"},Os.EARTHQUAKESENSOR={type:3,value:"EARTHQUAKESENSOR"},Os.FIRESENSOR={type:3,value:"FIRESENSOR"},Os.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Os.FOREIGNOBJECTDETECTIONSENSOR={type:3,value:"FOREIGNOBJECTDETECTIONSENSOR"},Os.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Os.GASSENSOR={type:3,value:"GASSENSOR"},Os.HEATSENSOR={type:3,value:"HEATSENSOR"},Os.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Os.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Os.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Os.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Os.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Os.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Os.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Os.OBSTACLESENSOR={type:3,value:"OBSTACLESENSOR"},Os.PHSENSOR={type:3,value:"PHSENSOR"},Os.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Os.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Os.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Os.RAINSENSOR={type:3,value:"RAINSENSOR"},Os.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Os.SNOWDEPTHSENSOR={type:3,value:"SNOWDEPTHSENSOR"},Os.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Os.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Os.TRAINSENSOR={type:3,value:"TRAINSENSOR"},Os.TURNOUTCLOSURESENSOR={type:3,value:"TURNOUTCLOSURESENSOR"},Os.WHEELSENSOR={type:3,value:"WHEELSENSOR"},Os.WINDSENSOR={type:3,value:"WINDSENSOR"},Os.USERDEFINED={type:3,value:"USERDEFINED"},Os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Os;class Ss{}Ss.FINISH_FINISH={type:3,value:"FINISH_FINISH"},Ss.FINISH_START={type:3,value:"FINISH_START"},Ss.START_FINISH={type:3,value:"START_FINISH"},Ss.START_START={type:3,value:"START_START"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=Ss;class xs{}xs.AWNING={type:3,value:"AWNING"},xs.JALOUSIE={type:3,value:"JALOUSIE"},xs.SHUTTER={type:3,value:"SHUTTER"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=xs;class ws{}ws.MARKER={type:3,value:"MARKER"},ws.MIRROR={type:3,value:"MIRROR"},ws.PICTORAL={type:3,value:"PICTORAL"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignTypeEnum=ws;class Bs{}Bs.AUDIO={type:3,value:"AUDIO"},Bs.MIXED={type:3,value:"MIXED"},Bs.VISUAL={type:3,value:"VISUAL"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignalTypeEnum=Bs;class Fs{}Fs.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},Fs.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},Fs.P_LISTVALUE={type:3,value:"P_LISTVALUE"},Fs.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},Fs.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},Fs.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},Fs.Q_AREA={type:3,value:"Q_AREA"},Fs.Q_COUNT={type:3,value:"Q_COUNT"},Fs.Q_LENGTH={type:3,value:"Q_LENGTH"},Fs.Q_NUMBER={type:3,value:"Q_NUMBER"},Fs.Q_TIME={type:3,value:"Q_TIME"},Fs.Q_VOLUME={type:3,value:"Q_VOLUME"},Fs.Q_WEIGHT={type:3,value:"Q_WEIGHT"},e.IfcSimplePropertyTemplateTypeEnum=Fs;class Ms{}Ms.APPROACH_SLAB={type:3,value:"APPROACH_SLAB"},Ms.BASESLAB={type:3,value:"BASESLAB"},Ms.FLOOR={type:3,value:"FLOOR"},Ms.LANDING={type:3,value:"LANDING"},Ms.PAVING={type:3,value:"PAVING"},Ms.ROOF={type:3,value:"ROOF"},Ms.SIDEWALK={type:3,value:"SIDEWALK"},Ms.TRACKSLAB={type:3,value:"TRACKSLAB"},Ms.WEARING={type:3,value:"WEARING"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Ms;class Ls{}Ls.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},Ls.SOLARPANEL={type:3,value:"SOLARPANEL"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=Ls;class Us{}Us.CONVECTOR={type:3,value:"CONVECTOR"},Us.RADIATOR={type:3,value:"RADIATOR"},Us.USERDEFINED={type:3,value:"USERDEFINED"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Us;class Hs{}Hs.BERTH={type:3,value:"BERTH"},Hs.EXTERNAL={type:3,value:"EXTERNAL"},Hs.GFA={type:3,value:"GFA"},Hs.INTERNAL={type:3,value:"INTERNAL"},Hs.PARKING={type:3,value:"PARKING"},Hs.SPACE={type:3,value:"SPACE"},Hs.USERDEFINED={type:3,value:"USERDEFINED"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Hs;class Gs{}Gs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Gs.FIRESAFETY={type:3,value:"FIRESAFETY"},Gs.INTERFERENCE={type:3,value:"INTERFERENCE"},Gs.LIGHTING={type:3,value:"LIGHTING"},Gs.OCCUPANCY={type:3,value:"OCCUPANCY"},Gs.RESERVATION={type:3,value:"RESERVATION"},Gs.SECURITY={type:3,value:"SECURITY"},Gs.THERMAL={type:3,value:"THERMAL"},Gs.TRANSPORT={type:3,value:"TRANSPORT"},Gs.VENTILATION={type:3,value:"VENTILATION"},Gs.USERDEFINED={type:3,value:"USERDEFINED"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=Gs;class ks{}ks.BIRDCAGE={type:3,value:"BIRDCAGE"},ks.COWL={type:3,value:"COWL"},ks.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=ks;class Vs{}Vs.CURVED={type:3,value:"CURVED"},Vs.FREEFORM={type:3,value:"FREEFORM"},Vs.SPIRAL={type:3,value:"SPIRAL"},Vs.STRAIGHT={type:3,value:"STRAIGHT"},Vs.WINDER={type:3,value:"WINDER"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Vs;class js{}js.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},js.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},js.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},js.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},js.LADDER={type:3,value:"LADDER"},js.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},js.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},js.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},js.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},js.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},js.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},js.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},js.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},js.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},js.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=js;class Qs{}Qs.LOCKED={type:3,value:"LOCKED"},Qs.READONLY={type:3,value:"READONLY"},Qs.READONLYLOCKED={type:3,value:"READONLYLOCKED"},Qs.READWRITE={type:3,value:"READWRITE"},Qs.READWRITELOCKED={type:3,value:"READWRITELOCKED"},e.IfcStateEnum=Qs;class Ws{}Ws.CONST={type:3,value:"CONST"},Ws.DISCRETE={type:3,value:"DISCRETE"},Ws.EQUIDISTANT={type:3,value:"EQUIDISTANT"},Ws.LINEAR={type:3,value:"LINEAR"},Ws.PARABOLA={type:3,value:"PARABOLA"},Ws.POLYGONAL={type:3,value:"POLYGONAL"},Ws.SINUS={type:3,value:"SINUS"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=Ws;class zs{}zs.CABLE={type:3,value:"CABLE"},zs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},zs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},zs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},zs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=zs;class Ks{}Ks.BILINEAR={type:3,value:"BILINEAR"},Ks.CONST={type:3,value:"CONST"},Ks.DISCRETE={type:3,value:"DISCRETE"},Ks.ISOCONTOUR={type:3,value:"ISOCONTOUR"},Ks.USERDEFINED={type:3,value:"USERDEFINED"},Ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=Ks;class Ys{}Ys.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},Ys.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},Ys.SHELL={type:3,value:"SHELL"},Ys.USERDEFINED={type:3,value:"USERDEFINED"},Ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=Ys;class Xs{}Xs.PURCHASE={type:3,value:"PURCHASE"},Xs.WORK={type:3,value:"WORK"},Xs.USERDEFINED={type:3,value:"USERDEFINED"},Xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=Xs;class Zs{}Zs.DEFECT={type:3,value:"DEFECT"},Zs.HATCHMARKING={type:3,value:"HATCHMARKING"},Zs.LINEMARKING={type:3,value:"LINEMARKING"},Zs.MARK={type:3,value:"MARK"},Zs.NONSKIDSURFACING={type:3,value:"NONSKIDSURFACING"},Zs.PAVEMENTSURFACEMARKING={type:3,value:"PAVEMENTSURFACEMARKING"},Zs.RUMBLESTRIP={type:3,value:"RUMBLESTRIP"},Zs.SYMBOLMARKING={type:3,value:"SYMBOLMARKING"},Zs.TAG={type:3,value:"TAG"},Zs.TRANSVERSERUMBLESTRIP={type:3,value:"TRANSVERSERUMBLESTRIP"},Zs.TREATMENT={type:3,value:"TREATMENT"},Zs.USERDEFINED={type:3,value:"USERDEFINED"},Zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=Zs;class qs{}qs.BOTH={type:3,value:"BOTH"},qs.NEGATIVE={type:3,value:"NEGATIVE"},qs.POSITIVE={type:3,value:"POSITIVE"},e.IfcSurfaceSide=qs;class Js{}Js.CONTACTOR={type:3,value:"CONTACTOR"},Js.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Js.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Js.KEYPAD={type:3,value:"KEYPAD"},Js.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Js.RELAY={type:3,value:"RELAY"},Js.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Js.STARTER={type:3,value:"STARTER"},Js.START_AND_STOP_EQUIPMENT={type:3,value:"START_AND_STOP_EQUIPMENT"},Js.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Js.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Js.USERDEFINED={type:3,value:"USERDEFINED"},Js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Js;class $s{}$s.PANEL={type:3,value:"PANEL"},$s.SUBRACK={type:3,value:"SUBRACK"},$s.WORKSURFACE={type:3,value:"WORKSURFACE"},$s.USERDEFINED={type:3,value:"USERDEFINED"},$s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=$s;class ei{}ei.BASIN={type:3,value:"BASIN"},ei.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ei.EXPANSION={type:3,value:"EXPANSION"},ei.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ei.OILRETENTIONTRAY={type:3,value:"OILRETENTIONTRAY"},ei.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ei.STORAGE={type:3,value:"STORAGE"},ei.VESSEL={type:3,value:"VESSEL"},ei.USERDEFINED={type:3,value:"USERDEFINED"},ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ei;class ti{}ti.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},ti.WORKTIME={type:3,value:"WORKTIME"},ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=ti;class si{}si.ADJUSTMENT={type:3,value:"ADJUSTMENT"},si.ATTENDANCE={type:3,value:"ATTENDANCE"},si.CALIBRATION={type:3,value:"CALIBRATION"},si.CONSTRUCTION={type:3,value:"CONSTRUCTION"},si.DEMOLITION={type:3,value:"DEMOLITION"},si.DISMANTLE={type:3,value:"DISMANTLE"},si.DISPOSAL={type:3,value:"DISPOSAL"},si.EMERGENCY={type:3,value:"EMERGENCY"},si.INSPECTION={type:3,value:"INSPECTION"},si.INSTALLATION={type:3,value:"INSTALLATION"},si.LOGISTIC={type:3,value:"LOGISTIC"},si.MAINTENANCE={type:3,value:"MAINTENANCE"},si.MOVE={type:3,value:"MOVE"},si.OPERATION={type:3,value:"OPERATION"},si.REMOVAL={type:3,value:"REMOVAL"},si.RENOVATION={type:3,value:"RENOVATION"},si.SAFETY={type:3,value:"SAFETY"},si.SHUTDOWN={type:3,value:"SHUTDOWN"},si.STARTUP={type:3,value:"STARTUP"},si.TESTING={type:3,value:"TESTING"},si.TROUBLESHOOTING={type:3,value:"TROUBLESHOOTING"},si.USERDEFINED={type:3,value:"USERDEFINED"},si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=si;class ii{}ii.COUPLER={type:3,value:"COUPLER"},ii.FIXED_END={type:3,value:"FIXED_END"},ii.TENSIONING_END={type:3,value:"TENSIONING_END"},ii.USERDEFINED={type:3,value:"USERDEFINED"},ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=ii;class ri{}ri.COUPLER={type:3,value:"COUPLER"},ri.DIABOLO={type:3,value:"DIABOLO"},ri.DUCT={type:3,value:"DUCT"},ri.GROUTING_DUCT={type:3,value:"GROUTING_DUCT"},ri.TRUMPET={type:3,value:"TRUMPET"},ri.USERDEFINED={type:3,value:"USERDEFINED"},ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonConduitTypeEnum=ri;class oi{}oi.BAR={type:3,value:"BAR"},oi.COATED={type:3,value:"COATED"},oi.STRAND={type:3,value:"STRAND"},oi.WIRE={type:3,value:"WIRE"},oi.USERDEFINED={type:3,value:"USERDEFINED"},oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=oi;class ni{}ni.DOWN={type:3,value:"DOWN"},ni.LEFT={type:3,value:"LEFT"},ni.RIGHT={type:3,value:"RIGHT"},ni.UP={type:3,value:"UP"},e.IfcTextPath=ni;class ai{}ai.CONTINUOUS={type:3,value:"CONTINUOUS"},ai.DISCRETE={type:3,value:"DISCRETE"},ai.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},ai.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},ai.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},ai.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=ai;class li{}li.BLOCKINGDEVICE={type:3,value:"BLOCKINGDEVICE"},li.DERAILER={type:3,value:"DERAILER"},li.FROG={type:3,value:"FROG"},li.HALF_SET_OF_BLADES={type:3,value:"HALF_SET_OF_BLADES"},li.SLEEPER={type:3,value:"SLEEPER"},li.SPEEDREGULATOR={type:3,value:"SPEEDREGULATOR"},li.TRACKENDOFALIGNMENT={type:3,value:"TRACKENDOFALIGNMENT"},li.VEHICLESTOP={type:3,value:"VEHICLESTOP"},li.USERDEFINED={type:3,value:"USERDEFINED"},li.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTrackElementTypeEnum=li;class hi{}hi.CHOPPER={type:3,value:"CHOPPER"},hi.COMBINED={type:3,value:"COMBINED"},hi.CURRENT={type:3,value:"CURRENT"},hi.FREQUENCY={type:3,value:"FREQUENCY"},hi.INVERTER={type:3,value:"INVERTER"},hi.RECTIFIER={type:3,value:"RECTIFIER"},hi.VOLTAGE={type:3,value:"VOLTAGE"},hi.USERDEFINED={type:3,value:"USERDEFINED"},hi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=hi;class ci{}ci.CONTINUOUS={type:3,value:"CONTINUOUS"},ci.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},ci.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},ci.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},e.IfcTransitionCode=ci;class Ai{}Ai.CRANEWAY={type:3,value:"CRANEWAY"},Ai.ELEVATOR={type:3,value:"ELEVATOR"},Ai.ESCALATOR={type:3,value:"ESCALATOR"},Ai.HAULINGGEAR={type:3,value:"HAULINGGEAR"},Ai.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ai.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ai.USERDEFINED={type:3,value:"USERDEFINED"},Ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ai;class ui{}ui.CARTESIAN={type:3,value:"CARTESIAN"},ui.PARAMETER={type:3,value:"PARAMETER"},ui.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=ui;class pi{}pi.FINNED={type:3,value:"FINNED"},pi.USERDEFINED={type:3,value:"USERDEFINED"},pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=pi;class di{}di.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},di.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},di.AREAUNIT={type:3,value:"AREAUNIT"},di.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},di.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},di.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},di.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},di.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},di.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},di.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},di.ENERGYUNIT={type:3,value:"ENERGYUNIT"},di.FORCEUNIT={type:3,value:"FORCEUNIT"},di.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},di.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},di.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},di.LENGTHUNIT={type:3,value:"LENGTHUNIT"},di.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},di.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},di.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},di.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},di.MASSUNIT={type:3,value:"MASSUNIT"},di.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},di.POWERUNIT={type:3,value:"POWERUNIT"},di.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},di.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},di.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},di.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},di.TIMEUNIT={type:3,value:"TIMEUNIT"},di.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},di.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=di;class fi{}fi.ALARMPANEL={type:3,value:"ALARMPANEL"},fi.BASESTATIONCONTROLLER={type:3,value:"BASESTATIONCONTROLLER"},fi.COMBINED={type:3,value:"COMBINED"},fi.CONTROLPANEL={type:3,value:"CONTROLPANEL"},fi.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},fi.HUMIDISTAT={type:3,value:"HUMIDISTAT"},fi.INDICATORPANEL={type:3,value:"INDICATORPANEL"},fi.MIMICPANEL={type:3,value:"MIMICPANEL"},fi.THERMOSTAT={type:3,value:"THERMOSTAT"},fi.WEATHERSTATION={type:3,value:"WEATHERSTATION"},fi.USERDEFINED={type:3,value:"USERDEFINED"},fi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=fi;class Ei{}Ei.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Ei.AIRHANDLER={type:3,value:"AIRHANDLER"},Ei.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},Ei.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Ei.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Ei.USERDEFINED={type:3,value:"USERDEFINED"},Ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Ei;class mi{}mi.AIRRELEASE={type:3,value:"AIRRELEASE"},mi.ANTIVACUUM={type:3,value:"ANTIVACUUM"},mi.CHANGEOVER={type:3,value:"CHANGEOVER"},mi.CHECK={type:3,value:"CHECK"},mi.COMMISSIONING={type:3,value:"COMMISSIONING"},mi.DIVERTING={type:3,value:"DIVERTING"},mi.DOUBLECHECK={type:3,value:"DOUBLECHECK"},mi.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},mi.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},mi.FAUCET={type:3,value:"FAUCET"},mi.FLUSHING={type:3,value:"FLUSHING"},mi.GASCOCK={type:3,value:"GASCOCK"},mi.GASTAP={type:3,value:"GASTAP"},mi.ISOLATING={type:3,value:"ISOLATING"},mi.MIXING={type:3,value:"MIXING"},mi.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},mi.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},mi.REGULATING={type:3,value:"REGULATING"},mi.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},mi.STEAMTRAP={type:3,value:"STEAMTRAP"},mi.STOPCOCK={type:3,value:"STOPCOCK"},mi.USERDEFINED={type:3,value:"USERDEFINED"},mi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=mi;class yi{}yi.CARGO={type:3,value:"CARGO"},yi.ROLLINGSTOCK={type:3,value:"ROLLINGSTOCK"},yi.VEHICLE={type:3,value:"VEHICLE"},yi.VEHICLEAIR={type:3,value:"VEHICLEAIR"},yi.VEHICLEMARINE={type:3,value:"VEHICLEMARINE"},yi.VEHICLETRACKED={type:3,value:"VEHICLETRACKED"},yi.VEHICLEWHEELED={type:3,value:"VEHICLEWHEELED"},yi.USERDEFINED={type:3,value:"USERDEFINED"},yi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVehicleTypeEnum=yi;class gi{}gi.AXIAL_YIELD={type:3,value:"AXIAL_YIELD"},gi.BENDING_YIELD={type:3,value:"BENDING_YIELD"},gi.FRICTION={type:3,value:"FRICTION"},gi.RUBBER={type:3,value:"RUBBER"},gi.SHEAR_YIELD={type:3,value:"SHEAR_YIELD"},gi.VISCOUS={type:3,value:"VISCOUS"},gi.USERDEFINED={type:3,value:"USERDEFINED"},gi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationDamperTypeEnum=gi;class Ii{}Ii.BASE={type:3,value:"BASE"},Ii.COMPRESSION={type:3,value:"COMPRESSION"},Ii.SPRING={type:3,value:"SPRING"},Ii.USERDEFINED={type:3,value:"USERDEFINED"},Ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Ii;class vi{}vi.BOUNDARY={type:3,value:"BOUNDARY"},vi.CLEARANCE={type:3,value:"CLEARANCE"},vi.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},vi.USERDEFINED={type:3,value:"USERDEFINED"},vi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVirtualElementTypeEnum=vi;class Ti{}Ti.CHAMFER={type:3,value:"CHAMFER"},Ti.CUTOUT={type:3,value:"CUTOUT"},Ti.EDGE={type:3,value:"EDGE"},Ti.HOLE={type:3,value:"HOLE"},Ti.MITER={type:3,value:"MITER"},Ti.NOTCH={type:3,value:"NOTCH"},Ti.USERDEFINED={type:3,value:"USERDEFINED"},Ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Ti;class _i{}_i.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},_i.MOVABLE={type:3,value:"MOVABLE"},_i.PARAPET={type:3,value:"PARAPET"},_i.PARTITIONING={type:3,value:"PARTITIONING"},_i.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},_i.POLYGONAL={type:3,value:"POLYGONAL"},_i.RETAININGWALL={type:3,value:"RETAININGWALL"},_i.SHEAR={type:3,value:"SHEAR"},_i.SOLIDWALL={type:3,value:"SOLIDWALL"},_i.STANDARD={type:3,value:"STANDARD"},_i.WAVEWALL={type:3,value:"WAVEWALL"},_i.USERDEFINED={type:3,value:"USERDEFINED"},_i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=_i;class Ri{}Ri.FLOORTRAP={type:3,value:"FLOORTRAP"},Ri.FLOORWASTE={type:3,value:"FLOORWASTE"},Ri.GULLYSUMP={type:3,value:"GULLYSUMP"},Ri.GULLYTRAP={type:3,value:"GULLYTRAP"},Ri.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ri.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ri.WASTETRAP={type:3,value:"WASTETRAP"},Ri.USERDEFINED={type:3,value:"USERDEFINED"},Ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ri;class Pi{}Pi.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Pi.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Pi.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Pi.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Pi.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Pi.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Pi.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Pi.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Pi.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Pi.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Pi.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Pi.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Pi.TOPHUNG={type:3,value:"TOPHUNG"},Pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Pi;class Di{}Di.BOTTOM={type:3,value:"BOTTOM"},Di.LEFT={type:3,value:"LEFT"},Di.MIDDLE={type:3,value:"MIDDLE"},Di.RIGHT={type:3,value:"RIGHT"},Di.TOP={type:3,value:"TOP"},Di.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Di;class Ni{}Ni.ALUMINIUM={type:3,value:"ALUMINIUM"},Ni.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ni.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ni.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Ni.PLASTIC={type:3,value:"PLASTIC"},Ni.STEEL={type:3,value:"STEEL"},Ni.WOOD={type:3,value:"WOOD"},Ni.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Ni;class bi{}bi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},bi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},bi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},bi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},bi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},bi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},bi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},bi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},bi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},bi.USERDEFINED={type:3,value:"USERDEFINED"},bi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=bi;class Ci{}Ci.LIGHTDOME={type:3,value:"LIGHTDOME"},Ci.SKYLIGHT={type:3,value:"SKYLIGHT"},Ci.WINDOW={type:3,value:"WINDOW"},Ci.USERDEFINED={type:3,value:"USERDEFINED"},Ci.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Ci;class Oi{}Oi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},Oi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},Oi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},Oi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},Oi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},Oi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},Oi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},Oi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},Oi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},Oi.USERDEFINED={type:3,value:"USERDEFINED"},Oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=Oi;class Si{}Si.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Si.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Si.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Si.USERDEFINED={type:3,value:"USERDEFINED"},Si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Si;class xi{}xi.ACTUAL={type:3,value:"ACTUAL"},xi.BASELINE={type:3,value:"BASELINE"},xi.PLANNED={type:3,value:"PLANNED"},xi.USERDEFINED={type:3,value:"USERDEFINED"},xi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=xi;class wi{}wi.ACTUAL={type:3,value:"ACTUAL"},wi.BASELINE={type:3,value:"BASELINE"},wi.PLANNED={type:3,value:"PLANNED"},wi.USERDEFINED={type:3,value:"USERDEFINED"},wi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=wi;e.IfcActorRole=class extends gI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Bi extends gI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Bi;class Fi extends gI{constructor(e,t,s){super(e),this.StartTag=t,this.EndTag=s,this.type=2879124712}}e.IfcAlignmentParameterSegment=Fi;e.IfcAlignmentVerticalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartHeight=o,this.StartGradient=n,this.EndGradient=a,this.RadiusOfCurvature=l,this.PredefinedType=h,this.type=3633395639}};e.IfcApplication=class extends gI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Mi extends gI{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Mi;e.IfcApproval=class extends gI{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Li extends gI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Li;e.IfcBoundaryEdgeCondition=class extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Li{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Ui extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Ui;e.IfcBoundaryNodeConditionWarping=class extends Ui{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class Hi extends gI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=Hi;class Gi extends Hi{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Gi;e.IfcConnectionSurfaceGeometry=class extends Hi{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends Hi{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class ki extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=ki;class Vi extends gI{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=Vi;class ji extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ji;e.IfcCostValue=class extends Mi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends gI{constructor(e,t,s,i,r){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.Name=r,this.type=1765591967}};e.IfcDerivedUnitElement=class extends gI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends gI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class Qi extends gI{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=Qi;class Wi extends gI{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=Wi;e.IfcExternallyDefinedHatchStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends gI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends gI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends Qi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends gI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends gI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends Vi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.ScaleY=h,this.ScaleZ=c,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends gI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class zi extends gI{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=zi;class Ki extends zi{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=Ki;e.IfcMaterialLayerSet=class extends zi{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends gI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class Yi extends zi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=Yi;e.IfcMaterialProfileSet=class extends zi{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends Yi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class Xi extends gI{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=Xi;e.IfcMeasureWithUnit=class extends gI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends gI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Zi extends gI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Zi;class qi extends gI{constructor(e,t){super(e),this.PlacementRelTo=t,this.type=3701648758}}e.IfcObjectPlacement=qi;e.IfcObjective=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends gI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class Ji extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=Ji;class $i extends Ji{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=$i;e.IfcPostalAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class er extends gI{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=er;class tr extends gI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=tr;e.IfcPresentationLayerWithStyle=class extends tr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class sr extends gI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=sr;class ir extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=ir;class rr extends gI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=rr;e.IfcProjectedCRS=class extends ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class or extends gI{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=or;e.IfcPropertyEnumeration=class extends or{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityNumber=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.NumberValue=r,this.Formula=o,this.type=2691318326}};e.IfcQuantityTime=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends gI{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class nr extends gI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=nr;class ar extends gI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=ar;class lr extends gI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=lr;e.IfcRepresentationMap=class extends gI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class hr extends gI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=hr;class cr extends gI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=cr;e.IfcSIUnit=class extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Prefix=i,this.Name=r,this.type=448429030}};class Ar extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=Ar;e.IfcShapeAspect=class extends gI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ur extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ur;e.IfcShapeRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class pr extends gI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=pr;class dr extends gI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=dr;e.IfcStructuralLoadConfiguration=class extends dr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class fr extends dr{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=fr;class Er extends fr{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Er;e.IfcStructuralLoadTemperature=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class mr extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=mr;e.IfcStyledItem=class extends lr{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends fr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends er{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends er{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class yr extends er{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=yr;e.IfcSurfaceStyleWithTextures=class extends er{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class gr extends er{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=gr;e.IfcTable=class extends gI{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends gI{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends gI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class Ir extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=Ir;e.IfcTaskTimeRecurring=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends er{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends er{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class vr extends er{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=vr;e.IfcTextureCoordinateGenerator=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};class Tr extends gI{constructor(e,t,s){super(e),this.TexCoordIndex=t,this.TexCoordsOf=s,this.type=222769930}}e.IfcTextureCoordinateIndices=Tr;e.IfcTextureCoordinateIndicesWithVoids=class extends Tr{constructor(e,t,s,i){super(e,t,s),this.TexCoordIndex=t,this.TexCoordsOf=s,this.InnerTexCoordIndices=i,this.type=1010789467}};e.IfcTextureMap=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends er{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends er{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends gI{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class _r extends gI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=_r;e.IfcTimeSeriesValue=class extends gI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Rr extends lr{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Rr;e.IfcTopologyRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends gI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Pr extends Rr{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Pr;e.IfcVertexPoint=class extends Pr{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends gI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends Ar{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.StartDate=o,this.FinishDate=n,this.type=1236880293}};e.IfcAlignmentCantSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartCantLeft=o,this.EndCantLeft=n,this.StartCantRight=a,this.EndCantRight=l,this.PredefinedType=h,this.type=3752311538}};e.IfcAlignmentHorizontalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartPoint=i,this.StartDirection=r,this.StartRadiusOfCurvature=o,this.EndRadiusOfCurvature=n,this.SegmentLength=a,this.GravityCenterLineHeight=l,this.PredefinedType=h,this.type=536804194}};e.IfcApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Dr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Dr;class Nr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Nr;e.IfcArbitraryProfileDefWithVoids=class extends Dr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends gr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Nr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends Qi{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Specification=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends er{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class br extends er{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=br;e.IfcCompositeProfileDef=class extends rr{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Cr extends Rr{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Cr;e.IfcConnectionCurveGeometry=class extends Hi{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Gi{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Zi{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class Or extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=Or;e.IfcConversionBasedUnitWithOffset=class extends Or{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends hr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends er{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends er{constructor(e,t,s,i){super(e),this.Name=t,this.CurveStyleFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends er{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Sr extends rr{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Sr;e.IfcDocumentInformation=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends Wi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class xr extends Rr{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=xr;e.IfcEdgeCurve=class extends xr{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends Ar{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class wr extends or{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=wr;e.IfcExternalReferenceRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Br extends Rr{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Br;class Fr extends Rr{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=Fr;e.IfcFaceOuterBound=class extends Fr{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Mr extends Br{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Mr;e.IfcFailureConnectionCondition=class extends pr{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelOrDraughting=i,this.type=738692330}};class Lr extends ar{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Lr;class Ur extends lr{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Ur;e.IfcGeometricRepresentationSubContext=class extends Lr{constructor(e,s,i,r,o,n,a,l){super(e,s,i,new t(0),null,r,null),this.ContextIdentifier=s,this.ContextType=i,this.WorldCoordinateSystem=r,this.ParentContext=o,this.TargetScale=n,this.TargetView=a,this.UserDefinedTargetView=l,this.type=4142052618}};class Hr extends Ur{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Hr;e.IfcGridPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.PlacementLocation=s,this.PlacementRefDirection=i,this.type=178086475}};class Gr extends Ur{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=Gr;e.IfcImageTexture=class extends gr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends er{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class kr extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=kr;e.IfcIndexedTriangleTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends Ar{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class Vr extends Ur{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=Vr;e.IfcLightSourceAmbient=class extends Vr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends Vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends Vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class jr extends Vr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=jr;e.IfcLightSourceSpot=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLinearPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.CartesianPosition=i,this.type=388784114}};e.IfcLocalPlacement=class extends qi{constructor(e,t,s){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class Qr extends Rr{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=Qr;e.IfcMappedItem=class extends lr{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends zi{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends ir{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class Wr extends Xi{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=Wr;e.IfcMaterialProfileSetUsageTapering=class extends Wr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends wr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.MaterialExpression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Sr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=2998442950}};class zr extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=zr;e.IfcOpenCrossProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.HorizontalWidths=i,this.Widths=r,this.Slopes=o,this.Tags=n,this.OffsetPoint=a,this.type=182550632}};e.IfcOpenShell=class extends Cr{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends xr{constructor(e,t,s,i){super(e,t,new yI(0)),this.EdgeStart=t,this.EdgeElement=s,this.Orientation=i,this.type=1029017970}};class Kr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=Kr;e.IfcPath=class extends Rr{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends Ji{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends gr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class Yr extends Ur{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Yr;class Xr extends Ur{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=Xr;class Zr extends Ur{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=Zr;e.IfcPointByDistanceExpression=class extends Zr{constructor(e,t,s,i,r,o){super(e),this.DistanceAlong=t,this.OffsetLateral=s,this.OffsetVertical=i,this.OffsetLongitudinal=r,this.BasisCurve=o,this.type=2165702409}};e.IfcPointOnCurve=class extends Zr{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends Zr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends Qr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends Gr{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class qr extends er{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=qr;class Jr extends or{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=Jr;class $r extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=$r;e.IfcProductDefinitionShape=class extends ir{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends wr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class eo extends or{constructor(e,t,s){super(e),this.Name=t,this.Specification=s,this.type=2598011224}}e.IfcProperty=eo;class to extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=to;e.IfcPropertyDependencyRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class so extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=so;class io extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=io;class ro extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=ro;class oo extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=oo;e.IfcRegularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class no extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=no;e.IfcResourceApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends Jr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Ur{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};class ao extends Ur{constructor(e,t){super(e),this.Transition=t,this.type=823603102}}e.IfcSegment=ao;e.IfcShellBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class lo extends eo{constructor(e,t,s){super(e,t,s),this.Name=t,this.Specification=s,this.type=3692461612}}e.IfcSimpleProperty=lo;e.IfcSlippageConnectionCondition=class extends pr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class ho extends Ur{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=ho;e.IfcStructuralLoadLinearForce=class extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class co extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=co;e.IfcStructuralLoadSingleDisplacementDistortion=class extends co{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ao extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ao;e.IfcStructuralLoadSingleForceWarping=class extends Ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends xr{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class uo extends Ur{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=uo;e.IfcSurfaceStyleRendering=class extends yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class po extends ho{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=po;class fo extends ho{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=fo;e.IfcSweptDiskSolidPolygonal=class extends fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Eo extends uo{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Eo;e.IfcTShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class mo extends Ur{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=mo;class yo extends Ur{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=yo;e.IfcTextLiteralWithExtent=class extends yo{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class go extends zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=go;class Io extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Io;class vo extends go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=vo;class To extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=To;e.IfcUShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Ur{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends Qr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcZShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Mr{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Ur{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};e.IfcAxis2PlacementLinear=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=3425423356}};class _o extends Ur{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=_o;class Ro extends uo{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=Ro;e.IfcBoundingBox=class extends Ur{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends Gr{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends Zr{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Po extends Ur{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Po;e.IfcCartesianPointList2D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=2059837836}};class Do extends Ur{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Do;class No extends Do{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=No;e.IfcCartesianTransformationOperator2DnonUniform=class extends No{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class bo extends Do{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=bo;e.IfcCartesianTransformationOperator3DnonUniform=class extends bo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Co extends Kr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Co;e.IfcClosedShell=class extends Cr{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends br{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends eo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Oo extends ao{constructor(e,t,s,i){super(e,t),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Oo;class So extends To{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=So;class xo extends zr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=xo;e.IfcCrewResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class wo extends Ur{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=wo;e.IfcCsgSolid=class extends ho{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Bo extends Ur{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Bo;e.IfcCurveBoundedPlane=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcCurveSegment=class extends ao{constructor(e,t,s,i,r,o){super(e,t),this.Transition=t,this.Placement=s,this.SegmentStart=i,this.SegmentLength=r,this.ParentCurve=o,this.type=4212018352}};e.IfcDirection=class extends Ur{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};class Fo extends po{constructor(e,t,s,i,r,o){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.type=593015953}}e.IfcDirectrixCurveSweptAreaSolid=Fo;e.IfcEdgeLoop=class extends Qr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends ro{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Mo extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Mo;class Lo extends uo{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Lo;e.IfcEllipseProfileDef=class extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class Uo extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=Uo;e.IfcExtrudedAreaSolidTapered=class extends Uo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Ur{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Ur{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};class Ho extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}}e.IfcFixedReferenceSweptAreaSolid=Ho;class Go extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Go;e.IfcFurnitureType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Hr{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class ko extends mo{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=ko;e.IfcIndexedPolygonalFaceWithVoids=class extends ko{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcIndexedPolygonalTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndices=r,this.type=3465909080}};e.IfcLShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends Bo{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Vo extends ho{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Vo;class jo extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=jo;class Qo extends Bo{constructor(e,t){super(e),this.BasisCurve=t,this.type=590820931}}e.IfcOffsetCurve=Qo;e.IfcOffsetCurve2D=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Qo{constructor(e,t,s,i,r){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcOffsetCurveByDistances=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.OffsetValues=s,this.Tag=i,this.type=2485787929}};e.IfcPcurve=class extends Bo{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends Xr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Lo{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};e.IfcPolynomialCurve=class extends Bo{constructor(e,t,s,i,r){super(e),this.Position=t,this.CoefficientsX=s,this.CoefficientsY=i,this.CoefficientsZ=r,this.type=3381221214}};class Wo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=Wo;class zo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=zo;class Ko extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=Ko;e.IfcProcedureType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class Yo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=Yo;class Xo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xo;e.IfcProject=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends lo{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Specification=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends so{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Specification=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class Zo extends io{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=Zo;e.IfcRectangleHollowProfileDef=class extends oo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends wo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends Ko{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class qo extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=qo;e.IfcRelAssignsToActor=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class Jo extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=Jo;e.IfcRelAssignsToGroupByFactor=class extends Jo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $o extends no{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$o;e.IfcRelAssociatesApproval=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $o{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileDef=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileDef=n,this.type=1033248425}};class en extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=en;class tn extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tn;e.IfcRelConnectsPathElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class sn extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sn;e.IfcRelConnectsWithEccentricity=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class rn extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=rn;class on extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=on;e.IfcRelDefinesByObject=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceSpace=l,this.InterferenceType=h,this.ImpliedOrder=c,this.type=427948657}};e.IfcRelNests=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelPositions=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPositioningElement=o,this.RelatedProducts=n,this.type=1441486842}};e.IfcRelProjectsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class nn extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=nn;class an extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=an;e.IfcRelSpaceBoundary2ndLevel=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Oo{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class ln extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=ln;class hn extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=hn;e.IfcRevolvedAreaSolidTapered=class extends hn{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends wo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends wo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class cn extends ho{constructor(e,t,s){super(e),this.Directrix=t,this.CrossSections=s,this.type=1862484736}}e.IfcSectionedSolid=cn;e.IfcSectionedSolidHorizontal=class extends cn{constructor(e,t,s,i){super(e,t,s),this.Directrix=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1290935644}};e.IfcSectionedSurface=class extends uo{constructor(e,t,s,i){super(e),this.Directrix=t,this.CrossSectionPositions=s,this.CrossSections=i,this.type=1356537516}};e.IfcSimplePropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class An extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=An;class un extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=un;class pn extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=pn;class dn extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=dn;e.IfcSpatialZone=class extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends un{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends wo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class fn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2735484536}}e.IfcSpiral=fn;class En extends Xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=En;class mn extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=yn;class gn extends En{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=gn;class In extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=In;e.IfcStructuralSurfaceMemberVarying=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class vn extends Bo{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=vn;e.IfcSurfaceCurveSweptAreaSolid=class extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Eo{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Eo{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Tn extends mo{constructor(e,t,s){super(e),this.Coordinates=t,this.Closed=s,this.type=2387106220}}e.IfcTessellatedFaceSet=Tn;e.IfcThirdOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o){super(e,t),this.Position=t,this.CubicTerm=s,this.QuadraticTerm=i,this.LinearTerm=r,this.ConstantTerm=o,this.type=782932809}};e.IfcToroidalSurface=class extends Lo{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};class _n extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3665877780}}e.IfcTransportationDeviceType=_n;class Rn extends Tn{constructor(e,t,s,i,r,o){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}}e.IfcTriangulatedFaceSet=Rn;e.IfcTriangulatedIrregularNetwork=class extends Rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.Flags=n,this.type=1229763772}};e.IfcVehicleType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3651464721}};e.IfcWindowLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class Pn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=Pn;class Dn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Dn;e.IfcAdvancedBrepWithVoids=class extends Dn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=1674181508}};class Nn extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Nn;class bn extends Nn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=bn;e.IfcBlock=class extends wo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends _o{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Cn extends Bo{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Cn;e.IfcBuildingStorey=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};class On extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1626504194}}e.IfcBuiltElementType=On;e.IfcChimneyType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Co{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcClothoid=class extends fn{constructor(e,t,s){super(e,t),this.Position=t,this.ClothoidConstant=s,this.type=3497074424}};e.IfcColumnType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class Sn extends Cn{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=Sn;class xn extends Sn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=xn;class wn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=wn;e.IfcConstructionEquipmentResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Bn extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Bn;class Fn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Fn;e.IfcCosineSpiral=class extends fn{constructor(e,t,s,i){super(e,t),this.Position=t,this.CosineTerm=s,this.ConstantTerm=i,this.type=2000195564}};e.IfcCostItem=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCourseType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4189326743}};e.IfcCoveringType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Mn extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1306400036}}e.IfcDeepFoundationType=Mn;e.IfcDirectrixDerivedReferenceSweptAreaSolid=class extends Ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=4234616927}};class Ln extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Ln;class Un extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Un;e.IfcDoorLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends Wo{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends zo{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Hn extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Hn;e.IfcElementAssembly=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class Gn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Gn;class kn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=kn;e.IfcEllipse=class extends wn{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Vn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Vn;e.IfcEngineType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class jn extends An{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=jn;class Qn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Qn;e.IfcFacetedBrepWithVoids=class extends Qn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Wn extends pn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=24185140}}e.IfcFacility=Wn;class zn extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.type=1310830890}}e.IfcFacilityPart=zn;e.IfcFacilityPartCommon=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=4228831410}};e.IfcFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class Kn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Kn;class Yn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Yn;class Xn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Xn;class Zn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Zn;class qn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=qn;e.IfcFlowMeterType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Jn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Jn;class $n extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=$n;class ea extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=ea;class ta extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=ta;class sa extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=sa;e.IfcFootingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class ia extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=ia;e.IfcFurniture=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};class ra extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4230923436}}e.IfcGeotechnicalElement=ra;e.IfcGeotechnicalStratum=class extends ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1594536857}};e.IfcGradientCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=2898700619}};class oa extends jo{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=oa;e.IfcHeatExchangerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcImpactProtectionDevice=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2568555532}};e.IfcImpactProtectionDeviceType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3948183225}};e.IfcIndexedPolyCurve=class extends Cn{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcKerbType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.Mountable=c,this.type=679976338}};e.IfcLaborResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};class na extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=2176059722}}e.IfcLinearElement=na;e.IfcLiquidTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1770583370}};e.IfcMarineFacility=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=525669439}};e.IfcMarinePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=976884017}};e.IfcMechanicalFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMobileTelecommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1950438474}};e.IfcMooringDeviceType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=710110818}};e.IfcMotorConnectionType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcNavigationElementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=506776471}};e.IfcOccupant=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}};e.IfcOutletType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPavementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=514975943}};e.IfcPerformanceHistory=class extends Fn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Tn{constructor(e,t,s,i,r){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends Cn{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class aa extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=aa;class la extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1946335990}}e.IfcPositioningElement=la;e.IfcProcedure=class extends Yo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1763565496}};e.IfcRailingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRailway=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=3992365140}};e.IfcRailwayPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=1891881377}};e.IfcRampFlightType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};e.IfcReferent=class extends la{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=4021432810}};class ha extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=ha;class ca extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ca;e.IfcReinforcingMesh=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAdheresToElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedSurfaceFeatures=n,this.type=3818125796}};e.IfcRelAggregates=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoad=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=146592293}};e.IfcRoadPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=550521510}};e.IfcRoofType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcSecondOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.QuadraticTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=3649235739}};e.IfcSegmentedReferenceCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=544395925}};e.IfcSeventhOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.Position=t,this.SepticTerm=s,this.SexticTerm=i,this.QuinticTerm=r,this.QuarticTerm=o,this.CubicTerm=n,this.QuadraticTerm=a,this.LinearTerm=l,this.ConstantTerm=h,this.type=1027922057}};e.IfcShadingDeviceType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSign=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=33720170}};e.IfcSignType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3599934289}};e.IfcSignalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1894708472}};e.IfcSineSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.SineTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=42703149}};e.IfcSite=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class Aa extends En{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=Aa;class ua extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=ua;class pa extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=pa;e.IfcStructuralCurveConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.AxisDirection=h,this.type=4243806635}};class da extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=da;e.IfcStructuralCurveMemberVarying=class extends da{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends pa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class fa extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=fa;e.IfcStructuralPointAction=class extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends oa{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class Ea extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=Ea;e.IfcStructuralSurfaceConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends Kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class ma extends oa{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=ma;e.IfcSystemFurnitureElement=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonConduit=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=3663046924}};e.IfcTendonConduitType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2281632017}};e.IfcTendonType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTrackElementType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=618700268}};e.IfcTransformerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElementType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class ya extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1953115116}}e.IfcTransportationDevice=ya;e.IfcTrimmedCurve=class extends Cn{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVehicle=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=840318589}};e.IfcVibrationDamper=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1530820697}};e.IfcVibrationDamperType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3956297820}};e.IfcVibrationIsolator=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2769231204}};e.IfcVoidingFeature=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class ga extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=ga;e.IfcWorkPlan=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends ma{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAlignmentCant=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.RailHeadDistance=l,this.type=4266260250}};e.IfcAlignmentHorizontal=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1545765605}};e.IfcAlignmentSegment=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.DesignParameters=l,this.type=317615605}};e.IfcAlignmentVertical=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1662888072}};e.IfcAsset=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class Ia extends Cn{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Ia;class va extends Ia{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=va;e.IfcBeamType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBearingType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3649138523}};e.IfcBoilerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Ta extends xn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=Ta;e.IfcBridge=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=644574406}};e.IfcBridgePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=963979645}};e.IfcBuilding=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};e.IfcBuildingElementPart=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxyType=class extends On{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};class _a extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1876633798}}e.IfcBuiltElement=_a;e.IfcBuiltSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=3862327254}};e.IfcBurnerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcCaissonFoundationType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3203706013}};e.IfcChillerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends wn{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}};e.IfcCommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcConveyorSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2940368186}};e.IfcCooledBeamType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCourse=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1502416096}};e.IfcCovering=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};class Ra extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3426335179}}e.IfcDeepFoundation=Ra;e.IfcDiscreteAccessory=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=479945903}};e.IfcDistributionChamberElementType=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Pa extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Pa;class Da extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=Da;class Na extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Na;e.IfcDistributionPort=class extends aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class ba extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=ba;e.IfcDoor=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}};e.IfcDuctFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcEarthworksCut=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3071239417}};class Ca extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1077100507}}e.IfcEarthworksElement=Ca;e.IfcEarthworksFill=class extends Ca{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3376911765}};e.IfcElectricApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricFlowTreatmentDeviceType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2142170206}};e.IfcElectricGeneratorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Oa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Oa;e.IfcEngine=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends jn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Sa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Sa;class xa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=xa;e.IfcFlowInstrumentType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class wa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=wa;class Ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Ba;class Fa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=Fa;class Ma extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=Ma;class La extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=La;e.IfcFooting=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};class Ua extends ra{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2713699986}}e.IfcGeotechnicalAssembly=Ua;e.IfcGrid=class extends la{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};e.IfcHeatExchanger=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcKerb=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.Mountable=h,this.type=2696325953}};e.IfcLamp=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};class Ha extends la{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1154579445}}e.IfcLinearPositioningElement=Ha;e.IfcLiquidTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1638804497}};e.IfcMedicalDevice=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};e.IfcMember=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}};e.IfcMobileTelecommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2078563270}};e.IfcMooringDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=234836483}};e.IfcMotorConnection=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcNavigationElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2182337498}};e.IfcOuterBoundaryCurve=class extends Ta{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPavement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1383356374}};e.IfcPile=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};e.IfcPlate=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}};e.IfcProtectiveDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRail=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3290496277}};e.IfcRailing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends va{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcedSoil=class extends Ca{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3798194928}};e.IfcReinforcingBar=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};e.IfcSignal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=991950508}};e.IfcSlab=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcSolarDevice=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends ma{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends fa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends Ea{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTrackElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3425753595}};e.IfcTransformer=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTransportElement=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTubeBundle=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Ga extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Ga;e.IfcWallStandardCase=class extends Ga{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};e.IfcWindow=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}};e.IfcActuatorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAlignment=class extends Ha{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=325726236}};e.IfcAudioVisualAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};e.IfcBeam=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}};e.IfcBearing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4196446775}};e.IfcBoiler=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBorehole=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3314249567}};e.IfcBuildingElementProxy=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBurner=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcCaissonFoundation=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3999819293}};e.IfcChiller=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcConveyorSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3460952963}};e.IfcCooledBeam=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3693000487}};e.IfcDistributionChamberElement=class extends Na{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends ba{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class ka extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=ka;e.IfcDuctFitting=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricFlowTreatmentDevice=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=24726584}};e.IfcElectricGenerator=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcGeomodel=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2680139844}};e.IfcGeoslice=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1971632696}};e.IfcProtectiveDeviceTrippingUnit=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(uI||(uI={})),(dI=pI||(pI={}))[dI.LOG_LEVEL_DEBUG=0]="LOG_LEVEL_DEBUG",dI[dI.LOG_LEVEL_INFO=1]="LOG_LEVEL_INFO",dI[dI.LOG_LEVEL_WARN=2]="LOG_LEVEL_WARN",dI[dI.LOG_LEVEL_ERROR=3]="LOG_LEVEL_ERROR",dI[dI.LOG_LEVEL_OFF=4]="LOG_LEVEL_OFF","undefined"!=typeof self&&self.crossOriginIsolated)try{EI()}catch(e){mI()}else mI();p.vec2(),p.vec3(),p.vec3(),p.vec3();class II{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class vI{constructor(e,t,s,i){this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:s,this.viewer=e?e.viewer:i,this._children=[],e&&e._children.push(this),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,t,s){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new II),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._subIdMap.addItem();i[r]={callback:t,scope:s||this},this._subIdEvents[r]=e;const o=this._events[e];return void 0!==o&&t.call(s||this,o),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}log(e){e="[LOG] "+e,window.console.log(e)}warn(e){e="[WARN] "+e,window.console.warn(e)}error(e){e="[ERROR] "+e,window.console.error(e)}_mutexActivation(e){const t=e.length;for(let s=0;s
Default text
',s.appendChild(this._modal),this._modalVisible=!1,this._modal.style.display="hidden"}show(e){this._modalVisible=!0,this._modal.querySelector(".xeokit-busy-modal-message").innerText=e,this._modal.style.display="block"}hide(){this._modalVisible=!1,this._modal.style.display="none"}destroy(){super.destroy(),this._modal&&(this._modal.parentNode.removeChild(this._modal),this._modal=null)}}const _I=p.vec3();class RI extends vI{constructor(e,t={}){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.camera;this._modelMementos={},i.eye=[.577,.577,.577],i.look=[0,0,0],i.up=[-1,1,-1],this.bimViewer._modelsExplorer.on("modelLoaded",(e=>{this._saveModelMemento(e)})),this.bimViewer._modelsExplorer.on("modelUnloaded",(e=>{this._destroyModelMemento(e)})),this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.reset(),e.preventDefault()}))}_saveModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;const s=new hr;s.saveObjects(this.viewer.scene,t,{visible:!0,edges:!0,xrayed:!0,highlighted:!0,selected:!0,clippable:!0,pickable:!0,colorize:!1,opacity:!1}),this._modelMementos[e]=s}_restoreModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;this._modelMementos[e].restoreObjects(this.viewer.scene,t)}_destroyModelMemento(e){delete this._modelMementos[e]}reset(){const e=this.viewer.scene.modelIds;for(var t=0,s=e.length;t{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.fit(),e.preventDefault()}))}fit(){const e=this.viewer.scene,t=e.getAABB(e.visibleObjectIds);this.viewer.cameraFlight.flyTo({aabb:t}),this.viewer.cameraControl.pivotPos=p.getAABB3Center(t,PI)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class NI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.cameraControl,r=t.cameraControlNavModeMediator;i.navMode="orbit",i.followPointer=!0,this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e?(i.followPointer=!0,i.pivoting=!1):i.pivoting=!0})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class bI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(s.classList.remove("active"),this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class CI extends vI{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.selected=!e.entity.selected)}))):(s.classList.remove("active"),void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class OI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.scene.on("modelLoaded",(e=>{if(!this._active){const e=this.viewer.metaScene.getObjectIDsByType("IfcSpace");this.viewer.scene.setObjectsCulled(e,!0)}})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e){this._active!==e&&(this._active=e,e?(this._buttonElement.classList.add("active"),this._enterShowSpacesMode(),this.fire("active",this._active)):(this._buttonElement.classList.remove("active"),this._exitShowSpacesMode(),this.fire("active",this._active)))}_enterShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!1)}_exitShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!0)}}class SI extends vI{constructor(e,t){super(e)}}const xI=p.AABB3(),wI=p.vec3();class BI extends n{constructor(e={}){if(!e.sectionPlanesPlugin)throw"Missing config: sectionPlanesPlugin";super(y.apply({},e)),this._sectionPlanesPlugin=e.sectionPlanesPlugin,this._viewer=this._sectionPlanesPlugin.viewer,this._onSceneSectionPlaneCreated=this._viewer.scene.on("sectionPlaneCreated",(()=>{this._buildMenu()})),this._onSceneSectionPlaneDestroyed=this._viewer.scene.on("sectionPlaneDestroyed",(()=>{this._buildMenu()})),this._buildMenu()}_buildMenu(){const e=this._sectionPlanesPlugin,t=Object.values(e.sectionPlanes),s=[];for(let i=0,r=t.length;i`${e.viewer.localeService.translate("sectionToolContextMenu.slice")||"Slice"} #`+(i+1),doHoverEnter(t){e.hideControl(),e.showControl(r.id)},doHoverLeave(t){e.hideControl()},items:[[{getTitle:e=>r.active?e.viewer.localeService.translate("sectionToolContextMenu.deactivate")||"Disable":e.viewer.localeService.translate("sectionToolContextMenu.activate")||"Enable",doAction:e=>{r.active=!r.active}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.edit")||"Edit",getEnabled:()=>r.active,doAction:t=>{e.hideControl(),e.showControl(r.id);const s=r.pos;xI.set(this._viewer.scene.aabb),p.getAABB3Center(xI,wI),xI[0]+=s[0]-wI[0],xI[1]+=s[1]-wI[1],xI[2]+=s[2]-wI[2],xI[3]+=s[0]-wI[0],xI[4]+=s[1]-wI[1],xI[5]+=s[2]-wI[2],this._viewer.cameraFlight.flyTo({aabb:xI,fitFOV:65})}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flip")||"Flip",getEnabled:()=>r.active,doAction:e=>{r.flipDir()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.delete")||"Delete",doAction:e=>{r.destroy()}}]]})}this.items=[[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flipSlices")||"Flip Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.flipSections()}}],[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.disableAllSlices")||"Disable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.disableSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.enableAllSlices")||"Enable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.enableSections()}}],s]}destroy(){super.destroy();const e=this._viewer.scene;e.off(this._onSceneSectionPlaneCreated),e.off(this._onSceneSectionPlaneDestroyed)}}class FI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";if(!t.menuButtonElement)throw"Missing config: menuButtonElement";this._buttonElement=t.buttonElement,this._counterElement=t.counterElement,this._menuButtonElement=t.menuButtonElement,this._menuButtonArrowElement=t.menuButtonArrowElement,this._sectionPlanesPlugin=new fg(this.viewer,{}),this._sectionToolContextMenu=new BI({sectionPlanesPlugin:this._sectionPlanesPlugin,hideOnMouseDown:!1,hideOnAction:!1}),this._sectionPlanesPlugin.setOverviewVisible(!1),this.on("enabled",(e=>{e?(this._buttonElement.classList.remove("disabled"),this._counterElement&&this._counterElement.classList.remove("disabled"),this._menuButtonElement.classList.remove("disabled"),this._menuButtonArrowElement.classList.remove("disabled")):(this._buttonElement.classList.add("disabled"),this._counterElement&&this._counterElement.classList.add("disabled"),this._menuButtonElement.classList.add("disabled"),this._menuButtonArrowElement.classList.add("disabled"))})),this.on("active",(e=>{e?(this._buttonElement.classList.add("active"),this._counterElement&&this._counterElement.classList.add("active"),this._menuButtonElement.classList.add("active"),this._menuButtonArrowElement.classList.add("active")):(this._buttonElement.classList.remove("active"),this._counterElement&&this._counterElement.classList.remove("active"),this._menuButtonElement.classList.remove("active"),this._menuButtonArrowElement.classList.remove("active"))})),this.on("active",(e=>{e||this._sectionPlanesPlugin.hideControl()})),this._buttonElement.addEventListener("click",(e=>{if(!this.getEnabled())return;if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)return;const t=this.getActive();this.setActive(!t),e.preventDefault()})),document.addEventListener("mousedown",(e=>{if(!e.target.classList.contains("xeokit-context-menu-item"))if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)if(e.preventDefault(),this._sectionToolContextMenu.shown)this._sectionToolContextMenu.hide();else{this._sectionToolContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,sectionTool:this};const e=this._menuButtonElement.getBoundingClientRect();this._sectionToolContextMenu.show(e.left,e.bottom+5)}else this._sectionToolContextMenu.hide()})),this._sectionToolContextMenu.on("shown",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-down"),this._menuButtonArrowElement.classList.add("xeokit-arrow-up")})),this._sectionToolContextMenu.on("hidden",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-up"),this._menuButtonArrowElement.classList.add("xeokit-arrow-down")})),this.bimViewer.on("reset",(()=>{this.clear(),this.setActive(!1)})),this.viewer.scene.on("sectionPlaneCreated",(()=>{this._updateSectionPlanesCount()})),this.viewer.scene.on("sectionPlaneDestroyed",(()=>{this._updateSectionPlanesCount()})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive()||!this.getEnabled())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:p.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id)}})),this._updateSectionPlanesCount()}_updateSectionPlanesCount(){this._counterElement&&(this._counterElement.innerText=""+this.getNumSections())}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear(),this._updateSectionPlanesCount()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}enableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!0}}disableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!1}}hideControl(){this._sectionPlanesPlugin.hideControl()}destroy(){this._sectionPlanesPlugin.destroy(),this._sectionToolContextMenu.destroy(),super.destroy()}}class MI extends vI{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw"Missing config: navCubeCanvasElement";const s=t.navCubeCanvasElement;this._navCube=new ag(this.viewer,{canvasElement:s,fitVisible:!0,color:"#CFCFCF"}),this._navCube.setVisible(this._active),this.on("active",(e=>{this._navCube.setVisible(e)}))}destroy(){this._navCube.destroy(),super.destroy()}}class LI extends n{constructor(e={}){const t=[[{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadModel")||"Load",getEnabled:e=>!e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.loadModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadModel")||"Unload",getEnabled:e=>e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.unloadModel(e.modelId)}}]];!!e.enableEditModels&&t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.editModel")||"Edit",getEnabled:e=>!0,doAction:e=>{e.bimViewer.editModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.deleteModel")||"Delete",getEnabled:e=>!0,doAction:e=>{e.bimViewer.deleteModel(e.modelId)}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadAllModels")||"Load All",getEnabled:e=>{const t=e.bimViewer,s=t.getModelIds();return t.getLoadedModelIds().length{e.bimViewer.loadAllModels()}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadAllModels")||"Unload All",getEnabled:e=>e.bimViewer.getLoadedModelIds().length>0,doAction:e=>{e.bimViewer.unloadAllModels()}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]),super({hideOnAction:e.hideOnAction,context:e.context,items:t})}}const UI=p.vec3();class HI{constructor(e){this._server=e}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,s){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,s)}getMetaModel(e,t,s){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,s)}getXKT(e,t,s){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,s)}}class GI extends vI{constructor(e,t){if(super(e,t),!t.modelsTabElement)throw"Missing config: modelsTabElement";if(!t.unloadModelsButtonElement)throw"Missing config: unloadModelsButtonElement";if(!t.modelsElement)throw"Missing config: modelsElement";if(this._enableAddModels=!!t.enableEditModels,this._modelsTabElement=t.modelsTabElement,this._loadModelsButtonElement=t.loadModelsButtonElement,this._unloadModelsButtonElement=t.unloadModelsButtonElement,this._addModelButtonElement=t.addModelButtonElement,this._modelsElement=t.modelsElement,this._modelsTabButtonElement=this._modelsTabElement.querySelector(".xeokit-tab-btn"),!this._modelsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._dataSource=new HI(this.server),this._xktLoader=new nI(this.viewer,{dataSource:this._dataSource}),this._modelsContextMenu=new LI({enableEditModels:t.enableEditModels,hideOnAction:!0}),this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0,this._projectId=null}setObjectColors(e){this._xktLoader.objectDefaults=e}loadProject(e,t,s){this.server.getProject(e,(s=>{this.unloadProject(),this._projectId=e,this._modelsInfo={},this._numModels=0,this._parseProject(s,t),this._numModelsLoaded0&&this._unloadModelsButtonElement.classList.remove("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.remove("disabled")}),(e=>{this.error(e),s&&s(e)}))}_parseProject(e,t){this._buildModelsMenu(e),this._parseViewerConfigs(e),this._parseViewerContent(e,(()=>{this._parseViewerState(e,(()=>{t()}))}))}_buildModelsMenu(e){var t="";const s=e.models||[];this._modelsInfo={},this._numModels=s.length;for(let e=0,i=s.length;e",t+=""+i.name+"",t+=""}this._modelsElement.innerHTML=t;for(let e=0,t=s.length;e{r.checked?this.loadModel(i):this.unloadModel(t.id)})),o.addEventListener("click",(()=>{!!this.viewer.scene.models[i]?this.unloadModel(t.id):this.loadModel(i)})),o.oncontextmenu=e=>{this._modelsContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,modelId:i},this._modelsContextMenu.show(e.pageX,e.pageY),e.preventDefault()}}}_parseViewerConfigs(e){const t=e.viewerConfigs;t&&this.bimViewer.setConfigs(t)}_parseViewerContent(e,t){const s=e.viewerContent;s?this._parseModelsLoaded(s,(()=>{t()})):t()}_parseModelsLoaded(e,t){const s=e.modelsLoaded;s&&0!==s.length?this._loadNextModel(s.slice(0),t):t()}_loadNextModel(e,t){if(0===e.length)return void t();const s=e.pop();this.loadModel(s,(()=>{this._loadNextModel(e,t)}),(()=>{this._loadNextModel(e,t)}))}_parseViewerState(e,t){const s=e.viewerState;s?this.bimViewer.setViewerState(s,t):t()}unloadProject(){if(!this._projectId)return;const e=this.viewer.scene.models;for(var t in e)if(e.hasOwnProperty(t)){e[t].destroy()}this._modelsElement.innerHTML="",this._numModelsLoaded=0,this._loadModelsButtonElement.classList.add("disabled"),this._unloadModelsButtonElement.classList.add("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.add("disabled");const s=this._projectId;this._projectId=null,this.fire("projectUnloaded",{projectId:s})}getLoadedProjectId(){return this._projectId}getModelIds(){return Object.keys(this._modelsInfo)}loadModel(e,t,s){if(!this._projectId){const e="No project currently loaded";return this.error(e),void(s&&s(e))}const i=this._modelsInfo[e];if(!i){const e="Model not in currently loaded project";return this.error(e),void(s&&s(e))}this.bimViewer._busyModal.show(`${this.viewer.localeService.translate("busyModal.loading")||"Loading"} ${i.name}`);this.bimViewer.getConfig("externalMetadata")&&!i.manifest?this.server.getMetadata(this._projectId,e,(r=>{this._loadGeometry(e,i,r,t,s)}),(e=>{this.bimViewer._busyModal.hide(),this.error(e),s&&s(e)})):this._loadGeometry(e,i,null,t,s)}_loadGeometry(e,t,s,i,r){const o=()=>{document.getElementById(""+e).checked=!0,this._numModelsLoaded++,this._unloadModelsButtonElement.classList.remove("disabled"),this._numModelsLoaded{this.bimViewer._busyModal.hide(),this.error(e),r&&r(e)};if(t.manifest){this._dataSource.setProjectId(this._projectId),this._dataSource.setModelId(e);const s=this._xktLoader.load({id:e,manifestSrc:t.manifest,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});s.on("loaded",o),s.on("error",n)}else this.server.getGeometry(this._projectId,e,(i=>{const r=this._xktLoader.load({id:e,metaModelData:s,xkt:i,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});r.on("loaded",o),r.on("error",n)}),n)}_jumpToInitialCamera(){const e=this.viewer,t=e.scene,s=t.getAABB(t.visibleObjectIds),i=p.getAABB3Diag(s),r=p.getAABB3Center(s,UI),o=t.camera;o.perspective.fov;const n=Math.abs(i/Math.tan(45*p.DEGTORAD)),a=p.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=p.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=r,e.cameraControl.planView=!1,e.cameraFlight.jumpTo({look:r,eye:[r[0]-n*a[0],r[1]-n*a[1],r[2]-n*a[2]],up:l,orthoScale:1.1*i})}unloadModel(e){const t=this.viewer.scene.models[e];if(!t)return void this.error("Model not loaded: "+e);t.destroy();document.getElementById(""+e).checked=!1,document.getElementById("span-"+e),this._numModelsLoaded--,this._numModelsLoaded>0?this._unloadModelsButtonElement.classList.remove("disabled"):this._unloadModelsButtonElement.classList.add("disabled"),this._numModelsLoadede.viewer.localeService.translate("treeViewContextMenu.inspectProperties")||"Inspect Properties",getShown:e=>!!e.viewer.metaScene.metaObjects[e.treeViewNode.objectId],doAction:e=>{const t=e.treeViewNode.objectId;e.bimViewer.showObjectProperties(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFit")||"View Fit",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)})),s.setObjectsVisible(i,!0),s.setObjectsHighlighted(i,!0);const r=s.getAABB(i);t.cameraFlight.flyTo({aabb:r,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=p.getAABB3Center(r)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFitAll")||"View Fit All",doAction:function(e){const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.isolate")||"Isolate",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)}));const r=s.getAABB(i);t.cameraControl.pivotPos=p.getAABB3Center(r,kI),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsVisible(s.visibleObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(i,!0),t.cameraFlight.flyTo({aabb:r},(()=>{}))}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hide")||"Hide",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideOthers")||"Hide Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.visibleObjectIds,!1),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideAll")||"Hide All",getEnabled:function(e){return e.viewer.scene.visibleObjectIds.length>0},doAction:function(e){e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.show")||"Show",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!0,s.xrayed&&(s.pickable=!0),s.xrayed=!1,s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showOthers")||"Shows Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showAll")||"Show All",getEnabled:function(e){const t=e.viewer.scene;return t.numVisibleObjects0},doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xray")||"X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1,s.xrayed=!0,s.visible=!0,s.pickable=e.bimViewer.getConfig("xrayPickable"))}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoXray")||"Undo X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayOthers")||"X-Ray Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayAll")||"X-Ray All",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayNone")||"X-Ray None",getEnabled:function(e){return e.viewer.scene.numXRayedObjects>0},doAction:function(e){const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.select")||"Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!0,s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoSelect")||"Undo Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.selectNone")||"Select None",getEnabled:function(e){return e.viewer.scene.numSelectedObjects>0},doAction:function(e){e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.clearSlices")||"Clear Slices",getEnabled:function(e){return e.bimViewer.getNumSections()>0},doAction:function(e){e.bimViewer.clearSections()}}]]}}class jI extends vI{constructor(e,t={}){if(super(e),!t.objectsTabElement)throw"Missing config: objectsTabElement";if(!t.showAllObjectsButtonElement)throw"Missing config: showAllObjectsButtonElement";if(!t.hideAllObjectsButtonElement)throw"Missing config: hideAllObjectsButtonElement";if(!t.objectsElement)throw"Missing config: objectsElement";if(this._objectsTabElement=t.objectsTabElement,this._showAllObjectsButtonElement=t.showAllObjectsButtonElement,this._hideAllObjectsButtonElement=t.hideAllObjectsButtonElement,this._objectsTabButtonElement=this._objectsTabElement.querySelector(".xeokit-tab-btn"),!this._objectsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";const s=t.objectsElement;this._treeView=new mg(this.viewer,{containerElement:s,hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new VI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._objectsTabButtonElement.classList.remove("disabled"),this._showAllObjectsButtonElement.classList.remove("disabled"),this._hideAllObjectsButtonElement.classList.remove("disabled")):(this._objectsTabButtonElement.classList.add("disabled"),this._showAllObjectsButtonElement.classList.add("disabled"),this._hideAllObjectsButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}class QI extends vI{constructor(e,t={}){if(super(e),!t.classesTabElement)throw"Missing config: classesTabElement";if(!t.showAllClassesButtonElement)throw"Missing config: showAllClassesButtonElement";if(!t.hideAllClassesButtonElement)throw"Missing config: hideAllClassesButtonElement";if(!t.classesElement)throw"Missing config: classesElement";if(this._classesTabElement=t.classesTabElement,this._showAllClassesButtonElement=t.showAllClassesButtonElement,this._hideAllClassesButtonElement=t.hideAllClassesButtonElement,this._classesTabButtonElement=this._classesTabElement.querySelector(".xeokit-tab-btn"),!this._classesTabButtonElement)throw"Missing DOM element: xeokit-tab-btn";const s=t.classesElement;this._treeView=new mg(this.viewer,{containerElement:s,hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new VI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._classesTabButtonElement.classList.remove("disabled"),this._showAllClassesButtonElement.classList.remove("disabled"),this._hideAllClassesButtonElement.classList.remove("disabled")):(this._classesTabButtonElement.classList.add("disabled"),this._showAllClassesButtonElement.classList.add("disabled"),this._hideAllClassesButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const WI=p.vec3();class zI extends vI{constructor(e,t={}){if(super(e),!t.storeysTabElement)throw"Missing config: storeysTabElement";if(!t.showAllStoreysButtonElement)throw"Missing config: showAllStoreysButtonElement";if(!t.hideAllStoreysButtonElement)throw"Missing config: hideAllStoreysButtonElement";if(!t.storeysElement)throw"Missing config: storeysElement";if(this._storeysTabElement=t.storeysTabElement,this._showAllStoreysButtonElement=t.showAllStoreysButtonElement,this._hideAllStoreysButtonElement=t.hideAllStoreysButtonElement,this._storeysTabButtonElement=this._storeysTabElement.querySelector(".xeokit-tab-btn"),!this._storeysTabButtonElement)throw"Missing DOM element: .xeokit-tab-btn";const s=t.storeysElement;this._treeView=new mg(this.viewer,{containerElement:s,autoAddModels:!1,hierarchy:"storeys",autoExpandDepth:1}),this._treeViewContextMenu=new VI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode,pruneEmptyNodes:!0},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{const t=this.bimViewer._modelsExplorer.getModelInfo(e);t&&this._treeView.addModel(e,{rootName:t.name})})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse(),this._treeView.expandToDepth(1)}))}setEnabled(e){e?(this._storeysTabButtonElement.classList.remove("disabled"),this._showAllStoreysButtonElement.classList.remove("disabled"),this._hideAllStoreysButtonElement.classList.remove("disabled")):(this._storeysTabButtonElement.classList.add("disabled"),this._showAllStoreysButtonElement.classList.add("disabled"),this._hideAllStoreysButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];if(!s)return void this.error("selectStorey() - object is not found: '"+e+"'");if("IfcBuildingStorey"!==s.type)return void this.error("selectStorey() - object is not found: '"+e+"'");const i=s.getObjectIDsInSubtree();this._selectObjects(i,t)}_selectObjects(e,t){const s=this.viewer.scene,i=s.getAABB(e);this.viewer.cameraControl.pivotPos=p.getAABB3Center(i,WI),t?(s.setObjectsXRayed(s.objectIds,!0),s.setObjectsVisible(s.objectIds,!0),s.setObjectsPickable(s.objectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsXRayed(e,!1),s.setObjectsVisible(e,!0),s.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:i},(()=>{setTimeout((function(){s.setObjectsVisible(s.xrayedObjectIds,!1),s.setObjectsXRayed(s.xrayedObjectIds,!1)}),500),t()}))):(s.setObjectsVisible(s.objectIds,!1),s.setObjectsPickable(s.xrayedObjectIds,!0),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:i}))}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const KI=p.vec3();class YI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._saveOrthoActive=null,this._buttonElement=t.buttonElement,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&(this.bimViewer._sectionTool.hideControl(),this.setActive(!this.getActive(),(()=>{}))),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!0,(()=>{}))}))}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer._orthoMode.getActive()}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterThreeDMode((()=>{this.fire("active",this._active),t()})):(this._enterThreeDMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitThreeDMode((()=>{this.fire("active",this._active),t()})):(this._exitThreeDMode(),this.fire("active",this._active)))):t&&t()}_enterThreeDMode(e){const t=this.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds),r=p.getAABB3Diag(i),o=p.getAABB3Center(i,KI),n=Math.abs(r/Math.tan(32.5)),a=s.camera,l=a.yUp?[-1,-1,-1]:[1,1,1],h=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=o,this.bimViewer._navCubeMode.setActive(!0),this.bimViewer._firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer._sectionTool.setEnabled(!0),this.bimViewer._orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e){const t=this.viewer,s=t.scene,i=s.camera,r=s.getAABB(s.visibleObjectIds),o=p.getAABB3Center(r),n=p.getAABB3Diag(r),a=Math.abs(n/Math.tan(45*p.DEGTORAD)),l=1.3*n,h=KI;h[0]=o[0]+i.worldUp[0]*a,h[1]=o[1]+i.worldUp[1]*a,h[2]=o[2]+i.worldUp[2]*a;const c=p.mulVec3Scalar(i.worldForward,-1,[]);this.bimViewer._sectionTool.setActive(!1),this.bimViewer._firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer._orthoMode.getActive(),this.bimViewer._orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer._navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer._navCubeMode.setActive(!1))}}class XI extends n{constructor(e,t={}){super(t),this._bimViewer=e,this._buildMenu()}_buildMenu(){const e=[],t=[];this._bimViewer._enablePropertiesInspector&&e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.inspectProperties")||"Inspect Properties",doAction:e=>{const t=e.entity.id;e.bimViewer.showObjectProperties(t)}}),e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showInTree")||"Show in Explorer",doAction:e=>{const t=e.entity.id;e.showObjectInExplorers(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFit")||"View Fit",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity;t.cameraFlight.flyTo({aabb:i.aabb,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=p.getAABB3Center(i.aabb)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hide")||"Hide",getEnabled:e=>e.entity.visible,doAction:e=>{e.entity.visible=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideOthers")||"Hide Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.visibleObjectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.visible=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xray")||"X-Ray",getEnabled:e=>!e.entity.xrayed,doAction:e=>{const t=e.entity;t.xrayed=!0,t.pickable=e.bimViewer.getConfig("xrayPickable")}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayOthers")||"X-Ray Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.objectIds,!0),s.setObjectsXRayed(s.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||s.setObjectsPickable(s.objectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.xrayed=!1,t.pickable=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.select")||"Select",getEnabled:e=>!e.entity.selected,doAction:e=>{e.entity.selected=!0}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.undoSelect")||"Undo Select",getEnabled:e=>e.entity.selected,doAction:e=>{e.entity.selected=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]}}class ZI extends n{constructor(e={}){super({hideOnAction:e.hideOnAction,context:e.context,items:[[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene.xrayedObjectIds;e.viewer.scene.setObjectsPickable(t,!0),e.viewer.scene.setObjectsXRayed(t,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.resetView")||"Reset View",doAction:e=>{e.bimViewer.resetView()}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]})}}class qI extends vI{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e,this._active?this._buttonElement.classList.add("active"):this._buttonElement.classList.remove("active")})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active)))):t&&t()}_enterOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class JI extends vI{constructor(e,t={}){if(super(e),!t.propertiesTabElement)throw"Missing config: propertiesTabElement";if(!t.propertiesElement)throw"Missing config: propertiesElement";if(this._metaObject=null,this._propertiesTabElement=t.propertiesTabElement,this._propertiesElement=t.propertiesElement,this._propertiesTabButtonElement=this._propertiesTabElement.querySelector(".xeokit-tab-btn"),!this._propertiesTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{if(this._metaObject){const t=this._metaObject.metaModels;for(let s=0,i=t.length;s{this.clear()})),document.addEventListener("click",this._clickListener=e=>{e.target.matches(".xeokit-accordion .xeokit-accordion-button")&&(e.target.parentElement.classList.contains("active")?e.target.parentElement.classList.remove("active"):e.target.parentElement.classList.add("active"))}),this.clear()}showObjectPropertySets(e){const t=this.viewer.metaScene.metaObjects[e];if(!t)return;const s=t.propertySets;s&&s.length>0?this._setPropertySets(t,s):this._setPropertySets(t),this._metaObject=t}clear(){const e=[],t=this.viewer.localeService.translate("propertiesInspector.noObjectSelectedWarning")||"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.";e.push('
'),e.push(`

${t}

`),e.push("
");const s=e.join("");this._propertiesElement.innerHTML=s}_setPropertySets(e,t){const s=[];if(s.push('
'),e){s.push(''),s.push(``),e.type&&s.push(``),s.push(``),s.push(``);const i=e.attributes;if(i)for(let e in i)s.push(``);if(s.push("
Name:${e.name}
Class:${e.type}
UUID:${e.originalSystemId}
Viewer ID:${e.id}
${$I(e)}:${i[e]}
"),t&&0!==t.length){s.push("
"),s.push('
');for(let e=0,i=t.length;e0){s.push(`
\n

${i.name}

\n
\n `);for(let e=0,t=r.length;e`)}s.push("
${t.name||t.label}:${t.value}
\n
\n
")}}s.push("
")}else{const e=this.viewer.localeService.translate("propertiesInspector.noPropSetWarning")||"No properties sets found for this object";s.push(`

${e}

`),s.push("")}}else s.push('

No object selected

');this._propertiesElement.innerHTML=s.join("")}setEnabled(e){e?this._propertiesTabButtonElement.classList.remove("disabled"):this._propertiesTabButtonElement.classList.add("disabled")}destroy(){super.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),document.removeEventListener("click",this._clickListener)}}function $I(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}const ev=new Float32Array(3);class tv{constructor(e){if(!e)throw"Parameter expected: cfg";if(!e.viewer)throw"Parameter expected: cfg.viewer";this.viewer=e.viewer,this._maxTreeDepth=e.maxTreeDepth||15,this._root=null,this._needsRebuild=!0,this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const i=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&p.containsAABB3(e.left.aabb,i))return void this._insertEntity(e.left,t,s+1);if(e.right&&p.containsAABB3(e.right.aabb,i))return void this._insertEntity(e.right,t,s+1);const r=e.aabb;ev[0]=r[3]-r[0],ev[1]=r[4]-r[1],ev[2]=r[5]-r[2];let o=0;if(ev[1]>ev[o]&&(o=1),ev[2]>ev[o]&&(o=2),!e.left){const n=r.slice();if(n[o+3]=(r[o]+r[o+3])/2,e.left={aabb:n},p.containsAABB3(n,i))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const n=r.slice();if(n[o]=(r[o]+r[o+3])/2,e.right={aabb:n},p.containsAABB3(n,i))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class sv extends vI{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";this._objectsKdTree3=t.objectsKdTree3,this._marquee=p.AABB2(),this._marqueeFrustum=new St,this._marqueeFrustumProjMat=p.mat4(),this._marqueeDir=!1;const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._objectsKdTree3.root):s.classList.remove("active")})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}));const i=this.viewer.scene,r=i.canvas.canvas;this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement);const o=this._marqueeElement.style;let n,a,l,h,c,A,u,d;o.position="absolute",o["z-index"]="40000005",o.width="8px",o.height="8px",o.visibility="hidden",o.top="0px",o.left="0px",o["box-shadow"]="0 2px 5px 0 #182A3D;",o.opacity=1,o["pointer-events"]="none";let f=!1,E=!1;r.addEventListener("mousedown",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;const t=this.bimViewer.viewer.scene.input;t.keyDown[t.KEY_CTRL]||i.setObjectsSelected(i.selectedObjectIds,!1),n=e.pageX,a=e.pageY,o.visibility="visible",o.left=`${n}px`,o.top=`${a}px`,o.width="0px",o.height="0px",o.display="block",c=e.offsetX,A=e.offsetY,f=!0,this.viewer.cameraControl.pointerEnabled=!1})),r.addEventListener("mouseup",(e=>{if(!this.getActive()||!this.getEnabled())return;if(!f&&!E)return;if(0!==e.button)return;l=e.pageX,h=e.pageY;const t=Math.abs(l-n),s=Math.abs(h-a);o.width=`${t}px`,o.height=`${s}px`,o.visibility="hidden",f=!1,this.viewer.cameraControl.pointerEnabled=!0,E&&(E=!1),(t>3||s>3)&&this._marqueePick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&this.getEnabled()&&0===e.button&&f&&(o.visibility="hidden",f=!1,E=!0,this.viewer.cameraControl.pointerEnabled=!0)}),!0),r.addEventListener("mousemove",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;if(!f)return;const t=e.pageX,s=e.pageY,i=t-n,r=s-a;o.width=`${Math.abs(i)}px`,o.height=`${Math.abs(r)}px`,o.left=`${Math.min(n,t)}px`,o.top=`${Math.min(a,s)}px`,u=e.offsetX,d=e.offsetY;const l=c{if(i===St.INTERSECT&&(i=xt(this._marqueeFrustum,s.aabb)),i!==St.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,i=t.length;s{e.preventDefault()},o.oncontextmenu=e=>{e.preventDefault()},n.oncontextmenu=e=>{e.preventDefault()};const l=new km({localeService:t.localeService,canvasElement:s,keyboardEventsElement:t.keyboardEventsElement,transparent:!1,backgroundColor:[1,1,1],backgroundColorFromAmbientLight:!1,saoEnabled:!0,pbrEnabled:!1,colorTextureEnabled:!0});super(null,t,e,l),this._configs={},this._enableAddModels=!!t.enableEditModels,this._enablePropertiesInspector=!!t.inspectorElement,this.viewer=l,this._objectsKdTree3=new tv({viewer:l}),this._customizeViewer(),this._initCanvasContextMenus(),i.innerHTML=function(e){return'
\n
\n Models\n
\n
\n \n '+(e.enableEditModels?'':"")+'
\n
\n
\n
\n
\n Objects\n
\n
\n \n \n
\n
\n
\n
\n
\n Classes\n
\n
\n \n \n
\n
\n
\n
\n
\n Storeys\n
\n
\n \n \n
\n
\n
\n
\n
'}(t),o.innerHTML='
\n \x3c!-- Reset button --\x3e\n
\n \n
\n
\n \x3c!-- 3D Mode button --\x3e\n \n \x3c!-- Perspective/Ortho Mode button --\x3e\n \n \x3c!-- Fit button --\x3e\n \n \x3c!-- First Person mode button --\x3e\n \n \x3c!-- Show/hide IFCSpaces --\x3e\n \n
\n \x3c!-- Tools button group --\x3e\n
\n \x3c!-- Hide tool button --\x3e\n \n \x3c!-- Select tool button --\x3e\n \n \x3c!-- Marquee select tool button --\x3e\n \n \x3c!-- section tool button --\x3e\n \n
\n
',this._enablePropertiesInspector&&(r.innerHTML='
\n
\n Properties\n
\n
\n
\n
\n
'),this._explorerElement=i,this._inspectorElement=r,iv(i),this._enablePropertiesInspector&&iv(r),this._modelsExplorer=new GI(this,{modelsTabElement:i.querySelector(".xeokit-modelsTab"),loadModelsButtonElement:i.querySelector(".xeokit-loadAllModels"),unloadModelsButtonElement:i.querySelector(".xeokit-unloadAllModels"),addModelButtonElement:i.querySelector(".xeokit-addModel"),modelsElement:i.querySelector(".xeokit-models"),enableEditModels:this._enableAddModels}),this._objectsExplorer=new jI(this,{objectsTabElement:i.querySelector(".xeokit-objectsTab"),showAllObjectsButtonElement:i.querySelector(".xeokit-showAllObjects"),hideAllObjectsButtonElement:i.querySelector(".xeokit-hideAllObjects"),objectsElement:i.querySelector(".xeokit-objects")}),this._classesExplorer=new QI(this,{classesTabElement:i.querySelector(".xeokit-classesTab"),showAllClassesButtonElement:i.querySelector(".xeokit-showAllClasses"),hideAllClassesButtonElement:i.querySelector(".xeokit-hideAllClasses"),classesElement:i.querySelector(".xeokit-classes")}),this._storeysExplorer=new zI(this,{storeysTabElement:i.querySelector(".xeokit-storeysTab"),showAllStoreysButtonElement:i.querySelector(".xeokit-showAllStoreys"),hideAllStoreysButtonElement:i.querySelector(".xeokit-hideAllStoreys"),storeysElement:i.querySelector(".xeokit-storeys")}),this._enablePropertiesInspector&&(this._propertiesInspector=new JI(this,{propertiesTabElement:r.querySelector(".xeokit-propertiesTab"),propertiesElement:r.querySelector(".xeokit-properties")})),this._resetAction=new RI(this,{buttonElement:o.querySelector(".xeokit-reset"),active:!1}),this._fitAction=new DI(this,{buttonElement:o.querySelector(".xeokit-fit"),active:!1});const h=new function(e){let t=!1;this.setThreeDModeActive=s=>{s?(e._firstPersonMode.setActive(!1),e._marqueeSelectionTool.setEnabled(!0),e.viewer.cameraControl.navMode="orbit"):(e._marqueeSelectionTool.setEnabled(!1),e._marqueeSelectionTool.setActive(!1),e._firstPersonMode.setActive(!1),e.viewer.cameraControl.navMode="planView"),t=s},this.setFirstPersonModeActive=s=>{e.viewer.cameraControl.navMode=s?"firstPerson":t?"orbit":"planView"}}(this);this._threeDMode=new YI(this,{buttonElement:o.querySelector(".xeokit-threeD"),cameraControlNavModeMediator:h,active:!1}),this._orthoMode=new qI(this,{buttonElement:o.querySelector(".xeokit-ortho"),active:!1}),this._firstPersonMode=new NI(this,{buttonElement:o.querySelector(".xeokit-firstPerson"),cameraControlNavModeMediator:h,active:!1}),this._hideTool=new bI(this,{buttonElement:o.querySelector(".xeokit-hide"),active:!1}),this._selectionTool=new CI(this,{buttonElement:o.querySelector(".xeokit-select"),active:!1}),this._marqueeSelectionTool=new sv(this,{buttonElement:o.querySelector(".xeokit-marquee"),active:!1,objectsKdTree3:this._objectsKdTree3}),this._showSpacesMode=new OI(this,{buttonElement:o.querySelector(".xeokit-showSpaces"),active:!1}),this._queryTool=new SI(this,{active:!1}),this._sectionTool=new FI(this,{buttonElement:o.querySelector(".xeokit-section"),counterElement:o.querySelector(".xeokit-section-counter"),menuButtonElement:o.querySelector(".xeokit-section-menu-button"),menuButtonArrowElement:o.querySelector(".xeokit-section-menu-button-arrow"),active:!1}),this._navCubeMode=new MI(this,{navCubeCanvasElement:n,active:!0}),this._busyModal=new TI(this,{busyModalBackdropElement:a}),this._threeDMode.setActive(!0),this._firstPersonMode.setActive(!1),this._navCubeMode.setActive(!0),this._modelsExplorer.on("modelLoaded",(e=>{this._modelsExplorer.getNumModelsLoaded()>0&&this.setControlsEnabled(!0),this.fire("modelLoaded",e)})),this._modelsExplorer.on("modelUnloaded",(e=>{0===this._modelsExplorer.getNumModelsLoaded()&&(this.setControlsEnabled(!1),this.openTab("models")),this.fire("modelUnloaded",e)})),this._resetAction.on("reset",(()=>{this.fire("reset",!0)})),this._mutexActivation([this._hideTool,this._selectionTool,this._marqueeSelectionTool,this._sectionTool]),i.querySelector(".xeokit-showAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-loadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this.loadAllModels(),e.preventDefault()})),i.querySelector(".xeokit-unloadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this._modelsExplorer.unloadAllModels(),e.preventDefault()})),this._enableAddModels&&i.querySelector(".xeokit-addModel").addEventListener("click",(e=>{this.fire("addModel",{}),e.preventDefault()})),this._bcfViewpointsPlugin=new Ki(this.viewer,{}),this._fastNavPlugin=new Vm(l,{hideEdges:!0,hideSAO:!0,hidePBR:!1,hideColorTexture:!1,hideTransparentObjects:!1,scaleCanvasResolution:!1,scaleCanvasResolutionFactor:.6}),this.viewer.scene.on("rendered",(()=>{const e=this._fastNavPlugin;e.hideEdges=5").firstChild;document.body.appendChild(t),this.viewer.cameraControl.pivotElement=t,e.camera.perspective.near=.01,e.camera.perspective.far=3e3,e.camera.ortho.near=.01,e.camera.ortho.far=2e3;const s=e.sao;s.enabled=!0,s.numSamples=50,s.kernelRadius=200}_initCanvasContextMenus(){this._canvasContextMenu=new ZI(this,{hideOnAction:!0}),this._objectContextMenu=new XI(this,{hideOnAction:!0}),this.viewer.cameraControl.on("rightClick",(e=>{e.event;const t=this.viewer.scene.pick({canvasPos:e.canvasPos});t&&t.entity.isObject?(this._canvasContextMenu.hide(),this._objectContextMenu.context={viewer:this.viewer,bimViewer:this,showObjectInExplorers:e=>{const t=this.getOpenTab();"objects"!==t&&"classes"!==t&&"storeys"!==t&&this.openTab("objects"),this.showObjectInExplorers(e)},entity:t.entity},this._objectContextMenu.show(e.pagePos[0],e.pagePos[1])):(this._objectContextMenu.hide(),this._canvasContextMenu.context={viewer:this.viewer,bimViewer:this},this._canvasContextMenu.show(e.pagePos[0],e.pagePos[1]))}))}_initConfigs(){this.setConfigs({cameraNear:"0.05",cameraFar:"3000.0",smartPivot:"true",saoEnabled:"true",pbrEnabled:"false",saoBias:"0.5",saoIntensity:"0.15",saoNumSamples:"40",saoKernelRadius:"100",edgesEnabled:!0,xrayContext:!0,xrayPickable:!1,selectedGlowThrough:!0,highlightGlowThrough:!0,backgroundColor:[1,1,1],externalMetadata:!1,dtxEnabled:!1})}setConfigs(e){for(let t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setConfig(t,s)}}setConfig(e,t){function s(e){return!0===e||"true"===e}try{switch(e){case"backgroundColor":const i=t;this.setBackgroundColor(i),this._configs[e]=i;break;case"cameraNear":const r=parseFloat(t);this.viewer.scene.camera.perspective.near=r,this.viewer.scene.camera.ortho.near=r,this._configs[e]=r;break;case"cameraFar":const o=parseFloat(t);this.viewer.scene.camera.perspective.far=o,this._configs[e]=o;break;case"smartPivot":this.viewer.cameraControl.smartPivot=this._configs[e]=s(t);break;case"saoEnabled":this._fastNavPlugin.saoEnabled=this._configs[e]=s(t);break;case"saoBias":this.viewer.scene.sao.bias=parseFloat(t);break;case"saoIntensity":this.viewer.scene.sao.intensity=parseFloat(t);break;case"saoKernelRadius":this.viewer.scene.sao.kernelRadius=this._configs[e]=parseFloat(t);break;case"saoNumSamples":this.viewer.scene.sao.numSamples=this._configs[e]=parseFloat(t);break;case"saoBlur":this.viewer.scene.sao.blur=this._configs[e]=s(t);break;case"edgesEnabled":this._fastNavPlugin.edgesEnabled=this._configs[e]=s(t);break;case"pbrEnabled":this._fastNavPlugin.pbrEnabled=this._configs[e]=s(t);break;case"viewFitFOV":this.viewer.cameraFlight.fitFOV=this._configs[e]=parseFloat(t);break;case"viewFitDuration":this.viewer.cameraFlight.duration=this._configs[e]=parseFloat(t);break;case"perspectiveFOV":this.viewer.camera.perspective.fov=this._configs[e]=parseFloat(t);break;case"excludeUnclassifiedObjects":case"xrayPickable":case"externalMetadata":this._configs[e]=s(t);break;case"xrayContext":this._configs[e]=t;break;case"selectedGlowThrough":const n=this._configs[e]=s(t),a=this.viewer.scene.selectedMaterial;a.glowThrough=n,a.fillAlpha=n?.5:1,a.edgeAlpha=n?.5:1;break;case"highlightGlowThrough":const l=this._configs[e]=s(t),h=this.viewer.scene.highlightMaterial;h.glowThrough=l,h.fillAlpha=l?.5:1,h.edgeAlpha=l?.5:1;break;case"showSpaces":this._configs[e]=s(t),this._showSpacesMode.setActive(t);break;case"dtxEnabled":this._configs[e]=s(t),this.viewer.scene.dtxEnabled=t;break;case"objectColors":this._configs[e]=t,this._modelsExplorer.setObjectColors(t);break;default:this.warn("setConfig() - unsupported configuration: '"+e+"'")}}catch(t){this.error("setConfig() - failed to configure '"+e+"': "+t)}}getConfig(e){return this._configs[e]}getProjectsInfo(e,t){e?this.server.getProjects(e,(e=>{this.error("getProjectsInfo() - "+e),t&&t(e)})):this.error("getProjectsInfo() - Argument expected: 'done'")}getProjectInfo(e,t,s){e?t?this.server.getProject(e,t,(e=>{this.error("getProjectInfo() - "+e),s&&s(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getProjectInfo() - Argument expected: projectId")}getObjectInfo(e,t,s,i,r){e?t?s?i?this.server.getObjectInfo(e,t,s,i,(e=>{r&&r(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getObjectInfo() - Argument expected: objectId"):this.error("getObjectInfo() - Argument expected: modelId"):this.error("getObjectInfo() - Argument expected: projectId")}loadProject(e,t,s){e?this._modelsExplorer.loadProject(e,(()=>{t&&t()}),(e=>{this.error("loadProject() - "+e),s&&s(e)})):this.error("loadProject() - Argument expected: objectId")}unloadProject(){this._modelsExplorer.unloadProject(),this.openTab("models"),this.setControlsEnabled(!1)}getLoadedProjectId(){return this._modelsExplorer.getLoadedProjectId()}getModelIds(){return this._modelsExplorer.getModelIds()}loadModel(e,t,s){e?this._modelsExplorer.loadModel(e,(()=>{t&&t()}),(e=>{this.error("loadModel() - "+e),s&&s(e)})):this.error("loadModel() - Argument expected: modelId")}loadAllModels(e=function(){}){const t=this._modelsExplorer.getModelIds(),s=(e,i)=>{if(e>=t.length)i();else{const r=t[e];this._modelsExplorer.isModelLoaded(r)?s(e+1,i):this._modelsExplorer.loadModel(r,(()=>{s(e+1,i)}),(t=>{this.error("loadAllModels() - "+t),s(e+1,i)}))}};s(0,e)}getLoadedModelIds(){return this._modelsExplorer._getLoadedModelIds()}isModelLoaded(e){if(e)return this._modelsExplorer.isModelLoaded(e);this.error("unloadModel() - Argument expected: modelId")}unloadModel(e){e?this._modelsExplorer.unloadModel(e):this.error("unloadModel() - Argument expected: modelId")}unloadAllModels(){this._modelsExplorer.unloadAllModels()}editModel(e){this.fire("editModel",{modelId:e})}deleteModel(e){this.fire("deleteModel",{modelId:e})}addModel(){this.fire("addModel",{})}setBackgroundColor(e){this.viewer.scene.canvas.backgroundColor=e}setObjectColorSource(e){console.log("BIMViewer.setObjectColorSource() is now deprecated and no longer functional. By default, BIMViewer.getObjectColorSource() will now always return the (formerly) default value of `model`.")}getObjectColorSource(){return"model"}setViewerState(e,t=(()=>{})){e.tabOpen&&this.openTab(e.tabOpen),e.expandObjectsTree&&this._objectsExplorer.expandTreeViewToDepth(e.expandObjectsTree),e.expandClassesTree&&this._classesExplorer.expandTreeViewToDepth(e.expandClassesTree),e.expandStoreysTree&&this._storeysExplorer.expandTreeViewToDepth(e.expandStoreysTree),e.setCamera&&this.setCamera(e.setCamera),this._parseSelectedStorey(e,(()=>{this._parseThreeDMode(e,(()=>{t()}))}))}_parseSelectedStorey(e,t){e.selectedStorey?(this.selectStorey(e.selectedStorey),t()):t()}_parseThreeDMode(e,t){const s=!1!==e.threeDActive;this.set3DEnabled(s,t)}showObjectInExplorers(e){e?(this._objectsExplorer.showNodeInTreeView(e),this._classesExplorer.showNodeInTreeView(e),this._storeysExplorer.showNodeInTreeView(e),this.fire("openExplorer",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}unShowObjectInExplorers(){this._objectsExplorer.unShowNodeInTreeView(),this._classesExplorer.unShowNodeInTreeView(),this._storeysExplorer.unShowNodeInTreeView()}showObjectProperties(e){e?(this._enablePropertiesInspector&&this._propertiesInspector.showObjectPropertySets(e),this.fire("openInspector",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}setObjectsVisible(e,t){this._withObjectsInSubtree(e,(e=>{e.visible=t}))}setAllObjectsVisible(e){e?this.viewer.scene.setObjectsVisible(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsVisible(this.viewer.scene.visibleObjectIds,!1)}setObjectsXRayed(e,t){this._withObjectsInSubtree(e,(e=>{e.xrayed=t}))}setAllObjectsXRayed(e){e?this.viewer.scene.setObjectsXRayed(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsXRayed(this.viewer.scene.xrayedObjectIds,!1)}setObjectsSelected(e,t){this._withObjectsInSubtree(e,(e=>{e.selected=t}))}setAllObjectsSelected(e){e?this.viewer.scene.setObjectsSelected(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsSelected(this.viewer.scene.selectedObjectIds,!1)}_withObjectsInSubtree(e,t){if(e)for(let s=0,i=e.length;s{const s=this.viewer.scene.objects[e.id];s&&t(s)}))}else this.error("Argument expected: objectIds")}flyToObject(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectId");const s=this.viewer,i=s.scene,r=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{i.objects[e.id]&&r.push(e.id)})),0===r.length)return this.error("Object not found in viewer: '"+e+"'"),void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const o=i.getAABB(r);s.cameraFlight.flyTo({aabb:o},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=p.getAABB3Center(o)}viewFitObjects(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectIds");const s=this.viewer,i=s.scene,r=[];for(var o=0,n=e.length;o{i.objects[e.id]&&r.push(e.id)}))}if(0===r.length)return void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const a=i.getAABB(r);s.cameraFlight.flyTo({aabb:a},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=p.getAABB3Center(a)}viewFitAll(e){const t=this.viewer,s=t.scene.getAABB();t.cameraFlight.flyTo({aabb:s},(()=>{e&&e()})),t.cameraControl.pivotPos=p.getAABB3Center(s)}jumpToObject(e){if(!e)return void this.error("jumpToObject() - Argument expected: objectId");const t=this.viewer,s=t.scene,i=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{s.objects[e.id]&&i.push(e.id)})),0===i.length)return void this.error("Object not found in viewer: '"+e+"'");s.setObjectsVisible(i,!0);const r=s.getAABB(i);t.cameraFlight.jumpTo({aabb:r}),t.cameraControl.pivotPos=p.getAABB3Center(r)}setCamera(e){const t=this.viewer.scene.camera;e.eye&&(t.eye=e.eye),e.look&&(t.look=e.look),e.up&&(t.up=e.up)}viewFitModels(e,t){if(!e)return void this.error("viewFitModels() - Argument expected: modelIds");const s=this.viewer,i=s.scene,r=p.AABB3();p.collapseAABB3(r);for(var o=0,n=e.length;o{t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})):(s.cameraFlight.jumpTo({aabb:r}),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)),s.cameraControl.pivotPos=p.getAABB3Center(r)}openTab(e){if(!e)return void this.error("openTab() - Argument expected: tabId");let t;switch(e){case"models":t="xeokit-modelsTab";break;case"objects":t="xeokit-objectsTab";break;case"classes":t="xeokit-classesTab";break;case"storeys":t="xeokit-storeysTab";break;case"properties":t="xeokit-propertiesTab";break;default:return void this.error("openTab() - tab not recognized: '"+e+"'")}this._openTab(this._explorerElement,t)}_openTab(e,t){const s="active";let i=e.querySelectorAll(".xeokit-tab"),r=e.querySelector("."+t);for(let e=0;e-1}const t="active";return e(this._explorerElement.querySelector(".xeokit-modelsTab"),t)?"models":e(this._explorerElement.querySelector(".xeokit-objectsTab"),t)?"objects":e(this._explorerElement.querySelector(".xeokit-classesTab"),t)?"classes":e(this._explorerElement.querySelector(".xeokit-storeysTab"),t)?"storeys":e(this._inspectorElement.querySelector(".xeokit-propertiesTab"),t)?"properties":"none"}set3DEnabled(e,t){this._threeDMode.setActive(e,t)}get3DEnabled(){return this._threeDMode.getActive()}setSpacesShown(e){this._showSpacesMode.setActive(e)}getSpacesShown(){return this._showSpacesMode.getActive()}setOrthoEnabled(e,t){this._orthoMode.setActive(e,t)}getOrthoEnabled(){return this._orthoMode.getActive()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];s?"IfcBuildingStorey"===s.type?this._storeysExplorer.selectStorey(e,t):this.error("selectStorey() - Object is not an IfcBuildingStorey: '"+e+"'"):this.error("selectStorey() - Object is not found: '"+e+"'")}saveBCFViewpoint(e){return this._bcfViewpointsPlugin.getViewpoint(e)}loadBCFViewpoint(e,t){e?(this._orthoMode.setActive("ortho"===this.viewer.camera.projection),this._bcfViewpointsPlugin.setViewpoint(e,t)):this.error("loadBCFViewpoint() - Argument expected: bcfViewpoint")}resetView(){this._resetAction.reset()}setControlsEnabled(e){this._objectsExplorer.setEnabled(e),this._classesExplorer.setEnabled(e),this._storeysExplorer.setEnabled(e),this._resetAction.setEnabled(e),this._fitAction.setEnabled(e),this._threeDMode.setEnabled(e),this._orthoMode.setEnabled(e),this._firstPersonMode.setEnabled(e),this._queryTool.setEnabled(e),this._hideTool.setEnabled(e),this._selectionTool.setEnabled(e),this._marqueeSelectionTool.setEnabled(e),this._showSpacesMode.setEnabled(e),this._sectionTool.setEnabled(e),this._enablePropertiesInspector&&this._propertiesInspector.setEnabled(e)}setKeyboardEnabled(e){this.viewer.scene.input.keyboardEnabled=e}getKeyboardEnabled(){return this.viewer.scene.input.keyboardEnabled}clearSections(){this._sectionTool.clear()}disableSections(){this._sectionTool.disableSections()}enableSections(){this._sectionTool.enableSections()}flipSections(){this._sectionTool.flipSections()}hideSectionEditControl(){this._sectionTool.hideControl()}getNumSections(){return this._sectionTool.getNumSections()}destroy(){this.viewer.destroy(),this._bcfViewpointsPlugin.destroy(),this._canvasContextMenu.destroy(),this._objectContextMenu.destroy()}},e.LocaleService=Ji,e.Server=class{constructor(e={}){this._dataDir=e.dataDir||""}getProjects(e,t){const s=this._dataDir+"/projects/index.json";y.loadJSON(s,e,t)}getProject(e,t,s){const i=this._dataDir+"/projects/"+e+"/index.json";y.loadJSON(i,t,s)}getMetadata(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/metadata.json";y.loadJSON(r,s,i)}getGeometry(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/geometry.xkt";y.loadArraybuffer(r,s,i)}getObjectInfo(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/props/"+s+".json";y.loadJSON(o,i,r)}getIssues(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/issues.json";y.loadJSON(r,s,i)}getSplitModelManifest(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadJSON(o,i,r)}getSplitModelMetadata(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadJSON(o,i,r)}getSplitModelGeometry(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadArraybuffer(o,i,r)}},Object.defineProperty(e,"__esModule",{value:!0})})); + ***************************************************************************** */var mc=function(e,t){return mc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},mc(e,t)};function yc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}mc(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}var gc=function(){return gc=Object.assign||function(e){for(var t,s=1,i=arguments.length;s0&&r[r.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=55296&&r<=56319&&s>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},Nc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Oc=0;Oc=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Fc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mc="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Lc=0;Lc>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i0;){var n=i[--o];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var a=s;a<=i.length;){var l;if((l=i[++a])===t)return!0;if(l!==Uc)break}if(n!==Uc)break}return!1},IA=function(e,t){for(var s=e;s>=0;){var i=t[s];if(i!==Uc)return i;s--}return 0},vA=function(e,t,s,i,r){if(0===s[i])return hA;var o=i-1;if(Array.isArray(r)&&!0===r[o])return hA;var n=o-1,a=o+1,l=t[o],h=n>=0?t[n]:0,c=t[a];if(2===l&&3===c)return hA;if(-1!==pA.indexOf(l))return"!";if(-1!==pA.indexOf(c))return hA;if(-1!==dA.indexOf(c))return hA;if(8===IA(o,t))return cA;if(11===AA.get(e[o]))return hA;if((l===$c||l===eA)&&11===AA.get(e[a]))return hA;if(7===l||7===c)return hA;if(9===l)return hA;if(-1===[Uc,Hc,Gc].indexOf(l)&&9===c)return hA;if(-1!==[kc,Vc,jc,Kc,qc].indexOf(c))return hA;if(IA(o,t)===zc)return hA;if(gA(23,zc,o,t))return hA;if(gA([kc,Vc],Wc,o,t))return hA;if(gA(12,12,o,t))return hA;if(l===Uc)return cA;if(23===l||23===c)return hA;if(16===c||16===l)return cA;if(-1!==[Hc,Gc,Wc].indexOf(c)||14===l)return hA;if(36===h&&-1!==yA.indexOf(l))return hA;if(l===qc&&36===c)return hA;if(c===Qc)return hA;if(-1!==uA.indexOf(c)&&l===Yc||-1!==uA.indexOf(l)&&c===Yc)return hA;if(l===Zc&&-1!==[iA,$c,eA].indexOf(c)||-1!==[iA,$c,eA].indexOf(l)&&c===Xc)return hA;if(-1!==uA.indexOf(l)&&-1!==fA.indexOf(c)||-1!==fA.indexOf(l)&&-1!==uA.indexOf(c))return hA;if(-1!==[Zc,Xc].indexOf(l)&&(c===Yc||-1!==[zc,Gc].indexOf(c)&&t[a+1]===Yc)||-1!==[zc,Gc].indexOf(l)&&c===Yc||l===Yc&&-1!==[Yc,qc,Kc].indexOf(c))return hA;if(-1!==[Yc,qc,Kc,kc,Vc].indexOf(c))for(var A=o;A>=0;){if((u=t[A])===Yc)return hA;if(-1===[qc,Kc].indexOf(u))break;A--}if(-1!==[Zc,Xc].indexOf(c))for(A=-1!==[kc,Vc].indexOf(l)?n:o;A>=0;){var u;if((u=t[A])===Yc)return hA;if(-1===[qc,Kc].indexOf(u))break;A--}if(rA===l&&-1!==[rA,oA,tA,sA].indexOf(c)||-1!==[oA,tA].indexOf(l)&&-1!==[oA,nA].indexOf(c)||-1!==[nA,sA].indexOf(l)&&c===nA)return hA;if(-1!==mA.indexOf(l)&&-1!==[Qc,Xc].indexOf(c)||-1!==mA.indexOf(c)&&l===Zc)return hA;if(-1!==uA.indexOf(l)&&-1!==uA.indexOf(c))return hA;if(l===Kc&&-1!==uA.indexOf(c))return hA;if(-1!==uA.concat(Yc).indexOf(l)&&c===zc&&-1===lA.indexOf(e[a])||-1!==uA.concat(Yc).indexOf(c)&&l===Vc)return hA;if(41===l&&41===c){for(var p=s[o],d=1;p>0&&41===t[--p];)d++;if(d%2!=0)return hA}return l===$c&&c===eA?hA:cA},TA=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var s=function(e,t){void 0===t&&(t="strict");var s=[],i=[],r=[];return e.forEach((function(e,o){var n=AA.get(e);if(n>50?(r.push(!0),n-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(o),s.push(16);if(4===n||11===n){if(0===o)return i.push(o),s.push(Jc);var a=s[o-1];return-1===EA.indexOf(a)?(i.push(i[o-1]),s.push(a)):(i.push(o),s.push(Jc))}return i.push(o),31===n?s.push("strict"===t?Wc:iA):n===aA||29===n?s.push(Jc):43===n?e>=131072&&e<=196605||e>=196608&&e<=262141?s.push(iA):s.push(Jc):void s.push(n)})),[i,s,r]}(e,t.lineBreak),i=s[0],r=s[1],o=s[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(r=r.map((function(e){return-1!==[Yc,Jc,aA].indexOf(e)?iA:e})));var n="keep-all"===t.wordBreak?o.map((function(t,s){return t&&e[s]>=19968&&e[s]<=40959})):void 0;return[i,r,n]},_A=function(){function e(e,t,s,i){this.codePoints=e,this.required="!"===t,this.start=s,this.end=i}return e.prototype.slice=function(){return Dc.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),RA=45,PA=43,DA=-1,NA=function(e){return e>=48&&e<=57},CA=function(e){return NA(e)||e>=65&&e<=70||e>=97&&e<=102},OA=function(e){return 10===e||9===e||32===e},bA=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},SA=function(e){return bA(e)||NA(e)||e===RA},wA=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},xA=function(e,t){return 92===e&&10!==t},BA=function(e,t,s){return e===RA?bA(t)||xA(t,s):!!bA(e)||!(92!==e||!xA(e,t))},FA=function(e,t,s){return e===PA||e===RA?!!NA(t)||46===t&&NA(s):NA(46===e?t:e)},MA=function(e){var t=0,s=1;e[t]!==PA&&e[t]!==RA||(e[t]===RA&&(s=-1),t++);for(var i=[];NA(e[t]);)i.push(e[t++]);var r=i.length?parseInt(Dc.apply(void 0,i),10):0;46===e[t]&&t++;for(var o=[];NA(e[t]);)o.push(e[t++]);var n=o.length,a=n?parseInt(Dc.apply(void 0,o),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;e[t]!==PA&&e[t]!==RA||(e[t]===RA&&(l=-1),t++);for(var h=[];NA(e[t]);)h.push(e[t++]);var c=h.length?parseInt(Dc.apply(void 0,h),10):0;return s*(r+a*Math.pow(10,-n))*Math.pow(10,l*c)},LA={type:2},UA={type:3},HA={type:4},GA={type:13},kA={type:8},VA={type:21},jA={type:9},QA={type:10},WA={type:11},zA={type:12},KA={type:14},YA={type:23},XA={type:1},ZA={type:25},qA={type:24},JA={type:26},$A={type:27},eu={type:28},tu={type:29},su={type:31},iu={type:32},ru=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(Pc(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==iu;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),s=this.peekCodePoint(1),i=this.peekCodePoint(2);if(SA(t)||xA(s,i)){var r=BA(t,s,i)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),GA;break;case 39:return this.consumeStringToken(39);case 40:return LA;case 41:return UA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),KA;break;case PA:if(FA(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return HA;case RA:var o=e,n=this.peekCodePoint(0),a=this.peekCodePoint(1);if(FA(o,n,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(BA(o,n,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===RA&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),qA;break;case 46:if(FA(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(l===DA)return this.consumeToken()}break;case 58:return JA;case 59:return $A;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===RA&&this.peekCodePoint(2)===RA)return this.consumeCodePoint(),this.consumeCodePoint(),ZA;break;case 64:var h=this.peekCodePoint(0),c=this.peekCodePoint(1),A=this.peekCodePoint(2);if(BA(h,c,A))return{type:7,value:this.consumeName()};break;case 91:return eu;case 92:if(xA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return tu;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),kA;break;case 123:return WA;case 125:return zA;case 117:case 85:var u=this.peekCodePoint(0),p=this.peekCodePoint(1);return u!==PA||!CA(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),jA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),VA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),QA;break;case DA:return iu}return OA(e)?(this.consumeWhiteSpace(),su):NA(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):bA(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Dc(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();CA(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var s=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),s=!0;if(s)return{type:30,start:parseInt(Dc.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(Dc.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var i=parseInt(Dc.apply(void 0,e),16);if(this.peekCodePoint(0)===RA&&CA(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var r=[];CA(t)&&r.length<6;)r.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(Dc.apply(void 0,r),16)}}return{type:30,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===DA)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var s=this.consumeStringToken(this.consumeCodePoint());return 0===s.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===DA||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:s.value}):(this.consumeBadUrlRemnants(),YA)}for(;;){var i=this.consumeCodePoint();if(i===DA||41===i)return{type:22,value:Dc.apply(void 0,e)};if(OA(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===DA||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:Dc.apply(void 0,e)}):(this.consumeBadUrlRemnants(),YA);if(34===i||39===i||40===i||wA(i))return this.consumeBadUrlRemnants(),YA;if(92===i){if(!xA(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),YA;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;OA(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===DA)return;xA(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var s=Math.min(5e4,e);t+=Dc.apply(void 0,this._value.splice(0,s)),e-=s}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",s=0;;){var i=this._value[s];if(i===DA||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(s)};if(10===i)return this._value.splice(0,s),XA;if(92===i){var r=this._value[s+1];r!==DA&&void 0!==r&&(10===r?(t+=this.consumeStringSlice(s),s=-1,this._value.shift()):xA(i,r)&&(t+=this.consumeStringSlice(s),t+=Dc(this.consumeEscapedCodePoint()),s=-1))}s++}},e.prototype.consumeNumber=function(){var e=[],t=4,s=this.peekCodePoint(0);for(s!==PA&&s!==RA||e.push(this.consumeCodePoint());NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(46===s&&NA(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());s=this.peekCodePoint(0),i=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===s||101===s)&&((i===PA||i===RA)&&NA(r)||NA(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;NA(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[MA(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],s=e[1],i=this.peekCodePoint(0),r=this.peekCodePoint(1),o=this.peekCodePoint(2);return BA(i,r,o)?{type:15,number:t,flags:s,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:t,flags:s}):{type:17,number:t,flags:s}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(CA(e)){for(var t=Dc(e);CA(this.peekCodePoint(0))&&t.length<6;)t+=Dc(this.consumeCodePoint());OA(this.peekCodePoint(0))&&this.consumeCodePoint();var s=parseInt(t,16);return 0===s||function(e){return e>=55296&&e<=57343}(s)||s>1114111?65533:s}return e===DA?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(SA(t))e+=Dc(t);else{if(!xA(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=Dc(this.consumeEscapedCodePoint())}}},e}(),ou=function(){function e(e){this._tokens=e}return e.create=function(t){var s=new ru;return s.write(t),new e(s.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},s=this.consumeToken();;){if(32===s.type||du(s,e))return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue()),s=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var s=this.consumeToken();if(32===s.type||3===s.type)return t;this.reconsumeToken(s),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?iu:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),nu=function(e){return 15===e.type},au=function(e){return 17===e.type},lu=function(e){return 20===e.type},hu=function(e){return 0===e.type},cu=function(e,t){return lu(e)&&e.value===t},Au=function(e){return 31!==e.type},uu=function(e){return 31!==e.type&&4!==e.type},pu=function(e){var t=[],s=[];return e.forEach((function(e){if(4===e.type){if(0===s.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(s),void(s=[])}31!==e.type&&s.push(e)})),s.length&&t.push(s),t},du=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},fu=function(e){return 17===e.type||15===e.type},Eu=function(e){return 16===e.type||fu(e)},mu=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},yu={type:17,number:0,flags:4},gu={type:16,number:50,flags:4},Iu={type:16,number:100,flags:4},vu=function(e,t,s){var i=e[0],r=e[1];return[Tu(i,t),Tu(void 0!==r?r:i,s)]},Tu=function(e,t){if(16===e.type)return e.number/100*t;if(nu(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},_u="grad",Ru="turn",Pu=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case _u:return Math.PI/200*t.number;case"rad":return t.number;case Ru:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Du=function(e){return 15===e.type&&("deg"===e.unit||e.unit===_u||"rad"===e.unit||e.unit===Ru)},Nu=function(e){switch(e.filter(lu).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[yu,yu];case"to top":case"bottom":return Cu(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[yu,Iu];case"to right":case"left":return Cu(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Iu,Iu];case"to bottom":case"top":return Cu(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Iu,yu];case"to left":case"right":return Cu(270)}return 0},Cu=function(e){return Math.PI*e/180},Ou=function(e,t){if(18===t.type){var s=Lu[t.name];if(void 0===s)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return s(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);return wu(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),1)}if(4===t.value.length){i=t.value.substring(0,1),r=t.value.substring(1,2),o=t.value.substring(2,3);var n=t.value.substring(3,4);return wu(parseInt(i+i,16),parseInt(r+r,16),parseInt(o+o,16),parseInt(n+n,16)/255)}if(6===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6);return wu(parseInt(i,16),parseInt(r,16),parseInt(o,16),1)}if(8===t.value.length){i=t.value.substring(0,2),r=t.value.substring(2,4),o=t.value.substring(4,6),n=t.value.substring(6,8);return wu(parseInt(i,16),parseInt(r,16),parseInt(o,16),parseInt(n,16)/255)}}if(20===t.type){var a=Hu[t.value.toUpperCase()];if(void 0!==a)return a}return Hu.TRANSPARENT},bu=function(e){return 0==(255&e)},Su=function(e){var t=255&e,s=255&e>>8,i=255&e>>16,r=255&e>>24;return t<255?"rgba("+r+","+i+","+s+","+t/255+")":"rgb("+r+","+i+","+s+")"},wu=function(e,t,s,i){return(e<<24|t<<16|s<<8|Math.round(255*i)<<0)>>>0},xu=function(e,t){if(17===e.type)return e.number;if(16===e.type){var s=3===t?1:255;return 3===t?e.number/100*s:Math.round(e.number/100*s)}return 0},Bu=function(e,t){var s=t.filter(uu);if(3===s.length){var i=s.map(xu),r=i[0],o=i[1],n=i[2];return wu(r,o,n,1)}if(4===s.length){var a=s.map(xu),l=(r=a[0],o=a[1],n=a[2],a[3]);return wu(r,o,n,l)}return 0};function Fu(e,t,s){return s<0&&(s+=1),s>=1&&(s-=1),s<1/6?(t-e)*s*6+e:s<.5?t:s<2/3?6*(t-e)*(2/3-s)+e:e}var Mu=function(e,t){var s=t.filter(uu),i=s[0],r=s[1],o=s[2],n=s[3],a=(17===i.type?Cu(i.number):Pu(e,i))/(2*Math.PI),l=Eu(r)?r.number/100:0,h=Eu(o)?o.number/100:0,c=void 0!==n&&Eu(n)?Tu(n,1):1;if(0===l)return wu(255*h,255*h,255*h,1);var A=h<=.5?h*(l+1):h+l-h*l,u=2*h-A,p=Fu(u,A,a+1/3),d=Fu(u,A,a),f=Fu(u,A,a-1/3);return wu(255*p,255*d,255*f,c)},Lu={hsl:Mu,hsla:Mu,rgb:Bu,rgba:Bu},Uu=function(e,t){return Ou(e,ou.create(t).parseComponentValue())},Hu={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Gu={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(lu(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},ku={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Vu=function(e,t){var s=Ou(e,t[0]),i=t[1];return i&&Eu(i)?{color:s,stop:i}:{color:s,stop:null}},ju=function(e,t){var s=e[0],i=e[e.length-1];null===s.stop&&(s.stop=yu),null===i.stop&&(i.stop=Iu);for(var r=[],o=0,n=0;no?r.push(l):r.push(o),o=l}else r.push(null)}var h=null;for(n=0;ne.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},Ku=function(e,t){var s=Cu(180),i=[];return pu(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(s=Nu(t));if(Du(o))return void(s=(Pu(e,o)+Cu(270))%Cu(360))}var n=Vu(e,t);i.push(n)})),{angle:s,stops:i,type:1}},Yu="closest-side",Xu="farthest-side",Zu="closest-corner",qu="farthest-corner",Ju="circle",$u="ellipse",ep="cover",tp="contain",sp=function(e,t){var s=0,i=3,r=[],o=[];return pu(t).forEach((function(t,n){var a=!0;if(0===n?a=t.reduce((function(e,t){if(lu(t))switch(t.value){case"center":return o.push(gu),!1;case"top":case"left":return o.push(yu),!1;case"right":case"bottom":return o.push(Iu),!1}else if(Eu(t)||fu(t))return o.push(t),!1;return e}),a):1===n&&(a=t.reduce((function(e,t){if(lu(t))switch(t.value){case Ju:return s=0,!1;case $u:return s=1,!1;case tp:case Yu:return i=0,!1;case Xu:return i=1,!1;case Zu:return i=2,!1;case ep:case qu:return i=3,!1}else if(fu(t)||Eu(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)),a){var l=Vu(e,t);r.push(l)}})),{size:i,shape:s,stops:r,position:o,type:2}},ip=function(e,t){if(22===t.type){var s={url:t.value,type:0};return e.cache.addImage(t.value),s}if(18===t.type){var i=op[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)};var rp,op={"linear-gradient":function(e,t){var s=Cu(180),i=[];return pu(t).forEach((function(t,r){if(0===r){var o=t[0];if(20===o.type&&"to"===o.value)return void(s=Nu(t));if(Du(o))return void(s=Pu(e,o))}var n=Vu(e,t);i.push(n)})),{angle:s,stops:i,type:1}},"-moz-linear-gradient":Ku,"-ms-linear-gradient":Ku,"-o-linear-gradient":Ku,"-webkit-linear-gradient":Ku,"radial-gradient":function(e,t){var s=0,i=3,r=[],o=[];return pu(t).forEach((function(t,n){var a=!0;if(0===n){var l=!1;a=t.reduce((function(e,t){if(l)if(lu(t))switch(t.value){case"center":return o.push(gu),e;case"top":case"left":return o.push(yu),e;case"right":case"bottom":return o.push(Iu),e}else(Eu(t)||fu(t))&&o.push(t);else if(lu(t))switch(t.value){case Ju:return s=0,!1;case $u:return s=1,!1;case"at":return l=!0,!1;case Yu:return i=0,!1;case ep:case Xu:return i=1,!1;case tp:case Zu:return i=2,!1;case qu:return i=3,!1}else if(fu(t)||Eu(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),a)}if(a){var h=Vu(e,t);r.push(h)}})),{size:i,shape:s,stops:r,position:o,type:2}},"-moz-radial-gradient":sp,"-ms-radial-gradient":sp,"-o-radial-gradient":sp,"-webkit-radial-gradient":sp,"-webkit-gradient":function(e,t){var s=Cu(180),i=[],r=1;return pu(t).forEach((function(t,s){var o=t[0];if(0===s){if(lu(o)&&"linear"===o.value)return void(r=1);if(lu(o)&&"radial"===o.value)return void(r=2)}if(18===o.type)if("from"===o.name){var n=Ou(e,o.values[0]);i.push({stop:yu,color:n})}else if("to"===o.name){n=Ou(e,o.values[0]);i.push({stop:Iu,color:n})}else if("color-stop"===o.name){var a=o.values.filter(uu);if(2===a.length){n=Ou(e,a[1]);var l=a[0];au(l)&&i.push({stop:{type:16,number:100*l.number,flags:l.flags},color:n})}}})),1===r?{angle:(s+Cu(180))%Cu(360),stops:i,type:r}:{size:3,shape:0,stops:i,position:[],type:r}}},np={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var s=t[0];return 20===s.type&&"none"===s.value?[]:t.filter((function(e){return uu(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!op[e.name])}(e)})).map((function(t){return ip(e,t)}))}},ap={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(lu(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},lp={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return pu(t).map((function(e){return e.filter(Eu)})).map(mu)}},hp={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return pu(t).map((function(e){return e.filter(lu).map((function(e){return e.value})).join(" ")})).map(cp)}},cp=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(rp||(rp={}));var Ap,up={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return pu(t).map((function(e){return e.filter(pp)}))}},pp=function(e){return lu(e)||Eu(e)},dp=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},fp=dp("top"),Ep=dp("right"),mp=dp("bottom"),yp=dp("left"),gp=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return mu(t.filter(Eu))}}},Ip=gp("top-left"),vp=gp("top-right"),Tp=gp("bottom-right"),_p=gp("bottom-left"),Rp=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Pp=Rp("top"),Dp=Rp("right"),Np=Rp("bottom"),Cp=Rp("left"),Op=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return nu(t)?t.number:0}}},bp=Op("top"),Sp=Op("right"),wp=Op("bottom"),xp=Op("left"),Bp={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fp={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Mp={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(lu).reduce((function(e,t){return e|Lp(t.value)}),0)}},Lp=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Up={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Hp={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(Ap||(Ap={}));var Gp,kp={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?Ap.STRICT:Ap.NORMAL}},Vp={name:"line-height",initialValue:"normal",prefix:!1,type:4},jp=function(e,t){return lu(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Eu(e)?Tu(e,t):t},Qp={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:ip(e,t)}},Wp={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},zp={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Kp=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Yp=Kp("top"),Xp=Kp("right"),Zp=Kp("bottom"),qp=Kp("left"),Jp={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(lu).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},$p={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},ed=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},td=ed("top"),sd=ed("right"),id=ed("bottom"),rd=ed("left"),od={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},nd={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},ad={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&cu(t[0],"none")?[]:pu(t).map((function(t){for(var s={color:Hu.TRANSPARENT,offsetX:yu,offsetY:yu,blur:yu},i=0,r=0;r1?1:0],this.overflowWrap=Gd(e,$p,t.overflowWrap),this.paddingTop=Gd(e,td,t.paddingTop),this.paddingRight=Gd(e,sd,t.paddingRight),this.paddingBottom=Gd(e,id,t.paddingBottom),this.paddingLeft=Gd(e,rd,t.paddingLeft),this.paintOrder=Gd(e,Bd,t.paintOrder),this.position=Gd(e,nd,t.position),this.textAlign=Gd(e,od,t.textAlign),this.textDecorationColor=Gd(e,gd,null!==(s=t.textDecorationColor)&&void 0!==s?s:t.color),this.textDecorationLine=Gd(e,Id,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=Gd(e,ad,t.textShadow),this.textTransform=Gd(e,ld,t.textTransform),this.transform=Gd(e,hd,t.transform),this.transformOrigin=Gd(e,pd,t.transformOrigin),this.visibility=Gd(e,dd,t.visibility),this.webkitTextStrokeColor=Gd(e,Fd,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Gd(e,Md,t.webkitTextStrokeWidth),this.wordBreak=Gd(e,fd,t.wordBreak),this.zIndex=Gd(e,Ed,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return bu(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return Dd(this.display,4)||Dd(this.display,33554432)||Dd(this.display,268435456)||Dd(this.display,536870912)||Dd(this.display,67108864)||Dd(this.display,134217728)},e}(),Ud=function(e,t){this.content=Gd(e,Nd,t.content),this.quotes=Gd(e,Sd,t.quotes)},Hd=function(e,t){this.counterIncrement=Gd(e,Cd,t.counterIncrement),this.counterReset=Gd(e,Od,t.counterReset)},Gd=function(e,t,s){var i=new ru,r=null!=s?s.toString():t.initialValue;i.write(r);var o=new ou(i.read());switch(t.type){case 2:var n=o.parseComponentValue();return t.parse(e,lu(n)?n.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return Pu(e,o.parseComponentValue());case"color":return Ou(e,o.parseComponentValue());case"image":return ip(e,o.parseComponentValue());case"length":var a=o.parseComponentValue();return fu(a)?a:yu;case"length-percentage":var l=o.parseComponentValue();return Eu(l)?l:yu;case"time":return md(e,o.parseComponentValue())}}},kd=function(e,t){var s=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===s||t===s},Vd=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,kd(t,3),this.styles=new Ld(e,window.getComputedStyle(t,null)),Kf(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=Rc(this.context,t),kd(t,4)&&(this.flags|=16)},jd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Wd=0;Wd=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Yd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zd=0;Zd>10),n%1024+56320)),(r+1===s||i.length>16384)&&(o+=String.fromCharCode.apply(String,i),i.length=0)}return o},rf=function(e,t){var s,i,r,o=function(e){var t,s,i,r,o,n=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(n--,"="===e[e.length-2]&&n--);var h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(n):new Array(n),c=Array.isArray(h)?h:new Uint8Array(h);for(t=0;t>4,c[l++]=(15&i)<<4|r>>2,c[l++]=(3&r)<<6|63&o;return h}(e),n=Array.isArray(o)?function(e){for(var t=e.length,s=[],i=0;i=55296&&r<=56319&&s=s)return{done:!0,value:null};for(var e=of;in.x||r.y>n.y;return n=r,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(uf,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,s=e.createElement("canvas"),i=s.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,";try{i.drawImage(t,0,0),s.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(uf,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),s=100;t.width=s,t.height=s;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,s,s);var r=new Image,o=t.toDataURL();r.src=o;var n=cf(s,s,0,0,r);return i.fillStyle="red",i.fillRect(0,0,s,s),Af(n).then((function(t){i.drawImage(t,0,0);var r=i.getImageData(0,0,s,s).data;i.fillStyle="red",i.fillRect(0,0,s,s);var n=e.createElement("div");return n.style.backgroundImage="url("+o+")",n.style.height="100px",hf(r)?Af(cf(s,s,0,0,n)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),hf(i.getImageData(0,0,s,s).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(uf,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(uf,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(uf,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(uf,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(uf,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},pf=function(e,t){this.text=e,this.bounds=t},df=function(e,t){var s=t.ownerDocument;if(s){var i=s.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var r=t.parentNode;if(r){r.replaceChild(i,t);var o=Rc(e,i);return i.firstChild&&r.replaceChild(i.firstChild,i),o}}return _c.EMPTY},ff=function(e,t,s){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var r=i.createRange();return r.setStart(e,t),r.setEnd(e,t+s),r},Ef=function(e){if(uf.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,s=lf(e),i=[];!(t=s.next()).done;)t.value&&i.push(t.value.slice());return i}(e)},mf=function(e,t){return 0!==t.letterSpacing?Ef(e):function(e,t){if(uf.SUPPORT_NATIVE_TEXT_SEGMENTATION){var s=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(s.segment(e)).map((function(e){return e.segment}))}return gf(e,t)}(e,t)},yf=[32,160,4961,65792,65793,4153,4241],gf=function(e,t){for(var s,i=function(e,t){var s=Pc(e),i=TA(s,t),r=i[0],o=i[1],n=i[2],a=s.length,l=0,h=0;return{next:function(){if(h>=a)return{done:!0,value:null};for(var e=hA;h0)if(uf.SUPPORT_RANGE_BOUNDS){var r=ff(i,n,t.length).getClientRects();if(r.length>1){var a=Ef(t),l=0;a.forEach((function(t){o.push(new pf(t,_c.fromDOMRectList(e,ff(i,l+n,t.length).getClientRects()))),l+=t.length}))}else o.push(new pf(t,_c.fromDOMRectList(e,r)))}else{var h=i.splitText(t.length);o.push(new pf(t,df(e,i))),i=h}else uf.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));n+=t.length})),o}(e,this.text,s,t)},vf=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Tf,_f);case 2:return e.toUpperCase();default:return e}},Tf=/(^|\s|:|-|\(|\))([a-z])/g,_f=function(e,t,s){return e.length>0?t+s.toUpperCase():e},Rf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.src=s.currentSrc||s.src,i.intrinsicWidth=s.naturalWidth,i.intrinsicHeight=s.naturalHeight,i.context.cache.addImage(i.src),i}return yc(t,e),t}(Vd),Pf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.canvas=s,i.intrinsicWidth=s.width,i.intrinsicHeight=s.height,i}return yc(t,e),t}(Vd),Df=function(e){function t(t,s){var i=e.call(this,t,s)||this,r=new XMLSerializer,o=Rc(t,s);return s.setAttribute("width",o.width+"px"),s.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(s)),i.intrinsicWidth=s.width.baseVal.value,i.intrinsicHeight=s.height.baseVal.value,i.context.cache.addImage(i.svg),i}return yc(t,e),t}(Vd),Nf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.value=s.value,i}return yc(t,e),t}(Vd),Cf=function(e){function t(t,s){var i=e.call(this,t,s)||this;return i.start=s.start,i.reversed="boolean"==typeof s.reversed&&!0===s.reversed,i}return yc(t,e),t}(Vd),Of=[{type:15,flags:0,unit:"px",number:3}],bf=[{type:16,flags:0,number:50}],Sf="checkbox",wf="radio",xf="password",Bf=707406591,Ff=function(e){function t(t,s){var i,r,o,n=e.call(this,t,s)||this;switch(n.type=s.type.toLowerCase(),n.checked=s.checked,n.value=0===(r=(i=s).type===xf?new Array(i.value.length+1).join("•"):i.value).length?i.placeholder||"":r,n.type!==Sf&&n.type!==wf||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(o=n.bounds).width>o.height?new _c(o.left+(o.width-o.height)/2,o.top,o.height,o.height):o.width0)s.textNodes.push(new If(e,r,s.styles));else if(zf(r))if(aE(r)&&r.assignedNodes)r.assignedNodes().forEach((function(t){return Gf(e,t,s,i)}));else{var n=kf(e,r);n.styles.isVisible()&&(jf(r,n,i)?n.flags|=4:Qf(n.styles)&&(n.flags|=2),-1!==Hf.indexOf(r.tagName)&&(n.flags|=8),s.elements.push(n),r.slot,r.shadowRoot?Gf(e,r.shadowRoot,n,i):oE(r)||Jf(r)||nE(r)||Gf(e,r,n,i))}},kf=function(e,t){return sE(t)?new Rf(e,t):eE(t)?new Pf(e,t):Jf(t)?new Df(e,t):Xf(t)?new Nf(e,t):Zf(t)?new Cf(e,t):qf(t)?new Ff(e,t):nE(t)?new Mf(e,t):oE(t)?new Lf(e,t):iE(t)?new Uf(e,t):new Vd(e,t)},Vf=function(e,t){var s=kf(e,t);return s.flags|=4,Gf(e,t,s,s),s},jf=function(e,t,s){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||$f(e)&&s.styles.isTransparent()},Qf=function(e){return e.isPositioned()||e.isFloating()},Wf=function(e){return e.nodeType===Node.TEXT_NODE},zf=function(e){return e.nodeType===Node.ELEMENT_NODE},Kf=function(e){return zf(e)&&void 0!==e.style&&!Yf(e)},Yf=function(e){return"object"==typeof e.className},Xf=function(e){return"LI"===e.tagName},Zf=function(e){return"OL"===e.tagName},qf=function(e){return"INPUT"===e.tagName},Jf=function(e){return"svg"===e.tagName},$f=function(e){return"BODY"===e.tagName},eE=function(e){return"CANVAS"===e.tagName},tE=function(e){return"VIDEO"===e.tagName},sE=function(e){return"IMG"===e.tagName},iE=function(e){return"IFRAME"===e.tagName},rE=function(e){return"STYLE"===e.tagName},oE=function(e){return"TEXTAREA"===e.tagName},nE=function(e){return"SELECT"===e.tagName},aE=function(e){return"SLOT"===e.tagName},lE=function(e){return e.tagName.indexOf("-")>0},hE=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,s=e.counterIncrement,i=e.counterReset,r=!0;null!==s&&s.forEach((function(e){var s=t.counters[e.counter];s&&0!==e.increment&&(r=!1,s.length||s.push(1),s[Math.max(0,s.length-1)]+=e.increment)}));var o=[];return r&&i.forEach((function(e){var s=t.counters[e.counter];o.push(e.counter),s||(s=t.counters[e.counter]=[]),s.push(e.reset)})),o},e}(),cE={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},AE={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},uE={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},pE={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},dE=function(e,t,s,i,r,o){return es?_E(e,r,o.length>0):i.integers.reduce((function(t,s,r){for(;e>=s;)e-=s,t+=i.values[r];return t}),"")+o},fE=function(e,t,s,i){var r="";do{s||e--,r=i(e)+r,e/=t}while(e*t>=t);return r},EE=function(e,t,s,i,r){var o=s-t+1;return(e<0?"-":"")+(fE(Math.abs(e),o,i,(function(e){return Dc(Math.floor(e%o)+t)}))+r)},mE=function(e,t,s){void 0===s&&(s=". ");var i=t.length;return fE(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+s},yE=function(e,t,s,i,r,o){if(e<-9999||e>9999)return _E(e,4,r.length>0);var n=Math.abs(e),a=r;if(0===n)return t[0]+a;for(var l=0;n>0&&l<=4;l++){var h=n%10;0===h&&Dd(o,1)&&""!==a?a=t[h]+a:h>1||1===h&&0===l||1===h&&1===l&&Dd(o,2)||1===h&&1===l&&Dd(o,4)&&e>100||1===h&&l>1&&Dd(o,8)?a=t[h]+(l>0?s[l-1]:"")+a:1===h&&l>0&&(a=s[l-1]+a),n=Math.floor(n/10)}return(e<0?i:"")+a},gE="十百千萬",IE="拾佰仟萬",vE="マイナス",TE="마이너스",_E=function(e,t,s){var i=s?". ":"",r=s?"、":"",o=s?", ":"",n=s?" ":"";switch(t){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var a=EE(e,48,57,!0,i);return a.length<4?"0"+a:a;case 4:return mE(e,"〇一二三四五六七八九",r);case 6:return dE(e,1,3999,cE,3,i).toLowerCase();case 7:return dE(e,1,3999,cE,3,i);case 8:return EE(e,945,969,!1,i);case 9:return EE(e,97,122,!1,i);case 10:return EE(e,65,90,!1,i);case 11:return EE(e,1632,1641,!0,i);case 12:case 49:return dE(e,1,9999,AE,3,i);case 35:return dE(e,1,9999,AE,3,i).toLowerCase();case 13:return EE(e,2534,2543,!0,i);case 14:case 30:return EE(e,6112,6121,!0,i);case 15:return mE(e,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return mE(e,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return yE(e,"零一二三四五六七八九",gE,"負",r,14);case 47:return yE(e,"零壹貳參肆伍陸柒捌玖",IE,"負",r,15);case 42:return yE(e,"零一二三四五六七八九",gE,"负",r,14);case 41:return yE(e,"零壹贰叁肆伍陆柒捌玖",IE,"负",r,15);case 26:return yE(e,"〇一二三四五六七八九","十百千万",vE,r,0);case 25:return yE(e,"零壱弐参四伍六七八九","拾百千万",vE,r,7);case 31:return yE(e,"영일이삼사오육칠팔구","십백천만",TE,o,7);case 33:return yE(e,"零一二三四五六七八九","十百千萬",TE,o,0);case 32:return yE(e,"零壹貳參四五六七八九","拾百千",TE,o,7);case 18:return EE(e,2406,2415,!0,i);case 20:return dE(e,1,19999,pE,3,i);case 21:return EE(e,2790,2799,!0,i);case 22:return EE(e,2662,2671,!0,i);case 22:return dE(e,1,10999,uE,3,i);case 23:return mE(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return mE(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return EE(e,3302,3311,!0,i);case 28:return mE(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return mE(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return EE(e,3792,3801,!0,i);case 37:return EE(e,6160,6169,!0,i);case 38:return EE(e,4160,4169,!0,i);case 39:return EE(e,2918,2927,!0,i);case 40:return EE(e,1776,1785,!0,i);case 43:return EE(e,3046,3055,!0,i);case 44:return EE(e,3174,3183,!0,i);case 45:return EE(e,3664,3673,!0,i);case 46:return EE(e,3872,3881,!0,i);default:return EE(e,48,57,!0,i)}},RE="data-html2canvas-ignore",PE=function(){function e(e,t,s){if(this.context=e,this.options=s,this.scrolledElements=[],this.referenceElement=t,this.counters=new hE,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var s=this,i=NE(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,n=i.contentWindow,a=n.document,l=bE(i).then((function(){return Ic(s,void 0,void 0,(function(){var e,s;return vc(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(FE),n&&(n.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||n.scrollY===t.top&&n.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(n.scrollX-t.left,n.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(s=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,OE(a)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,s)})).then((function(){return i}))]:[2,i]}}))}))}));return a.open(),a.write(xE(document.doctype)+""),BE(this.referenceElement.ownerDocument,r,o),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(kd(e,2),eE(e))return this.createCanvasClone(e);if(tE(e))return this.createVideoClone(e);if(rE(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return sE(t)&&(sE(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),lE(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return wE(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var s=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=s,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var s=e.ownerDocument.createElement("img");try{return s.src=e.toDataURL(),s}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var r=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&r)o.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var n=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(n){var a=n.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var s=t.getContext("2d");try{return s&&(s.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||s.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},e.prototype.appendChildNode=function(e,t,s){zf(t)&&("SCRIPT"===t.tagName||t.hasAttribute(RE)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&zf(t)&&rE(t)||e.appendChild(this.cloneNode(t,s))},e.prototype.cloneChildNodes=function(e,t,s){for(var i=this,r=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;r;r=r.nextSibling)if(zf(r)&&aE(r)&&"function"==typeof r.assignedNodes){var o=r.assignedNodes();o.length&&o.forEach((function(e){return i.appendChildNode(t,e,s)}))}else this.appendChildNode(t,r,s)},e.prototype.cloneNode=function(e,t){if(Wf(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var s=e.ownerDocument.defaultView;if(s&&zf(e)&&(Kf(e)||Yf(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var r=s.getComputedStyle(e),o=s.getComputedStyle(e,":before"),n=s.getComputedStyle(e,":after");this.referenceElement===e&&Kf(i)&&(this.clonedReferenceElement=i),$f(i)&&HE(i);var a=this.counters.parse(new Hd(this.context,r)),l=this.resolvePseudoContent(e,i,o,qd.BEFORE);lE(e)&&(t=!0),tE(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var h=this.resolvePseudoContent(e,i,n,qd.AFTER);return h&&i.appendChild(h),this.counters.pop(a),(r&&(this.options.copyStyles||Yf(e))&&!iE(e)||t)&&wE(r,i),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(oE(e)||nE(e))&&(oE(i)||nE(i))&&(i.value=e.value),i}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,s,i){var r=this;if(s){var o=s.content,n=t.ownerDocument;if(n&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==s.display){this.counters.parse(new Hd(this.context,s));var a=new Ud(this.context,s),l=n.createElement("html2canvaspseudoelement");wE(s,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(n.createTextNode(t.value));else if(22===t.type){var s=n.createElement("img");s.src=t.value,s.style.opacity="1",l.appendChild(s)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(lu);i.length&&l.appendChild(n.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(uu),h=o[0],c=o[1];if(h&&lu(h)){var A=r.counters.getCounterValue(h.value),u=c&&lu(c)?zp.parse(r.context,c.value):3;l.appendChild(n.createTextNode(_E(A,u,!1)))}}else if("counters"===t.name){var p=t.values.filter(uu),d=(h=p[0],p[1]);c=p[2];if(h&&lu(h)){var f=r.counters.getCounterValues(h.value),E=c&&lu(c)?zp.parse(r.context,c.value):3,m=d&&0===d.type?d.value:"",y=f.map((function(e){return _E(e,E,!1)})).join(m);l.appendChild(n.createTextNode(y))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(n.createTextNode(wd(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":l.appendChild(n.createTextNode(wd(a.quotes,--r.quoteDepth,!1)));break;default:l.appendChild(n.createTextNode(t.value))}})),l.className=ME+" "+LE;var h=i===qd.BEFORE?" "+ME:" "+LE;return Yf(t)?t.className.baseValue+=h:t.className+=h,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(qd||(qd={}));var DE,NE=function(e,t){var s=e.createElement("iframe");return s.className="html2canvas-container",s.style.visibility="hidden",s.style.position="fixed",s.style.left="-10000px",s.style.top="0px",s.style.border="0",s.width=t.width.toString(),s.height=t.height.toString(),s.scrolling="no",s.setAttribute(RE,"true"),e.body.appendChild(s),s},CE=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},OE=function(e){return Promise.all([].slice.call(e.images,0).map(CE))},bE=function(e){return new Promise((function(t,s){var i=e.contentWindow;if(!i)return s("No window assigned for iframe");var r=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var s=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(s),t(e))}),50)}}))},SE=["all","d","content"],wE=function(e,t){for(var s=e.length-1;s>=0;s--){var i=e.item(s);-1===SE.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},xE=function(e){var t="";return e&&(t+=""),t},BE=function(e,t,s){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||s!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,s)},FE=function(e){var t=e[0],s=e[1],i=e[2];t.scrollLeft=s,t.scrollTop=i},ME="___html2canvas___pseudoelement_before",LE="___html2canvas___pseudoelement_after",UE='{\n content: "" !important;\n display: none !important;\n}',HE=function(e){GE(e,"."+ME+":before"+UE+"\n ."+LE+":after"+UE)},GE=function(e,t){var s=e.ownerDocument;if(s){var i=s.createElement("style");i.textContent=t,e.appendChild(i)}},kE=function(){function e(){}return e.getOrigin=function(t){var s=e._link;return s?(s.href=t,s.href=s.href,s.protocol+s.hostname+s.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),VE=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:XE(e)||zE(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return Ic(this,void 0,void 0,(function(){var t,s,i,r,o=this;return vc(this,(function(n){switch(n.label){case 0:return t=kE.isSameOrigin(e),s=!KE(e)&&!0===this._options.useCORS&&uf.SUPPORT_CORS_IMAGES&&!t,i=!KE(e)&&!t&&!XE(e)&&"string"==typeof this._options.proxy&&uf.SUPPORT_CORS_XHR&&!s,t||!1!==this._options.allowTaint||KE(e)||XE(e)||i||s?(r=e,i?[4,this.proxy(r)]:[3,2]):[2];case 1:r=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(YE(r)||s)&&(i.crossOrigin="anonymous"),i.src=r,!0===i.complete&&setTimeout((function(){return e(i)}),500),o._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,s=this._options.proxy;if(!s)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(r,o){var n=uf.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===n)r(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return r(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(a.response)}else o("Failed to proxy resource "+i+" with status code "+a.status)},a.onerror=o;var l=s.indexOf("?")>-1?"&":"?";if(a.open("GET",""+s+l+"url="+encodeURIComponent(e)+"&responseType="+n),"text"!==n&&a instanceof XMLHttpRequest&&(a.responseType=n),t._options.imageTimeout){var h=t._options.imageTimeout;a.timeout=h,a.ontimeout=function(){return o("Timed out ("+h+"ms) proxying "+i)}}a.send()}))},e}(),jE=/^data:image\/svg\+xml/i,QE=/^data:image\/.*;base64,/i,WE=/^data:image\/.*/i,zE=function(e){return uf.SUPPORT_SVG_DRAWING||!ZE(e)},KE=function(e){return WE.test(e)},YE=function(e){return QE.test(e)},XE=function(e){return"blob"===e.substr(0,4)},ZE=function(e){return"svg"===e.substr(-3).toLowerCase()||jE.test(e)},qE=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,s){return new e(this.x+t,this.y+s)},e}(),JE=function(e,t,s){return new qE(e.x+(t.x-e.x)*s,e.y+(t.y-e.y)*s)},$E=function(){function e(e,t,s,i){this.type=1,this.start=e,this.startControl=t,this.endControl=s,this.end=i}return e.prototype.subdivide=function(t,s){var i=JE(this.start,this.startControl,t),r=JE(this.startControl,this.endControl,t),o=JE(this.endControl,this.end,t),n=JE(i,r,t),a=JE(r,o,t),l=JE(n,a,t);return s?new e(this.start,i,n,l):new e(l,a,o,this.end)},e.prototype.add=function(t,s){return new e(this.start.add(t,s),this.startControl.add(t,s),this.endControl.add(t,s),this.end.add(t,s))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),em=function(e){return 1===e.type},tm=function(e){var t=e.styles,s=e.bounds,i=vu(t.borderTopLeftRadius,s.width,s.height),r=i[0],o=i[1],n=vu(t.borderTopRightRadius,s.width,s.height),a=n[0],l=n[1],h=vu(t.borderBottomRightRadius,s.width,s.height),c=h[0],A=h[1],u=vu(t.borderBottomLeftRadius,s.width,s.height),p=u[0],d=u[1],f=[];f.push((r+a)/s.width),f.push((p+c)/s.width),f.push((o+d)/s.height),f.push((l+A)/s.height);var E=Math.max.apply(Math,f);E>1&&(r/=E,o/=E,a/=E,l/=E,c/=E,A/=E,p/=E,d/=E);var m=s.width-a,y=s.height-A,g=s.width-c,I=s.height-d,v=t.borderTopWidth,T=t.borderRightWidth,_=t.borderBottomWidth,R=t.borderLeftWidth,P=Tu(t.paddingTop,e.bounds.width),D=Tu(t.paddingRight,e.bounds.width),N=Tu(t.paddingBottom,e.bounds.width),C=Tu(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||o>0?sm(s.left+R/3,s.top+v/3,r-R/3,o-v/3,DE.TOP_LEFT):new qE(s.left+R/3,s.top+v/3),this.topRightBorderDoubleOuterBox=r>0||o>0?sm(s.left+m,s.top+v/3,a-T/3,l-v/3,DE.TOP_RIGHT):new qE(s.left+s.width-T/3,s.top+v/3),this.bottomRightBorderDoubleOuterBox=c>0||A>0?sm(s.left+g,s.top+y,c-T/3,A-_/3,DE.BOTTOM_RIGHT):new qE(s.left+s.width-T/3,s.top+s.height-_/3),this.bottomLeftBorderDoubleOuterBox=p>0||d>0?sm(s.left+R/3,s.top+I,p-R/3,d-_/3,DE.BOTTOM_LEFT):new qE(s.left+R/3,s.top+s.height-_/3),this.topLeftBorderDoubleInnerBox=r>0||o>0?sm(s.left+2*R/3,s.top+2*v/3,r-2*R/3,o-2*v/3,DE.TOP_LEFT):new qE(s.left+2*R/3,s.top+2*v/3),this.topRightBorderDoubleInnerBox=r>0||o>0?sm(s.left+m,s.top+2*v/3,a-2*T/3,l-2*v/3,DE.TOP_RIGHT):new qE(s.left+s.width-2*T/3,s.top+2*v/3),this.bottomRightBorderDoubleInnerBox=c>0||A>0?sm(s.left+g,s.top+y,c-2*T/3,A-2*_/3,DE.BOTTOM_RIGHT):new qE(s.left+s.width-2*T/3,s.top+s.height-2*_/3),this.bottomLeftBorderDoubleInnerBox=p>0||d>0?sm(s.left+2*R/3,s.top+I,p-2*R/3,d-2*_/3,DE.BOTTOM_LEFT):new qE(s.left+2*R/3,s.top+s.height-2*_/3),this.topLeftBorderStroke=r>0||o>0?sm(s.left+R/2,s.top+v/2,r-R/2,o-v/2,DE.TOP_LEFT):new qE(s.left+R/2,s.top+v/2),this.topRightBorderStroke=r>0||o>0?sm(s.left+m,s.top+v/2,a-T/2,l-v/2,DE.TOP_RIGHT):new qE(s.left+s.width-T/2,s.top+v/2),this.bottomRightBorderStroke=c>0||A>0?sm(s.left+g,s.top+y,c-T/2,A-_/2,DE.BOTTOM_RIGHT):new qE(s.left+s.width-T/2,s.top+s.height-_/2),this.bottomLeftBorderStroke=p>0||d>0?sm(s.left+R/2,s.top+I,p-R/2,d-_/2,DE.BOTTOM_LEFT):new qE(s.left+R/2,s.top+s.height-_/2),this.topLeftBorderBox=r>0||o>0?sm(s.left,s.top,r,o,DE.TOP_LEFT):new qE(s.left,s.top),this.topRightBorderBox=a>0||l>0?sm(s.left+m,s.top,a,l,DE.TOP_RIGHT):new qE(s.left+s.width,s.top),this.bottomRightBorderBox=c>0||A>0?sm(s.left+g,s.top+y,c,A,DE.BOTTOM_RIGHT):new qE(s.left+s.width,s.top+s.height),this.bottomLeftBorderBox=p>0||d>0?sm(s.left,s.top+I,p,d,DE.BOTTOM_LEFT):new qE(s.left,s.top+s.height),this.topLeftPaddingBox=r>0||o>0?sm(s.left+R,s.top+v,Math.max(0,r-R),Math.max(0,o-v),DE.TOP_LEFT):new qE(s.left+R,s.top+v),this.topRightPaddingBox=a>0||l>0?sm(s.left+Math.min(m,s.width-T),s.top+v,m>s.width+T?0:Math.max(0,a-T),Math.max(0,l-v),DE.TOP_RIGHT):new qE(s.left+s.width-T,s.top+v),this.bottomRightPaddingBox=c>0||A>0?sm(s.left+Math.min(g,s.width-R),s.top+Math.min(y,s.height-_),Math.max(0,c-T),Math.max(0,A-_),DE.BOTTOM_RIGHT):new qE(s.left+s.width-T,s.top+s.height-_),this.bottomLeftPaddingBox=p>0||d>0?sm(s.left+R,s.top+Math.min(I,s.height-_),Math.max(0,p-R),Math.max(0,d-_),DE.BOTTOM_LEFT):new qE(s.left+R,s.top+s.height-_),this.topLeftContentBox=r>0||o>0?sm(s.left+R+C,s.top+v+P,Math.max(0,r-(R+C)),Math.max(0,o-(v+P)),DE.TOP_LEFT):new qE(s.left+R+C,s.top+v+P),this.topRightContentBox=a>0||l>0?sm(s.left+Math.min(m,s.width+R+C),s.top+v+P,m>s.width+R+C?0:a-R+C,l-(v+P),DE.TOP_RIGHT):new qE(s.left+s.width-(T+D),s.top+v+P),this.bottomRightContentBox=c>0||A>0?sm(s.left+Math.min(g,s.width-(R+C)),s.top+Math.min(y,s.height+v+P),Math.max(0,c-(T+D)),A-(_+N),DE.BOTTOM_RIGHT):new qE(s.left+s.width-(T+D),s.top+s.height-(_+N)),this.bottomLeftContentBox=p>0||d>0?sm(s.left+R+C,s.top+I,Math.max(0,p-(R+C)),d-(_+N),DE.BOTTOM_LEFT):new qE(s.left+R+C,s.top+s.height-(_+N))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(DE||(DE={}));var sm=function(e,t,s,i,r){var o=(Math.sqrt(2)-1)/3*4,n=s*o,a=i*o,l=e+s,h=t+i;switch(r){case DE.TOP_LEFT:return new $E(new qE(e,h),new qE(e,h-a),new qE(l-n,t),new qE(l,t));case DE.TOP_RIGHT:return new $E(new qE(e,t),new qE(e+n,t),new qE(l,h-a),new qE(l,h));case DE.BOTTOM_RIGHT:return new $E(new qE(l,t),new qE(l,t+a),new qE(e+n,h),new qE(e,h));case DE.BOTTOM_LEFT:default:return new $E(new qE(l,h),new qE(l-n,h),new qE(e,t+a),new qE(e,t))}},im=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},rm=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},om=function(e,t,s){this.offsetX=e,this.offsetY=t,this.matrix=s,this.type=0,this.target=6},nm=function(e,t){this.path=e,this.target=t,this.type=1},am=function(e){this.opacity=e,this.type=2,this.target=6},lm=function(e){return 1===e.type},hm=function(e,t){return e.length===t.length&&e.some((function(e,s){return e===t[s]}))},cm=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Am=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new tm(this.container),this.container.styles.opacity<1&&this.effects.push(new am(this.container.styles.opacity)),null!==this.container.styles.transform){var s=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new om(s,i,r))}if(0!==this.container.styles.overflowX){var o=im(this.curves),n=rm(this.curves);hm(o,n)?this.effects.push(new nm(o,6)):(this.effects.push(new nm(o,2)),this.effects.push(new nm(n,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),s=this.parent,i=this.effects.slice(0);s;){var r=s.effects.filter((function(e){return!lm(e)}));if(t||0!==s.container.styles.position||!s.parent){if(i.unshift.apply(i,r),t=-1===[2,3].indexOf(s.container.styles.position),0!==s.container.styles.overflowX){var o=im(s.curves),n=rm(s.curves);hm(o,n)||i.unshift(new nm(n,6))}}else i.unshift.apply(i,r);s=s.parent}return i.filter((function(t){return Dd(t.target,e)}))},e}(),um=function(e,t,s,i){e.container.elements.forEach((function(r){var o=Dd(r.flags,4),n=Dd(r.flags,2),a=new Am(r,e);Dd(r.styles.display,2048)&&i.push(a);var l=Dd(r.flags,8)?[]:i;if(o||n){var h=o||r.styles.isPositioned()?s:t,c=new cm(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var A=r.styles.zIndex.order;if(A<0){var u=0;h.negativeZIndex.some((function(e,t){return A>e.element.container.styles.zIndex.order?(u=t,!1):u>0})),h.negativeZIndex.splice(u,0,c)}else if(A>0){var p=0;h.positiveZIndex.some((function(e,t){return A>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0})),h.positiveZIndex.splice(p,0,c)}else h.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?h.nonPositionedFloats.push(c):h.nonPositionedInlineLevel.push(c);um(a,c,o?c:s,l)}else r.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),um(a,t,s,l);Dd(r.flags,8)&&pm(r,l)}))},pm=function(e,t){for(var s=e instanceof Cf?e.start:1,i=e instanceof Cf&&e.reversed,r=0;r0&&e.intrinsicHeight>0){var i=ym(e),r=rm(t);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return Ic(this,void 0,void 0,(function(){var s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g;return vc(this,(function(I){switch(I.label){case 0:this.applyEffects(e.getEffects(4)),s=e.container,i=e.curves,r=s.styles,o=0,n=s.textNodes,I.label=1;case 1:return o0&&_>0&&(m=i.ctx.createPattern(d,"repeat"),i.renderRepeat(g,m,P,D))):function(e){return 2===e.type}(s)&&(y=gm(e,t,[null,null,null]),g=y[0],I=y[1],v=y[2],T=y[3],_=y[4],R=0===s.position.length?[gu]:s.position,P=Tu(R[0],T),D=Tu(R[R.length-1],_),N=function(e,t,s,i,r){var o=0,n=0;switch(e.size){case 0:0===e.shape?o=n=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-i)),n=Math.min(Math.abs(s),Math.abs(s-r)));break;case 2:if(0===e.shape)o=n=Math.min(Wu(t,s),Wu(t,s-r),Wu(t-i,s),Wu(t-i,s-r));else if(1===e.shape){var a=Math.min(Math.abs(s),Math.abs(s-r))/Math.min(Math.abs(t),Math.abs(t-i)),l=zu(i,r,t,s,!0),h=l[0],c=l[1];n=a*(o=Wu(h-t,(c-s)/a))}break;case 1:0===e.shape?o=n=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(s),Math.abs(s-r)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-i)),n=Math.max(Math.abs(s),Math.abs(s-r)));break;case 3:if(0===e.shape)o=n=Math.max(Wu(t,s),Wu(t,s-r),Wu(t-i,s),Wu(t-i,s-r));else if(1===e.shape){a=Math.max(Math.abs(s),Math.abs(s-r))/Math.max(Math.abs(t),Math.abs(t-i));var A=zu(i,r,t,s,!1);h=A[0],c=A[1],n=a*(o=Wu(h-t,(c-s)/a))}}return Array.isArray(e.size)&&(o=Tu(e.size[0],i),n=2===e.size.length?Tu(e.size[1],r):o),[o,n]}(s,P,D,T,_),C=N[0],O=N[1],C>0&&O>0&&(b=i.ctx.createRadialGradient(I+P,v+D,0,I+P,v+D,C),ju(s.stops,2*C).forEach((function(e){return b.addColorStop(e.stop,Su(e.color))})),i.path(g),i.ctx.fillStyle=b,C!==O?(S=e.bounds.left+.5*e.bounds.width,w=e.bounds.top+.5*e.bounds.height,B=1/(x=O/C),i.ctx.save(),i.ctx.translate(S,w),i.ctx.transform(1,0,0,x,0,0),i.ctx.translate(-S,-w),i.ctx.fillRect(I,B*(v-w)+w,T,_*B),i.ctx.restore()):i.ctx.fill())),F.label=6;case 6:return t--,[2]}}))},i=this,r=0,o=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return r0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:c.sent(),c.label=11;case 11:o++,c.label=12;case 12:return n++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,s,i,r){return Ic(this,void 0,void 0,(function(){var o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I;return vc(this,(function(v){return this.ctx.save(),o=function(e,t){switch(t){case 0:return fm(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return fm(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return fm(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return fm(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(i,s),n=dm(i,s),2===r&&(this.path(n),this.ctx.clip()),em(n[0])?(a=n[0].start.x,l=n[0].start.y):(a=n[0].x,l=n[0].y),em(n[1])?(h=n[1].end.x,c=n[1].end.y):(h=n[1].x,c=n[1].y),A=0===s||2===s?Math.abs(a-h):Math.abs(l-c),this.ctx.beginPath(),3===r?this.formatPath(o):this.formatPath(n.slice(0,2)),u=t<3?3*t:2*t,p=t<3?2*t:t,3===r&&(u=t,p=t),d=!0,A<=2*u?d=!1:A<=2*u+p?(u*=f=A/(2*u+p),p*=f):(E=Math.floor((A+p)/(u+p)),m=(A-E*u)/(E-1),p=(y=(A-(E+1)*u)/E)<=0||Math.abs(p-m){})),Km(this,"_reject",(()=>{})),this.name=e,this.workerThread=t,this.result=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){jm(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){jm(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xm{}const Zm=new Map;function qm(e){jm(e.source&&!e.url||!e.source&&e.url);let t=Zm.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return Jm((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),Zm.set(e.url,t)),e.source&&(t=Jm(e.source),Zm.set(e.source,t))),jm(t),t}function Jm(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function $m(e,t=!0,s){const i=s||new Set;if(e){if(ey(e))i.add(e);else if(ey(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(const s in e)$m(e[s],t,i)}else;return void 0===s?Array.from(i):[]}function ey(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const ty=()=>{};class sy{static isSupported(){return"undefined"!=typeof Worker&&Qm||void 0!==typeof Xm}constructor(e){Km(this,"name",void 0),Km(this,"source",void 0),Km(this,"url",void 0),Km(this,"terminated",!1),Km(this,"worker",void 0),Km(this,"onMessage",void 0),Km(this,"onError",void 0),Km(this,"_loadableURL","");const{name:t,source:s,url:i}=e;jm(s||i),this.name=t,this.source=s,this.url=i,this.onMessage=ty,this.onError=e=>console.log(e),this.worker=Qm?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=ty,this.onError=ty,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||$m(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=qm({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new Xm(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new Xm(this.source,{eval:!0})}return e.on("message",(e=>{this.onMessage(e)})),e.on("error",(e=>{this.onError(e)})),e.on("exit",(e=>{})),e}}class iy{static isSupported(){return sy.isSupported()}constructor(e){Km(this,"name","unnamed"),Km(this,"source",void 0),Km(this,"url",void 0),Km(this,"maxConcurrency",1),Km(this,"maxMobileConcurrency",1),Km(this,"onDebug",(()=>{})),Km(this,"reuseWorkers",!0),Km(this,"props",{}),Km(this,"jobQueue",[]),Km(this,"idleQueue",[]),Km(this,"count",0),Km(this,"isDestroyed",!1),this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach((e=>e.destroy())),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e,t=((e,t,s)=>e.done(s)),s=((e,t)=>e.error(t))){const i=new Promise((i=>(this.jobQueue.push({name:e,onMessage:t,onError:s,onStart:i}),this)));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const s=new Ym(t.name,e);e.onMessage=e=>t.onMessage(s,e.type,e.payload),e.onError=e=>t.onError(s,e),t.onStart(s);try{await s.result}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class oy{static isSupported(){return sy.isSupported()}static getWorkerFarm(e={}){return oy._workerFarm=oy._workerFarm||new oy({}),oy._workerFarm.setProps(e),oy._workerFarm}constructor(e){Km(this,"props",void 0),Km(this,"workerPools",new Map),this.props={...ry},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:s,url:i}=e;let r=this.workerPools.get(t);return r||(r=new iy({name:t,source:s,url:i}),r.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,r)),r}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}Km(oy,"_workerFarm",void 0);const ny={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},ay=ny.window||ny.self||ny.global,ly=ny.process||{},hy="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source",cy=!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}();class Ay{constructor(e,t,s="sessionStorage"){this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function uy(e,t,s,i=600){const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}const py={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function dy(e){return"string"==typeof e?py[e.toUpperCase()]||py.WHITE:e}function fy(e,t){if(!e)throw new Error(t||"Assertion failed")}function Ey(){let e;if(cy&&ay.performance)e=ay.performance.now();else if(ly.hrtime){const t=ly.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const my={debug:cy&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},yy={enabled:!0,level:0};function gy(){}const Iy={},vy={once:!0};function Ty(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}class _y{constructor({id:e}={id:""}){this.id=e,this.VERSION=hy,this._startTs=Ey(),this._deltaTs=Ey(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new Ay("__probe-".concat(this.id,"__"),yy),this.userData={},this.timeStamp("".concat(this.id," started")),function(e,t=["constructor"]){const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Ey()-this._startTs).toPrecision(10))}getDelta(){return Number((Ey()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}assert(e,t){fy(e,t)}warn(e){return this._getLogFunction(0,e,my.warn,arguments,vy)}error(e){return this._getLogFunction(0,e,my.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,my.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,my.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,my.debug||my.info,arguments,vy)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||gy,s&&[s],{tag:Ty(t)}):gy}image({logLevel:e,priority:t,image:s,message:i="",scale:r=1}){return this._shouldLog(e||t)?cy?function({image:e,message:t="",scale:s=1}){if("string"==typeof e){const i=new Image;return i.onload=()=>{const e=uy(i,t,s);console.log(...e)},i.src=e,gy}const i=e.nodeName||"";if("img"===i.toLowerCase())return console.log(...uy(e,t,s)),gy;if("canvas"===i.toLowerCase()){const i=new Image;return i.onload=()=>console.log(...uy(i,t,s)),i.src=e.toDataURL(),gy}return gy}({image:s,message:i,scale:r}):function({image:e,message:t="",scale:s=1}){let i=null;try{i=module.require("asciify-image")}catch(e){}if(i)return()=>i(e,{fit:"box",width:"".concat(Math.round(80*s),"%")}).then((e=>console.log(e)));return gy}({image:s,message:i,scale:r}):gy}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||gy)}group(e,t,s={collapsed:!1}){s=Py({logLevel:e,message:t,opts:s});const{collapsed:i}=s;return s.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(s)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||gy)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=Ry(e)}_getLogFunction(e,t,s,i=[],r){if(this._shouldLog(e)){r=Py({logLevel:e,message:t,args:i,opts:r}),fy(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=Ey();const o=r.tag||r.message;if(r.once){if(Iy[o])return gy;Iy[o]=Ey()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e,t=8){const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return cy||"string"!=typeof e||(t&&(t=dy(t),e="[".concat(t,"m").concat(e,"")),s&&(t=dy(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return gy}}function Ry(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return fy(Number.isFinite(t)&&t>=0),t}function Py(e){const{logLevel:t,message:s}=e;e.logLevel=Ry(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(e.args=i,typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return fy("string"===r||"object"===r),Object.assign(e,e.opts)}_y.VERSION=hy,new _y({id:"loaders.gl"});function Dy(){return!("object"==typeof process&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"==typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,s=e||t;return!!(s&&s.indexOf("Electron")>=0)}()}new class{constructor(){Km(this,"console",void 0),this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const Ny={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"==typeof process&&process},Cy=Ny.window||Ny.self||Ny.global,Oy=Ny.process||{},by="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";Dy();class Sy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Km(this,"storage",void 0),Km(this,"id",void 0),Km(this,"config",{}),this.storage=function(e){try{const t=window[e],s="__storage_test__";return t.setItem(s,s),t.removeItem(s),t}catch(e){return null}}(s),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function wy(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const r=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>i&&(s=Math.min(s,i/e.width));const o=e.width*s,n=e.height*s,a=["font-size:1px;","padding:".concat(Math.floor(n/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(n,"px;"),"background:url(".concat(r,");"),"background-size:".concat(o,"px ").concat(n,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}let xy;function By(e){return"string"==typeof e?xy[e.toUpperCase()]||xy.WHITE:e}function Fy(e,t){if(!e)throw new Error(t||"Assertion failed")}function My(){let e;var t,s;if(Dy&&"performance"in Cy)e=null==Cy||null===(t=Cy.performance)||void 0===t||null===(s=t.now)||void 0===s?void 0:s.call(t);else if("hrtime"in Oy){var i;const t=null==Oy||null===(i=Oy.hrtime)||void 0===i?void 0:i.call(Oy);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(xy||(xy={}));const Ly={debug:Dy&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Uy={enabled:!0,level:0};function Hy(){}const Gy={},ky={once:!0};class Vy{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};Km(this,"id",void 0),Km(this,"VERSION",by),Km(this,"_startTs",My()),Km(this,"_deltaTs",My()),Km(this,"_storage",void 0),Km(this,"userData",{}),Km(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new Sy("__probe-".concat(this.id,"__"),Uy),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const s=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(s);for(const s of i)"function"==typeof e[s]&&(t.find((e=>s===e))||(e[s]=e[s].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((My()-this._startTs).toPrecision(10))}getDelta(){return Number((My()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){Fy(e,t)}warn(e){return this._getLogFunction(0,e,Ly.warn,arguments,ky)}error(e){return this._getLogFunction(0,e,Ly.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,Ly.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,Ly.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var s=arguments.length,i=new Array(s>2?s-2:0),r=2;r{const t=wy(e,s,i);console.log(...t)},e.src=t,Hy}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...wy(t,s,i)),Hy;if("canvas"===r.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...wy(e,s,i)),e.src=t.toDataURL(),Hy}return Hy}({image:i,message:r,scale:o}):function(e){let{image:t,message:s="",scale:i=1}=e,r=null;try{r=module.require("asciify-image")}catch(e){}if(r)return()=>r(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return Hy}({image:i,message:r,scale:o}):Hy}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||Hy)}group(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const i=Qy({logLevel:e,message:t,opts:s}),{collapsed:r}=s;return i.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||Hy)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jy(e)}_getLogFunction(e,t,s,i,r){if(this._shouldLog(e)){r=Qy({logLevel:e,message:t,args:i,opts:r}),Fy(s=s||r.method),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=My();const o=r.tag||r.message;if(r.once){if(Gy[o])return Hy;Gy[o]=My()}return t=function(e,t,s){if("string"==typeof t){const i=s.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const s=Math.max(t-e.length,0);return"".concat(" ".repeat(s)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(s.total)):"";t=s.time?"".concat(e,": ").concat(i," ").concat(t):"".concat(e,": ").concat(t),t=function(e,t,s){return Dy||"string"!=typeof e||(t&&(t=By(t),e="[".concat(t,"m").concat(e,"")),s&&(t=By(s),e="[".concat(s+10,"m").concat(e,""))),e}(t,s.color,s.background)}return t}(this.id,r.message,r),s.bind(console,t,...r.args)}return Hy}}function jy(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return Fy(Number.isFinite(t)&&t>=0),t}function Qy(e){const{logLevel:t,message:s}=e;e.logLevel=jy(t);const i=e.args?Array.from(e.args):[];for(;i.length&&i.shift()!==s;);switch(typeof t){case"string":case"function":void 0!==s&&i.unshift(s),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());const r=typeof e.message;return Fy("string"===r||"object"===r),Object.assign(e,{args:i},e.opts)}function Wy(e){for(const t in e)for(const s in e[t])return s||"untitled";return"empty"}var zy,Ky,Yy,Xy,Zy,qy,Jy,$y,eg;let tg;Km(Vy,"VERSION",by),new Vy({id:"loaders.gl"}),(eg=zy||(zy={}))[eg.NONE=0]="NONE",eg[eg.BASISLZ=1]="BASISLZ",eg[eg.ZSTD=2]="ZSTD",eg[eg.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(Ky||(Ky={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(Yy||(Yy={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Xy||(Xy={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Zy||(Zy={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(qy||(qy={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(Jy||(Jy={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}($y||($y={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(tg||(tg={}));const sg={DEFAULT:{}};function ig(e,t,s={}){const i="lightgrey",r=s.hoverColor||"rgba(0,0,0,0.4)",o=500,n=o+o/3,a=n/24,l=[{boundary:[6,6,6,6],color:s.frontColor||s.color||"#55FF55"},{boundary:[18,6,6,6],color:s.backColor||s.color||"#55FF55"},{boundary:[12,6,6,6],color:s.leftColor||s.color||"#FF5555"},{boundary:[0,6,6,6],color:s.rightColor||s.color||"#FF5555"},{boundary:[6,0,6,6],color:s.topColor||s.color||"#7777FF"},{boundary:[6,12,6,6],color:s.bottomColor||s.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];s.frontColor||s.color,s.backColor||s.color,s.leftColor||s.color,s.rightColor||s.color,s.topColor||s.color,s.bottomColor||s.color;const c=[{yUp:"",label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}];for(let e=0,t=h.length;e=r[0]*a&&t<=(r[0]+r[2])*a&&s>=r[1]*a&&s<=(r[1]+r[3])*a)return i}}return-1},this.setAreaHighlighted=function(e,t){var s=A[e];if(!s)throw"Area not found: "+e;s.highlighted=!!t,f()},this.getAreaDir=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=A[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null)}}const rg=p.vec3(),og=p.vec3();p.mat4();class ng extends a{constructor(e,t={}){super("NavCube",e,t),e.navCube=this;try{this._navCubeScene=new zt(e,{canvasId:t.canvasId,canvasElement:t.canvasElement,transparent:!0}),this._navCubeCanvas=this._navCubeScene.canvas.canvas,this._navCubeScene.input.keyboardEnabled=!1}catch(e){return void this.error(e)}const s=this._navCubeScene;s.clearLights(),new qe(s,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new qe(s,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new qe(s,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._navCubeCamera=s.camera,this._navCubeCamera.ortho.scale=7,this._navCubeCamera.ortho.near=.1,this._navCubeCamera.ortho.far=2e3,s.edgeMaterial.edgeColor=[.2,.2,.2],s.edgeMaterial.edgeAlpha=.6,this._zUp=Boolean(e.camera.zUp);var i=this;this.setIsProjectNorth(t.isProjectNorth),this.setProjectNorthOffsetAngle(t.projectNorthOffsetAngle);const r=function(){const e=p.mat4();return function(t,s,r){return p.identityMat4(e),p.rotationMat4v(t*i._projectNorthOffsetAngle*p.DEGTORAD,[0,1,0],e),p.transformVec3(e,s,r)}}();this._synchCamera=function(){var t=p.rotationMat4c(-90*p.DEGTORAD,1,0,0),s=p.vec3(),o=p.vec3(),n=p.vec3();return function(){var a=e.camera.eye,l=e.camera.look,h=e.camera.up;s=p.mulVec3Scalar(p.normalizeVec3(p.subVec3(a,l,s)),5),i._isProjectNorth&&i._projectNorthOffsetAngle&&(s=r(-1,s,rg),h=r(-1,h,og)),i._zUp?(p.transformVec3(t,s,o),p.transformVec3(t,h,n),i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=p.transformVec3(t,s,o),i._navCubeCamera.up=p.transformPoint3(t,h,n)):(i._navCubeCamera.look=[0,0,0],i._navCubeCamera.eye=s,i._navCubeCamera.up=h)}}(),this._cubeTextureCanvas=new ig(e,s,t),this._cubeSampler=new Oi(s,{image:this._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Yt,wrapT:Yt}),this._cubeMesh=new ni(s,{geometry:new ct(s,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new ft(s,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:this._cubeSampler,emissiveMap:this._cubeSampler}),visible:!0,edges:!0}),this._shadow=!1===t.shadowVisible?null:new ni(s,{geometry:new ct(s,li({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new ft(s,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),this._onCameraMatrix=e.camera.on("matrix",this._synchCamera),this._onCameraWorldAxis=e.camera.on("worldAxis",(()=>{e.camera.zUp?(this._zUp=!0,this._cubeTextureCanvas.setZUp(),this._repaint(),this._synchCamera()):e.camera.yUp&&(this._zUp=!1,this._cubeTextureCanvas.setYUp(),this._repaint(),this._synchCamera())})),this._onCameraFOV=e.camera.perspective.on("fov",(e=>{this._synchProjection&&(this._navCubeCamera.perspective.fov=e)})),this._onCameraProjection=e.camera.on("projection",(e=>{this._synchProjection&&(this._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var o=-1;function n(e){var t=[0,0];if(e){for(var s=e.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-i,t[1]=e.pageY-r}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var a,l,h=null,c=null,A=!1,u=!1,d=.5;i._navCubeCanvas.addEventListener("mouseenter",i._onMouseEnter=function(e){u=!0}),i._navCubeCanvas.addEventListener("mouseleave",i._onMouseLeave=function(e){u=!1}),i._navCubeCanvas.addEventListener("mousedown",i._onMouseDown=function(e){if(1===e.which){h=e.x,c=e.y,a=e.clientX,l=e.clientY;var t=n(e),i=s.pick({canvasPos:t});A=!!i}}),document.addEventListener("mouseup",i._onMouseUp=function(e){if(1===e.which&&(A=!1,null!==h)){var t=n(e),a=s.pick({canvasPos:t,pickSurface:!0});if(a&&a.uv){var l=i._cubeTextureCanvas.getArea(a.uv);if(l>=0&&(document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0)){if(i._cubeTextureCanvas.setAreaHighlighted(l,!0),o=l,i._repaint(),e.xh+3||e.yc+3)return;var u=i._cubeTextureCanvas.getAreaDir(l);if(u){var p=i._cubeTextureCanvas.getAreaUp(l);i._isProjectNorth&&i._projectNorthOffsetAngle&&(u=r(1,u,rg),p=r(1,p,og)),f(u,p,(function(){o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),document.body.style.cursor="pointer",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),l>=0&&(i._cubeTextureCanvas.setAreaHighlighted(l,!1),o=-1,i._repaint())}))}}}}}),document.addEventListener("mousemove",i._onMouseMove=function(t){if(o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1),1!==t.buttons||A){if(A){var r=t.clientX,h=t.clientY;return document.body.style.cursor="move",void function(t,s){var i=(t-a)*-d,r=(s-l)*-d;e.camera.orbitYaw(i),e.camera.orbitPitch(-r),a=t,l=s}(r,h)}if(u){var c=n(t),p=s.pick({canvasPos:c,pickSurface:!0});if(p){if(p.uv){document.body.style.cursor="pointer";var f=i._cubeTextureCanvas.getArea(p.uv);if(f===o)return;o>=0&&i._cubeTextureCanvas.setAreaHighlighted(o,!1),f>=0&&(i._cubeTextureCanvas.setAreaHighlighted(f,!0),i._repaint(),o=f)}}else document.body.style.cursor="default",o>=0&&(i._cubeTextureCanvas.setAreaHighlighted(o,!1),i._repaint(),o=-1)}}});var f=function(){var t=p.vec3();return function(s,r,o){var n=i._fitVisible?e.scene.getAABB(e.scene.visibleObjectIds):e.scene.aabb,a=p.getAABB3Diag(n);p.getAABB3Center(n,t);var l=Math.abs(a/Math.tan(i._cameraFitFOV*p.DEGTORAD));e.cameraControl.pivotPos=t,i._cameraFly?e.cameraFlight.flyTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV,duration:i._cameraFlyDuration},o):e.cameraFlight.jumpTo({look:t,eye:[t[0]-l*s[0],t[1]-l*s[1],t[2]-l*s[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:i._cameraFitFOV},o)}}();this._onUpdated=e.localeService.on("updated",(()=>{this._cubeTextureCanvas.clear(),this._repaint()})),this.setVisible(t.visible),this.setCameraFitFOV(t.cameraFitFOV),this.setCameraFly(t.cameraFly),this.setCameraFlyDuration(t.cameraFlyDuration),this.setFitVisible(t.fitVisible),this.setSynchProjection(t.synchProjection)}send(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}_repaint(){const e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}setVisible(e=!0){this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}getVisible(){return!!this._navCubeCanvas&&this._cubeMesh.visible}setFitVisible(e=!1){this._fitVisible=e}getFitVisible(){return this._fitVisible}setCameraFly(e=!0){this._cameraFly=e}getCameraFly(){return this._cameraFly}setCameraFitFOV(e=45){this._cameraFitFOV=e}getCameraFitFOV(){return this._cameraFitFOV}setCameraFlyDuration(e=.5){this._cameraFlyDuration=e}getCameraFlyDuration(){return this._cameraFlyDuration}setSynchProjection(e=!1){this._synchProjection=e}getSynchProjection(){return this._synchProjection}setIsProjectNorth(e=!1){this._isProjectNorth=e}getIsProjectNorth(){return this._isProjectNorth}setProjectNorthOffsetAngle(e){this._projectNorthOffsetAngle=e}getProjectNorthOffsetAngle(){return this._projectNorthOffsetAngle}destroy(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,super.destroy()}}p.vec3();const ag=new Float64Array([0,0,1]),lg=new Float64Array(4);class hg{constructor(e){this.id=null,this._viewer=e.viewer,this._visible=!1,this._pos=p.vec3(),this._origin=p.vec3(),this._rtcPos=p.vec3(),this._baseDir=p.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}_setSectionPlane(e){this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(()=>{this._setPos(this._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(()=>{this._ignoreNextSectionPlaneDirUpdate?this._ignoreNextSectionPlaneDirUpdate=!1:this._setDir(this._sectionPlane.dir)})))}get sectionPlane(){return this._sectionPlane}_setPos(e){this._pos.set(e),w(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}_setDir(e){this._baseDir.set(e),this._rootNode.quaternion=p.vec3PairToQuaternion(ag,e,lg)}_setSectionPlaneDir(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}setVisible(e=!0){if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}getVisible(){return this._visible}setCulled(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}_createNodes(){const e=!1,t=this._viewer.scene,s=.01;this._rootNode=new Ii(t,{position:[0,0,0],scale:[5,5,5]});const i=this._rootNode,r={arrowHead:new ct(i,li({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new ct(i,li({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new ct(i,li({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new ct(i,Fi({radius:.8,tube:s,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new ct(i,Fi({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new ct(i,Fi({radius:.8,tube:s,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new ct(i,li({radiusTop:s,radiusBottom:s,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new ct(i,li({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},o={pickable:new ft(i,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new ft(i,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new mt(i,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new ft(i,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new mt(i,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new ft(i,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new mt(i,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new ft(i,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new mt(i,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new mt(i,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:i.addChild(new ni(i,{geometry:new ct(i,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new ft(i,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new mt(i,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!0,clippable:!1,visible:!1,scale:[2.4,2.4,1]}),e),planeFrame:i.addChild(new ni(i,{geometry:new ct(i,Fi({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new ft(i,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new mt(i,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45]}),e),xCurve:i.addChild(new ni(i,{geometry:r.curve,material:o.red,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveHandle:i.addChild(new ni(i,{geometry:r.curveHandle,material:o.pickable,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xCurveArrow1:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,-.07,-.8,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(0*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xCurveArrow2:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,-.8,-.07,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurve:i.addChild(new ni(i,{geometry:r.curve,material:o.green,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveHandle:i.addChild(new ni(i,{geometry:r.curveHandle,material:o.pickable,rotation:[-90,0,0],pickable:!0,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),yCurveArrow1:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(.07,0,-.8,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yCurveArrow2:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(.8,0,-.07,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurve:i.addChild(new ni(i,{geometry:r.curve,material:o.blue,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zCurveHandle:i.addChild(new ni(i,{geometry:r.curveHandle,material:o.pickable,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveCurveArrow1:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(.8,-.07,0,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4());return p.mulMat4(e,t,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zCurveArrow2:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(.05,-.8,0,p.identityMat4()),t=p.scaleMat4v([.6,.6,.6],p.identityMat4()),s=p.rotationMat4v(90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(p.mulMat4(e,t,p.identityMat4()),s,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),center:i.addChild(new ni(i,{geometry:new ct(i,hi({radius:.05})),material:o.center,pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.red,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisArrowHandle:i.addChild(new ni(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),xAxis:i.addChild(new ni(i,{geometry:r.axis,material:o.red,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),xAxisHandle:i.addChild(new ni(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.green,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrowHandle:i.addChild(new ni(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1,opacity:.2}),e),yShaft:i.addChild(new ni(i,{geometry:r.axis,material:o.green,position:[0,-.5,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yShaftHandle:i.addChild(new ni(i,{geometry:r.axisHandle,material:o.pickable,position:[0,-.5,0],pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHead,material:o.blue,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrowHandle:i.addChild(new ni(i,{geometry:r.arrowHeadHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!0,collidable:!0,clippable:!1,visible:!1}),e),zShaft:i.addChild(new ni(i,{geometry:r.axis,material:o.blue,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),clippable:!1,pickable:!1,collidable:!0,visible:!1}),e),zAxisHandle:i.addChild(new ni(i,{geometry:r.axisHandle,material:o.pickable,matrix:function(){const e=p.translateMat4c(0,.5,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),clippable:!1,pickable:!0,collidable:!0,visible:!1}),e)},this._affordanceMeshes={planeFrame:i.addChild(new ni(i,{geometry:new ct(i,Fi({center:[0,0,0],radius:2,tube:s,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new ft(i,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new mt(i,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45]}),e),xHoop:i.addChild(new ni(i,{geometry:r.hoop,material:o.red,highlighted:!0,highlightMaterial:o.highlightRed,matrix:function(){const e=p.rotationMat4v(90*p.DEGTORAD,[0,1,0],p.identityMat4()),t=p.rotationMat4v(270*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yHoop:i.addChild(new ni(i,{geometry:r.hoop,material:o.green,highlighted:!0,highlightMaterial:o.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zHoop:i.addChild(new ni(i,{geometry:r.hoop,material:o.blue,highlighted:!0,highlightMaterial:o.highlightBlue,matrix:p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4()),pickable:!1,collidable:!0,clippable:!1,backfaces:!0,visible:!1}),e),xAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHeadBig,material:o.red,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[0,0,1],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),yAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHeadBig,material:o.green,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(180*p.DEGTORAD,[1,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e),zAxisArrow:i.addChild(new ni(i,{geometry:r.arrowHeadBig,material:o.blue,matrix:function(){const e=p.translateMat4c(0,1.1,0,p.identityMat4()),t=p.rotationMat4v(-90*p.DEGTORAD,[.8,0,0],p.identityMat4());return p.mulMat4(t,e,p.identityMat4())}(),pickable:!1,collidable:!0,clippable:!1,visible:!1}),e)}}_bindEvents(){const e=this;var t=!1;const s=-1,i=0,r=1,o=2,n=3,a=4,l=5,h=this._rootNode;var c=null,A=null;const u=p.vec2(),d=p.vec3([1,0,0]),f=p.vec3([0,1,0]),E=p.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,y=this._viewer.camera,g=this._viewer.scene;{const e=p.vec3([0,0,0]);let t=-1;this._onCameraViewMatrix=g.camera.on("viewMatrix",(()=>{})),this._onCameraProjMatrix=g.camera.on("projMatrix",(()=>{})),this._onSceneTick=g.on("tick",(()=>{const s=Math.abs(p.lenVec3(p.subVec3(g.camera.eye,this._pos,e)));if(s!==t&&"perspective"===y.projection){const e=.07*(Math.tan(y.perspective.fov*p.DEGTORAD)*s);h.scale=[e,e,e],t=s}if("ortho"===y.projection){const e=y.ortho.scale/10;h.scale=[e,e,e],t=s}}))}const I=function(){const e=new Float64Array(2);return function(t){if(t){for(var s=t.target,i=0,r=0;s.offsetParent;)i+=s.offsetLeft,r+=s.offsetTop,s=s.offsetParent;e[0]=t.pageX-i,e[1]=t.pageY-r}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),v=function(){const t=p.mat4();return function(s,i){return p.quaternionToMat4(e._rootNode.quaternion,t),p.transformVec3(t,s,i),p.normalizeVec3(i),i}}();var T=function(){const e=p.vec3();return function(t){const s=Math.abs(t[0]);return s>Math.abs(t[1])&&s>Math.abs(t[2])?p.cross3Vec3(t,[0,1,0],e):p.cross3Vec3(t,[1,0,0],e),p.cross3Vec3(e,t,e),p.normalizeVec3(e),e}}();const _=function(){const t=p.vec3(),s=p.vec3(),i=p.vec4();return function(r,o,n){v(r,i);const a=T(i,o,n);P(o,a,t),P(n,a,s),p.subVec3(s,t);const l=p.dotVec3(s,i);e._pos[0]+=i[0]*l,e._pos[1]+=i[1]*l,e._pos[2]+=i[2]*l,e._rootNode.position=e._pos,e._sectionPlane&&(e._sectionPlane.pos=e._pos)}}();var R=function(){const t=p.vec4(),s=p.vec4(),i=p.vec4(),r=p.vec4();return function(o,n,a){v(o,r);if(!(P(n,r,t)&&P(a,r,s))){const e=T(r,n,a);P(n,e,t,1),P(a,e,s,1);var l=p.dotVec3(t,r);t[0]-=l*r[0],t[1]-=l*r[1],t[2]-=l*r[2],l=p.dotVec3(s,r),s[0]-=l*r[0],s[1]-=l*r[1],s[2]-=l*r[2]}p.normalizeVec3(t),p.normalizeVec3(s),l=p.dotVec3(t,s),l=p.clamp(l,-1,1);var h=Math.acos(l)*p.RADTODEG;p.cross3Vec3(t,s,i),p.dotVec3(i,r)<0&&(h=-h),e._rootNode.rotate(o,h),D()}}(),P=function(){const t=p.vec4([0,0,0,1]),s=p.mat4();return function(i,r,o,n){n=n||0,t[0]=i[0]/m.width*2-1,t[1]=-(i[1]/m.height*2-1),t[2]=0,t[3]=1,p.mulMat4(y.projMatrix,y.viewMatrix,s),p.inverseMat4(s),p.transformVec4(s,t,t),p.mulVec4Scalar(t,1/t[3]);var a=y.eye;p.subVec4(t,a,t);const l=e._sectionPlane.pos;var h=-p.dotVec3(l,r)-n,c=p.dotVec3(r,t);if(Math.abs(c)>.005){var A=-(p.dotVec3(r,a)+h)/c;return p.mulVec3Scalar(t,A,o),p.addVec3(o,a),p.subVec3(o,l,o),!0}return!1}}();const D=function(){const t=p.vec3(),s=p.mat4();return function(){e.sectionPlane&&(p.quaternionToMat4(h.quaternion,s),p.transformVec3(s,[0,0,1],t),e._setSectionPlaneDir(t))}}();var N,C=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(e=>{if(!this._visible)return;if(C)return;var h;t=!1,N&&(N.visible=!1);switch(e.entity.id){case this._displayMeshes.xAxisArrowHandle.id:case this._displayMeshes.xAxisHandle.id:h=this._affordanceMeshes.xAxisArrow,c=i;break;case this._displayMeshes.yAxisArrowHandle.id:case this._displayMeshes.yShaftHandle.id:h=this._affordanceMeshes.yAxisArrow,c=r;break;case this._displayMeshes.zAxisArrowHandle.id:case this._displayMeshes.zAxisHandle.id:h=this._affordanceMeshes.zAxisArrow,c=o;break;case this._displayMeshes.xCurveHandle.id:h=this._affordanceMeshes.xHoop,c=n;break;case this._displayMeshes.yCurveHandle.id:h=this._affordanceMeshes.yHoop,c=a;break;case this._displayMeshes.zCurveHandle.id:h=this._affordanceMeshes.zHoop,c=l;break;default:return void(c=s)}h&&(h.visible=!0),N=h,t=!0})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOutEntity",(e=>{this._visible&&(N&&(N.visible=!1),N=null,c=s)})),m.addEventListener("mousedown",this._canvasMouseDownListener=e=>{if(e.preventDefault(),this._visible&&t&&(this._viewer.cameraControl.pointerEnabled=!1,1===e.which)){C=!0;var s=I(e);A=c,u[0]=s[0],u[1]=s[1]}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=e=>{if(!this._visible)return;if(!C)return;var t=I(e);const s=t[0],h=t[1];switch(A){case i:_(d,u,t);break;case r:_(f,u,t);break;case o:_(E,u,t);break;case n:R(d,u,t);break;case a:R(f,u,t);break;case l:R(E,u,t)}u[0]=s,u[1]=h}),m.addEventListener("mouseup",this._canvasMouseUpListener=e=>{this._visible&&(this._viewer.cameraControl.pointerEnabled=!0,C&&(e.which,C=!1,t=!1))}),m.addEventListener("wheel",this._canvasWheelListener=e=>{if(this._visible)Math.max(-1,Math.min(1,40*-e.deltaY))})}_destroy(){this._unbindEvents(),this._destroyNodes()}_unbindEvents(){const e=this._viewer,t=e.scene,s=t.canvas.canvas,i=e.camera,r=e.cameraControl;t.off(this._onSceneTick),s.removeEventListener("mousedown",this._canvasMouseDownListener),s.removeEventListener("mousemove",this._canvasMouseMoveListener),s.removeEventListener("mouseup",this._canvasMouseUpListener),s.removeEventListener("wheel",this._canvasWheelListener),i.off(this._onCameraViewMatrix),i.off(this._onCameraProjMatrix),r.off(this._onCameraControlHover),r.off(this._onCameraControlHoverLeave)}_destroyNodes(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}class cg{constructor(e,t,s){this.id=s.id,this._sectionPlane=s,this._mesh=new ni(t,{id:s.id,geometry:new ct(t,At({xSize:.5,ySize:.5,zSize:.001})),material:new ft(t,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new gt(t,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new mt(t,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new mt(t,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});{const e=p.vec3([0,0,0]),t=p.vec3(),s=p.vec3([0,0,1]),i=p.vec4(4),r=p.vec3(),o=()=>{const o=this._sectionPlane.scene.center,n=[-this._sectionPlane.dir[0],-this._sectionPlane.dir[1],-this._sectionPlane.dir[2]];p.subVec3(o,this._sectionPlane.pos,e);const a=-p.dotVec3(n,e);p.normalizeVec3(n),p.mulVec3Scalar(n,a,t);const l=p.vec3PairToQuaternion(s,this._sectionPlane.dir,i);r[0]=.1*t[0],r[1]=.1*t[1],r[2]=.1*t[2],this._mesh.quaternion=l,this._mesh.position=r};this._onSectionPlanePos=this._sectionPlane.on("pos",o),this._onSectionPlaneDir=this._sectionPlane.on("dir",o)}this._highlighted=!1,this._selected=!1}setHighlighted(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}getHighlighted(){return this._highlighted}setSelected(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}getSelected(){return this._selected}destroy(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}class Ag{constructor(e,t){if(!(t.onHoverEnterPlane&&t.onHoverLeavePlane&&t.onClickedNothing&&t.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=e,this._viewer=e.viewer,this._onHoverEnterPlane=t.onHoverEnterPlane,this._onHoverLeavePlane=t.onHoverLeavePlane,this._onClickedNothing=t.onClickedNothing,this._onClickedPlane=t.onClickedPlane,this._visible=!0,this._planes={},this._canvas=t.overviewCanvas,this._scene=new zt(this._viewer,{canvasId:this._canvas.id,transparent:!0}),this._scene.clearLights(),new qe(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new qe(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new qe(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;{const e=this._scene.camera,t=p.rotationMat4c(-90*p.DEGTORAD,1,0,0),s=p.vec3(),i=p.vec3(),r=p.vec3();this._synchCamera=()=>{const o=this._viewer.camera.eye,n=this._viewer.camera.look,a=this._viewer.camera.up;p.mulVec3Scalar(p.normalizeVec3(p.subVec3(o,n,s)),7),this._zUp?(p.transformVec3(t,s,i),p.transformVec3(t,a,r),e.look=[0,0,0],e.eye=p.transformVec3(t,s,i),e.up=p.transformPoint3(t,a,r)):(e.look=[0,0,0],e.eye=s,e.up=a)}}this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(e=>{this._scene.camera.perspective.fov=e}));var s=null;this._onInputMouseMove=this._scene.input.on("mousemove",(e=>{const t=this._scene.pick({canvasPos:e});if(t){if(!s||t.entity.id!==s.id){if(s){this._planes[s.id]&&this._onHoverLeavePlane(s.id)}s=t.entity;this._planes[s.id]&&this._onHoverEnterPlane(s.id)}}else s&&(this._onHoverLeavePlane(s.id),s=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=()=>{if(s){this._planes[s.id]&&this._onClickedPlane(s.id)}else this._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=()=>{s&&(this._onHoverLeavePlane(s.id),s=null)}),this.setVisible(t.overviewVisible)}addSectionPlane(e){this._planes[e.id]=new cg(this,this._scene,e)}setPlaneHighlighted(e,t){const s=this._planes[e];s&&s.setHighlighted(t)}setPlaneSelected(e,t){const s=this._planes[e];s&&s.setSelected(t)}removeSectionPlane(e){const t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}setVisible(e=!0){this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}getVisible(){return this._visible}destroy(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}const ug=p.AABB3(),pg=p.vec3();class dg extends a{constructor(e,t={}){if(super("SectionPlanes",e),this._freeControls=[],this._sectionPlanes=e.scene.sectionPlanes,this._controls={},this._shownControlId=null,null!==t.overviewCanvasId&&void 0!==t.overviewCanvasId){const e=document.getElementById(t.overviewCanvasId);e?this._overview=new Ag(this,{overviewCanvas:e,visible:t.overviewVisible,onHoverEnterPlane:e=>{this._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:e=>{this._overview.setPlaneHighlighted(e,!1)},onClickedPlane:e=>{if(this.getShownControl()===e)return void this.hideControl();this.showControl(e);const t=this.sectionPlanes[e].pos;ug.set(this.viewer.scene.aabb),p.getAABB3Center(ug,pg),ug[0]+=t[0]-pg[0],ug[1]+=t[1]-pg[1],ug[2]+=t[2]-pg[2],ug[3]+=t[0]-pg[0],ug[4]+=t[1]-pg[1],ug[5]+=t[2]-pg[2],this.viewer.cameraFlight.flyTo({aabb:ug,fitFOV:65})},onClickedNothing:()=>{this.hideControl()}}):this.warn("Can't find overview canvas: '"+t.overviewCanvasId+"' - will create plugin without overview")}this._onSceneSectionPlaneCreated=e.scene.on("sectionPlaneCreated",(e=>{this._sectionPlaneCreated(e)}))}setOverviewVisible(e){this._overview&&this._overview.setVisible(e)}getOverviewVisible(){if(this._overview)return this._overview.getVisible()}get sectionPlanes(){return this._sectionPlanes}createSectionPlane(e={}){void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id);return new ci(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}_sectionPlaneCreated(e){const t=this._freeControls.length>0?this._freeControls.pop():new hg(this);t._setSectionPlane(e),t.setVisible(!1),this._controls[e.id]=t,this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(()=>{this._sectionPlaneDestroyed(e)}))}flipSectionPlanes(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].flipDir()}}showControl(e){const t=this._controls[e];t?(this.hideControl(),t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e):this.error("Control not found: "+e)}getShownControl(){return this._shownControlId}hideControl(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null}destroySectionPlane(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null)):this.error("SectionPlane not found: "+e)}_sectionPlaneDestroyed(e){this._overview&&this._overview.removeSectionPlane(e);const t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}clear(){const e=Object.keys(this._sectionPlanes);for(var t=0,s=e.length;t{e.preventDefault()},this._onObjectVisibility=this._viewer.scene.on("objectVisibility",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;const i=e.visible;if(!(i!==s.checked))return;this._muteTreeEvents=!0,s.checked=i,i?s.numVisibleEntities++:s.numVisibleEntities--;const r=document.getElementById(`checkbox-${s.nodeId}`);r&&(r.checked=i);let o=s.parent;for(;o;){o.checked=i,i?o.numVisibleEntities++:o.numVisibleEntities--;const e=document.getElementById(`checkbox-${o.nodeId}`);if(e){const t=o.numVisibleEntities>0;t!==e.checked&&(e.checked=t)}o=o.parent}this._muteTreeEvents=!1})),this._onObjectXrayed=this._viewer.scene.on("objectXRayed",(e=>{if(this._muteSceneEvents)return;const t=e.id,s=this._objectNodes[t];if(!s)return;this._muteTreeEvents=!0;const i=e.xrayed;if(!(i!==s.xrayed))return;s.xrayed=i;const r=s.nodeId,o=document.getElementById(r);null!==o&&(i?o.classList.add("xrayed-node"):o.classList.remove("xrayed-node")),this._muteTreeEvents=!1})),this._switchExpandHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._expandSwitchElement(t)},this._switchCollapseHandler=e=>{e.preventDefault(),e.stopPropagation();const t=e.target;this._collapseSwitchElement(t)},this._checkboxChangeHandler=e=>{if(this._muteTreeEvents)return;this._muteSceneEvents=!0;const t=e.target,s=t.checked,i=t.id.replace("checkbox-",""),r=this._nodeNodes[i],o=this._viewer.scene.objects;let n=0;this._withNodeTree(r,(e=>{const t=e.objectId,i=`checkbox-${e.nodeId}`,r=o[t],a=0===e.children.length;e.numVisibleEntities=s?e.numEntities:0,a&&s!==e.checked&&n++,e.checked=s;const l=document.getElementById(i);l&&(l.checked=s),r&&(r.visible=s)}));let a=r.parent;for(;a;){a.checked=s;const e=document.getElementById(`checkbox-${a.nodeId}`);s?a.numVisibleEntities+=n:a.numVisibleEntities-=n;const t=a.numVisibleEntities>0;t!==e.checked&&(e.checked=t),a=a.parent}this._muteSceneEvents=!1},this._hierarchy=t.hierarchy||"containment",this._autoExpandDepth=t.autoExpandDepth||0,this._autoAddModels){const e=Object.keys(this.viewer.metaScene.metaModels);for(let t=0,s=e.length;t{this.viewer.metaScene.metaModels[e]&&this.addModel(e)}))}this.hierarchy=t.hierarchy}else this.error("Config expected: containerElement")}set hierarchy(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}get hierarchy(){return this._hierarchy}addModel(e,t={}){if(!this._containerElement)return;const s=this.viewer.scene.models[e];if(!s)throw"Model not found: "+e;const i=this.viewer.metaScene.metaModels[e];i?this._metaModels[e]?this.warn("Model already added: "+e):(this._metaModels[e]=i,s.on("destroyed",(()=>{this.removeModel(s.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}removeModel(e){if(!this._containerElement)return;this._metaModels[e]&&(delete this._metaModels[e],this._createNodes())}showNode(e){this._showListItemElementId&&this.unShowNode();const t=this._objectNodes[e];if(!t)return;const s=t.nodeId,i="switch-"+s,r=document.getElementById(i);if(r)return this._expandSwitchElement(r),void r.scrollIntoView();const o=[];o.unshift(t);let n=t.parent;for(;n;)o.unshift(n),n=n.parent;for(let e=0,t=o.length;e{if(i===e)return;const r="switch-"+s.nodeId,o=document.getElementById(r);if(o){this._expandSwitchElement(o);const e=s.children;for(var n=0,a=e.length;n0;return this.valid}_validateMetaModelForStoreysHierarchy(e=0,t,s){return!0}_createEnabledNodes(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this._createTrees(),this.expandToDepth(this._autoExpandDepth)}_createDisabledNodes(){const e=document.createElement("ul");this._rootElement=e,this._containerElement.appendChild(e);const t=this._viewer.metaScene.rootMetaObjects;for(let s in t){const i=t[s],r=i.type,o=i.name,n=o&&""!==o&&"Undefined"!==o&&"Default"!==o?o:r,a=document.createElement("li");e.appendChild(a);const l=document.createElement("a");l.href="#",l.textContent="!",l.classList.add("warn"),l.classList.add("warning"),a.appendChild(l);const h=document.createElement("span");h.textContent=n,a.appendChild(h)}}_findEmptyNodes(){const e=this._viewer.metaScene.rootMetaObjects;for(let t in e)this._findEmptyNodes2(e[t])}_findEmptyNodes2(e,t=0){const s=this.viewer.scene,i=e.children,r=e.id,o=s.objects[r];if(e._countEntities=0,o&&e._countEntities++,i)for(let t=0,s=i.length;t{e.aabb&&r.aabb||(e.aabb||(e.aabb=t.getAABB(i.getObjectIDsInSubtree(e.objectId))),r.aabb||(r.aabb=t.getAABB(i.getObjectIDsInSubtree(r.objectId))));let o=0;return o=s.xUp?0:s.yUp?1:2,e.aabb[o]>r.aabb[o]?-1:e.aabb[o]i?1:0}_synchNodesToEntities(){const e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,s=this._viewer.scene.objects;for(let i=0,r=e.length;ithis._createNodeElement(e))),t=document.createElement("ul");e.forEach((e=>{t.appendChild(e)})),this._containerElement.appendChild(t),this._rootElement=t}_createNodeElement(e){const t=document.createElement("li"),s=e.nodeId;if(e.xrayed&&t.classList.add("xrayed-node"),t.id=s,e.children.length>0){const e="switch-"+s,i=document.createElement("a");i.href="#",i.id=e,i.textContent="+",i.classList.add("plus"),i.addEventListener("click",this._switchExpandHandler),t.appendChild(i)}const i=document.createElement("input");i.id=`checkbox-${s}`,i.type="checkbox",i.checked=e.checked,i.style["pointer-events"]="all",i.addEventListener("change",this._checkboxChangeHandler),t.appendChild(i);const r=document.createElement("span");return r.textContent=e.title,t.appendChild(r),r.oncontextmenu=t=>{this.fire("contextmenu",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},r.onclick=t=>{this.fire("nodeTitleClicked",{event:t,viewer:this._viewer,treeViewPlugin:this,treeViewNode:e}),t.preventDefault()},t}_expandSwitchElement(e){const t=e.parentElement;if(t.getElementsByTagName("li")[0])return;const s=t.id,i=this._nodeNodes[s].children.map((e=>this._createNodeElement(e))),r=document.createElement("ul");i.forEach((e=>{r.appendChild(e)})),t.appendChild(r),e.classList.remove("plus"),e.classList.add("minus"),e.textContent="-",e.removeEventListener("click",this._switchExpandHandler),e.addEventListener("click",this._switchCollapseHandler)}_collapseNode(e){const t="switch-"+e,s=document.getElementById(t);this._collapseSwitchElement(s)}_collapseSwitchElement(e){if(!e)return;const t=e.parentElement;if(!t)return;const s=t.querySelector("ul");s&&(t.removeChild(s),e.classList.remove("minus"),e.classList.add("plus"),e.textContent="+",e.removeEventListener("click",this._switchCollapseHandler),e.addEventListener("click",this._switchExpandHandler))}}class mg{constructor(){}getManifest(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getMetaModel(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getXKT(e,t,s){var i=()=>{};t=t||i,s=s||i;const r=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){const e=!!r[2];var o=r[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),s=new Uint8Array(e);for(var n=0;n=0;)e[t]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),o=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n=new Array(576);t(n);const a=new Array(60);t(a);const l=new Array(512);t(l);const h=new Array(256);t(h);const c=new Array(29);t(c);const A=new Array(30);function u(e,t,s,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}let p,d,f;function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(A);const m=e=>e<256?l[e]:l[256+(e>>>7)],y=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},g=(e,t,s)=>{e.bi_valid>16-s?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=s-16):(e.bi_buf|=t<{g(e,s[2*t],s[2*t+1])},v=(e,t)=>{let s=0;do{s|=1&e,e>>>=1,s<<=1}while(--t>0);return s>>>1},T=(e,t,s)=>{const i=new Array(16);let r,o,n=0;for(r=1;r<=15;r++)n=n+s[r-1]<<1,i[r]=n;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=v(i[t]++,t))}},_=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},R=e=>{e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},P=(e,t,s,i)=>{const r=2*t,o=2*s;return e[r]{const i=e.heap[s];let r=s<<1;for(;r<=e.heap_len&&(r{let o,n,a,l,u=0;if(0!==e.sym_next)do{o=255&e.pending_buf[e.sym_buf+u++],o+=(255&e.pending_buf[e.sym_buf+u++])<<8,n=e.pending_buf[e.sym_buf+u++],0===o?I(e,n,t):(a=h[n],I(e,a+256+1,t),l=s[a],0!==l&&(n-=c[a],g(e,n,l)),o--,a=m(o),I(e,a,r),l=i[a],0!==l&&(o-=A[a],g(e,o,l)))}while(u{const s=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems;let n,a,l,h=-1;for(e.heap_len=0,e.heap_max=573,n=0;n>1;n>=1;n--)D(e,s,n);l=o;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D(e,s,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,s[2*l]=s[2*n]+s[2*a],e.depth[l]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,s[2*n+1]=s[2*a+1]=l,e.heap[1]=l++,D(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const s=t.dyn_tree,i=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,n=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,l=t.stat_desc.max_length;let h,c,A,u,p,d,f=0;for(u=0;u<=15;u++)e.bl_count[u]=0;for(s[2*e.heap[e.heap_max]+1]=0,h=e.heap_max+1;h<573;h++)c=e.heap[h],u=s[2*s[2*c+1]+1]+1,u>l&&(u=l,f++),s[2*c+1]=u,c>i||(e.bl_count[u]++,p=0,c>=a&&(p=n[c-a]),d=s[2*c],e.opt_len+=d*(u+p),o&&(e.static_len+=d*(r[2*c+1]+p)));if(0!==f){do{for(u=l-1;0===e.bl_count[u];)u--;e.bl_count[u]--,e.bl_count[u+1]+=2,e.bl_count[l]--,f-=2}while(f>0);for(u=l;0!==u;u--)for(c=e.bl_count[u];0!==c;)A=e.heap[--h],A>i||(s[2*A+1]!==u&&(e.opt_len+=(u-s[2*A+1])*s[2*A],s[2*A+1]=u),c--)}})(e,t),T(s,h,e.bl_count)},O=(e,t,s)=>{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),t[2*(s+1)+1]=65535,i=0;i<=s;i++)r=n,n=t[2*(i+1)+1],++a{let i,r,o=-1,n=t[1],a=0,l=7,h=4;for(0===n&&(l=138,h=3),i=0;i<=s;i++)if(r=n,n=t[2*(i+1)+1],!(++a{g(e,0+(i?1:0),3),R(e),y(e,s),y(e,~s),s&&e.pending_buf.set(e.window.subarray(t,t+s),e.pending),e.pending+=s};var x={_tr_init:e=>{S||((()=>{let e,t,o,E,m;const y=new Array(16);for(o=0,E=0;E<28;E++)for(c[E]=o,e=0;e<1<>=7;E<30;E++)for(A[E]=m<<7,e=0;e<1<{let r,l,h=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,s=4093624447;for(t=0;t<=31;t++,s>>>=1)if(1&s&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),C(e,e.l_desc),C(e,e.d_desc),h=(e=>{let t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*o[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,l=e.static_len+3+7>>>3,l<=r&&(r=l)):r=l=s+5,s+4<=r&&-1!==t?w(e,t,s,i):4===e.strategy||l===r?(g(e,2+(i?1:0),3),N(e,n,a)):(g(e,4+(i?1:0),3),((e,t,s,i)=>{let r;for(g(e,t-257,5),g(e,s-1,5),g(e,i-4,4),r=0;r(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=s,0===t?e.dyn_ltree[2*s]++:(e.matches++,t--,e.dyn_ltree[2*(h[s]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{g(e,2,3),I(e,256,n),(e=>{16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},B=(e,t,s,i)=>{let r=65535&e|0,o=e>>>16&65535|0,n=0;for(;0!==s;){n=s>2e3?2e3:s,s-=n;do{r=r+t[i++]|0,o=o+r|0}while(--n);r%=65521,o%=65521}return r|o<<16|0};const F=new Uint32Array((()=>{let e,t=[];for(var s=0;s<256;s++){e=s;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[s]=e}return t})());var M=(e,t,s,i)=>{const r=F,o=i+s;e^=-1;for(let s=i;s>>8^r[255&(e^t[s])];return-1^e},L={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},U={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:G,_tr_flush_block:k,_tr_tally:V,_tr_align:j}=x,{Z_NO_FLUSH:Q,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:z,Z_FINISH:K,Z_BLOCK:Y,Z_OK:X,Z_STREAM_END:Z,Z_STREAM_ERROR:q,Z_DATA_ERROR:J,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:ee,Z_FILTERED:te,Z_HUFFMAN_ONLY:se,Z_RLE:ie,Z_FIXED:re,Z_DEFAULT_STRATEGY:oe,Z_UNKNOWN:ne,Z_DEFLATED:ae}=U,le=258,he=262,ce=42,Ae=113,ue=666,pe=(e,t)=>(e.msg=L[t],t),de=e=>2*e-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ee=e=>{let t,s,i,r=e.w_size;t=e.hash_size,i=t;do{s=e.head[--i],e.head[i]=s>=r?s-r:0}while(--t);t=r,i=t;do{s=e.prev[--i],e.prev[i]=s>=r?s-r:0}while(--t)};let me=(e,t,s)=>(t<{const t=e.state;let s=t.pending;s>e.avail_out&&(s=e.avail_out),0!==s&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+s),e.next_out),e.next_out+=s,t.pending_out+=s,e.total_out+=s,e.avail_out-=s,t.pending-=s,0===t.pending&&(t.pending_out=0))},ge=(e,t)=>{k(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ye(e.strm)},Ie=(e,t)=>{e.pending_buf[e.pending++]=t},ve=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Te=(e,t,s,i)=>{let r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),s),1===e.state.wrap?e.adler=B(e.adler,t,r,s):2===e.state.wrap&&(e.adler=M(e.adler,t,r,s)),e.next_in+=r,e.total_in+=r,r)},_e=(e,t)=>{let s,i,r=e.max_chain_length,o=e.strstart,n=e.prev_length,a=e.nice_match;const l=e.strstart>e.w_size-he?e.strstart-(e.w_size-he):0,h=e.window,c=e.w_mask,A=e.prev,u=e.strstart+le;let p=h[o+n-1],d=h[o+n];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(s=t,h[s+n]===d&&h[s+n-1]===p&&h[s]===h[o]&&h[++s]===h[o+1]){o+=2,s++;do{}while(h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&h[++o]===h[++s]&&on){if(e.match_start=t,n=i,i>=a)break;p=h[o+n-1],d=h[o+n]}}}while((t=A[t&c])>l&&0!=--r);return n<=e.lookahead?n:e.lookahead},Re=e=>{const t=e.w_size;let s,i,r;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-he)&&(e.window.set(e.window.subarray(t,t+t-i),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ee(e),i+=t),0===e.strm.avail_in)break;if(s=Te(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=s,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=me(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=me(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let s,i,r,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n=0,a=e.strm.avail_in;do{if(s=65535,r=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(s=i+e.strm.avail_in),s>r&&(s=r),s>8,e.pending_buf[e.pending-2]=~s,e.pending_buf[e.pending-1]=~s>>8,ye(e.strm),i&&(i>s&&(i=s),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,s-=i),s&&(Te(e.strm,e.strm.output,e.strm.next_out,s),e.strm.next_out+=s,e.strm.avail_out-=s,e.strm.total_out+=s)}while(0===n);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_waterr&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(Te(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,o=r>e.w_size?e.w_size:r,i=e.strstart-e.block_start,(i>=o||(i||t===K)&&t!==Q&&0===e.strm.avail_in&&i<=r)&&(s=i>r?r:i,n=t===K&&0===e.strm.avail_in&&s===i?1:0,G(e,e.block_start,s,n),e.block_start+=s,ye(e.strm)),n?3:1)},De=(e,t)=>{let s,i;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==s&&e.strstart-s<=e.w_size-he&&(e.match_length=_e(e,s)),e.match_length>=3)if(i=V(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=me(e,e.ins_h,e.window[e.strstart+1]);else i=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2},Ne=(e,t)=>{let s,i,r;for(;;){if(e.lookahead=3&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==s&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,i=V(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=me(e,e.ins_h,e.window[e.strstart+3-1]),s=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(ge(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(i=V(e,0,e.window[e.strstart-1]),i&&ge(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=V(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2};function Ce(e,t,s,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=s,this.max_chain=i,this.func=r}const Oe=[new Ce(0,0,0,0,Pe),new Ce(4,4,8,4,De),new Ce(4,5,16,8,De),new Ce(4,6,32,32,De),new Ce(4,4,16,16,Ne),new Ce(8,16,32,32,Ne),new Ce(8,16,128,128,Ne),new Ce(8,32,128,256,Ne),new Ce(32,128,258,1024,Ne),new Ce(32,258,258,4096,Ne)];function be(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ae,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Se=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==ce&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ae&&t.status!==ue?1:0},we=e=>{if(Se(e))return pe(e,q);e.total_in=e.total_out=0,e.data_type=ne;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?ce:Ae,e.adler=2===t.wrap?0:1,t.last_flush=-2,H(t),X},xe=e=>{const t=we(e);var s;return t===X&&((s=e.state).window_size=2*s.w_size,fe(s.head),s.max_lazy_match=Oe[s.level].max_lazy,s.good_match=Oe[s.level].good_length,s.nice_match=Oe[s.level].nice_length,s.max_chain_length=Oe[s.level].max_chain,s.strstart=0,s.block_start=0,s.lookahead=0,s.insert=0,s.match_length=s.prev_length=2,s.match_available=0,s.ins_h=0),t},Be=(e,t,s,i,r,o)=>{if(!e)return q;let n=1;if(t===ee&&(t=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),r<1||r>9||s!==ae||i<8||i>15||t<0||t>9||o<0||o>re||8===i&&1!==n)return pe(e,q);8===i&&(i=9);const a=new be;return e.state=a,a.strm=e,a.status=ce,a.wrap=n,a.gzhead=null,a.w_bits=i,a.w_size=1<Se(e)||2!==e.state.wrap?q:(e.state.gzhead=t,X),Le=(e,t)=>{if(Se(e)||t>Y||t<0)return e?pe(e,q):q;const s=e.state;if(!e.output||0!==e.avail_in&&!e.input||s.status===ue&&t!==K)return pe(e,0===e.avail_out?$:q);const i=s.last_flush;if(s.last_flush=t,0!==s.pending){if(ye(e),0===e.avail_out)return s.last_flush=-1,X}else if(0===e.avail_in&&de(t)<=de(i)&&t!==K)return pe(e,$);if(s.status===ue&&0!==e.avail_in)return pe(e,$);if(s.status===ce&&0===s.wrap&&(s.status=Ae),s.status===ce){let t=ae+(s.w_bits-8<<4)<<8,i=-1;if(i=s.strategy>=se||s.level<2?0:s.level<6?1:6===s.level?2:3,t|=i<<6,0!==s.strstart&&(t|=32),t+=31-t%31,ve(s,t),0!==s.strstart&&(ve(s,e.adler>>>16),ve(s,65535&e.adler)),e.adler=1,s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(57===s.status)if(e.adler=0,Ie(s,31),Ie(s,139),Ie(s,8),s.gzhead)Ie(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),Ie(s,255&s.gzhead.time),Ie(s,s.gzhead.time>>8&255),Ie(s,s.gzhead.time>>16&255),Ie(s,s.gzhead.time>>24&255),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(Ie(s,255&s.gzhead.extra.length),Ie(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=M(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,0),Ie(s,9===s.level?2:s.strategy>=se||s.level<2?4:0),Ie(s,3),s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X;if(69===s.status){if(s.gzhead.extra){let t=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex+=r,ye(e),0!==s.pending)return s.last_flush=-1,X;t=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>t&&(e.adler=M(e.adler,s.pending_buf,s.pending-t,t)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let t,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i)),ye(e),0!==s.pending)return s.last_flush=-1,X;i=0}t=s.gzindexi&&(e.adler=M(e.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(ye(e),0!==s.pending))return s.last_flush=-1,X;Ie(s,255&e.adler),Ie(s,e.adler>>8&255),e.adler=0}if(s.status=Ae,ye(e),0!==s.pending)return s.last_flush=-1,X}if(0!==e.avail_in||0!==s.lookahead||t!==Q&&s.status!==ue){let i=0===s.level?Pe(s,t):s.strategy===se?((e,t)=>{let s;for(;;){if(0===e.lookahead&&(Re(e),0===e.lookahead)){if(t===Q)return 1;break}if(e.match_length=0,s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):s.strategy===ie?((e,t)=>{let s,i,r,o;const n=e.window;for(;;){if(e.lookahead<=le){if(Re(e),e.lookahead<=le&&t===Q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,i=n[r],i===n[++r]&&i===n[++r]&&i===n[++r])){o=e.strstart+le;do{}while(i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&i===n[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(s=V(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(s=V(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),s&&(ge(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===K?(ge(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(ge(e,!1),0===e.strm.avail_out)?1:2})(s,t):Oe[s.level].func(s,t);if(3!==i&&4!==i||(s.status=ue),1===i||3===i)return 0===e.avail_out&&(s.last_flush=-1),X;if(2===i&&(t===W?j(s):t!==Y&&(G(s,0,0,!1),t===z&&(fe(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),ye(e),0===e.avail_out))return s.last_flush=-1,X}return t!==K?X:s.wrap<=0?Z:(2===s.wrap?(Ie(s,255&e.adler),Ie(s,e.adler>>8&255),Ie(s,e.adler>>16&255),Ie(s,e.adler>>24&255),Ie(s,255&e.total_in),Ie(s,e.total_in>>8&255),Ie(s,e.total_in>>16&255),Ie(s,e.total_in>>24&255)):(ve(s,e.adler>>>16),ve(s,65535&e.adler)),ye(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?X:Z)},Ue=e=>{if(Se(e))return q;const t=e.state.status;return e.state=null,t===Ae?pe(e,J):X},He=(e,t)=>{let s=t.length;if(Se(e))return q;const i=e.state,r=i.wrap;if(2===r||1===r&&i.status!==ce||i.lookahead)return q;if(1===r&&(e.adler=B(e.adler,t,s,0)),i.wrap=0,s>=i.w_size){0===r&&(fe(i.head),i.strstart=0,i.block_start=0,i.insert=0);let e=new Uint8Array(i.w_size);e.set(t.subarray(s-i.w_size,s),0),t=e,s=i.w_size}const o=e.avail_in,n=e.next_in,a=e.input;for(e.avail_in=s,e.next_in=0,e.input=t,Re(i);i.lookahead>=3;){let e=i.strstart,t=i.lookahead-2;do{i.ins_h=me(i,i.ins_h,i.window[e+3-1]),i.prev[e&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=e,e++}while(--t);i.strstart=e,i.lookahead=2,Re(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=n,e.input=a,e.avail_in=o,i.wrap=r,X};const Ge=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ke=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const s=t.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(const t in s)Ge(s,t)&&(e[t]=s[t])}}return e},Ve=e=>{let t=0;for(let s=0,i=e.length;s=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qe[254]=Qe[254]=1;var We=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,s,i,r,o,n=e.length,a=0;for(r=0;r>>6,t[o++]=128|63&s):s<65536?(t[o++]=224|s>>>12,t[o++]=128|s>>>6&63,t[o++]=128|63&s):(t[o++]=240|s>>>18,t[o++]=128|s>>>12&63,t[o++]=128|s>>>6&63,t[o++]=128|63&s);return t},ze=(e,t)=>{const s=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let i,r;const o=new Array(2*s);for(r=0,i=0;i4)o[r++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&je)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let s="";for(let i=0;i{(t=t||e.length)>e.length&&(t=e.length);let s=t-1;for(;s>=0&&128==(192&e[s]);)s--;return s<0||0===s?t:s+Qe[e[s]]>t?s:t},Ye=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Xe=Object.prototype.toString,{Z_NO_FLUSH:Ze,Z_SYNC_FLUSH:qe,Z_FULL_FLUSH:Je,Z_FINISH:$e,Z_OK:et,Z_STREAM_END:tt,Z_DEFAULT_COMPRESSION:st,Z_DEFAULT_STRATEGY:it,Z_DEFLATED:rt}=U;function ot(e){this.options=ke({level:st,method:rt,chunkSize:16384,windowBits:15,memLevel:8,strategy:it},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Fe(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(s!==et)throw new Error(L[s]);if(t.header&&Me(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?We(t.dictionary):"[object ArrayBuffer]"===Xe.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,s=He(this.strm,e),s!==et)throw new Error(L[s]);this._dict_set=!0}}function nt(e,t){const s=new ot(t);if(s.push(e,!0),s.err)throw s.msg||L[s.err];return s.result}ot.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize;let r,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?$e:Ze,"string"==typeof e?s.input=We(e):"[object ArrayBuffer]"===Xe.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),(o===qe||o===Je)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(r=Le(s,o),r===tt)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),r=Ue(this.strm),this.onEnd(r),this.ended=!0,r===et;if(0!==s.avail_out){if(o>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},ot.prototype.onData=function(e){this.chunks.push(e)},ot.prototype.onEnd=function(e){e===et&&(this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var at={Deflate:ot,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:U};const lt=16209;var ht=function(e,t){let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P;const D=e.state;s=e.next_in,R=e.input,i=s+(e.avail_in-5),r=e.next_out,P=e.output,o=r-(t-e.avail_out),n=r+(e.avail_out-257),a=D.dmax,l=D.wsize,h=D.whave,c=D.wnext,A=D.window,u=D.hold,p=D.bits,d=D.lencode,f=D.distcode,E=(1<>>24,u>>>=g,p-=g,g=y>>>16&255,0===g)P[r++]=65535&y;else{if(!(16&g)){if(0==(64&g)){y=d[(65535&y)+(u&(1<>>=g,p-=g),p<15&&(u+=R[s++]<>>24,u>>>=g,p-=g,g=y>>>16&255,!(16&g)){if(0==(64&g)){y=f[(65535&y)+(u&(1<a){e.msg="invalid distance too far back",D.mode=lt;break e}if(u>>>=g,p-=g,g=r-o,v>g){if(g=v-g,g>h&&D.sane){e.msg="invalid distance too far back",D.mode=lt;break e}if(T=0,_=A,0===c){if(T+=l-g,g2;)P[r++]=_[T++],P[r++]=_[T++],P[r++]=_[T++],I-=3;I&&(P[r++]=_[T++],I>1&&(P[r++]=_[T++]))}else{T=r-v;do{P[r++]=P[T++],P[r++]=P[T++],P[r++]=P[T++],I-=3}while(I>2);I&&(P[r++]=P[T++],I>1&&(P[r++]=P[T++]))}break}}break}}while(s>3,s-=I,p-=I<<3,u&=(1<{const l=a.bits;let h,c,A,u,p,d,f=0,E=0,m=0,y=0,g=0,I=0,v=0,T=0,_=0,R=0,P=null;const D=new Uint16Array(16),N=new Uint16Array(16);let C,O,b,S=null;for(f=0;f<=15;f++)D[f]=0;for(E=0;E=1&&0===D[y];y--);if(g>y&&(g=y),0===y)return r[o++]=20971520,r[o++]=20971520,a.bits=1,0;for(m=1;m0&&(0===e||1!==y))return-1;for(N[1]=0,f=1;f<15;f++)N[f+1]=N[f]+D[f];for(E=0;E852||2===e&&_>592)return 1;for(;;){C=f-v,n[E]+1=d?(O=S[n[E]-d],b=P[n[E]-d]):(O=96,b=0),h=1<>v)+c]=C<<24|O<<16|b|0}while(0!==c);for(h=1<>=1;if(0!==h?(R&=h-1,R+=h):R=0,E++,0==--D[f]){if(f===y)break;f=t[s+n[E]]}if(f>g&&(R&u)!==A){for(0===v&&(v=g),p+=m,I=f-v,T=1<852||2===e&&_>592)return 1;A=R&u,r[A]=g<<24|I<<16|p-o|0}}return 0!==R&&(r[p+R]=f-v<<24|64<<16|0),a.bits=g,0};const{Z_FINISH:ft,Z_BLOCK:Et,Z_TREES:mt,Z_OK:yt,Z_STREAM_END:gt,Z_NEED_DICT:It,Z_STREAM_ERROR:vt,Z_DATA_ERROR:Tt,Z_MEM_ERROR:_t,Z_BUF_ERROR:Rt,Z_DEFLATED:Pt}=U,Dt=16180,Nt=16190,Ct=16191,Ot=16192,bt=16194,St=16199,wt=16200,xt=16206,Bt=16209,Ft=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Mt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Lt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Ut=e=>{if(Lt(e))return vt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,yt},Ht=e=>{if(Lt(e))return vt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Ut(e)},Gt=(e,t)=>{let s;if(Lt(e))return vt;const i=e.state;return t<0?(s=0,t=-t):(s=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?vt:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=s,i.wbits=t,Ht(e))},kt=(e,t)=>{if(!e)return vt;const s=new Mt;e.state=s,s.strm=e,s.window=null,s.mode=Dt;const i=Gt(e,t);return i!==yt&&(e.state=null),i};let Vt,jt,Qt=!0;const Wt=e=>{if(Qt){Vt=new Int32Array(512),jt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dt(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dt(2,e.lens,0,32,jt,0,e.work,{bits:5}),Qt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=jt,e.distbits=5},zt=(e,t,s,i)=>{let r;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(s-o.wsize,s),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),o.window.set(t.subarray(s-i,s-i+r),o.wnext),(i-=r)?(o.window.set(t.subarray(s-i,s),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave{let s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R=0;const P=new Uint8Array(4);let D,N;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Lt(e)||!e.output||!e.input&&0!==e.avail_in)return vt;s=e.state,s.mode===Ct&&(s.mode=Ot),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,A=a,u=l,_=yt;e:for(;;)switch(s.mode){case Dt:if(0===s.wrap){s.mode=Ot;break}for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0),h=0,c=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&h)<<8)+(h>>8))%31){e.msg="incorrect header check",s.mode=Bt;break}if((15&h)!==Pt){e.msg="unknown compression method",s.mode=Bt;break}if(h>>>=4,c-=4,T=8+(15&h),0===s.wbits&&(s.wbits=T),T>15||T>s.wbits){e.msg="invalid window size",s.mode=Bt;break}s.dmax=1<>8&1),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>8&255,P[2]=h>>>16&255,P[3]=h>>>24&255,s.check=M(s.check,P,4,0)),h=0,c=0,s.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>8),512&s.flags&&4&s.wrap&&(P[0]=255&h,P[1]=h>>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0,s.mode=16184;case 16184:if(1024&s.flags){for(;c<16;){if(0===a)break e;a--,h+=i[o++]<>>8&255,s.check=M(s.check,P,2,0)),h=0,c=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&(p=s.length,p>a&&(p=a),p&&(s.head&&(T=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(i.subarray(o,o+p),T)),512&s.flags&&4&s.wrap&&(s.check=M(s.check,i,p,o)),a-=p,o+=p,s.length-=p),s.length))break e;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===a)break e;p=0;do{T=i[o+p++],s.head&&T&&s.length<65536&&(s.head.name+=String.fromCharCode(T))}while(T&&p>9&1,s.head.done=!0),e.adler=s.check=0,s.mode=Ct;break;case 16189:for(;c<32;){if(0===a)break e;a--,h+=i[o++]<>>=7&c,c-=7&c,s.mode=xt;break}for(;c<3;){if(0===a)break e;a--,h+=i[o++]<>>=1,c-=1,3&h){case 0:s.mode=16193;break;case 1:if(Wt(s),s.mode=St,t===mt){h>>>=2,c-=2;break e}break;case 2:s.mode=16196;break;case 3:e.msg="invalid block type",s.mode=Bt}h>>>=2,c-=2;break;case 16193:for(h>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,h+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",s.mode=Bt;break}if(s.length=65535&h,h=0,c=0,s.mode=bt,t===mt)break e;case bt:s.mode=16195;case 16195:if(p=s.length,p){if(p>a&&(p=a),p>l&&(p=l),0===p)break e;r.set(i.subarray(o,o+p),n),a-=p,o+=p,l-=p,n+=p,s.length-=p;break}s.mode=Ct;break;case 16196:for(;c<14;){if(0===a)break e;a--,h+=i[o++]<>>=5,c-=5,s.ndist=1+(31&h),h>>>=5,c-=5,s.ncode=4+(15&h),h>>>=4,c-=4,s.nlen>286||s.ndist>30){e.msg="too many length or distance symbols",s.mode=Bt;break}s.have=0,s.mode=16197;case 16197:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[C[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,D={bits:s.lenbits},_=dt(0,s.lens,0,19,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid code lengths set",s.mode=Bt;break}s.have=0,s.mode=16198;case 16198:for(;s.have>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=E,c-=E,s.lens[s.have++]=y;else{if(16===y){for(N=E+2;c>>=E,c-=E,0===s.have){e.msg="invalid bit length repeat",s.mode=Bt;break}T=s.lens[s.have-1],p=3+(3&h),h>>>=2,c-=2}else if(17===y){for(N=E+3;c>>=E,c-=E,T=0,p=3+(7&h),h>>>=3,c-=3}else{for(N=E+7;c>>=E,c-=E,T=0,p=11+(127&h),h>>>=7,c-=7}if(s.have+p>s.nlen+s.ndist){e.msg="invalid bit length repeat",s.mode=Bt;break}for(;p--;)s.lens[s.have++]=T}}if(s.mode===Bt)break;if(0===s.lens[256]){e.msg="invalid code -- missing end-of-block",s.mode=Bt;break}if(s.lenbits=9,D={bits:s.lenbits},_=dt(1,s.lens,0,s.nlen,s.lencode,0,s.work,D),s.lenbits=D.bits,_){e.msg="invalid literal/lengths set",s.mode=Bt;break}if(s.distbits=6,s.distcode=s.distdyn,D={bits:s.distbits},_=dt(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,D),s.distbits=D.bits,_){e.msg="invalid distances set",s.mode=Bt;break}if(s.mode=St,t===mt)break e;case St:s.mode=wt;case wt:if(a>=6&&l>=258){e.next_out=n,e.avail_out=l,e.next_in=o,e.avail_in=a,s.hold=h,s.bits=c,ht(e,u),n=e.next_out,r=e.output,l=e.avail_out,o=e.next_in,i=e.input,a=e.avail_in,h=s.hold,c=s.bits,s.mode===Ct&&(s.back=-1);break}for(s.back=0;R=s.lencode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,s.length=y,0===m){s.mode=16205;break}if(32&m){s.back=-1,s.mode=Ct;break}if(64&m){e.msg="invalid literal/length code",s.mode=Bt;break}s.extra=15&m,s.mode=16201;case 16201:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;R=s.distcode[h&(1<>>24,m=R>>>16&255,y=65535&R,!(E<=c);){if(0===a)break e;a--,h+=i[o++]<>g)],E=R>>>24,m=R>>>16&255,y=65535&R,!(g+E<=c);){if(0===a)break e;a--,h+=i[o++]<>>=g,c-=g,s.back+=g}if(h>>>=E,c-=E,s.back+=E,64&m){e.msg="invalid distance code",s.mode=Bt;break}s.offset=y,s.extra=15&m,s.mode=16203;case 16203:if(s.extra){for(N=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){e.msg="invalid distance too far back",s.mode=Bt;break}s.mode=16204;case 16204:if(0===l)break e;if(p=u-l,s.offset>p){if(p=s.offset-p,p>s.whave&&s.sane){e.msg="invalid distance too far back",s.mode=Bt;break}p>s.wnext?(p-=s.wnext,d=s.wsize-p):d=s.wnext-p,p>s.length&&(p=s.length),f=s.window}else f=r,d=n-s.offset,p=s.length;p>l&&(p=l),l-=p,s.length-=p;do{r[n++]=f[d++]}while(--p);0===s.length&&(s.mode=wt);break;case 16205:if(0===l)break e;r[n++]=s.length,l--,s.mode=wt;break;case xt:if(s.wrap){for(;c<32;){if(0===a)break e;a--,h|=i[o++]<{if(Lt(e))return vt;let t=e.state;return t.window&&(t.window=null),e.state=null,yt},qt=(e,t)=>{if(Lt(e))return vt;const s=e.state;return 0==(2&s.wrap)?vt:(s.head=t,t.done=!1,yt)},Jt=(e,t)=>{const s=t.length;let i,r,o;return Lt(e)?vt:(i=e.state,0!==i.wrap&&i.mode!==Nt?vt:i.mode===Nt&&(r=1,r=B(r,t,s,0),r!==i.check)?Tt:(o=zt(e,t,s,s),o?(i.mode=16210,_t):(i.havedict=1,yt)))},$t=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const es=Object.prototype.toString,{Z_NO_FLUSH:ts,Z_FINISH:ss,Z_OK:is,Z_STREAM_END:rs,Z_NEED_DICT:os,Z_STREAM_ERROR:ns,Z_DATA_ERROR:as,Z_MEM_ERROR:ls}=U;function hs(e){this.options=ke({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ye,this.strm.avail_out=0;let s=Yt(this.strm,t.windowBits);if(s!==is)throw new Error(L[s]);if(this.header=new $t,qt(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=We(t.dictionary):"[object ArrayBuffer]"===es.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(s=Jt(this.strm,t.dictionary),s!==is)))throw new Error(L[s])}function cs(e,t){const s=new hs(t);if(s.push(e),s.err)throw s.msg||L[s.err];return s.result}hs.prototype.push=function(e,t){const s=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let o,n,a;if(this.ended)return!1;for(n=t===~~t?t:!0===t?ss:ts,"[object ArrayBuffer]"===es.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),o=Xt(s,n),o===os&&r&&(o=Jt(s,r),o===is?o=Xt(s,n):o===as&&(o=os));s.avail_in>0&&o===rs&&s.state.wrap>0&&0!==e[s.next_in];)Kt(s),o=Xt(s,n);switch(o){case ns:case as:case os:case ls:return this.onEnd(o),this.ended=!0,!1}if(a=s.avail_out,s.next_out&&(0===s.avail_out||o===rs))if("string"===this.options.to){let e=Ke(s.output,s.next_out),t=s.next_out-e,r=ze(s.output,e);s.next_out=t,s.avail_out=i-t,t&&s.output.set(s.output.subarray(e,e+t),0),this.onData(r)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(o!==is||0!==a){if(o===rs)return o=Zt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},hs.prototype.onData=function(e){this.chunks.push(e)},hs.prototype.onEnd=function(e){e===is&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ve(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var As={Inflate:hs,inflate:cs,inflateRaw:function(e,t){return(t=t||{}).raw=!0,cs(e,t)},ungzip:cs,constants:U};const{Deflate:us,deflate:ps,deflateRaw:ds,gzip:fs}=at,{Inflate:Es,inflate:ms,inflateRaw:ys,ungzip:gs}=As;var Is=us,vs=ps,Ts=ds,_s=fs,Rs=Es,Ps=ms,Ds=ys,Ns=gs,Cs=U,Os={Deflate:Is,deflate:vs,deflateRaw:Ts,gzip:_s,Inflate:Rs,inflate:Ps,inflateRaw:Ds,ungzip:Ns,constants:Cs};e.Deflate=Is,e.Inflate=Rs,e.constants=Cs,e.default=Os,e.deflate=vs,e.deflateRaw=Ts,e.gzip=_s,e.inflate=Ps,e.inflateRaw=Ds,e.ungzip=Ns,Object.defineProperty(e,"__esModule",{value:!0})}));var yg=Object.freeze({__proto__:null});let gg=window.pako||yg;gg.inflate||(gg=gg.default);const Ig=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const vg={version:1,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],meshPositions:e[4],meshIndices:e[5],meshEdgesIndices:e[6],meshColors:e[7],entityIDs:e[8],entityMeshes:e[9],entityIsObjects:e[10],positionsDecodeMatrix:e[11]}}(s),a=function(e){return{positions:new Uint16Array(gg.inflate(e.positions).buffer),normals:new Int8Array(gg.inflate(e.normals).buffer),indices:new Uint32Array(gg.inflate(e.indices).buffer),edgeIndices:new Uint32Array(gg.inflate(e.edgeIndices).buffer),meshPositions:new Uint32Array(gg.inflate(e.meshPositions).buffer),meshIndices:new Uint32Array(gg.inflate(e.meshIndices).buffer),meshEdgesIndices:new Uint32Array(gg.inflate(e.meshEdgesIndices).buffer),meshColors:new Uint8Array(gg.inflate(e.meshColors).buffer),entityIDs:gg.inflate(e.entityIDs,{to:"string"}),entityMeshes:new Uint32Array(gg.inflate(e.entityMeshes).buffer),entityIsObjects:new Uint8Array(gg.inflate(e.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(gg.inflate(e.positionsDecodeMatrix).buffer)}}(n);!function(e,t,s,i,r,o){o.getNextId(),i.positionsCompression="precompressed",i.normalsCompression="precompressed";const n=s.positions,a=s.normals,l=s.indices,h=s.edgeIndices,c=s.meshPositions,A=s.meshIndices,u=s.meshEdgesIndices,d=s.meshColors,f=JSON.parse(s.entityIDs),E=s.entityMeshes,m=s.entityIsObjects,g=c.length,I=E.length;for(let r=0;rE[e]E[t]?1:0));for(let e=0;e1||(C[s]=e)}}for(let e=0;e<_;e++){const t=D[e],s=t===_-1,r=P[t]>1,o=Og(m.subarray(4*t,4*t+3)),u=m[4*t+3]/255,g=a.subarray(p[t],s?a.length:p[t+1]),v=l.subarray(p[t],s?l.length:p[t+1]),T=h.subarray(d[t],s?h.length:d[t+1]),R=c.subarray(f[t],s?c.length:f[t+1]),N=A.subarray(E[t],E[t]+16);if(r){const e=`${n}-geometry.${t}`;i.createGeometry({id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N})}else{const e=`${n}-${t}`;I[C[t]];const s={};i.createMesh(y.apply(s,{id:e,primitive:"triangles",positionsCompressed:g,normalsCompressed:v,indices:T,edgeIndices:R,positionsDecodeMatrix:N,color:o,opacity:u}))}}let O=0;for(let e=0;e1){const t={},r=`${n}-instance.${O++}`,o=`${n}-geometry.${s}`,a=16*T[e],h=u.subarray(a,a+16);i.createMesh(y.apply(t,{id:r,geometryId:o,matrix:h})),l.push(r)}else l.push(s)}if(l.length>0){const e={};i.createEntity(y.apply(e,{id:r,isObject:!0,meshIds:l}))}}}(0,0,a,i,0,o)}};let Sg=window.pako||yg;Sg.inflate||(Sg=Sg.default);const wg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const xg={version:5,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],eachPrimitivePositionsAndNormalsPortion:e[5],eachPrimitiveIndicesPortion:e[6],eachPrimitiveEdgeIndicesPortion:e[7],eachPrimitiveColor:e[8],primitiveInstances:e[9],eachEntityId:e[10],eachEntityPrimitiveInstancesPortion:e[11],eachEntityMatricesPortion:e[12]}}(s),a=function(e){return{positions:new Float32Array(Sg.inflate(e.positions).buffer),normals:new Int8Array(Sg.inflate(e.normals).buffer),indices:new Uint32Array(Sg.inflate(e.indices).buffer),edgeIndices:new Uint32Array(Sg.inflate(e.edgeIndices).buffer),matrices:new Float32Array(Sg.inflate(e.matrices).buffer),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(Sg.inflate(e.eachPrimitivePositionsAndNormalsPortion).buffer),eachPrimitiveIndicesPortion:new Uint32Array(Sg.inflate(e.eachPrimitiveIndicesPortion).buffer),eachPrimitiveEdgeIndicesPortion:new Uint32Array(Sg.inflate(e.eachPrimitiveEdgeIndicesPortion).buffer),eachPrimitiveColor:new Uint8Array(Sg.inflate(e.eachPrimitiveColor).buffer),primitiveInstances:new Uint32Array(Sg.inflate(e.primitiveInstances).buffer),eachEntityId:Sg.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(Sg.inflate(e.eachEntityPrimitiveInstancesPortion).buffer),eachEntityMatricesPortion:new Uint32Array(Sg.inflate(e.eachEntityMatricesPortion).buffer)}}(n);!function(e,t,s,i,r,o){const n=o.getNextId();i.positionsCompression="disabled",i.normalsCompression="precompressed";const a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.eachPrimitivePositionsAndNormalsPortion,p=s.eachPrimitiveIndicesPortion,d=s.eachPrimitiveEdgeIndicesPortion,f=s.eachPrimitiveColor,E=s.primitiveInstances,m=JSON.parse(s.eachEntityId),g=s.eachEntityPrimitiveInstancesPortion,I=s.eachEntityMatricesPortion,v=u.length,T=E.length,_=new Uint8Array(v),R=m.length;for(let e=0;e1||(P[s]=e)}}for(let e=0;e1,r=wg(f.subarray(4*e,4*e+3)),o=f[4*e+3]/255,A=a.subarray(u[e],t?a.length:u[e+1]),E=l.subarray(u[e],t?l.length:u[e+1]),g=h.subarray(p[e],t?h.length:p[e+1]),I=c.subarray(d[e],t?c.length:d[e+1]);if(s){const t=`${n}-geometry.${e}`;i.createGeometry({id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I})}else{const t=e;m[P[e]];const s={};i.createMesh(y.apply(s,{id:t,primitive:"triangles",positionsCompressed:A,normalsCompressed:E,indices:g,edgeIndices:I,color:r,opacity:o}))}}let D=0;for(let e=0;e1){const t={},r="instance."+D++,o="geometry"+s,n=16*I[e],l=A.subarray(n,n+16);i.createMesh(y.apply(t,{id:r,geometryId:o,matrix:l})),a.push(r)}else a.push(s)}if(a.length>0){const e={};i.createEntity(y.apply(e,{id:r,isObject:!0,meshIds:a}))}}}(0,0,a,i,0,o)}};let Bg=window.pako||yg;Bg.inflate||(Bg=Bg.default);const Fg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const Mg={version:6,parse:function(e,t,s,i,r,o){const n=function(e){return{positions:e[0],normals:e[1],indices:e[2],edgeIndices:e[3],matrices:e[4],reusedPrimitivesDecodeMatrix:e[5],eachPrimitivePositionsAndNormalsPortion:e[6],eachPrimitiveIndicesPortion:e[7],eachPrimitiveEdgeIndicesPortion:e[8],eachPrimitiveColorAndOpacity:e[9],primitiveInstances:e[10],eachEntityId:e[11],eachEntityPrimitiveInstancesPortion:e[12],eachEntityMatricesPortion:e[13],eachTileAABB:e[14],eachTileEntitiesPortion:e[15]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Bg.inflate(e,t).buffer}return{positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedPrimitivesDecodeMatrix:new Float32Array(t(e.reusedPrimitivesDecodeMatrix)),eachPrimitivePositionsAndNormalsPortion:new Uint32Array(t(e.eachPrimitivePositionsAndNormalsPortion)),eachPrimitiveIndicesPortion:new Uint32Array(t(e.eachPrimitiveIndicesPortion)),eachPrimitiveEdgeIndicesPortion:new Uint32Array(t(e.eachPrimitiveEdgeIndicesPortion)),eachPrimitiveColorAndOpacity:new Uint8Array(t(e.eachPrimitiveColorAndOpacity)),primitiveInstances:new Uint32Array(t(e.primitiveInstances)),eachEntityId:Bg.inflate(e.eachEntityId,{to:"string"}),eachEntityPrimitiveInstancesPortion:new Uint32Array(t(e.eachEntityPrimitiveInstancesPortion)),eachEntityMatricesPortion:new Uint32Array(t(e.eachEntityMatricesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.positions,l=s.normals,h=s.indices,c=s.edgeIndices,A=s.matrices,u=s.reusedPrimitivesDecodeMatrix,d=s.eachPrimitivePositionsAndNormalsPortion,f=s.eachPrimitiveIndicesPortion,E=s.eachPrimitiveEdgeIndicesPortion,m=s.eachPrimitiveColorAndOpacity,g=s.primitiveInstances,I=JSON.parse(s.eachEntityId),v=s.eachEntityPrimitiveInstancesPortion,T=s.eachEntityMatricesPortion,_=s.eachTileAABB,R=s.eachTileEntitiesPortion,P=d.length,D=g.length,N=I.length,C=R.length,O=new Uint32Array(P);for(let e=0;e1,A=t===P-1,p=a.subarray(d[t],A?a.length:d[t+1]),I=l.subarray(d[t],A?l.length:d[t+1]),v=h.subarray(f[t],A?h.length:f[t+1]),T=c.subarray(E[t],A?c.length:E[t+1]),_=Fg(m.subarray(4*t,4*t+3)),R=m[4*t+3]/255,D=o.getNextId();if(r){const e=`${n}-geometry.${s}.${t}`;M[e]||(i.createGeometry({id:e,primitive:"triangles",positionsCompressed:p,indices:v,edgeIndices:T,positionsDecodeMatrix:u}),M[e]=!0),i.createMesh(y.apply(H,{id:D,geometryId:e,origin:b,matrix:C,color:_,opacity:R})),B.push(D)}else i.createMesh(y.apply(H,{id:D,origin:b,primitive:"triangles",positionsCompressed:p,normalsCompressed:I,indices:v,edgeIndices:T,positionsDecodeMatrix:F,color:_,opacity:R})),B.push(D)}B.length>0&&i.createEntity(y.apply(U,{id:R,isObject:!0,meshIds:B}))}}}(e,t,a,i,0,o)}};let Lg=window.pako||yg;Lg.inflate||(Lg=Lg.default);const Ug=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Hg(e){const t=[];for(let s=0,i=e.length;s1,p=t===O-1,P=Ug(R.subarray(6*e,6*e+3)),D=R[6*e+3]/255,N=R[6*e+4]/255,C=R[6*e+5]/255,b=o.getNextId();if(r){const r=_[e],o=u.slice(r,r+16),T=`${n}-geometry.${s}.${t}`;if(!G[T]){let e,s,r,o,n,u;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],p?a.length:E[t+1]),o=Hg(h.subarray(g[t],p?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],p?a.length:E[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]);break;default:continue}i.createGeometry({id:T,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:u,positionsDecodeMatrix:d}),G[T]=!0}i.createMesh(y.apply(k,{id:b,geometryId:T,origin:B,matrix:o,color:P,metallic:N,roughness:C,opacity:D})),M.push(b)}else{let e,s,r,o,n,u;switch(f[t]){case 0:e="solid",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 1:e="surface",s=a.subarray(E[t],p?a.length:E[t+1]),r=l.subarray(m[t],p?l.length:m[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]),u=A.subarray(v[t],p?A.length:v[t+1]);break;case 2:e="points",s=a.subarray(E[t],p?a.length:E[t+1]),o=Hg(h.subarray(g[t],p?h.length:g[t+1]));break;case 3:e="lines",s=a.subarray(E[t],p?a.length:E[t+1]),n=c.subarray(I[t],p?c.length:I[t+1]);break;default:continue}i.createMesh(y.apply(k,{id:b,origin:B,primitive:e,positionsCompressed:s,normalsCompressed:r,colors:o,indices:n,edgeIndices:u,positionsDecodeMatrix:H,color:P,metallic:N,roughness:C,opacity:D})),M.push(b)}}M.length>0&&i.createEntity(y.apply(U,{id:C,isObject:!0,meshIds:M}))}}}(e,t,a,i,0,o)}};let kg=window.pako||yg;kg.inflate||(kg=kg.default);const Vg=p.vec4(),jg=p.vec4();const Qg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function Wg(e){const t=[];for(let s=0,i=e.length;s1,l=r===F-1,h=Qg(O.subarray(6*e,6*e+3)),c=O[6*e+3]/255,A=O[6*e+4]/255,b=O[6*e+5]/255,S=o.getNextId();if(a){const o=C[e],a=g.slice(o,o+16),N=`${n}-geometry.${s}.${r}`;let O=V[N];if(!O){O={batchThisMesh:!t.reuseGeometries};let e=!1;switch(v[r]){case 0:O.primitiveName="solid",O.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),O.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),O.geometryEdgeIndices=m.subarray(D[r],l?m.length:D[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 1:O.primitiveName="surface",O.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),O.geometryNormals=d.subarray(_[r],l?d.length:_[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),O.geometryEdgeIndices=m.subarray(D[r],l?m.length:D[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 2:O.primitiveName="points",O.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),O.geometryColors=Wg(f.subarray(R[r],l?f.length:R[r+1])),e=O.geometryPositions.length>0;break;case 3:O.primitiveName="lines",O.geometryPositions=u.subarray(T[r],l?u.length:T[r+1]),O.geometryIndices=E.subarray(P[r],l?E.length:P[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;default:continue}if(e||(O=null),O&&(O.geometryPositions.length,O.batchThisMesh)){O.decompressedPositions=new Float32Array(O.geometryPositions.length);const e=O.geometryPositions,t=O.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=u.subarray(T[r],l?u.length:T[r+1]),s=d.subarray(_[r],l?d.length:_[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),a=m.subarray(D[r],l?m.length:D[r+1]),p=t.length>0&&n.length>0;break;case 2:e="points",t=u.subarray(T[r],l?u.length:T[r+1]),o=Wg(f.subarray(R[r],l?f.length:R[r+1])),p=t.length>0;break;case 3:e="lines",t=u.subarray(T[r],l?u.length:T[r+1]),n=E.subarray(P[r],l?E.length:P[r+1]),p=t.length>0&&n.length>0;break;default:continue}p&&(i.createMesh(y.apply(Q,{id:S,origin:G,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:B,color:h,metallic:A,roughness:b,opacity:c})),x.push(S))}}x.length>0&&i.createEntity(y.apply(j,{id:h,isObject:!0,meshIds:x}))}}}(e,t,a,i,r,o)}};let Kg=window.pako||yg;Kg.inflate||(Kg=Kg.default);const Yg=p.vec4(),Xg=p.vec4();const Zg=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();const qg={version:9,parse:function(e,t,s,i,r,o){const n=function(e){return{metadata:e[0],positions:e[1],normals:e[2],colors:e[3],indices:e[4],edgeIndices:e[5],matrices:e[6],reusedGeometriesDecodeMatrix:e[7],eachGeometryPrimitiveType:e[8],eachGeometryPositionsPortion:e[9],eachGeometryNormalsPortion:e[10],eachGeometryColorsPortion:e[11],eachGeometryIndicesPortion:e[12],eachGeometryEdgeIndicesPortion:e[13],eachMeshGeometriesPortion:e[14],eachMeshMatricesPortion:e[15],eachMeshMaterial:e[16],eachEntityId:e[17],eachEntityMeshesPortion:e[18],eachTileAABB:e[19],eachTileEntitiesPortion:e[20]}}(s),a=function(e){function t(e,t){return 0===e.length?[]:Kg.inflate(e,t).buffer}return{metadata:JSON.parse(Kg.inflate(e.metadata,{to:"string"})),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshMaterial:new Uint8Array(t(e.eachMeshMaterial)),eachEntityId:JSON.parse(Kg.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(n);!function(e,t,s,i,r,o){const n=o.getNextId(),a=s.metadata,l=s.positions,h=s.normals,c=s.colors,A=s.indices,u=s.edgeIndices,d=s.matrices,f=s.reusedGeometriesDecodeMatrix,E=s.eachGeometryPrimitiveType,m=s.eachGeometryPositionsPortion,g=s.eachGeometryNormalsPortion,I=s.eachGeometryColorsPortion,v=s.eachGeometryIndicesPortion,T=s.eachGeometryEdgeIndicesPortion,_=s.eachMeshGeometriesPortion,R=s.eachMeshMatricesPortion,P=s.eachMeshMaterial,D=s.eachEntityId,N=s.eachEntityMeshesPortion,C=s.eachTileAABB,O=s.eachTileEntitiesPortion,b=m.length,S=_.length,w=N.length,x=O.length;r&&r.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});const B=new Uint32Array(b);for(let e=0;e1,D=r===b-1,N=Zg(P.subarray(6*e,6*e+3)),C=P[6*e+3]/255,O=P[6*e+4]/255,S=P[6*e+5]/255,w=o.getNextId();if(a){const o=R[e],a=d.slice(o,o+16),_=`${n}-geometry.${s}.${r}`;let P=L[_];if(!P){P={batchThisMesh:!t.reuseGeometries};let e=!1;switch(E[r]){case 0:P.primitiveName="solid",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=u.subarray(T[r],D?u.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 1:P.primitiveName="surface",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryNormals=h.subarray(g[r],D?h.length:g[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),P.geometryEdgeIndices=u.subarray(T[r],D?u.length:T[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;case 2:P.primitiveName="points",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryColors=c.subarray(I[r],D?c.length:I[r+1]),e=P.geometryPositions.length>0;break;case 3:P.primitiveName="lines",P.geometryPositions=l.subarray(m[r],D?l.length:m[r+1]),P.geometryIndices=A.subarray(v[r],D?A.length:v[r+1]),e=P.geometryPositions.length>0&&P.geometryIndices.length>0;break;default:continue}if(e||(P=null),P&&(P.geometryPositions.length,P.batchThisMesh)){P.decompressedPositions=new Float32Array(P.geometryPositions.length),P.transformedAndRecompressedPositions=new Uint16Array(P.geometryPositions.length);const e=P.geometryPositions,t=P.decompressedPositions;for(let s=0,i=e.length;s0&&n.length>0;break;case 1:e="surface",t=l.subarray(m[r],D?l.length:m[r+1]),s=h.subarray(g[r],D?h.length:g[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),a=u.subarray(T[r],D?u.length:T[r+1]),p=t.length>0&&n.length>0;break;case 2:e="points",t=l.subarray(m[r],D?l.length:m[r+1]),o=c.subarray(I[r],D?c.length:I[r+1]),p=t.length>0;break;case 3:e="lines",t=l.subarray(m[r],D?l.length:m[r+1]),n=A.subarray(v[r],D?A.length:v[r+1]),p=t.length>0&&n.length>0;break;default:continue}p&&(i.createMesh(y.apply(j,{id:w,origin:F,primitive:e,positionsCompressed:t,normalsCompressed:s,colorsCompressed:o,indices:n,edgeIndices:a,positionsDecodeMatrix:G,color:N,metallic:O,roughness:S,opacity:C})),U.push(w))}}U.length>0&&i.createEntity(y.apply(V,{id:C,isObject:!0,meshIds:U}))}}}(e,t,a,i,r,o)}};let Jg=window.pako||yg;Jg.inflate||(Jg=Jg.default);const $g=p.vec4(),eI=p.vec4();const tI=function(){const e=new Float32Array(3);return function(t){return e[0]=t[0]/255,e[1]=t[1]/255,e[2]=t[2]/255,e}}();function sI(e,t){const s=[];if(t.length>1)for(let e=0,i=t.length-1;e1)for(let t=0,i=e.length/3-1;t0,a=9*e,A=1===c[a+0],u=c[a+1];c[a+2],c[a+3];const p=c[a+4],d=c[a+5],f=c[a+6],E=c[a+7],m=c[a+8];if(o){const t=new Uint8Array(l.subarray(s,r)).buffer,o=`${n}-texture-${e}`;if(A)i.createTexture({id:o,buffers:[t],minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m});else{const e=new Blob([t],{type:10001===u?"image/jpeg":10002===u?"image/png":"image/gif"}),s=(window.URL||window.webkitURL).createObjectURL(e),r=document.createElement("img");r.src=s,i.createTexture({id:o,image:r,minFilter:p,magFilter:d,wrapS:f,wrapT:E,wrapR:m})}}}for(let e=0;e=0?`${n}-texture-${r}`:null,normalsTextureId:a>=0?`${n}-texture-${a}`:null,metallicRoughnessTextureId:o>=0?`${n}-texture-${o}`:null,emissiveTextureId:l>=0?`${n}-texture-${l}`:null,occlusionTextureId:h>=0?`${n}-texture-${h}`:null})}const j=new Uint32Array(H);for(let e=0;e1,l=r===H-1,h=S[e],c=h>=0?`${n}-textureSet-${h}`:null,x=tI(w.subarray(6*e,6*e+3)),B=w[6*e+3]/255,F=w[6*e+4]/255,U=w[6*e+5]/255,G=o.getNextId();if(a){const o=b[e],a=I.slice(o,o+16),h=`${n}-geometry.${s}.${r}`;let O=z[h];if(!O){O={batchThisMesh:!t.reuseGeometries};let e=!1;switch(T[r]){case 0:O.primitiveName="solid",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryNormals=u.subarray(R[r],l?u.length:R[r+1]),O.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),O.geometryEdgeIndices=m.subarray(C[r],l?m.length:C[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 1:O.primitiveName="surface",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryNormals=u.subarray(R[r],l?u.length:R[r+1]),O.geometryUVs=f.subarray(D[r],l?f.length:D[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),O.geometryEdgeIndices=m.subarray(C[r],l?m.length:C[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 2:O.primitiveName="points",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryColors=d.subarray(P[r],l?d.length:P[r+1]),e=O.geometryPositions.length>0;break;case 3:O.primitiveName="lines",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryIndices=E.subarray(N[r],l?E.length:N[r+1]),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;case 4:O.primitiveName="lines",O.geometryPositions=A.subarray(_[r],l?A.length:_[r+1]),O.geometryIndices=sI(O.geometryPositions,E.subarray(N[r],l?E.length:N[r+1])),e=O.geometryPositions.length>0&&O.geometryIndices.length>0;break;default:continue}if(e||(O=null),O&&(O.geometryPositions.length,O.batchThisMesh)){O.decompressedPositions=new Float32Array(O.geometryPositions.length),O.transformedAndRecompressedPositions=new Uint16Array(O.geometryPositions.length);const e=O.geometryPositions,t=O.decompressedPositions;for(let s=0,i=e.length;s0&&a.length>0;break;case 1:e="surface",t=A.subarray(_[r],l?A.length:_[r+1]),s=u.subarray(R[r],l?u.length:R[r+1]),o=f.subarray(D[r],l?f.length:D[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),h=m.subarray(C[r],l?m.length:C[r+1]),p=t.length>0&&a.length>0;break;case 2:e="points",t=A.subarray(_[r],l?A.length:_[r+1]),n=d.subarray(P[r],l?d.length:P[r+1]),p=t.length>0;break;case 3:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=E.subarray(N[r],l?E.length:N[r+1]),p=t.length>0&&a.length>0;break;case 4:e="lines",t=A.subarray(_[r],l?A.length:_[r+1]),a=sI(t,E.subarray(N[r],l?E.length:N[r+1])),p=t.length>0&&a.length>0;break;default:continue}p&&(i.createMesh(y.apply(V,{id:G,textureSetId:c,origin:Q,primitive:e,positionsCompressed:t,normalsCompressed:s,uv:o&&o.length>0?o:null,colorsCompressed:n,indices:a,edgeIndices:h,positionsDecodeMatrix:g,color:x,metallic:F,roughness:U,opacity:B})),M.push(G))}}M.length>0&&i.createEntity(y.apply(G,{id:l,isObject:!0,meshIds:M}))}}}(e,t,a,i,r,o)}},rI={};rI[vg.version]=vg,rI[Rg.version]=Rg,rI[Ng.version]=Ng,rI[bg.version]=bg,rI[xg.version]=xg,rI[Mg.version]=Mg,rI[Gg.version]=Gg,rI[zg.version]=zg,rI[qg.version]=qg,rI[iI.version]=iI;class oI extends a{constructor(e,t={}){super("XKTLoader",e,t),this._maxGeometryBatchSize=t.maxGeometryBatchSize,this.textureTranscoder=t.textureTranscoder,this.dataSource=t.dataSource,this.objectDefaults=t.objectDefaults,this.includeTypes=t.includeTypes,this.excludeTypes=t.excludeTypes,this.excludeUnclassifiedObjects=t.excludeUnclassifiedObjects,this.reuseGeometries=t.reuseGeometries}get supportedVersions(){return Object.keys(rI)}get textureTranscoder(){return this._textureTranscoder}set textureTranscoder(e){this._textureTranscoder=e}get dataSource(){return this._dataSource}set dataSource(e){this._dataSource=e||new mg}get objectDefaults(){return this._objectDefaults}set objectDefaults(e){this._objectDefaults=e||sg}get includeTypes(){return this._includeTypes}set includeTypes(e){this._includeTypes=e}get excludeTypes(){return this._excludeTypes}set excludeTypes(e){this._excludeTypes=e}get excludeUnclassifiedObjects(){return this._excludeUnclassifiedObjects}set excludeUnclassifiedObjects(e){this._excludeUnclassifiedObjects=!!e}get globalizeObjectIds(){return this._globalizeObjectIds}set globalizeObjectIds(e){this._globalizeObjectIds=!!e}get reuseGeometries(){return this._reuseGeometries}set reuseGeometries(e){this._reuseGeometries=!1!==e}load(e={}){if(e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id),!e.src&&!e.xkt&&!e.manifestSrc)return this.error("load() param expected: src, xkt or manifestSrc"),o;const t={},s=e.includeTypes||this._includeTypes,i=e.excludeTypes||this._excludeTypes,r=e.objectDefaults||this._objectDefaults;if(t.reuseGeometries=null!==e.reuseGeometries&&void 0!==e.reuseGeometries?e.reuseGeometries:!1!==this._reuseGeometries,s){t.includeTypesMap={};for(let e=0,i=s.length;e{o.finalize(),a.finalize(),this.viewer.scene.canvas.spinner.processes--,o.once("destroyed",(()=>{this.viewer.metaScene.destroyMetaModel(a.id)})),o.scene.once("tick",(()=>{o.destroyed||(o.scene.fire("modelLoaded",o.id),o.fire("loaded",!0,!1))}))},h=e=>{this.viewer.scene.canvas.spinner.processes--,this.error(e),o.fire("error",e)};let c=0;const A={getNextId:()=>`${n}.${c++}`};if(e.metaModelSrc||e.metaModelData)if(e.metaModelSrc){const r=e.metaModelSrc;this._dataSource.getMetaModel(r,(r=>{o.destroyed||(a.loadData(r,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()))}),(e=>{h(`load(): Failed to load model metadata for model '${n} from '${r}' - ${e}`)}))}else e.metaModelData&&(a.loadData(e.metaModelData,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),e.src?this._loadModel(e.src,e,t,o,null,A,l,h):(this._parseModel(e.xkt,e,t,o,null,A),l()));else if(e.src)this._loadModel(e.src,e,t,o,a,A,l,h);else if(e.xkt)this._parseModel(e.xkt,e,t,o,a,A),l();else if(e.manifestSrc){const r=function(e){const t=e.split("/");return t.pop(),t.join("/")+"/"}(e.manifestSrc),n=(e,o,n)=>{let l=0;const h=()=>{l>=e.length?o():this._dataSource.getMetaModel(`${r}${e[l]}`,(e=>{a.loadData(e,{includeTypes:s,excludeTypes:i,globalizeObjectIds:t.globalizeObjectIds}),l++,h()}),n)};h()},c=(s,i,n)=>{let l=0;const h=()=>{l>=s.length?i():this._dataSource.getXKT(`${r}${s[l]}`,(s=>{this._parseModel(s,e,t,o,a,A),l++,h()}),n)};h()};this._dataSource.getManifest(e.manifestSrc,(e=>{if(o.destroyed)return;const t=e.xktFiles;if(!t||0===t.length)return void h("load(): Failed to load model manifest - manifest not valid");const s=e.metaModelFiles;s?n(s,(()=>{c(t,l,h)}),h):c(t,l,h)}),h)}return o}_loadModel(e,t,s,i,r,o,n,a){this._dataSource.getXKT(t.src,(e=>{this._parseModel(e,t,s,i,r,o),n()}),a)}_parseModel(e,t,s,i,r,o){if(i.destroyed)return;const n=new DataView(e),a=new Uint8Array(e),l=n.getUint32(0,!0),h=rI[l];if(!h)return void this.error("Unsupported .XKT file version: "+l+" - this XKTLoaderPlugin supports versions "+Object.keys(rI));this.log("Loading .xkt V"+l);const c=n.getUint32(4,!0),A=[];let u=4*(c+2);for(let e=0;ee.size)throw new RangeError("offset:"+t+", length:"+s+", size:"+e.size);return e.slice?e.slice(t,t+s):e.webkitSlice?e.webkitSlice(t,t+s):e.mozSlice?e.mozSlice(t,t+s):e.msSlice?e.msSlice(t,t+s):void 0}(e,t,s))}catch(e){r(e)}}}function d(){}function f(e){var s,i=this;i.init=function(e){s=new Blob([],{type:n}),e()},i.writeUint8Array=function(e,i){s=new Blob([s,t?e:e.buffer],{type:n}),i()},i.getData=function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=i,r.readAsText(s,e)}}function E(t){var s=this,i="",r="";s.init=function(e){i+="data:"+(t||"")+";base64,",e()},s.writeUint8Array=function(t,s){var o,n=r.length,a=r;for(r="",o=0;o<3*Math.floor((n+t.length)/3)-n;o++)a+=String.fromCharCode(t[o]);for(;o2?i+=e.btoa(a):r=a,s()},s.getData=function(t){t(i+e.btoa(r))}}function m(e){var s,i=this;i.init=function(t){s=new Blob([],{type:e}),t()},i.writeUint8Array=function(i,r){s=new Blob([s,t?i:i.buffer],{type:e}),r()},i.getData=function(e){e(s)}}function y(e,t,s,i,r,n,a,l,h,c){var A,u,p,d=0,f=t.sn;function E(){e.removeEventListener("message",m,!1),l(u,p)}function m(t){var s=t.data,r=s.data,o=s.error;if(o)return o.toString=function(){return"Error: "+this.message},void h(o);if(s.sn===f)switch("number"==typeof s.codecTime&&(e.codecTime+=s.codecTime),"number"==typeof s.crcTime&&(e.crcTime+=s.crcTime),s.type){case"append":r?(u+=r.length,i.writeUint8Array(r,(function(){y()}),c)):y();break;case"flush":p=s.crc,r?(u+=r.length,i.writeUint8Array(r,(function(){E()}),c)):E();break;case"progress":a&&a(A+s.loaded,n);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",s)}}function y(){(A=d*o)<=n?s.readUint8Array(r+A,Math.min(o,n-A),(function(s){a&&a(A,n);var i=0===A?t:{sn:f};i.type="append",i.data=s;try{e.postMessage(i,[s.buffer])}catch(t){e.postMessage(i)}d++}),h):e.postMessage({sn:f,type:"flush"})}u=0,e.addEventListener("message",m,!1),y()}function g(e,t,s,i,r,n,l,h,c,A){var u,p=0,d=0,f="input"===n,E="output"===n,m=new a;!function n(){var a;if((u=p*o)127?r[s-128]:String.fromCharCode(s);return i}function T(e){return decodeURIComponent(escape(e))}function _(e){var t,s="";for(t=0;t>16,s=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&s)>>11,(2016&s)>>5,2*(31&s),0)}catch(e){}}(e.lastModDateRaw),1!=(1&e.bitFlag)?((i||8!=(8&e.bitFlag))&&(e.crc32=t.view.getUint32(s+10,!0),e.compressedSize=t.view.getUint32(s+14,!0),e.uncompressedSize=t.view.getUint32(s+18,!0)),4294967295!==e.compressedSize&&4294967295!==e.uncompressedSize?(e.filenameLength=t.view.getUint16(s+22,!0),e.extraFieldLength=t.view.getUint16(s+24,!0)):r("File is using Zip64 (4gb+ file size).")):r("File contains encrypted entry.")}function P(t,o,n){var a=0;function l(){}l.prototype.getData=function(i,o,l,c){var A=this;function u(e,t){c&&!function(e){var t=h(4);return t.view.setUint32(0,e),A.crc32==t.view.getUint32(0)}(t)?n("CRC failed."):i.getData((function(e){o(e)}))}function p(e){n(e||r)}function d(e){n(e||"Error while writing file data.")}t.readUint8Array(A.offset,30,(function(r){var o,f=h(r.length,r);1347093252==f.view.getUint32(0)?(R(A,f,4,!1,n),o=A.offset+30+A.filenameLength+A.extraFieldLength,i.init((function(){0===A.compressionMethod?I(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d):function(t,s,i,r,o,n,a,l,h,c,A){var u=a?"output":"none";e.zip.useWebWorkers?y(t,{sn:s,codecClass:"Inflater",crcType:u},i,r,o,n,h,l,c,A):g(new e.zip.Inflater,i,r,o,n,u,h,l,c,A)}(A._worker,a++,t,i,o,A.compressedSize,c,u,l,p,d)}),d)):n(s)}),p)};var c={getEntries:function(e){var r=this._worker;!function(e){t.size<22?n(s):r(22,(function(){r(Math.min(65558,t.size),(function(){n(s)}))}));function r(s,r){t.readUint8Array(t.size-s,s,(function(t){for(var s=t.length-22;s>=0;s--)if(80===t[s]&&75===t[s+1]&&5===t[s+2]&&6===t[s+3])return void e(new DataView(t.buffer,s,22));r()}),(function(){n(i)}))}}((function(o){var a,c;a=o.getUint32(16,!0),c=o.getUint16(8,!0),a<0||a>=t.size?n(s):t.readUint8Array(a,t.size-a,(function(t){var i,o,a,A,u=0,p=[],d=h(t.length,t);for(i=0;i>>8^s[255&(t^e[i])];this.crc=t},a.prototype.get=function(){return~this.crc},a.prototype.table=function(){var e,t,s,i=[];for(e=0;e<256;e++){for(s=e,t=0;t<8;t++)1&s?s=s>>>1^3988292384:s>>>=1;i[e]=s}return i}(),l.prototype.append=function(e,t){return e},l.prototype.flush=function(){},A.prototype=new c,A.prototype.constructor=A,u.prototype=new c,u.prototype.constructor=u,p.prototype=new c,p.prototype.constructor=p,d.prototype.getData=function(e){e(this.data)},f.prototype=new d,f.prototype.constructor=f,E.prototype=new d,E.prototype.constructor=E,m.prototype=new d,m.prototype.constructor=m;var O={deflater:["z-worker.js","deflate.js"],inflater:["z-worker.js","inflate.js"]};function b(t,s,i){if(null===e.zip.workerScripts||null===e.zip.workerScriptsPath){var r;if(e.zip.workerScripts){if(r=e.zip.workerScripts[t],!Array.isArray(r))return void i(new Error("zip.workerScripts."+t+" is not an array!"));r=function(e){var t=document.createElement("a");return e.map((function(e){return t.href=e,t.href}))}(r)}else(r=O[t].slice(0))[0]=(e.zip.workerScriptsPath||"")+r[0];var o=new Worker(r[0]);o.codecTime=o.crcTime=0,o.postMessage({type:"importScripts",scripts:r.slice(1)}),o.addEventListener("message",(function e(t){var r=t.data;if(r.error)return o.terminate(),void i(r.error);"importScripts"===r.type&&(o.removeEventListener("message",e),o.removeEventListener("error",n),s(o))})),o.addEventListener("error",n)}else i(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));function n(e){o.terminate(),i(e)}}function S(e){console.error(e)}e.zip={Reader:c,Writer:d,BlobReader:p,Data64URIReader:u,TextReader:A,BlobWriter:m,Data64URIWriter:E,TextWriter:f,createReader:function(e,t,s){s=s||S,e.init((function(){P(e,t,s)}),s)},createWriter:function(e,t,s,i){s=s||S,i=!!i,e.init((function(){C(e,t,s,i)}),s)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null}}(nI);!function(e){var t,s,i=e.Reader,r=e.Writer;try{s=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(e){}function o(e){var t=this;function s(s,i){var r;t.data?s():((r=new XMLHttpRequest).addEventListener("load",(function(){t.size||(t.size=Number(r.getResponseHeader("Content-Length"))||Number(r.response.byteLength)),t.data=new Uint8Array(r.response),s()}),!1),r.addEventListener("error",i,!1),r.open("GET",e),r.responseType="arraybuffer",r.send())}t.size=0,t.init=function(i,r){if(function(e){var t=document.createElement("a");return t.href=e,"http:"===t.protocol||"https:"===t.protocol}(e)){var o=new XMLHttpRequest;o.addEventListener("load",(function(){t.size=Number(o.getResponseHeader("Content-Length")),t.size?i():s(i,r)}),!1),o.addEventListener("error",r,!1),o.open("HEAD",e),o.send()}else s(i,r)},t.readUint8Array=function(e,i,r,o){s((function(){r(new Uint8Array(t.data.subarray(e,e+i)))}),o)}}function n(e){var t=this;t.size=0,t.init=function(s,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(){t.size=Number(r.getResponseHeader("Content-Length")),"bytes"==r.getResponseHeader("Accept-Ranges")?s():i("HTTP Range not supported.")}),!1),r.addEventListener("error",i,!1),r.open("HEAD",e),r.send()},t.readUint8Array=function(t,s,i,r){!function(t,s,i,r){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="arraybuffer",o.setRequestHeader("Range","bytes="+t+"-"+(t+s-1)),o.addEventListener("load",(function(){i(o.response)}),!1),o.addEventListener("error",r,!1),o.send()}(t,s,(function(e){i(new Uint8Array(e))}),r)}}function a(e){var t=this;t.size=0,t.init=function(s,i){t.size=e.byteLength,s()},t.readUint8Array=function(t,s,i,r){i(new Uint8Array(e.slice(t,t+s)))}}function l(){var e,t=this;t.init=function(t,s){e=new Uint8Array,t()},t.writeUint8Array=function(t,s,i){var r=new Uint8Array(e.length+t.length);r.set(e),r.set(t,e.length),e=r,s()},t.getData=function(t){t(e.buffer)}}function h(e,t){var i,r=this;r.init=function(t,s){e.createWriter((function(e){i=e,t()}),s)},r.writeUint8Array=function(e,r,o){var n=new Blob([s?e:e.buffer],{type:t});i.onwrite=function(){i.onwrite=null,r()},i.onerror=o,i.write(n)},r.getData=function(t){e.file(t)}}o.prototype=new i,o.prototype.constructor=o,n.prototype=new i,n.prototype.constructor=n,a.prototype=new i,a.prototype.constructor=a,l.prototype=new r,l.prototype.constructor=l,h.prototype=new r,h.prototype.constructor=h,e.FileWriter=h,e.HttpReader=o,e.HttpRangeReader=n,e.ArrayBufferReader=a,e.ArrayBufferWriter=l,e.fs&&((t=e.fs.ZipDirectoryEntry).prototype.addHttpContent=function(s,i,r){return function(s,i,r,o){if(s.directory)return o?new t(s.fs,i,r,s):new e.fs.ZipFileEntry(s.fs,i,r,s);throw"Parent entry is not a directory."}(this,s,{data:i,Reader:r?n:o})},t.prototype.importHttpContent=function(e,t,s,i){this.importZip(t?new n(e):new o(e),s,i)},e.fs.FS.prototype.importHttpContent=function(e,s,i,r){this.entries=[],this.root=new t(this),this.root.importHttpContent(e,s,i,r)})}(nI.zip);var aI,lI,hI,cI,AI,uI,pI,dI=(e,t)=>function(){return t||(0,e[Object.keys(e)[0]])((t={exports:{}}).exports,t),t.exports},fI=dI({"dist/web-ifc-mt.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){function t(){return N.buffer!=x.buffer&&z(),x}function i(){return N.buffer!=x.buffer&&z(),B}function r(){return N.buffer!=x.buffer&&z(),F}function o(){return N.buffer!=x.buffer&&z(),M}function n(){return N.buffer!=x.buffer&&z(),L}function a(){return N.buffer!=x.buffer&&z(),U}function l(){return N.buffer!=x.buffer&&z(),G}var h,c,A=void 0!==e?e:{};A.ready=new Promise((function(e,t){h=e,c=t}));var u,p,d,f=Object.assign({},A),E="./this.program",m=(e,t)=>{throw t},y="object"==typeof window,g="function"==typeof importScripts,I="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=A.ENVIRONMENT_IS_PTHREAD||!1,T="";function _(e){return A.locateFile?A.locateFile(e,T):T+e}(y||g)&&(g?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),s&&(T=s),T=0!==T.indexOf("blob:")?T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g&&(d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)});var R,P=A.print||console.log.bind(console),D=A.printErr||console.warn.bind(console);Object.assign(A,f),f=null,A.arguments,A.thisProgram&&(E=A.thisProgram),A.quit&&(m=A.quit),A.wasmBinary&&(R=A.wasmBinary);var N,C,O=A.noExitRuntime||!0;"object"!=typeof WebAssembly&&ae("no native wasm support detected");var b,S=!1;function w(e,t){e||ae(t)}var x,B,F,M,L,U,H,G,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function V(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&k)return k.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,r):e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function j(e,t){return(e>>>=0)?V(i(),e,t):""}function Q(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function W(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function z(){var e=N.buffer;A.HEAP8=x=new Int8Array(e),A.HEAP16=F=new Int16Array(e),A.HEAP32=L=new Int32Array(e),A.HEAPU8=B=new Uint8Array(e),A.HEAPU16=M=new Uint16Array(e),A.HEAPU32=U=new Uint32Array(e),A.HEAPF32=H=new Float32Array(e),A.HEAPF64=G=new Float64Array(e)}var K,Y=A.INITIAL_MEMORY||16777216;if(w(Y>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+Y+"! (STACK_SIZE=5242880)"),v)N=A.wasmMemory;else if(A.wasmMemory)N=A.wasmMemory;else if(!((N=new WebAssembly.Memory({initial:Y/65536,maximum:65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw D("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),I&&D("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");z(),Y=N.buffer.byteLength;var X=[],Z=[],q=[];function J(){return O}function $(){v||(A.noFSInit||ye.init.initialized||ye.init(),ye.ignorePermissions=!1,_e(Z))}var ee,te,se,ie=0,re=null;function oe(e){ie++,A.monitorRunDependencies&&A.monitorRunDependencies(ie)}function ne(e){if(ie--,A.monitorRunDependencies&&A.monitorRunDependencies(ie),0==ie&&re){var t=re;re=null,t()}}function ae(e){A.onAbort&&A.onAbort(e),D(e="Aborted("+e+")"),S=!0,b=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw c(t),t}function le(e){return e.startsWith("data:application/octet-stream;base64,")}function he(e){try{if(e==ee&&R)return new Uint8Array(R);if(d)return d(e);throw"both async and sync fetching of the wasm failed"}catch(e){ae(e)}}function ce(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ae(e){var t=Te.pthreads[e];w(t),Te.returnWorkerToPool(t)}le(ee="web-ifc-mt.wasm")||(ee=_(ee));var ue={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=ue.isAbs(e),s="/"===e.substr(-1);return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ue.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ue.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ue.normalize(e.join("/"))},join2:(e,t)=>ue.normalize(e+"/"+t)},pe={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:ye.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=ue.isAbs(i)}return e=ue.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=pe.resolve(e).substr(1),t=pe.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:W(e)+1,r=new Array(i),o=Q(e,r,0,r.length);return t&&(r.length=o),r}var fe={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){fe.ttys[e]={input:[],output:[],ops:t},ye.registerDevice(e,fe.stream_ops)},stream_ops:{open:function(e){var t=fe.ttys[e.node.rdev];if(!t)throw new ye.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new ye.ErrnoError(60);for(var o=0,n=0;n0&&(P(V(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(D(V(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(D(V(e.output,0)),e.output=[])}}};function Ee(e){ae()}var me={ops_table:null,mount:function(e){return me.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(ye.isBlkdev(s)||ye.isFIFO(s))throw new ye.ErrnoError(63);me.ops_table||(me.ops_table={dir:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,lookup:me.node_ops.lookup,mknod:me.node_ops.mknod,rename:me.node_ops.rename,unlink:me.node_ops.unlink,rmdir:me.node_ops.rmdir,readdir:me.node_ops.readdir,symlink:me.node_ops.symlink},stream:{llseek:me.stream_ops.llseek}},file:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:{llseek:me.stream_ops.llseek,read:me.stream_ops.read,write:me.stream_ops.write,allocate:me.stream_ops.allocate,mmap:me.stream_ops.mmap,msync:me.stream_ops.msync}},link:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr,readlink:me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:me.node_ops.getattr,setattr:me.node_ops.setattr},stream:ye.chrdev_stream_ops}});var r=ye.createNode(e,t,s,i);return ye.isDir(r.mode)?(r.node_ops=me.ops_table.dir.node,r.stream_ops=me.ops_table.dir.stream,r.contents={}):ye.isFile(r.mode)?(r.node_ops=me.ops_table.file.node,r.stream_ops=me.ops_table.file.stream,r.usedBytes=0,r.contents=null):ye.isLink(r.mode)?(r.node_ops=me.ops_table.link.node,r.stream_ops=me.ops_table.link.stream):ye.isChrdev(r.mode)&&(r.node_ops=me.ops_table.chrdev.node,r.stream_ops=me.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=ye.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,ye.isDir(e.mode)?t.size=4096:ye.isFile(e.mode)?t.size=e.usedBytes:ye.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&me.resizeFileStorage(e,t.size)},lookup:function(e,t){throw ye.genericErrors[44]},mknod:function(e,t,s,i){return me.createNode(e,t,s,i)},rename:function(e,t,s){if(ye.isDir(e.mode)){var i;try{i=ye.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new ye.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=ye.lookupNode(e,t);for(var i in s.contents)throw new ye.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=me.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!ye.isLink(e.mode))throw new ye.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||i+s>>=0,t().set(l,n>>>0)}else a=!1,n=l.byteOffset;return{ptr:n,allocated:a}},msync:function(e,t,s,i,r){return me.stream_ops.write(e,t,0,i,s,!1),0}}},ye={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=pe.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new ye.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=ye.root,r="/",o=0;o40)throw new ye.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(ye.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%ye.nameTable.length},hashAddNode:e=>{var t=ye.hashName(e.parent.id,e.name);e.name_next=ye.nameTable[t],ye.nameTable[t]=e},hashRemoveNode:e=>{var t=ye.hashName(e.parent.id,e.name);if(ye.nameTable[t]===e)ye.nameTable[t]=e.name_next;else for(var s=ye.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=ye.mayLookup(e);if(s)throw new ye.ErrnoError(s,e);for(var i=ye.hashName(e.id,t),r=ye.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return ye.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new ye.FSNode(e,t,s,i);return ye.hashAddNode(r),r},destroyNode:e=>{ye.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=ye.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>ye.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=ye.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return ye.lookupNode(e,t),20}catch(e){}return ye.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=ye.lookupNode(e,t)}catch(e){return e.errno}var r=ye.nodePermissions(e,"wx");if(r)return r;if(s){if(!ye.isDir(i.mode))return 54;if(ye.isRoot(i)||ye.getPath(i)===ye.cwd())return 10}else if(ye.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?ye.isLink(e.mode)?32:ye.isDir(e.mode)&&("r"!==ye.flagsToPermissionString(t)||512&t)?31:ye.nodePermissions(e,ye.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=ye.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!ye.streams[s])return s;throw new ye.ErrnoError(33)},getStream:e=>ye.streams[e],createStream:(e,t,s)=>{ye.FSStream||(ye.FSStream=function(){this.shared={}},ye.FSStream.prototype={},Object.defineProperties(ye.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new ye.FSStream,e);var i=ye.nextfd(t,s);return e.fd=i,ye.streams[i]=e,e},closeStream:e=>{ye.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=ye.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new ye.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{ye.devices[e]={stream_ops:t}},getDevice:e=>ye.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),ye.syncFSRequests++,ye.syncFSRequests>1&&D("warning: "+ye.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=ye.getMounts(ye.root.mount),i=0;function r(e){return ye.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&ye.root)throw new ye.ErrnoError(10);if(!r&&!o){var n=ye.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,ye.isMountpoint(i))throw new ye.ErrnoError(10);if(!ye.isDir(i.mode))throw new ye.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?ye.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=ye.lookupPath(e,{follow_mount:!1});if(!ye.isMountpoint(t.node))throw new ye.ErrnoError(28);var s=t.node,i=s.mounted,r=ye.getMounts(i);Object.keys(ye.nameTable).forEach((e=>{for(var t=ye.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&ye.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=ye.lookupPath(e,{parent:!0}).node,r=ue.basename(e);if(!r||"."===r||".."===r)throw new ye.ErrnoError(28);var o=ye.mayCreate(i,r);if(o)throw new ye.ErrnoError(o);if(!i.node_ops.mknod)throw new ye.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,ye.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,ye.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,ye.mknod(e,t,s)),symlink:(e,t)=>{if(!pe.resolve(e))throw new ye.ErrnoError(44);var s=ye.lookupPath(t,{parent:!0}).node;if(!s)throw new ye.ErrnoError(44);var i=ue.basename(t),r=ye.mayCreate(s,i);if(r)throw new ye.ErrnoError(r);if(!s.node_ops.symlink)throw new ye.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=ue.dirname(e),o=ue.dirname(t),n=ue.basename(e),a=ue.basename(t);if(s=ye.lookupPath(e,{parent:!0}).node,i=ye.lookupPath(t,{parent:!0}).node,!s||!i)throw new ye.ErrnoError(44);if(s.mount!==i.mount)throw new ye.ErrnoError(75);var l,h=ye.lookupNode(s,n),c=pe.relative(e,o);if("."!==c.charAt(0))throw new ye.ErrnoError(28);if("."!==(c=pe.relative(t,r)).charAt(0))throw new ye.ErrnoError(55);try{l=ye.lookupNode(i,a)}catch(e){}if(h!==l){var A=ye.isDir(h.mode),u=ye.mayDelete(s,n,A);if(u)throw new ye.ErrnoError(u);if(u=l?ye.mayDelete(i,a,A):ye.mayCreate(i,a))throw new ye.ErrnoError(u);if(!s.node_ops.rename)throw new ye.ErrnoError(63);if(ye.isMountpoint(h)||l&&ye.isMountpoint(l))throw new ye.ErrnoError(10);if(i!==s&&(u=ye.nodePermissions(s,"w")))throw new ye.ErrnoError(u);ye.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{ye.hashAddNode(h)}}},rmdir:e=>{var t=ye.lookupPath(e,{parent:!0}).node,s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!0);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.rmdir)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.rmdir(t,s),ye.destroyNode(i)},readdir:e=>{var t=ye.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new ye.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=ye.lookupPath(e,{parent:!0}).node;if(!t)throw new ye.ErrnoError(44);var s=ue.basename(e),i=ye.lookupNode(t,s),r=ye.mayDelete(t,s,!1);if(r)throw new ye.ErrnoError(r);if(!t.node_ops.unlink)throw new ye.ErrnoError(63);if(ye.isMountpoint(i))throw new ye.ErrnoError(10);t.node_ops.unlink(t,s),ye.destroyNode(i)},readlink:e=>{var t=ye.lookupPath(e).node;if(!t)throw new ye.ErrnoError(44);if(!t.node_ops.readlink)throw new ye.ErrnoError(28);return pe.resolve(ye.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=ye.lookupPath(e,{follow:!t}).node;if(!s)throw new ye.ErrnoError(44);if(!s.node_ops.getattr)throw new ye.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>ye.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?ye.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{ye.chmod(e,t,!0)},fchmod:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);ye.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?ye.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{ye.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=ye.getStream(e);if(!i)throw new ye.ErrnoError(8);ye.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new ye.ErrnoError(28);var s;if(!(s="string"==typeof e?ye.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ye.ErrnoError(63);if(ye.isDir(s.mode))throw new ye.ErrnoError(31);if(!ye.isFile(s.mode))throw new ye.ErrnoError(28);var i=ye.nodePermissions(s,"w");if(i)throw new ye.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=ye.getStream(e);if(!s)throw new ye.ErrnoError(8);if(0==(2097155&s.flags))throw new ye.ErrnoError(28);ye.truncate(s.node,t)},utime:(e,t,s)=>{var i=ye.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new ye.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?ye.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=ue.normalize(e);try{i=ye.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var r=!1;if(64&t)if(i){if(128&t)throw new ye.ErrnoError(20)}else i=ye.mknod(e,s,0),r=!0;if(!i)throw new ye.ErrnoError(44);if(ye.isChrdev(i.mode)&&(t&=-513),65536&t&&!ye.isDir(i.mode))throw new ye.ErrnoError(54);if(!r){var o=ye.mayOpen(i,t);if(o)throw new ye.ErrnoError(o)}512&t&&!r&&ye.truncate(i,0),t&=-131713;var n=ye.createStream({node:i,path:ye.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return n.stream_ops.open&&n.stream_ops.open(n),!A.logReadFiles||1&t||(ye.readFiles||(ye.readFiles={}),e in ye.readFiles||(ye.readFiles[e]=1)),n},close:e=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ye.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ye.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new ye.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(1==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.read)throw new ye.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new ye.ErrnoError(28);if(ye.isClosed(e))throw new ye.ErrnoError(8);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(ye.isDir(e.node.mode))throw new ye.ErrnoError(31);if(!e.stream_ops.write)throw new ye.ErrnoError(28);e.seekable&&1024&e.flags&&ye.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new ye.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(ye.isClosed(e))throw new ye.ErrnoError(8);if(t<0||s<=0)throw new ye.ErrnoError(28);if(0==(2097155&e.flags))throw new ye.ErrnoError(8);if(!ye.isFile(e.node.mode)&&!ye.isDir(e.node.mode))throw new ye.ErrnoError(43);if(!e.stream_ops.allocate)throw new ye.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new ye.ErrnoError(2);if(1==(2097155&e.flags))throw new ye.ErrnoError(2);if(!e.stream_ops.mmap)throw new ye.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new ye.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=ye.open(e,t.flags),r=ye.stat(e).size,o=new Uint8Array(r);return ye.read(i,o,0,r,0),"utf8"===t.encoding?s=V(o,0):"binary"===t.encoding&&(s=o),ye.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=ye.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(W(t)+1),o=Q(t,r,0,r.length);ye.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");ye.write(i,t,0,t.byteLength,void 0,s.canOwn)}ye.close(i)},cwd:()=>ye.currentPath,chdir:e=>{var t=ye.lookupPath(e,{follow:!0});if(null===t.node)throw new ye.ErrnoError(44);if(!ye.isDir(t.node.mode))throw new ye.ErrnoError(54);var s=ye.nodePermissions(t.node,"x");if(s)throw new ye.ErrnoError(s);ye.currentPath=t.path},createDefaultDirectories:()=>{ye.mkdir("/tmp"),ye.mkdir("/home"),ye.mkdir("/home/web_user")},createDefaultDevices:()=>{ye.mkdir("/dev"),ye.registerDevice(ye.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),ye.mkdev("/dev/null",ye.makedev(1,3)),fe.register(ye.makedev(5,0),fe.default_tty_ops),fe.register(ye.makedev(6,0),fe.default_tty1_ops),ye.mkdev("/dev/tty",ye.makedev(5,0)),ye.mkdev("/dev/tty1",ye.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>ae("randomDevice")}();ye.createDevice("/dev","random",e),ye.createDevice("/dev","urandom",e),ye.mkdir("/dev/shm"),ye.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ye.mkdir("/proc");var e=ye.mkdir("/proc/self");ye.mkdir("/proc/self/fd"),ye.mount({mount:()=>{var t=ye.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=ye.getStream(s);if(!i)throw new ye.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{A.stdin?ye.createDevice("/dev","stdin",A.stdin):ye.symlink("/dev/tty","/dev/stdin"),A.stdout?ye.createDevice("/dev","stdout",null,A.stdout):ye.symlink("/dev/tty","/dev/stdout"),A.stderr?ye.createDevice("/dev","stderr",null,A.stderr):ye.symlink("/dev/tty1","/dev/stderr"),ye.open("/dev/stdin",0),ye.open("/dev/stdout",1),ye.open("/dev/stderr",1)},ensureErrnoError:()=>{ye.ErrnoError||(ye.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ye.ErrnoError.prototype=new Error,ye.ErrnoError.prototype.constructor=ye.ErrnoError,[44].forEach((e=>{ye.genericErrors[e]=new ye.ErrnoError(e),ye.genericErrors[e].stack=""})))},staticInit:()=>{ye.ensureErrnoError(),ye.nameTable=new Array(4096),ye.mount(me,{},"/"),ye.createDefaultDirectories(),ye.createDefaultDevices(),ye.createSpecialDirectories(),ye.filesystems={MEMFS:me}},init:(e,t,s)=>{ye.init.initialized=!0,ye.ensureErrnoError(),A.stdin=e||A.stdin,A.stdout=t||A.stdout,A.stderr=s||A.stderr,ye.createStandardStreams()},quit:()=>{ye.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=ye.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=ye.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=ye.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=ue.basename(e),i=ye.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:ye.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=ue.join2(e,o);try{ye.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=ue.join2("string"==typeof e?e:ye.getPath(e),t),n=ye.getMode(i,r);return ye.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:ye.getPath(e),n=t?ue.join2(e,t):e);var a=ye.getMode(i,r),l=ye.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=ue.join2("string"==typeof e?e:ye.getPath(e),t),o=ye.getMode(!!s,!!i);ye.createDevice.major||(ye.createDevice.major=64);var n=ye.makedev(ye.createDevice.major++,0);return ye.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=de(u(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ye.ErrnoError(29)}},createLazyFile:(e,s,i,r,o)=>{function n(){this.lengthKnown=!1,this.chunks=[]}if(n.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",i,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+i+". Status: "+e.status);var t,s=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=s);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,s-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>s-1)throw new Error("only "+s+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",i,!1),s!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+i+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):de(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&s||(n=s=1,s=this.getter(0).length,n=s,P("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=s,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!g)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:a}}else l={isDevice:!1,url:i};var h=ye.createFile(e,s,l,r,o);l.contents?h.contents=l.contents:l.url&&(h.contents=null,h.url=l.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var c={};function A(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=h.stream_ops[e];c[e]=function(){return ye.forceLoadFile(h),t.apply(null,arguments)}})),c.read=(e,t,s,i,r)=>(ye.forceLoadFile(h),A(e,t,s,i,r)),c.mmap=(e,s,i,r,o)=>{ye.forceLoadFile(h);var n=Ee();if(!n)throw new ye.ErrnoError(48);return A(e,t(),n,s,i),{ptr:n,allocated:!0}},h.stream_ops=c,h},createPreloadedFile:(e,t,s,i,r,o,n,a,l,h)=>{var c=t?pe.resolve(ue.join2(e,t)):e;function A(s){function A(s){h&&h(),a||ye.createDataFile(e,t,s,i,r,l),o&&o(),ne()}Browser.handledByPreloadPlugin(s,c,A,(()=>{n&&n(),ne()}))||A(s)}oe(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;p(e,(s=>{w(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&ne()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&oe()}(s,(e=>A(e)),n):A(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{P("creating db"),r.result.createObjectStore(ye.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([ye.DB_STORE_NAME],"readwrite"),o=i.objectStore(ye.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(ye.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=ye.indexedDB();try{var r=i.open(ye.DB_NAME(),ye.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([ye.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(ye.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{ye.analyzePath(e).exists&&ye.unlink(e),ye.createDataFile(ue.dirname(e),ue.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},ge={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(ue.isAbs(t))return t;var i;if(i=-100===e?ye.cwd():ge.getStreamFromFD(e).path,0==t.length){if(!s)throw new ye.ErrnoError(44);return i}return ue.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&ue.normalize(t)!==ue.normalize(ye.getPath(e.node)))return-54;throw e}n()[s>>>2]=i.dev,n()[s+8>>>2]=i.ino,n()[s+12>>>2]=i.mode,a()[s+16>>>2]=i.nlink,n()[s+20>>>2]=i.uid,n()[s+24>>>2]=i.gid,n()[s+28>>>2]=i.rdev,se=[i.size>>>0,(te=i.size,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+40>>>2]=se[0],n()[s+44>>>2]=se[1],n()[s+48>>>2]=4096,n()[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),l=i.ctime.getTime();return se=[Math.floor(r/1e3)>>>0,(te=Math.floor(r/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+56>>>2]=se[0],n()[s+60>>>2]=se[1],a()[s+64>>>2]=r%1e3*1e3,se=[Math.floor(o/1e3)>>>0,(te=Math.floor(o/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+72>>>2]=se[0],n()[s+76>>>2]=se[1],a()[s+80>>>2]=o%1e3*1e3,se=[Math.floor(l/1e3)>>>0,(te=Math.floor(l/1e3),+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+88>>>2]=se[0],n()[s+92>>>2]=se[1],a()[s+96>>>2]=l%1e3*1e3,se=[i.ino>>>0,(te=i.ino,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[s+104>>>2]=se[0],n()[s+108>>>2]=se[1],0},doMsync:function(e,t,s,r,o){if(!ye.isFile(t.node.mode))throw new ye.ErrnoError(43);if(2&r)return 0;e>>>=0;var n=i().slice(e,e+s);ye.msync(t,n,o,s,r)},varargs:void 0,get:function(){return ge.varargs+=4,n()[ge.varargs-4>>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=ye.getStream(e);if(!t)throw new ye.ErrnoError(8);return t}};function Ie(e){if(v)return ls(1,1,e);b=e,J()||(Te.terminateAllThreads(),A.onExit&&A.onExit(e),S=!0),m(e,new ce(e))}var ve=function(e,t){if(b=e,!t&&v)throw Re(e),"unwind";Ie(e)},Te={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){v?Te.initWorker():Te.initMainThread()},initMainThread:function(){for(var e=navigator.hardwareConcurrency;e--;)Te.allocateUnusedWorker()},initWorker:function(){O=!1},setExitStatus:function(e){b=e},terminateAllThreads:function(){for(var e of Object.values(Te.pthreads))Te.returnWorkerToPool(e);for(var e of Te.unusedWorkers)e.terminate();Te.unusedWorkers=[]},returnWorkerToPool:function(e){var t=e.pthread_ptr;delete Te.pthreads[t],Te.unusedWorkers.push(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Fs(t)},receiveObjectTransfer:function(e){},threadInitTLS:function(){Te.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=s=>{var i,r=s.data,o=r.cmd;if(e.pthread_ptr&&(Te.currentProxiedOperationCallerThread=e.pthread_ptr),r.targetThread&&r.targetThread!=Os()){var n=Te.pthreads[r.targetThread];return n?n.postMessage(r,r.transferList):D('Internal error! Worker sent a message "'+o+'" to target pthread '+r.targetThread+", but that thread no longer exists!"),void(Te.currentProxiedOperationCallerThread=void 0)}"processProxyingQueue"===o?ts(r.queue):"spawnThread"===o?function(e){var t=Te.getNewWorker();if(!t)return 6;Te.runningWorkers.push(t),Te.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var s={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};t.postMessage(s,e.transferList)}(r):"cleanupThread"===o?Ae(r.thread):"killThread"===o?function(e){var t=Te.pthreads[e];delete Te.pthreads[e],t.terminate(),Fs(e),Te.runningWorkers.splice(Te.runningWorkers.indexOf(t),1),t.pthread_ptr=0}(r.thread):"cancelThread"===o?(i=r.thread,Te.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"print"===o?P("Thread "+r.threadId+": "+r.text):"printErr"===o?D("Thread "+r.threadId+": "+r.text):"alert"===o?alert("Thread "+r.threadId+": "+r.text):"setimmediate"===r.target?e.postMessage(r):"callHandler"===o?A[r.handler](...r.args):o&&D("worker sent an unknown command "+o),Te.currentProxiedOperationCallerThread=void 0},e.onerror=e=>{throw D("worker sent an error! "+e.filename+":"+e.lineno+": "+e.message),e};var i=[];for(var r of["onExit","onAbort","print","printErr"])A.hasOwnProperty(r)&&i.push(r);e.postMessage({cmd:"load",handlers:i,urlOrBlob:A.mainScriptUrlOrBlob||s,wasmMemory:N,wasmModule:C})})),loadWasmModuleToAllWorkers:function(e){if(v)return e();Promise.all(Te.unusedWorkers.map(Te.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker:function(){var e,t=_("web-ifc-mt.worker.js");e=new Worker(t),Te.unusedWorkers.push(e)},getNewWorker:function(){return 0==Te.unusedWorkers.length&&(Te.allocateUnusedWorker(),Te.loadWasmModuleToWorker(Te.unusedWorkers[0])),Te.unusedWorkers.pop()}};function _e(e){for(;e.length>0;)e.shift()(A)}function Re(e){if(v)return ls(2,0,e);try{ve(e)}catch(e){!function(e){if(e instanceof ce||"unwind"==e)return b;m(1,e)}(e)}}A.PThread=Te,A.establishStackSpace=function(){var e=Os(),t=n()[e+52>>>2],s=n()[e+56>>>2];Us(t,t-s),Gs(t)};var Pe=[];function De(e){var t=Pe[e];return t||(e>=Pe.length&&(Pe.length=e+1),Pe[e]=t=K.get(e)),t}function Ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){a()[this.ptr+4>>>2]=e},this.get_type=function(){return a()[this.ptr+4>>>2]},this.set_destructor=function(e){a()[this.ptr+8>>>2]=e},this.get_destructor=function(){return a()[this.ptr+8>>>2]},this.set_refcount=function(e){n()[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){Atomics.add(n(),this.ptr+0>>2,1)},this.release_ref=function(){return 1===Atomics.sub(n(),this.ptr+0>>2,1)},this.set_adjusted_ptr=function(e){a()[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return a()[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Vs(this.get_type()))return a()[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}A.invokeEntryPoint=function(e,t){var s=De(e)(t);J()?Te.setExitStatus(s):Ms(s)};var Ce="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",Oe={};function be(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Se(e){return this.fromWireType(n()[e>>>2])}var we={},xe={},Be={};function Fe(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function Me(e,t){return e=Fe(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Le(e,t){var s=Me(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var Ue=void 0;function He(e){throw new Ue(e)}function Ge(e,t,s){function i(t){var i=s(t);i.length!==e.length&&He("Mismatched type converter count");for(var r=0;r{xe.hasOwnProperty(e)?r[t]=xe[e]:(o.push(e),we.hasOwnProperty(e)||(we[e]=[]),we[e].push((()=>{r[t]=xe[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var ke={};function Ve(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var je=void 0;function Qe(e){for(var t="",s=e;i()[s>>>0];)t+=je[i()[s++>>>0]];return t}var We=void 0;function ze(e){throw new We(e)}function Ke(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ze('type "'+i+'" must have a positive integer typeid pointer'),xe.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ze("Cannot register type '"+i+"' twice")}if(xe[e]=t,delete Be[e],we.hasOwnProperty(e)){var r=we[e];delete we[e],r.forEach((e=>e()))}}function Ye(e){if(!(this instanceof mt))return!1;if(!(e instanceof mt))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function Xe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ze(e){ze(e.$$.ptrType.registeredClass.name+" instance already deleted")}var qe=!1;function Je(e){}function $e(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function et(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=et(e,t,s.baseClass);return null===i?null:s.downcast(i)}var tt={};function st(){return Object.keys(lt).length}function it(){var e=[];for(var t in lt)lt.hasOwnProperty(t)&&e.push(lt[t]);return e}var rt=[];function ot(){for(;rt.length;){var e=rt.pop();e.$$.deleteScheduled=!1,e.delete()}}var nt=void 0;function at(e){nt=e,rt.length&&nt&&nt(ot)}var lt={};function ht(e,t){return t=function(e,t){for(void 0===t&&ze("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),lt[t]}function ct(e,t){return t.ptrType&&t.ptr||He("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&He("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ut(Object.create(e,{$$:{value:t}}))}function At(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=ht(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?ct(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ct(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=tt[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=et(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):ct(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function ut(e){return"undefined"==typeof FinalizationRegistry?(ut=e=>e,e):(qe=new FinalizationRegistry((e=>{$e(e.$$)})),Je=e=>qe.unregister(e),(ut=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};qe.register(e,s,e)}return e})(e))}function pt(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ut(Object.create(Object.getPrototypeOf(this),{$$:{value:Xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function dt(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),Je(this),$e(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ft(){return!this.$$.ptr}function Et(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),rt.push(this),1===rt.length&&nt&&nt(ot),this.$$.deleteScheduled=!0,this}function mt(){}function yt(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ze("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function gt(e,t,s){A.hasOwnProperty(e)?((void 0===s||void 0!==A[e].overloadTable&&void 0!==A[e].overloadTable[s])&&ze("Cannot register public name '"+e+"' twice"),yt(A,e,e),A.hasOwnProperty(s)&&ze("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),A[e].overloadTable[s]=t):(A[e]=t,void 0!==s&&(A[e].numArguments=s))}function It(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function vt(e,t,s){for(;t!==s;)t.upcast||ze("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Tt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function _t(e,t){var s;if(null===t)return this.isReference&&ze("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=vt(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ze("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ze("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,Vt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ze("Unsupporting sharing policy")}return s}function Rt(e,t){if(null===t)return this.isReference&&ze("null is not a valid "+this.name),0;t.$$||ze('Cannot pass "'+Wt(t)+'" as a '+this.name),t.$$.ptr||ze("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ze("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return vt(t.$$.ptr,s,this.registeredClass)}function Pt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Dt(e){this.rawDestructor&&this.rawDestructor(e)}function Nt(e){null!==e&&e.delete()}function Ct(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=_t:i?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=Rt,this.destructorFunction=null)}function Ot(e,t,s){A.hasOwnProperty(e)||He("Replacing nonexistant public symbol"),void 0!==A[e].overloadTable&&void 0!==s?A[e].overloadTable[s]=t:(A[e]=t,A[e].argCount=s)}function bt(e,t,s){return e.includes("j")?function(e,t,s){var i=A["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):De(t).apply(null,s)}function St(e,t){var s,i,r,o=(e=Qe(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),bt(s,i,r)}):De(t);return"function"!=typeof o&&ze("unknown function pointer with signature "+e+": "+t),o}var wt=void 0;function xt(e){var t=bs(e),s=Qe(t);return Ls(t),s}function Bt(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||xe[t]||(Be[t]?Be[t].forEach(e):(s.push(t),i[t]=!0))})),new wt(e+": "+s.map(xt).join([", "]))}function Ft(e,t){for(var s=[],i=0;i>>2]);return s}function Mt(e,t,s,i,r){var o=t.length;o<2&&ze("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--Ut[e].refcount&&(Ut[e]=void 0,Lt.push(e))}function Gt(){for(var e=0,t=5;t(e||ze("Cannot use deleted val. handle = "+e),Ut[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Lt.length?Lt.pop():Ut.length;return Ut[t]={refcount:1,value:e},t}}};function jt(e,s,l){switch(s){case 0:return function(e){var s=l?t():i();return this.fromWireType(s[e>>>0])};case 1:return function(e){var t=l?r():o();return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=l?n():a();return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function Qt(e,t){var s=xe[e];return void 0===s&&ze(t+" has unknown type "+xt(e)),s}function Wt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function zt(e,t){switch(t){case 2:return function(e){return this.fromWireType((N.buffer!=x.buffer&&z(),H)[e>>>2])};case 3:return function(e){return this.fromWireType(l()[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Kt(e,s,l){switch(s){case 0:return l?function(e){return t()[e>>>0]}:function(e){return i()[e>>>0]};case 1:return l?function(e){return r()[e>>>1]}:function(e){return o()[e>>>1]};case 2:return l?function(e){return n()[e>>>2]}:function(e){return a()[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Yt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Xt(e,t){for(var s=e,n=s>>1,a=n+t/2;!(n>=a)&&o()[n>>>0];)++n;if((s=n<<1)-e>32&&Yt)return Yt.decode(i().slice(e,s));for(var l="",h=0;!(h>=t/2);++h){var c=r()[e+2*h>>>1];if(0==c)break;l+=String.fromCharCode(c)}return l}function Zt(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,o=(s-=2)<2*e.length?s/2:e.length,n=0;n>>1]=a,t+=2}return r()[t>>>1]=0,t-i}function qt(e){return 2*e.length}function Jt(e,t){for(var s=0,i="";!(s>=t/4);){var r=n()[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function $t(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),n()[t>>>2]=a,(t+=4)+4>r)break}return n()[t>>>2]=0,t-i}function es(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}function ts(e){Atomics.store(n(),e>>2,1),Os()&&Bs(e),Atomics.compareExchange(n(),e>>2,1,0)}A.executeNotifiedProxyingQueue=ts;var ss,is={};function rs(e){var t=is[e];return void 0===t?Qe(e):t}function os(){return"object"==typeof globalThis?globalThis:Function("return this")()}function ns(e){ns.shown||(ns.shown={}),ns.shown[e]||(ns.shown[e]=1,D(e))}function as(e){var t=Hs(),s=e();return Gs(t),s}function ls(e,t){var s=arguments.length-2,i=arguments;return as((()=>{for(var r=s,o=ks(8*r),n=o>>3,a=0;a>>0]=h}return xs(e,r,o,t)}))}ss=()=>performance.timeOrigin+performance.now();var hs=[];function cs(e){var t=N.buffer;try{return N.grow(e-t.byteLength+65535>>>16),z(),1}catch(e){}}var As={};function us(){if(!us.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:E||"./this.program"};for(var t in As)void 0===As[t]?delete e[t]:e[t]=As[t];var s=[];for(var t in e)s.push(t+"="+e[t]);us.strings=s}return us.strings}function ps(e,s){if(v)return ls(3,1,e,s);var i=0;return us().forEach((function(r,o){var n=s+i;a()[e+4*o>>>2]=n,function(e,s,i){for(var r=0;r>>0]=e.charCodeAt(r);i||(t()[s>>>0]=0)}(r,n),i+=r.length+1})),0}function ds(e,t){if(v)return ls(4,1,e,t);var s=us();a()[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),a()[t>>>2]=i,0}function fs(e){if(v)return ls(5,1,e);try{var t=ge.getStreamFromFD(e);return ye.close(t),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function Es(e,s,i,r){if(v)return ls(6,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.read(e,t(),l,h,r);if(c<0)return-1;if(o+=c,c>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function ms(e,t,s,i,r){if(v)return ls(7,1,e,t,s,i,r);try{var o=(h=s)+2097152>>>0<4194305-!!(l=t)?(l>>>0)+4294967296*h:NaN;if(isNaN(o))return 61;var a=ge.getStreamFromFD(e);return ye.llseek(a,o,i),se=[a.position>>>0,(te=a.position,+Math.abs(te)>=1?te>0?(0|Math.min(+Math.floor(te/4294967296),4294967295))>>>0:~~+Math.ceil((te-+(~~te>>>0))/4294967296)>>>0:0)],n()[r>>>2]=se[0],n()[r+4>>>2]=se[1],a.getdents&&0===o&&0===i&&(a.getdents=null),0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}var l,h}function ys(e,s,i,r){if(v)return ls(8,1,e,s,i,r);try{var o=function(e,s,i,r){for(var o=0,n=0;n>>2],h=a()[s+4>>>2];s+=8;var c=ye.write(e,t(),l,h,r);if(c<0)return-1;o+=c,void 0!==r&&(r+=c)}return o}(ge.getStreamFromFD(e),s,i);return a()[r>>>2]=o,0}catch(e){if(void 0===ye||!(e instanceof ye.ErrnoError))throw e;return e.errno}}function gs(e){return e%4==0&&(e%100!=0||e%400==0)}var Is=[31,29,31,30,31,30,31,31,30,31,30,31],vs=[31,28,31,30,31,30,31,31,30,31,30,31];function Ts(e,s,i,r){var o=n()[r+40>>>2],a={tm_sec:n()[r>>>2],tm_min:n()[r+4>>>2],tm_hour:n()[r+8>>>2],tm_mday:n()[r+12>>>2],tm_mon:n()[r+16>>>2],tm_year:n()[r+20>>>2],tm_wday:n()[r+24>>>2],tm_yday:n()[r+28>>>2],tm_isdst:n()[r+32>>>2],tm_gmtoff:n()[r+36>>>2],tm_zone:o?j(o):""},l=j(i),h={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in h)l=l.replace(new RegExp(c,"g"),h[c]);var A=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function E(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=gs(s.getFullYear()),r=s.getMonth(),o=(i?Is:vs)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=E(s),o=E(i);return f(r,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(e){return A[e.tm_wday].substring(0,3)},"%A":function(e){return A[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return p(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(gs(e.tm_year+1900)?Is:vs,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&gs(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&gs(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in l=l.replace(/%%/g,"\0\0"),y)l.includes(c)&&(l=l.replace(new RegExp(c,"g"),y[c](a)));var g,I,v=de(l=l.replace(/\0\0/g,"%"),!1);return v.length>s?0:(g=v,I=e,t().set(g,I>>>0),v.length-1)}Te.init();var _s=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ye.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Rs=365,Ps=146;Object.defineProperties(_s.prototype,{read:{get:function(){return(this.mode&Rs)===Rs},set:function(e){e?this.mode|=Rs:this.mode&=-366}},write:{get:function(){return(this.mode&Ps)===Ps},set:function(e){e?this.mode|=Ps:this.mode&=-147}},isFolder:{get:function(){return ye.isDir(this.mode)}},isDevice:{get:function(){return ye.isChrdev(this.mode)}}}),ye.FSNode=_s,ye.staticInit(),Ue=A.InternalError=Le(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);je=e}(),We=A.BindingError=Le(Error,"BindingError"),mt.prototype.isAliasOf=Ye,mt.prototype.clone=pt,mt.prototype.delete=dt,mt.prototype.isDeleted=ft,mt.prototype.deleteLater=Et,A.getInheritedInstanceCount=st,A.getLiveInheritedInstances=it,A.flushPendingDeletes=ot,A.setDelayFunction=at,Ct.prototype.getPointee=Pt,Ct.prototype.destructor=Dt,Ct.prototype.argPackAdvance=8,Ct.prototype.readValueFromPointer=Se,Ct.prototype.deleteObject=Nt,Ct.prototype.fromWireType=At,wt=A.UnboundTypeError=Le(Error,"UnboundTypeError"),A.count_emval_handles=Gt,A.get_first_emval=kt;var Ds=[null,Ie,Re,ps,ds,fs,Es,ms,ys],Ns={g:function(e,t,s){throw new Ne(e).init(t,s),e},T:function(e){Ss(e,!g,1,!y),Te.threadInitTLS()},J:function(e){v?postMessage({cmd:"cleanupThread",thread:e}):Ae(e)},X:function(e){},_:function(e){ae(Ce)},Z:function(e,t){ae(Ce)},da:function(e){var t=Oe[e];delete Oe[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;Ge([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),be(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>l])},destructorFunction:null})},p:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=Qe(c),o=St(r,o),a&&(a=St(n,a)),h&&(h=St(l,h)),u=St(A,u);var p=Fe(c);gt(p,(function(){Bt("Cannot construct "+c+" due to unbound types",[i])})),Ge([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:mt.prototype;var n=Me(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new We("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new We(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new We("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new It(c,n,l,u,s,o,a,h),d=new Ct(c,A,!0,!1,!1),f=new Ct(c+"*",A,!1,!1,!1),E=new Ct(c+" const*",A,!1,!0,!1);return tt[e]={pointerType:f,constPointerType:E},Ot(p,n),[d,f,E]}))},o:function(e,t,s,i,r,o){w(t>0);var n=Ft(t,s);r=St(i,r),Ge([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new We("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Bt("Cannot construct "+e.name+" due to unbound types",n)},Ge([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Mt(s,i,null,r,o),[]})),[]}))},c:function(e,t,s,i,r,o,n,a){var l=Ft(s,i);t=Qe(t),o=St(r,o),Ge([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){Bt("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(yt(h,t,i),h[t].overloadTable[s-2]=r),Ge([],l,(function(r){var a=Mt(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},aa:function(e,t){Ke(e,{name:t=Qe(t),fromWireType:function(e){var t=Vt.toValue(e);return Ht(e),t},toWireType:function(e,t){return Vt.toHandle(t)},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:null})},D:function(e,t,s,i){var r=Ve(s);function o(){}t=Qe(t),o.values={},Ke(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:jt(t,r,i),destructorFunction:null}),gt(t,o)},t:function(e,t,s){var i=Qt(e,"enum");t=Qe(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:Me(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},B:function(e,t,s){var i=Ve(s);Ke(e,{name:t=Qe(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,i),destructorFunction:null})},d:function(e,t,s,i,r,o){var n=Ft(t,s);e=Qe(e),r=St(i,r),gt(e,(function(){Bt("Cannot call "+e+" due to unbound types",n)}),t-1),Ge([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ot(e,Mt(e,i,null,r,o),t-1),[]}))},s:function(e,t,s,i,r){t=Qe(t);var o=Ve(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ke(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Kt(t,o,0!==i),destructorFunction:null})},i:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){e>>=2;var t=a(),s=t[e>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ke(e,{name:s=Qe(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},C:function(e,t){var s="std::string"===(t=Qe(t));Ke(e,{name:t,fromWireType:function(e){var t,r=a()[e>>>2],o=e+4;if(s)for(var n=o,l=0;l<=r;++l){var h=o+l;if(l==r||0==i()[h>>>0]){var c=j(n,h-n);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),n=h+1}}else{var A=new Array(r);for(l=0;l>>0]);t=A.join("")}return Ls(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ze("Cannot pass non-string to std::string"),r=s&&o?W(t):t.length;var n,l,h=Cs(4+r+1),c=h+4;if(c>>>=0,a()[h>>>2]=r,s&&o)n=c,l=r+1,Q(t,i(),n,l);else if(o)for(var A=0;A255&&(Ls(c),ze("String has UTF-16 code units that do not fit in 8 bits")),i()[c+A>>>0]=u}else for(A=0;A>>0]=t[A];return null!==e&&e.push(Ls,h),h},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},x:function(e,t,s){var i,r,n,l,h;s=Qe(s),2===t?(i=Xt,r=Zt,l=qt,n=()=>o(),h=1):4===t&&(i=Jt,r=$t,l=es,n=()=>a(),h=2),Ke(e,{name:s,fromWireType:function(e){for(var s,r=a()[e>>>2],o=n(),l=e+4,c=0;c<=r;++c){var A=e+4+c*t;if(c==r||0==o[A>>>h]){var u=i(l,A-l);void 0===s?s=u:(s+=String.fromCharCode(0),s+=u),l=A+t}}return Ls(e),s},toWireType:function(e,i){"string"!=typeof i&&ze("Cannot pass non-string to C++ string type "+s);var o=l(i),n=Cs(4+o+t);return n>>>=0,a()[n>>>2]=o>>h,r(i,n+4,o+t),null!==e&&e.push(Ls,n),n},argPackAdvance:8,readValueFromPointer:Se,destructorFunction:function(e){Ls(e)}})},ea:function(e,t,s,i,r,o){Oe[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),elements:[]}},j:function(e,t,s,i,r,o,n,a,l){Oe[e].elements.push({getterReturnType:t,getter:St(s,i),getterContext:r,setterArgumentType:o,setter:St(n,a),setterContext:l})},r:function(e,t,s,i,r,o){ke[e]={name:Qe(t),rawConstructor:St(s,i),rawDestructor:St(r,o),fields:[]}},f:function(e,t,s,i,r,o,n,a,l,h){ke[e].fields.push({fieldName:Qe(t),getterReturnType:s,getter:St(i,r),getterContext:o,setterArgumentType:n,setter:St(a,l),setterContext:h})},ca:function(e,t){Ke(e,{isVoid:!0,name:t=Qe(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},Y:function(e){D(j(e))},V:function(e,t,s,i){if(e==t)setTimeout((()=>ts(i)));else if(v)postMessage({targetThread:e,cmd:"processProxyingQueue",queue:i});else{var r=Te.pthreads[e];if(!r)return;r.postMessage({cmd:"processProxyingQueue",queue:i})}return 1},S:function(e,t,s){return-1},n:function(e,t,s){e=Vt.toValue(e),t=Qt(t,"emval::as");var i=[],r=Vt.toHandle(i);return a()[s>>>2]=r,t.toWireType(i,e)},z:function(e,t,s,i){e=Vt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(Ut[e].refcount+=1)},ga:function(e,t){return(e=Vt.toValue(e))instanceof(t=Vt.toValue(t))},y:function(e){return"number"==typeof(e=Vt.toValue(e))},E:function(e){return"string"==typeof(e=Vt.toValue(e))},fa:function(){return Vt.toHandle([])},h:function(e){return Vt.toHandle(rs(e))},w:function(){return Vt.toHandle({})},m:function(e){be(Vt.toValue(e)),Ht(e)},k:function(e,t,s){e=Vt.toValue(e),t=Vt.toValue(t),s=Vt.toValue(s),e[t]=s},e:function(e,t){var s=(e=Qt(e,"_emval_take_value")).readValueFromPointer(t);return Vt.toHandle(s)},A:function(){ae("")},U:function(){g||ns("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},v:ss,W:function(e,t,s){i().copyWithin(e>>>0,t>>>0,t+s>>>0)},R:function(e,t,s){hs.length=t;for(var i=s>>3,r=0;r>>0];return Ds[e].apply(null,hs)},P:function(e){var t=i().length;if((e>>>=0)<=t)return!1;var s,r,o=4294901760;if(e>o)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);if(a=Math.min(a,e+100663296),cs(Math.min(o,(s=Math.max(e,a))+((r=65536)-s%r)%r)))return!0}return!1},$:function(){throw"unwind"},L:ps,M:ds,I:ve,N:fs,O:Es,G:ms,Q:ys,a:N||A.wasmMemory,K:function(e,t,s,i,r){return Ts(e,t,s,i)}};!function(){var e={a:Ns};function t(e,t){var s,i,r=e.exports;A.asm=r,s=A.asm.ka,Te.tlsInitFunctions.push(s),K=A.asm.ia,i=A.asm.ha,Z.unshift(i),C=t,Te.loadWasmModuleToAllWorkers((()=>ne()))}function s(e){t(e.instance,e.module)}function i(t){return(R||!y&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return he(ee)})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return he(ee)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){D("failed to asynchronously prepare wasm: "+e),ae(e)}))}if(oe(),A.instantiateWasm)try{return A.instantiateWasm(e,t)}catch(e){D("Module.instantiateWasm callback failed with error: "+e),c(e)}(R||"function"!=typeof WebAssembly.instantiateStreaming||le(ee)||"function"!=typeof fetch?i(s):fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return D("wasm streaming compile failed: "+e),D("falling back to ArrayBuffer instantiation"),i(s)}))}))).catch(c)}();var Cs=function(){return(Cs=A.asm.ja).apply(null,arguments)};A.__emscripten_tls_init=function(){return(A.__emscripten_tls_init=A.asm.ka).apply(null,arguments)};var Os=A._pthread_self=function(){return(Os=A._pthread_self=A.asm.la).apply(null,arguments)},bs=A.___getTypeName=function(){return(bs=A.___getTypeName=A.asm.ma).apply(null,arguments)};A.__embind_initialize_bindings=function(){return(A.__embind_initialize_bindings=A.asm.na).apply(null,arguments)};var Ss=A.__emscripten_thread_init=function(){return(Ss=A.__emscripten_thread_init=A.asm.oa).apply(null,arguments)};A.__emscripten_thread_crashed=function(){return(A.__emscripten_thread_crashed=A.asm.pa).apply(null,arguments)};var ws,xs=function(){return(xs=A.asm.qa).apply(null,arguments)},Bs=A.__emscripten_proxy_execute_task_queue=function(){return(Bs=A.__emscripten_proxy_execute_task_queue=A.asm.ra).apply(null,arguments)},Fs=function(){return(Fs=A.asm.sa).apply(null,arguments)},Ms=A.__emscripten_thread_exit=function(){return(Ms=A.__emscripten_thread_exit=A.asm.ta).apply(null,arguments)},Ls=function(){return(Ls=A.asm.ua).apply(null,arguments)},Us=function(){return(Us=A.asm.va).apply(null,arguments)},Hs=function(){return(Hs=A.asm.wa).apply(null,arguments)},Gs=function(){return(Gs=A.asm.xa).apply(null,arguments)},ks=function(){return(ks=A.asm.ya).apply(null,arguments)},Vs=function(){return(Vs=A.asm.za).apply(null,arguments)};function js(){if(!(ie>0)){if(v)return h(A),$(),void startWorker(A);!function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)e=A.preRun.shift(),X.unshift(e);var e;_e(X)}(),ie>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e())}function e(){ws||(ws=!0,A.calledRun=!0,S||($(),h(A),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(!v){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)e=A.postRun.shift(),q.unshift(e);var e;_e(q)}}()))}}if(A.dynCall_jiji=function(){return(A.dynCall_jiji=A.asm.Aa).apply(null,arguments)},A.dynCall_viijii=function(){return(A.dynCall_viijii=A.asm.Ba).apply(null,arguments)},A.dynCall_iiiiij=function(){return(A.dynCall_iiiiij=A.asm.Ca).apply(null,arguments)},A.dynCall_iiiiijj=function(){return(A.dynCall_iiiiijj=A.asm.Da).apply(null,arguments)},A.dynCall_iiiiiijj=function(){return(A.dynCall_iiiiiijj=A.asm.Ea).apply(null,arguments)},A.keepRuntimeAlive=J,A.wasmMemory=N,A.ExitStatus=ce,A.PThread=Te,re=function e(){ws||js(),ws||(re=e)},A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return js(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),EI=dI({"dist/web-ifc.js"(e,t){var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,i,r=void 0!==e?e:{};r.ready=new Promise((function(e,s){t=e,i=s}));var o,n,a=Object.assign({},r),l="./this.program",h="";"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),s&&(h=s),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},n=(e,t,s)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):s()},i.onerror=s,i.send(null)};var c,A,u=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments,r.thisProgram&&(l=r.thisProgram),r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var d=!1;function f(e,t){e||V(t)}var E,m,y,g,I,v,T,_,R,P="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(e,t,s){for(var i=(t>>>=0)+s,r=t;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&P)return P.decode(e.subarray(t,r));for(var o="";t>10,56320|1023&h)}}else o+=String.fromCharCode((31&n)<<6|a)}else o+=String.fromCharCode(n)}return o}function N(e,t){return(e>>>=0)?D(m,e,t):""}function C(e,t,s,i){if(!(i>0))return 0;for(var r=s>>>=0,o=s+i-1,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),a<=127){if(s>=o)break;t[s++>>>0]=a}else if(a<=2047){if(s+1>=o)break;t[s++>>>0]=192|a>>6,t[s++>>>0]=128|63&a}else if(a<=65535){if(s+2>=o)break;t[s++>>>0]=224|a>>12,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}else{if(s+3>=o)break;t[s++>>>0]=240|a>>18,t[s++>>>0]=128|a>>12&63,t[s++>>>0]=128|a>>6&63,t[s++>>>0]=128|63&a}}return t[s>>>0]=0,s-r}function O(e){for(var t=0,s=0;s=55296&&i<=57343?(t+=4,++s):t+=3}return t}function b(){var e=A.buffer;r.HEAP8=E=new Int8Array(e),r.HEAP16=y=new Int16Array(e),r.HEAP32=I=new Int32Array(e),r.HEAPU8=m=new Uint8Array(e),r.HEAPU16=g=new Uint16Array(e),r.HEAPU32=v=new Uint32Array(e),r.HEAPF32=T=new Float32Array(e),r.HEAPF64=_=new Float64Array(e)}var S,w,x,B,F=[],M=[],L=[],U=0,H=null;function G(e){U++,r.monitorRunDependencies&&r.monitorRunDependencies(U)}function k(e){if(U--,r.monitorRunDependencies&&r.monitorRunDependencies(U),0==U&&H){var t=H;H=null,t()}}function V(e){r.onAbort&&r.onAbort(e),p(e="Aborted("+e+")"),d=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}function j(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){try{if(e==S&&c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){V(e)}}function W(e){for(;e.length>0;)e.shift()(r)}function z(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){v[this.ptr+4>>>2]=e},this.get_type=function(){return v[this.ptr+4>>>2]},this.set_destructor=function(e){v[this.ptr+8>>>2]=e},this.get_destructor=function(){return v[this.ptr+8>>>2]},this.set_refcount=function(e){I[this.ptr>>>2]=e},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=I[this.ptr>>>2];I[this.ptr>>>2]=e+1},this.release_ref=function(){var e=I[this.ptr>>>2];return I[this.ptr>>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){v[this.ptr+16>>>2]=e},this.get_adjusted_ptr=function(){return v[this.ptr+16>>>2]},this.get_exception_ptr=function(){if(Kt(this.get_type()))return v[this.excPtr>>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}j(S="web-ifc.wasm")||(w=S,S=r.locateFile?r.locateFile(w,h):h+w);var K={};function Y(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function X(e){return this.fromWireType(I[e>>>2])}var Z={},q={},J={};function $(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function ee(e,t){return e=$(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function te(e,t){var s=ee(t,(function(e){this.name=t,this.message=e;var s=new Error(e).stack;void 0!==s&&(this.stack=this.toString()+"\n"+s.replace(/^Error(:[^\n]*)?\n/,""))}));return s.prototype=Object.create(e.prototype),s.prototype.constructor=s,s.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},s}var se=void 0;function ie(e){throw new se(e)}function re(e,t,s){function i(t){var i=s(t);i.length!==e.length&&ie("Mismatched type converter count");for(var r=0;r{q.hasOwnProperty(e)?r[t]=q[e]:(o.push(e),Z.hasOwnProperty(e)||(Z[e]=[]),Z[e].push((()=>{r[t]=q[e],++n===o.length&&i(r)})))})),0===o.length&&i(r)}var oe={};function ne(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ae=void 0;function le(e){for(var t="",s=e;m[s>>>0];)t+=ae[m[s++>>>0]];return t}var he=void 0;function ce(e){throw new he(e)}function Ae(e,t,s={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var i=t.name;if(e||ce('type "'+i+'" must have a positive integer typeid pointer'),q.hasOwnProperty(e)){if(s.ignoreDuplicateRegistrations)return;ce("Cannot register type '"+i+"' twice")}if(q[e]=t,delete J[e],Z.hasOwnProperty(e)){var r=Z[e];delete Z[e],r.forEach((e=>e()))}}function ue(e){if(!(this instanceof Fe))return!1;if(!(e instanceof Fe))return!1;for(var t=this.$$.ptrType.registeredClass,s=this.$$.ptr,i=e.$$.ptrType.registeredClass,r=e.$$.ptr;t.baseClass;)s=t.upcast(s),t=t.baseClass;for(;i.baseClass;)r=i.upcast(r),i=i.baseClass;return t===i&&s===r}function pe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function de(e){ce(e.$$.ptrType.registeredClass.name+" instance already deleted")}var fe=!1;function Ee(e){}function me(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function ye(e,t,s){if(t===s)return e;if(void 0===s.baseClass)return null;var i=ye(e,t,s.baseClass);return null===i?null:s.downcast(i)}var ge={};function Ie(){return Object.keys(De).length}function ve(){var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e}var Te=[];function _e(){for(;Te.length;){var e=Te.pop();e.$$.deleteScheduled=!1,e.delete()}}var Re=void 0;function Pe(e){Re=e,Te.length&&Re&&Re(_e)}var De={};function Ne(e,t){return t=function(e,t){for(void 0===t&&ce("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),De[t]}function Ce(e,t){return t.ptrType&&t.ptr||ie("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&ie("Both smartPtrType and smartPtr must be specified"),t.count={value:1},be(Object.create(e,{$$:{value:t}}))}function Oe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var s=Ne(this.registeredClass,t);if(void 0!==s){if(0===s.$$.count.value)return s.$$.ptr=t,s.$$.smartPtr=e,s.clone();var i=s.clone();return this.destructor(e),i}function r(){return this.isSmartPointer?Ce(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ce(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,n=this.registeredClass.getActualType(t),a=ge[n];if(!a)return r.call(this);o=this.isConst?a.constPointerType:a.pointerType;var l=ye(t,this.registeredClass,o.registeredClass);return null===l?r.call(this):this.isSmartPointer?Ce(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):Ce(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function be(e){return"undefined"==typeof FinalizationRegistry?(be=e=>e,e):(fe=new FinalizationRegistry((e=>{me(e.$$)})),Ee=e=>fe.unregister(e),(be=e=>{var t=e.$$;if(t.smartPtr){var s={$$:t};fe.register(e,s,e)}return e})(e))}function Se(){if(this.$$.ptr||de(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=be(Object.create(Object.getPrototypeOf(this),{$$:{value:pe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function we(){this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Ee(this),me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function xe(){return!this.$$.ptr}function Be(){return this.$$.ptr||de(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Te.push(this),1===Te.length&&Re&&Re(_e),this.$$.deleteScheduled=!0,this}function Fe(){}function Me(e,t,s){if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ce("Function '"+s+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}}function Le(e,t,s){r.hasOwnProperty(e)?((void 0===s||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[s])&&ce("Cannot register public name '"+e+"' twice"),Me(r,e,e),r.hasOwnProperty(s)&&ce("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),r[e].overloadTable[s]=t):(r[e]=t,void 0!==s&&(r[e].numArguments=s))}function Ue(e,t,s,i,r,o,n,a){this.name=e,this.constructor=t,this.instancePrototype=s,this.rawDestructor=i,this.baseClass=r,this.getActualType=o,this.upcast=n,this.downcast=a,this.pureVirtualFunctions=[]}function He(e,t,s){for(;t!==s;)t.upcast||ce("Expected null or instance of "+s.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Ge(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function ke(e,t){var s;if(null===t)return this.isReference&&ce("null is not a valid "+this.name),this.isSmartPointer?(s=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,s),s):0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var i=t.$$.ptrType.registeredClass;if(s=He(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?s=t.$$.smartPtr:ce("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:s=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)s=t.$$.smartPtr;else{var r=t.clone();s=this.rawShare(s,lt.toHandle((function(){r.delete()}))),null!==e&&e.push(this.rawDestructor,s)}break;default:ce("Unsupporting sharing policy")}return s}function Ve(e,t){if(null===t)return this.isReference&&ce("null is not a valid "+this.name),0;t.$$||ce('Cannot pass "'+At(t)+'" as a '+this.name),t.$$.ptr||ce("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&ce("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var s=t.$$.ptrType.registeredClass;return He(t.$$.ptr,s,this.registeredClass)}function je(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Qe(e){this.rawDestructor&&this.rawDestructor(e)}function We(e){null!==e&&e.delete()}function ze(e,t,s,i,r,o,n,a,l,h,c){this.name=e,this.registeredClass=t,this.isReference=s,this.isConst=i,this.isSmartPointer=r,this.pointeeType=o,this.sharingPolicy=n,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=c,r||void 0!==t.baseClass?this.toWireType=ke:i?(this.toWireType=Ge,this.destructorFunction=null):(this.toWireType=Ve,this.destructorFunction=null)}function Ke(e,t,s){r.hasOwnProperty(e)||ie("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==s?r[e].overloadTable[s]=t:(r[e]=t,r[e].argCount=s)}var Ye=[];function Xe(e){var t=Ye[e];return t||(e>=Ye.length&&(Ye.length=e+1),Ye[e]=t=R.get(e)),t}function Ze(e,t,s){return e.includes("j")?function(e,t,s){var i=r["dynCall_"+e];return s&&s.length?i.apply(null,[t].concat(s)):i.call(null,t)}(e,t,s):Xe(t).apply(null,s)}function qe(e,t){var s,i,r,o=(e=le(e)).includes("j")?(s=e,i=t,r=[],function(){return r.length=0,Object.assign(r,arguments),Ze(s,i,r)}):Xe(t);return"function"!=typeof o&&ce("unknown function pointer with signature "+e+": "+t),o}var Je=void 0;function $e(e){var t=Qt(e),s=le(t);return zt(t),s}function et(e,t){var s=[],i={};throw t.forEach((function e(t){i[t]||q[t]||(J[t]?J[t].forEach(e):(s.push(t),i[t]=!0))})),new Je(e+": "+s.map($e).join([", "]))}function tt(e,t){for(var s=[],i=0;i>>2]);return s}function st(e,t,s,i,r){var o=t.length;o<2&&ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var n=null!==t[1]&&null!==s,a=!1,l=1;l0?", ":"")+A),u+=(h?"var rv = ":"")+"invoker(fn"+(A.length>0?", ":"")+A+");\n",a)u+="runDestructors(destructors);\n";else for(l=n?1:2;l4&&0==--rt[e].refcount&&(rt[e]=void 0,it.push(e))}function nt(){for(var e=0,t=5;t(e||ce("Cannot use deleted val. handle = "+e),rt[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=it.length?it.pop():rt.length;return rt[t]={refcount:1,value:e},t}}};function ht(e,t,s){switch(t){case 0:return function(e){var t=s?E:m;return this.fromWireType(t[e>>>0])};case 1:return function(e){var t=s?y:g;return this.fromWireType(t[e>>>1])};case 2:return function(e){var t=s?I:v;return this.fromWireType(t[e>>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function ct(e,t){var s=q[e];return void 0===s&&ce(t+" has unknown type "+$e(e)),s}function At(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function ut(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>>2])};case 3:return function(e){return this.fromWireType(_[e>>>3])};default:throw new TypeError("Unknown float type: "+e)}}function pt(e,t,s){switch(t){case 0:return s?function(e){return E[e>>>0]}:function(e){return m[e>>>0]};case 1:return s?function(e){return y[e>>>1]}:function(e){return g[e>>>1]};case 2:return s?function(e){return I[e>>>2]}:function(e){return v[e>>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var dt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ft(e,t){for(var s=e,i=s>>1,r=i+t/2;!(i>=r)&&g[i>>>0];)++i;if((s=i<<1)-e>32&&dt)return dt.decode(m.subarray(e>>>0,s>>>0));for(var o="",n=0;!(n>=t/2);++n){var a=y[e+2*n>>>1];if(0==a)break;o+=String.fromCharCode(a)}return o}function Et(e,t,s){if(void 0===s&&(s=2147483647),s<2)return 0;for(var i=t,r=(s-=2)<2*e.length?s/2:e.length,o=0;o>>1]=n,t+=2}return y[t>>>1]=0,t-i}function mt(e){return 2*e.length}function yt(e,t){for(var s=0,i="";!(s>=t/4);){var r=I[e+4*s>>>2];if(0==r)break;if(++s,r>=65536){var o=r-65536;i+=String.fromCharCode(55296|o>>10,56320|1023&o)}else i+=String.fromCharCode(r)}return i}function gt(e,t,s){if(void 0===s&&(s=2147483647),s<4)return 0;for(var i=t>>>=0,r=i+s-4,o=0;o=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++o)),I[t>>>2]=n,(t+=4)+4>r)break}return I[t>>>2]=0,t-i}function It(e){for(var t=0,s=0;s=55296&&i<=57343&&++s,t+=4}return t}var vt={};function Tt(e){var t=vt[e];return void 0===t?le(e):t}function _t(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Rt(e){var t=A.buffer;try{return A.grow(e-t.byteLength+65535>>>16),b(),1}catch(e){}}var Pt={};function Dt(){if(!Dt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in Pt)void 0===Pt[t]?delete e[t]:e[t]=Pt[t];var s=[];for(var t in e)s.push(t+"="+e[t]);Dt.strings=s}return Dt.strings}var Nt={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var s=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),s++):s&&(e.splice(i,1),s--)}if(t)for(;s;s--)e.unshift("..");return e},normalize:e=>{var t=Nt.isAbs(e),s="/"===e.substr(-1);return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),e||t||(e="."),e&&s&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Nt.splitPath(e),s=t[0],i=t[1];return s||i?(i&&(i=i.substr(0,i.length-1)),s+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Nt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Nt.normalize(e.join("/"))},join2:(e,t)=>Nt.normalize(e+"/"+t)},Ct={resolve:function(){for(var e="",t=!1,s=arguments.length-1;s>=-1&&!t;s--){var i=s>=0?arguments[s]:xt.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=Nt.isAbs(i)}return e=Nt.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"),(t?"/":"")+e||"."},relative:(e,t)=>{function s(e){for(var t=0;t=0&&""===e[s];s--);return t>s?[]:e.slice(t,s-t+1)}e=Ct.resolve(e).substr(1),t=Ct.resolve(t).substr(1);for(var i=s(e.split("/")),r=s(t.split("/")),o=Math.min(i.length,r.length),n=o,a=0;a0?s:O(e)+1,r=new Array(i),o=C(e,r,0,r.length);return t&&(r.length=o),r}var bt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){bt.ttys[e]={input:[],output:[],ops:t},xt.registerDevice(e,bt.stream_ops)},stream_ops:{open:function(e){var t=bt.ttys[e.node.rdev];if(!t)throw new xt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,s,i,r){if(!e.tty||!e.tty.ops.get_char)throw new xt.ErrnoError(60);for(var o=0,n=0;n0&&(u(D(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(D(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(p(D(e.output,0)),e.output=[])}}};function St(e){V()}var wt={ops_table:null,mount:function(e){return wt.createNode(null,"/",16895,0)},createNode:function(e,t,s,i){if(xt.isBlkdev(s)||xt.isFIFO(s))throw new xt.ErrnoError(63);wt.ops_table||(wt.ops_table={dir:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr,lookup:wt.node_ops.lookup,mknod:wt.node_ops.mknod,rename:wt.node_ops.rename,unlink:wt.node_ops.unlink,rmdir:wt.node_ops.rmdir,readdir:wt.node_ops.readdir,symlink:wt.node_ops.symlink},stream:{llseek:wt.stream_ops.llseek}},file:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr},stream:{llseek:wt.stream_ops.llseek,read:wt.stream_ops.read,write:wt.stream_ops.write,allocate:wt.stream_ops.allocate,mmap:wt.stream_ops.mmap,msync:wt.stream_ops.msync}},link:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr,readlink:wt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:wt.node_ops.getattr,setattr:wt.node_ops.setattr},stream:xt.chrdev_stream_ops}});var r=xt.createNode(e,t,s,i);return xt.isDir(r.mode)?(r.node_ops=wt.ops_table.dir.node,r.stream_ops=wt.ops_table.dir.stream,r.contents={}):xt.isFile(r.mode)?(r.node_ops=wt.ops_table.file.node,r.stream_ops=wt.ops_table.file.stream,r.usedBytes=0,r.contents=null):xt.isLink(r.mode)?(r.node_ops=wt.ops_table.link.node,r.stream_ops=wt.ops_table.link.stream):xt.isChrdev(r.mode)&&(r.node_ops=wt.ops_table.chrdev.node,r.stream_ops=wt.ops_table.chrdev.stream),r.timestamp=Date.now(),e&&(e.contents[t]=r,e.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){t>>>=0;var s=e.contents?e.contents.length:0;if(!(s>=t)){t=Math.max(t,s*(s<1048576?2:1.125)>>>0),0!=s&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(t>>>=0,e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var s=e.contents;e.contents=new Uint8Array(t),s&&e.contents.set(s.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=xt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xt.isDir(e.mode)?t.size=4096:xt.isFile(e.mode)?t.size=e.usedBytes:xt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&wt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw xt.genericErrors[44]},mknod:function(e,t,s,i){return wt.createNode(e,t,s,i)},rename:function(e,t,s){if(xt.isDir(e.mode)){var i;try{i=xt.lookupNode(t,s)}catch(e){}if(i)for(var r in i.contents)throw new xt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=s,t.contents[s]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var s=xt.lookupNode(e,t);for(var i in s.contents)throw new xt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var s in e.contents)e.contents.hasOwnProperty(s)&&t.push(s);return t},symlink:function(e,t,s){var i=wt.createNode(e,t,41471,0);return i.link=s,i},readlink:function(e){if(!xt.isLink(e.mode))throw new xt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,s,i,r){var o=e.node.contents;if(r>=e.node.usedBytes)return 0;var n=Math.min(e.node.usedBytes-r,i);if(n>8&&o.subarray)t.set(o.subarray(r,r+n),s);else for(var a=0;a0||s+t>>=0,E.set(a,o>>>0)}else n=!1,o=a.byteOffset;return{ptr:o,allocated:n}},msync:function(e,t,s,i,r){return wt.stream_ops.write(e,t,0,i,s,!1),0}}},xt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=Ct.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new xt.ErrnoError(32);for(var s=e.split("/").filter((e=>!!e)),i=xt.root,r="/",o=0;o40)throw new xt.ErrnoError(32)}}return{path:r,node:i}},getPath:e=>{for(var t;;){if(xt.isRoot(e)){var s=e.mount.mountpoint;return t?"/"!==s[s.length-1]?s+"/"+t:s+t:s}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var s=0,i=0;i>>0)%xt.nameTable.length},hashAddNode:e=>{var t=xt.hashName(e.parent.id,e.name);e.name_next=xt.nameTable[t],xt.nameTable[t]=e},hashRemoveNode:e=>{var t=xt.hashName(e.parent.id,e.name);if(xt.nameTable[t]===e)xt.nameTable[t]=e.name_next;else for(var s=xt.nameTable[t];s;){if(s.name_next===e){s.name_next=e.name_next;break}s=s.name_next}},lookupNode:(e,t)=>{var s=xt.mayLookup(e);if(s)throw new xt.ErrnoError(s,e);for(var i=xt.hashName(e.id,t),r=xt.nameTable[i];r;r=r.name_next){var o=r.name;if(r.parent.id===e.id&&o===t)return r}return xt.lookup(e,t)},createNode:(e,t,s,i)=>{var r=new xt.FSNode(e,t,s,i);return xt.hashAddNode(r),r},destroyNode:e=>{xt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=xt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=xt.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{return xt.lookupNode(e,t),20}catch(e){}return xt.nodePermissions(e,"wx")},mayDelete:(e,t,s)=>{var i;try{i=xt.lookupNode(e,t)}catch(e){return e.errno}var r=xt.nodePermissions(e,"wx");if(r)return r;if(s){if(!xt.isDir(i.mode))return 54;if(xt.isRoot(i)||xt.getPath(i)===xt.cwd())return 10}else if(xt.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?xt.isLink(e.mode)?32:xt.isDir(e.mode)&&("r"!==xt.flagsToPermissionString(t)||512&t)?31:xt.nodePermissions(e,xt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=xt.MAX_OPEN_FDS)=>{for(var s=e;s<=t;s++)if(!xt.streams[s])return s;throw new xt.ErrnoError(33)},getStream:e=>xt.streams[e],createStream:(e,t,s)=>{xt.FSStream||(xt.FSStream=function(){this.shared={}},xt.FSStream.prototype={},Object.defineProperties(xt.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new xt.FSStream,e);var i=xt.nextfd(t,s);return e.fd=i,xt.streams[i]=e,e},closeStream:e=>{xt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=xt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new xt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{xt.devices[e]={stream_ops:t}},getDevice:e=>xt.devices[e],getMounts:e=>{for(var t=[],s=[e];s.length;){var i=s.pop();t.push(i),s.push.apply(s,i.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),xt.syncFSRequests++,xt.syncFSRequests>1&&p("warning: "+xt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=xt.getMounts(xt.root.mount),i=0;function r(e){return xt.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,r(e));++i>=s.length&&r(null)}s.forEach((t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:(e,t,s)=>{var i,r="/"===s,o=!s;if(r&&xt.root)throw new xt.ErrnoError(10);if(!r&&!o){var n=xt.lookupPath(s,{follow_mount:!1});if(s=n.path,i=n.node,xt.isMountpoint(i))throw new xt.ErrnoError(10);if(!xt.isDir(i.mode))throw new xt.ErrnoError(54)}var a={type:e,opts:t,mountpoint:s,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,r?xt.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount:e=>{var t=xt.lookupPath(e,{follow_mount:!1});if(!xt.isMountpoint(t.node))throw new xt.ErrnoError(28);var s=t.node,i=s.mounted,r=xt.getMounts(i);Object.keys(xt.nameTable).forEach((e=>{for(var t=xt.nameTable[e];t;){var s=t.name_next;r.includes(t.mount)&&xt.destroyNode(t),t=s}})),s.mounted=null;var o=s.mount.mounts.indexOf(i);s.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,s)=>{var i=xt.lookupPath(e,{parent:!0}).node,r=Nt.basename(e);if(!r||"."===r||".."===r)throw new xt.ErrnoError(28);var o=xt.mayCreate(i,r);if(o)throw new xt.ErrnoError(o);if(!i.node_ops.mknod)throw new xt.ErrnoError(63);return i.node_ops.mknod(i,r,t,s)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var s=e.split("/"),i="",r=0;r(void 0===s&&(s=t,t=438),t|=8192,xt.mknod(e,t,s)),symlink:(e,t)=>{if(!Ct.resolve(e))throw new xt.ErrnoError(44);var s=xt.lookupPath(t,{parent:!0}).node;if(!s)throw new xt.ErrnoError(44);var i=Nt.basename(t),r=xt.mayCreate(s,i);if(r)throw new xt.ErrnoError(r);if(!s.node_ops.symlink)throw new xt.ErrnoError(63);return s.node_ops.symlink(s,i,e)},rename:(e,t)=>{var s,i,r=Nt.dirname(e),o=Nt.dirname(t),n=Nt.basename(e),a=Nt.basename(t);if(s=xt.lookupPath(e,{parent:!0}).node,i=xt.lookupPath(t,{parent:!0}).node,!s||!i)throw new xt.ErrnoError(44);if(s.mount!==i.mount)throw new xt.ErrnoError(75);var l,h=xt.lookupNode(s,n),c=Ct.relative(e,o);if("."!==c.charAt(0))throw new xt.ErrnoError(28);if("."!==(c=Ct.relative(t,r)).charAt(0))throw new xt.ErrnoError(55);try{l=xt.lookupNode(i,a)}catch(e){}if(h!==l){var A=xt.isDir(h.mode),u=xt.mayDelete(s,n,A);if(u)throw new xt.ErrnoError(u);if(u=l?xt.mayDelete(i,a,A):xt.mayCreate(i,a))throw new xt.ErrnoError(u);if(!s.node_ops.rename)throw new xt.ErrnoError(63);if(xt.isMountpoint(h)||l&&xt.isMountpoint(l))throw new xt.ErrnoError(10);if(i!==s&&(u=xt.nodePermissions(s,"w")))throw new xt.ErrnoError(u);xt.hashRemoveNode(h);try{s.node_ops.rename(h,i,a)}catch(e){throw e}finally{xt.hashAddNode(h)}}},rmdir:e=>{var t=xt.lookupPath(e,{parent:!0}).node,s=Nt.basename(e),i=xt.lookupNode(t,s),r=xt.mayDelete(t,s,!0);if(r)throw new xt.ErrnoError(r);if(!t.node_ops.rmdir)throw new xt.ErrnoError(63);if(xt.isMountpoint(i))throw new xt.ErrnoError(10);t.node_ops.rmdir(t,s),xt.destroyNode(i)},readdir:e=>{var t=xt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=xt.lookupPath(e,{parent:!0}).node;if(!t)throw new xt.ErrnoError(44);var s=Nt.basename(e),i=xt.lookupNode(t,s),r=xt.mayDelete(t,s,!1);if(r)throw new xt.ErrnoError(r);if(!t.node_ops.unlink)throw new xt.ErrnoError(63);if(xt.isMountpoint(i))throw new xt.ErrnoError(10);t.node_ops.unlink(t,s),xt.destroyNode(i)},readlink:e=>{var t=xt.lookupPath(e).node;if(!t)throw new xt.ErrnoError(44);if(!t.node_ops.readlink)throw new xt.ErrnoError(28);return Ct.resolve(xt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var s=xt.lookupPath(e,{follow:!t}).node;if(!s)throw new xt.ErrnoError(44);if(!s.node_ops.getattr)throw new xt.ErrnoError(63);return s.node_ops.getattr(s)},lstat:e=>xt.stat(e,!0),chmod:(e,t,s)=>{var i;if(!(i="string"==typeof e?xt.lookupPath(e,{follow:!s}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod:(e,t)=>{xt.chmod(e,t,!0)},fchmod:(e,t)=>{var s=xt.getStream(e);if(!s)throw new xt.ErrnoError(8);xt.chmod(s.node,t)},chown:(e,t,s,i)=>{var r;if(!(r="string"==typeof e?xt.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(e,t,s)=>{xt.chown(e,t,s,!0)},fchown:(e,t,s)=>{var i=xt.getStream(e);if(!i)throw new xt.ErrnoError(8);xt.chown(i.node,t,s)},truncate:(e,t)=>{if(t<0)throw new xt.ErrnoError(28);var s;if(!(s="string"==typeof e?xt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xt.ErrnoError(63);if(xt.isDir(s.mode))throw new xt.ErrnoError(31);if(!xt.isFile(s.mode))throw new xt.ErrnoError(28);var i=xt.nodePermissions(s,"w");if(i)throw new xt.ErrnoError(i);s.node_ops.setattr(s,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var s=xt.getStream(e);if(!s)throw new xt.ErrnoError(8);if(0==(2097155&s.flags))throw new xt.ErrnoError(28);xt.truncate(s.node,t)},utime:(e,t,s)=>{var i=xt.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,s)})},open:(e,t,s)=>{if(""===e)throw new xt.ErrnoError(44);var i;if(s=void 0===s?438:s,s=64&(t="string"==typeof t?xt.modeStringToFlags(t):t)?4095&s|32768:0,"object"==typeof e)i=e;else{e=Nt.normalize(e);try{i=xt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(i){if(128&t)throw new xt.ErrnoError(20)}else i=xt.mknod(e,s,0),o=!0;if(!i)throw new xt.ErrnoError(44);if(xt.isChrdev(i.mode)&&(t&=-513),65536&t&&!xt.isDir(i.mode))throw new xt.ErrnoError(54);if(!o){var n=xt.mayOpen(i,t);if(n)throw new xt.ErrnoError(n)}512&t&&!o&&xt.truncate(i,0),t&=-131713;var a=xt.createStream({node:i,path:xt.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!r.logReadFiles||1&t||(xt.readFiles||(xt.readFiles={}),e in xt.readFiles||(xt.readFiles[e]=1)),a},close:e=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,s)=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xt.ErrnoError(70);if(0!=s&&1!=s&&2!=s)throw new xt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,s),e.ungotten=[],e.position},read:(e,t,s,i,r)=>{if(s>>>=0,i<0||r<0)throw new xt.ErrnoError(28);if(xt.isClosed(e))throw new xt.ErrnoError(8);if(1==(2097155&e.flags))throw new xt.ErrnoError(8);if(xt.isDir(e.node.mode))throw new xt.ErrnoError(31);if(!e.stream_ops.read)throw new xt.ErrnoError(28);var o=void 0!==r;if(o){if(!e.seekable)throw new xt.ErrnoError(70)}else r=e.position;var n=e.stream_ops.read(e,t,s,i,r);return o||(e.position+=n),n},write:(e,t,s,i,r,o)=>{if(s>>>=0,i<0||r<0)throw new xt.ErrnoError(28);if(xt.isClosed(e))throw new xt.ErrnoError(8);if(0==(2097155&e.flags))throw new xt.ErrnoError(8);if(xt.isDir(e.node.mode))throw new xt.ErrnoError(31);if(!e.stream_ops.write)throw new xt.ErrnoError(28);e.seekable&&1024&e.flags&&xt.llseek(e,0,2);var n=void 0!==r;if(n){if(!e.seekable)throw new xt.ErrnoError(70)}else r=e.position;var a=e.stream_ops.write(e,t,s,i,r,o);return n||(e.position+=a),a},allocate:(e,t,s)=>{if(xt.isClosed(e))throw new xt.ErrnoError(8);if(t<0||s<=0)throw new xt.ErrnoError(28);if(0==(2097155&e.flags))throw new xt.ErrnoError(8);if(!xt.isFile(e.node.mode)&&!xt.isDir(e.node.mode))throw new xt.ErrnoError(43);if(!e.stream_ops.allocate)throw new xt.ErrnoError(138);e.stream_ops.allocate(e,t,s)},mmap:(e,t,s,i,r)=>{if(0!=(2&i)&&0==(2&r)&&2!=(2097155&e.flags))throw new xt.ErrnoError(2);if(1==(2097155&e.flags))throw new xt.ErrnoError(2);if(!e.stream_ops.mmap)throw new xt.ErrnoError(43);return e.stream_ops.mmap(e,t,s,i,r)},msync:(e,t,s,i,r)=>(s>>>=0,e.stream_ops.msync?e.stream_ops.msync(e,t,s,i,r):0),munmap:e=>0,ioctl:(e,t,s)=>{if(!e.stream_ops.ioctl)throw new xt.ErrnoError(59);return e.stream_ops.ioctl(e,t,s)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var s,i=xt.open(e,t.flags),r=xt.stat(e).size,o=new Uint8Array(r);return xt.read(i,o,0,r,0),"utf8"===t.encoding?s=D(o,0):"binary"===t.encoding&&(s=o),xt.close(i),s},writeFile:(e,t,s={})=>{s.flags=s.flags||577;var i=xt.open(e,s.flags,s.mode);if("string"==typeof t){var r=new Uint8Array(O(t)+1),o=C(t,r,0,r.length);xt.write(i,r,0,o,void 0,s.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xt.write(i,t,0,t.byteLength,void 0,s.canOwn)}xt.close(i)},cwd:()=>xt.currentPath,chdir:e=>{var t=xt.lookupPath(e,{follow:!0});if(null===t.node)throw new xt.ErrnoError(44);if(!xt.isDir(t.node.mode))throw new xt.ErrnoError(54);var s=xt.nodePermissions(t.node,"x");if(s)throw new xt.ErrnoError(s);xt.currentPath=t.path},createDefaultDirectories:()=>{xt.mkdir("/tmp"),xt.mkdir("/home"),xt.mkdir("/home/web_user")},createDefaultDevices:()=>{xt.mkdir("/dev"),xt.registerDevice(xt.makedev(1,3),{read:()=>0,write:(e,t,s,i,r)=>i}),xt.mkdev("/dev/null",xt.makedev(1,3)),bt.register(xt.makedev(5,0),bt.default_tty_ops),bt.register(xt.makedev(6,0),bt.default_tty1_ops),xt.mkdev("/dev/tty",xt.makedev(5,0)),xt.mkdev("/dev/tty1",xt.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>V("randomDevice")}();xt.createDevice("/dev","random",e),xt.createDevice("/dev","urandom",e),xt.mkdir("/dev/shm"),xt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{xt.mkdir("/proc");var e=xt.mkdir("/proc/self");xt.mkdir("/proc/self/fd"),xt.mount({mount:()=>{var t=xt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var s=+t,i=xt.getStream(s);if(!i)throw new xt.ErrnoError(8);var r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?xt.createDevice("/dev","stdin",r.stdin):xt.symlink("/dev/tty","/dev/stdin"),r.stdout?xt.createDevice("/dev","stdout",null,r.stdout):xt.symlink("/dev/tty","/dev/stdout"),r.stderr?xt.createDevice("/dev","stderr",null,r.stderr):xt.symlink("/dev/tty1","/dev/stderr"),xt.open("/dev/stdin",0),xt.open("/dev/stdout",1),xt.open("/dev/stderr",1)},ensureErrnoError:()=>{xt.ErrnoError||(xt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xt.ErrnoError.prototype=new Error,xt.ErrnoError.prototype.constructor=xt.ErrnoError,[44].forEach((e=>{xt.genericErrors[e]=new xt.ErrnoError(e),xt.genericErrors[e].stack=""})))},staticInit:()=>{xt.ensureErrnoError(),xt.nameTable=new Array(4096),xt.mount(wt,{},"/"),xt.createDefaultDirectories(),xt.createDefaultDevices(),xt.createSpecialDirectories(),xt.filesystems={MEMFS:wt}},init:(e,t,s)=>{xt.init.initialized=!0,xt.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=s||r.stderr,xt.createStandardStreams()},quit:()=>{xt.init.initialized=!1;for(var e=0;e{var s=0;return e&&(s|=365),t&&(s|=146),s},findObject:(e,t)=>{var s=xt.analyzePath(e,t);return s.exists?s.object:null},analyzePath:(e,t)=>{try{e=(i=xt.lookupPath(e,{follow:!t})).path}catch(e){}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=xt.lookupPath(e,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=Nt.basename(e),i=xt.lookupPath(e,{follow:!t}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot="/"===i.path}catch(e){s.error=e.errno}return s},createPath:(e,t,s,i)=>{e="string"==typeof e?e:xt.getPath(e);for(var r=t.split("/").reverse();r.length;){var o=r.pop();if(o){var n=Nt.join2(e,o);try{xt.mkdir(n)}catch(e){}e=n}}return n},createFile:(e,t,s,i,r)=>{var o=Nt.join2("string"==typeof e?e:xt.getPath(e),t),n=xt.getMode(i,r);return xt.create(o,n)},createDataFile:(e,t,s,i,r,o)=>{var n=t;e&&(e="string"==typeof e?e:xt.getPath(e),n=t?Nt.join2(e,t):e);var a=xt.getMode(i,r),l=xt.create(n,a);if(s){if("string"==typeof s){for(var h=new Array(s.length),c=0,A=s.length;c{var r=Nt.join2("string"==typeof e?e:xt.getPath(e),t),o=xt.getMode(!!s,!!i);xt.createDevice.major||(xt.createDevice.major=64);var n=xt.makedev(xt.createDevice.major++,0);return xt.registerDevice(n,{open:e=>{e.seekable=!1},close:e=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(e,t,i,r,o)=>{for(var n=0,a=0;a{for(var n=0;n{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!o)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ot(o(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new xt.ErrnoError(29)}},createLazyFile:(e,t,s,i,r)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,s=e/this.chunkSize|0;return this.getter(s)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",s,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+s+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),r=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,n=1048576;r||(n=i);var a=this;a.setDataGetter((e=>{var t=e*n,r=(e+1)*n-1;if(r=Math.min(r,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var r=new XMLHttpRequest;if(r.open("GET",s,!1),i!==n&&r.setRequestHeader("Range","bytes="+e+"-"+t),r.responseType="arraybuffer",r.overrideMimeType&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+s+". Status: "+r.status);return void 0!==r.response?new Uint8Array(r.response||[]):Ot(r.responseText||"",!0)})(t,r)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!o&&i||(n=i=1,i=this.getter(0).length,n=i,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=n,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n={isDevice:!1,url:s},a=xt.createFile(e,t,n,i,r);n.contents?a.contents=n.contents:n.url&&(a.contents=null,a.url=n.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function h(e,t,s,i,r){var o=e.node.contents;if(r>=o.length)return 0;var n=Math.min(o.length-r,i);if(o.slice)for(var a=0;a{var t=a.stream_ops[e];l[e]=function(){return xt.forceLoadFile(a),t.apply(null,arguments)}})),l.read=(e,t,s,i,r)=>(xt.forceLoadFile(a),h(e,t,s,i,r)),l.mmap=(e,t,s,i,r)=>{xt.forceLoadFile(a);var o=St();if(!o)throw new xt.ErrnoError(48);return h(e,E,o,t,s),{ptr:o,allocated:!0}},a.stream_ops=l,a},createPreloadedFile:(e,t,s,i,r,o,a,l,h,c)=>{var A=t?Ct.resolve(Nt.join2(e,t)):e;function u(s){function n(s){c&&c(),l||xt.createDataFile(e,t,s,i,r,h),o&&o(),k()}Browser.handledByPreloadPlugin(s,A,n,(()=>{a&&a(),k()}))||n(s)}G(),"string"==typeof s?function(e,t,s,i){var r=i?"":"al "+e;n(e,(s=>{f(s,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(s)),r&&k()}),(t=>{if(!s)throw'Loading data file "'+e+'" failed.';s()})),r&&G()}(s,(e=>u(e)),a):u(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=xt.indexedDB();try{var r=i.open(xt.DB_NAME(),xt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=()=>{u("creating db"),r.result.createObjectStore(xt.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result.transaction([xt.DB_STORE_NAME],"readwrite"),o=i.objectStore(xt.DB_STORE_NAME),n=0,a=0,l=e.length;function h(){0==a?t():s()}e.forEach((e=>{var t=o.put(xt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++n+a==l&&h()},t.onerror=()=>{a++,n+a==l&&h()}})),i.onerror=s},r.onerror=s},loadFilesFromDB:(e,t=(()=>{}),s=(()=>{}))=>{var i=xt.indexedDB();try{var r=i.open(xt.DB_NAME(),xt.DB_VERSION)}catch(e){return s(e)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var o=i.transaction([xt.DB_STORE_NAME],"readonly")}catch(e){return void s(e)}var n=o.objectStore(xt.DB_STORE_NAME),a=0,l=0,h=e.length;function c(){0==l?t():s()}e.forEach((e=>{var t=n.get(e);t.onsuccess=()=>{xt.analyzePath(e).exists&&xt.unlink(e),xt.createDataFile(Nt.dirname(e),Nt.basename(e),t.result,!0,!0,!0),++a+l==h&&c()},t.onerror=()=>{l++,a+l==h&&c()}})),o.onerror=s},r.onerror=s}},Bt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,s){if(Nt.isAbs(t))return t;var i;if(i=-100===e?xt.cwd():Bt.getStreamFromFD(e).path,0==t.length){if(!s)throw new xt.ErrnoError(44);return i}return Nt.join2(i,t)},doStat:function(e,t,s){try{var i=e(t)}catch(e){if(e&&e.node&&Nt.normalize(t)!==Nt.normalize(xt.getPath(e.node)))return-54;throw e}I[s>>>2]=i.dev,I[s+8>>>2]=i.ino,I[s+12>>>2]=i.mode,v[s+16>>>2]=i.nlink,I[s+20>>>2]=i.uid,I[s+24>>>2]=i.gid,I[s+28>>>2]=i.rdev,B=[i.size>>>0,(x=i.size,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+40>>>2]=B[0],I[s+44>>>2]=B[1],I[s+48>>>2]=4096,I[s+52>>>2]=i.blocks;var r=i.atime.getTime(),o=i.mtime.getTime(),n=i.ctime.getTime();return B=[Math.floor(r/1e3)>>>0,(x=Math.floor(r/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+56>>>2]=B[0],I[s+60>>>2]=B[1],v[s+64>>>2]=r%1e3*1e3,B=[Math.floor(o/1e3)>>>0,(x=Math.floor(o/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+72>>>2]=B[0],I[s+76>>>2]=B[1],v[s+80>>>2]=o%1e3*1e3,B=[Math.floor(n/1e3)>>>0,(x=Math.floor(n/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+88>>>2]=B[0],I[s+92>>>2]=B[1],v[s+96>>>2]=n%1e3*1e3,B=[i.ino>>>0,(x=i.ino,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[s+104>>>2]=B[0],I[s+108>>>2]=B[1],0},doMsync:function(e,t,s,i,r){if(!xt.isFile(t.node.mode))throw new xt.ErrnoError(43);if(2&i)return 0;e>>>=0;var o=m.slice(e,e+s);xt.msync(t,o,r,s,i)},varargs:void 0,get:function(){return Bt.varargs+=4,I[Bt.varargs-4>>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=xt.getStream(e);if(!t)throw new xt.ErrnoError(8);return t}};function Ft(e){return e%4==0&&(e%100!=0||e%400==0)}var Mt=[31,29,31,30,31,30,31,31,30,31,30,31],Lt=[31,28,31,30,31,30,31,31,30,31,30,31];function Ut(e,t,s,i){var r=I[i+40>>>2],o={tm_sec:I[i>>>2],tm_min:I[i+4>>>2],tm_hour:I[i+8>>>2],tm_mday:I[i+12>>>2],tm_mon:I[i+16>>>2],tm_year:I[i+20>>>2],tm_wday:I[i+24>>>2],tm_yday:I[i+28>>>2],tm_isdst:I[i+32>>>2],tm_gmtoff:I[i+36>>>2],tm_zone:r?N(r):""},n=N(s),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in a)n=n.replace(new RegExp(l,"g"),a[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function A(e,t,s){for(var i="number"==typeof e?e.toString():e||"";i.length0?1:0}var i;return 0===(i=s(e.getFullYear()-t.getFullYear()))&&0===(i=s(e.getMonth()-t.getMonth()))&&(i=s(e.getDate()-t.getDate())),i}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function f(e){var t=function(e,t){for(var s=new Date(e.getTime());t>0;){var i=Ft(s.getFullYear()),r=s.getMonth(),o=(i?Mt:Lt)[r];if(!(t>o-s.getDate()))return s.setDate(s.getDate()+t),s;t-=o-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1))}return s}(new Date(e.tm_year+1900,0,1),e.tm_yday),s=new Date(t.getFullYear(),0,4),i=new Date(t.getFullYear()+1,0,4),r=d(s),o=d(i);return p(r,t)<=0?p(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return h[e.tm_wday].substring(0,3)},"%A":function(e){return h[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return u((e.tm_year+1900)/100|0,2)},"%d":function(e){return u(e.tm_mday,2)},"%e":function(e){return A(e.tm_mday,2," ")},"%g":function(e){return f(e).toString().substring(2)},"%G":function(e){return f(e)},"%H":function(e){return u(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),u(t,2)},"%j":function(e){return u(e.tm_mday+function(e,t){for(var s=0,i=0;i<=t;s+=e[i++]);return s}(Ft(e.tm_year+1900)?Mt:Lt,e.tm_mon-1),3)},"%m":function(e){return u(e.tm_mon+1,2)},"%M":function(e){return u(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return u(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return u(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var s=(e.tm_wday+371-e.tm_yday)%7;4==s||3==s&&Ft(e.tm_year)||(t=1)}}else{t=52;var i=(e.tm_wday+7-e.tm_yday-1)%7;(4==i||5==i&&Ft(e.tm_year%400-1))&&t++}return u(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return u(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,s=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(s?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in n=n.replace(/%%/g,"\0\0"),m)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),m[l](o)));var y,g,v=Ot(n=n.replace(/\0\0/g,"%"),!1);return v.length>t?0:(y=v,g=e,E.set(y,g>>>0),v.length-1)}se=r.InternalError=te(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ae=e}(),he=r.BindingError=te(Error,"BindingError"),Fe.prototype.isAliasOf=ue,Fe.prototype.clone=Se,Fe.prototype.delete=we,Fe.prototype.isDeleted=xe,Fe.prototype.deleteLater=Be,r.getInheritedInstanceCount=Ie,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=_e,r.setDelayFunction=Pe,ze.prototype.getPointee=je,ze.prototype.destructor=Qe,ze.prototype.argPackAdvance=8,ze.prototype.readValueFromPointer=X,ze.prototype.deleteObject=We,ze.prototype.fromWireType=Oe,Je=r.UnboundTypeError=te(Error,"UnboundTypeError"),r.count_emval_handles=nt,r.get_first_emval=at;var Ht=function(e,t,s,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xt.nextInode++,this.name=t,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=i},Gt=365,kt=146;Object.defineProperties(Ht.prototype,{read:{get:function(){return(this.mode&Gt)===Gt},set:function(e){e?this.mode|=Gt:this.mode&=-366}},write:{get:function(){return(this.mode&kt)===kt},set:function(e){e?this.mode|=kt:this.mode&=-147}},isFolder:{get:function(){return xt.isDir(this.mode)}},isDevice:{get:function(){return xt.isChrdev(this.mode)}}}),xt.FSNode=Ht,xt.staticInit();var Vt={f:function(e,t,s){throw new z(e).init(t,s),e},R:function(e){var t=K[e];delete K[e];var s=t.elements,i=s.length,r=s.map((function(e){return e.getterReturnType})).concat(s.map((function(e){return e.setterArgumentType}))),o=t.rawConstructor,n=t.rawDestructor;re([e],r,(function(e){return s.forEach(((t,s)=>{var r=e[s],o=t.getter,n=t.getterContext,a=e[s+i],l=t.setter,h=t.setterContext;t.read=e=>r.fromWireType(o(n,e)),t.write=(e,t)=>{var s=[];l(h,e,a.toWireType(s,t)),Y(s)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(i),r=0;r>>o])},destructorFunction:null})},o:function(e,t,s,i,r,o,n,a,l,h,c,A,u){c=le(c),o=qe(r,o),a&&(a=qe(n,a)),h&&(h=qe(l,h)),u=qe(A,u);var p=$(c);Le(p,(function(){et("Cannot construct "+c+" due to unbound types",[i])})),re([e,t,s],i?[i]:[],(function(t){var s,r;t=t[0],r=i?(s=t.registeredClass).instancePrototype:Fe.prototype;var n=ee(p,(function(){if(Object.getPrototypeOf(this)!==l)throw new he("Use 'new' to construct "+c);if(void 0===A.constructor_body)throw new he(c+" has no accessible constructor");var e=A.constructor_body[arguments.length];if(void 0===e)throw new he("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(A.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(r,{constructor:{value:n}});n.prototype=l;var A=new Ue(c,n,l,u,s,o,a,h),d=new ze(c,A,!0,!1,!1),f=new ze(c+"*",A,!1,!1,!1),E=new ze(c+" const*",A,!1,!0,!1);return ge[e]={pointerType:f,constPointerType:E},Ke(p,n),[d,f,E]}))},n:function(e,t,s,i,r,o){f(t>0);var n=tt(t,s);r=qe(i,r),re([],[e],(function(e){var s="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new he("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{et("Cannot construct "+e.name+" due to unbound types",n)},re([],n,(function(i){return i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=st(s,i,null,r,o),[]})),[]}))},b:function(e,t,s,i,r,o,n,a){var l=tt(s,i);t=le(t),o=qe(r,o),re([],[e],(function(e){var i=(e=e[0]).name+"."+t;function r(){et("Cannot call "+i+" due to unbound types",l)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,c=h[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===s-2?(r.argCount=s-2,r.className=e.name,h[t]=r):(Me(h,t,i),h[t].overloadTable[s-2]=r),re([],l,(function(r){var a=st(i,r,e,o,n);return void 0===h[t].overloadTable?(a.argCount=s-2,h[t]=a):h[t].overloadTable[s-2]=a,[]})),[]}))},O:function(e,t){Ae(e,{name:t=le(t),fromWireType:function(e){var t=lt.toValue(e);return ot(e),t},toWireType:function(e,t){return lt.toHandle(t)},argPackAdvance:8,readValueFromPointer:X,destructorFunction:null})},B:function(e,t,s,i){var r=ne(s);function o(){}t=le(t),o.values={},Ae(e,{name:t,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ht(t,r,i),destructorFunction:null}),Le(t,o)},s:function(e,t,s){var i=ct(e,"enum");t=le(t);var r=i.constructor,o=Object.create(i.constructor.prototype,{value:{value:s},constructor:{value:ee(i.name+"_"+t,(function(){}))}});r.values[s]=o,r[t]=o},z:function(e,t,s){var i=ne(s);Ae(e,{name:t=le(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:ut(t,i),destructorFunction:null})},c:function(e,t,s,i,r,o){var n=tt(t,s);e=le(e),r=qe(i,r),Le(e,(function(){et("Cannot call "+e+" due to unbound types",n)}),t-1),re([],n,(function(s){var i=[s[0],null].concat(s.slice(1));return Ke(e,st(e,i,null,r,o),t-1),[]}))},r:function(e,t,s,i,r){t=le(t);var o=ne(s),n=e=>e;if(0===i){var a=32-8*s;n=e=>e<>>a}var l=t.includes("unsigned");Ae(e,{name:t,fromWireType:n,toWireType:l?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:pt(t,o,0!==i),destructorFunction:null})},h:function(e,t,s){var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function r(e){var t=v,s=t[(e>>=2)>>>0],r=t[e+1>>>0];return new i(t.buffer,r,s)}Ae(e,{name:s=le(s),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})},A:function(e,t){var s="std::string"===(t=le(t));Ae(e,{name:t,fromWireType:function(e){var t,i=v[e>>>2],r=e+4;if(s)for(var o=r,n=0;n<=i;++n){var a=r+n;if(n==i||0==m[a>>>0]){var l=N(o,a-o);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),o=a+1}}else{var h=new Array(i);for(n=0;n>>0]);t=h.join("")}return zt(e),t},toWireType:function(e,t){var i;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ce("Cannot pass non-string to std::string"),i=s&&r?O(t):t.length;var o=jt(4+i+1),n=o+4;if(n>>>=0,v[o>>>2]=i,s&&r)C(t,m,n,i+1);else if(r)for(var a=0;a255&&(zt(n),ce("String has UTF-16 code units that do not fit in 8 bits")),m[n+a>>>0]=l}else for(a=0;a>>0]=t[a];return null!==e&&e.push(zt,o),o},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},v:function(e,t,s){var i,r,o,n,a;s=le(s),2===t?(i=ft,r=Et,n=mt,o=()=>g,a=1):4===t&&(i=yt,r=gt,n=It,o=()=>v,a=2),Ae(e,{name:s,fromWireType:function(e){for(var s,r=v[e>>>2],n=o(),l=e+4,h=0;h<=r;++h){var c=e+4+h*t;if(h==r||0==n[c>>>a]){var A=i(l,c-l);void 0===s?s=A:(s+=String.fromCharCode(0),s+=A),l=c+t}}return zt(e),s},toWireType:function(e,i){"string"!=typeof i&&ce("Cannot pass non-string to C++ string type "+s);var o=n(i),l=jt(4+o+t);return v[(l>>>=0)>>>2]=o>>a,r(i,l+4,o+t),null!==e&&e.push(zt,l),l},argPackAdvance:8,readValueFromPointer:X,destructorFunction:function(e){zt(e)}})},S:function(e,t,s,i,r,o){K[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),elements:[]}},i:function(e,t,s,i,r,o,n,a,l){K[e].elements.push({getterReturnType:t,getter:qe(s,i),getterContext:r,setterArgumentType:o,setter:qe(n,a),setterContext:l})},q:function(e,t,s,i,r,o){oe[e]={name:le(t),rawConstructor:qe(s,i),rawDestructor:qe(r,o),fields:[]}},e:function(e,t,s,i,r,o,n,a,l,h){oe[e].fields.push({fieldName:le(t),getterReturnType:s,getter:qe(i,r),getterContext:o,setterArgumentType:n,setter:qe(a,l),setterContext:h})},Q:function(e,t){Ae(e,{isVoid:!0,name:t=le(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,s){e=lt.toValue(e),t=ct(t,"emval::as");var i=[],r=lt.toHandle(i);return v[s>>>2]=r,t.toWireType(i,e)},x:function(e,t,s,i){e=lt.toValue(e);for(var r=function(e,t){for(var s=new Array(e),i=0;i>>2],"parameter "+i);return s}(t,s),o=new Array(t),n=0;n4&&(rt[e].refcount+=1)},U:function(e,t){return(e=lt.toValue(e))instanceof(t=lt.toValue(t))},w:function(e){return"number"==typeof(e=lt.toValue(e))},C:function(e){return"string"==typeof(e=lt.toValue(e))},T:function(){return lt.toHandle([])},g:function(e){return lt.toHandle(Tt(e))},u:function(){return lt.toHandle({})},l:function(e){Y(lt.toValue(e)),ot(e)},j:function(e,t,s){e=lt.toValue(e),t=lt.toValue(t),s=lt.toValue(s),e[t]=s},d:function(e,t){var s=(e=ct(e,"_emval_take_value")).readValueFromPointer(t);return lt.toHandle(s)},y:function(){V("")},N:function(e,t,s){m.copyWithin(e>>>0,t>>>0,t+s>>>0)},L:function(e){var t,s,i=m.length,r=4294901760;if((e>>>=0)>r)return!1;for(var o=1;o<=4;o*=2){var n=i*(1+.2/o);if(n=Math.min(n,e+100663296),Rt(Math.min(r,(t=Math.max(e,n))+((s=65536)-t%s)%s)))return!0}return!1},H:function(e,t){var s=0;return Dt().forEach((function(i,r){var o=t+s;v[e+4*r>>>2]=o,function(e,t,s){for(var i=0;i>>0]=e.charCodeAt(i);s||(E[t>>>0]=0)}(i,o),s+=i.length+1})),0},I:function(e,t){var s=Dt();v[e>>>2]=s.length;var i=0;return s.forEach((function(e){i+=e.length+1})),v[t>>>2]=i,0},J:function(e){try{var t=Bt.getStreamFromFD(e);return xt.close(t),0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},K:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=xt.read(e,E,n,a,i);if(l<0)return-1;if(r+=l,l>>2]=r,0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},E:function(e,t,s,i,r){try{var o=(l=s)+2097152>>>0<4194305-!!(a=t)?(a>>>0)+4294967296*l:NaN;if(isNaN(o))return 61;var n=Bt.getStreamFromFD(e);return xt.llseek(n,o,i),B=[n.position>>>0,(x=n.position,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],I[r>>>2]=B[0],I[r+4>>>2]=B[1],n.getdents&&0===o&&0===i&&(n.getdents=null),0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}var a,l},M:function(e,t,s,i){try{var r=function(e,t,s,i){for(var r=0,o=0;o>>2],a=v[t+4>>>2];t+=8;var l=xt.write(e,E,n,a,i);if(l<0)return-1;r+=l,void 0!==i&&(i+=l)}return r}(Bt.getStreamFromFD(e),t,s);return v[i>>>2]=r,0}catch(e){if(void 0===xt||!(e instanceof xt.ErrnoError))throw e;return e.errno}},G:function(e,t,s,i,r){return Ut(e,t,s,i)}};!function(){var e={a:Vt};function t(e,t){var s,i=e.exports;r.asm=i,A=r.asm.V,b(),R=r.asm.X,s=r.asm.W,M.unshift(s),k()}function s(e){t(e.instance)}function o(t){return(c||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(S)})):fetch(S,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+S+"'";return e.arrayBuffer()})).catch((function(){return Q(S)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),V(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){p("Module.instantiateWasm callback failed with error: "+e),i(e)}(c||"function"!=typeof WebAssembly.instantiateStreaming||j(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(i)}();var jt=function(){return(jt=r.asm.Y).apply(null,arguments)},Qt=r.___getTypeName=function(){return(Qt=r.___getTypeName=r.asm.Z).apply(null,arguments)};r.__embind_initialize_bindings=function(){return(r.__embind_initialize_bindings=r.asm._).apply(null,arguments)};var Wt,zt=function(){return(zt=r.asm.$).apply(null,arguments)},Kt=function(){return(Kt=r.asm.aa).apply(null,arguments)};function Yt(){function e(){Wt||(Wt=!0,r.calledRun=!0,d||(r.noFSInit||xt.init.initialized||xt.init(),xt.ignorePermissions=!1,W(M),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),L.unshift(e);var e;W(L)}()))}U>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),F.unshift(e);var e;W(F)}(),U>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}if(r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.ba).apply(null,arguments)},r.dynCall_viijii=function(){return(r.dynCall_viijii=r.asm.ca).apply(null,arguments)},r.dynCall_iiiiij=function(){return(r.dynCall_iiiiij=r.asm.da).apply(null,arguments)},r.dynCall_iiiiijj=function(){return(r.dynCall_iiiiijj=r.asm.ea).apply(null,arguments)},r.dynCall_iiiiiijj=function(){return(r.dynCall_iiiiiijj=r.asm.fa).apply(null,arguments)},H=function e(){Wt||Yt(),Wt||(H=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Yt(),e.ready});"object"==typeof e&&"object"==typeof t?t.exports=i:"function"==typeof define&&define.amd?define([],(function(){return i})):"object"==typeof e&&(e.WebIFCWasm=i)}}),mI=class{constructor(e){this.value=e,this.type=5}},yI=class{constructor(e){this.expressID=e,this.type=0}};if((lI=aI||(aI={})).IFC2X3="IFC2X3",lI.IFC4="IFC4",lI.IFC4X3="IFC4X3",function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDaylightSavingHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHourInDay=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMinuteInHour=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSecondInMinute=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},s.COMPLETION_G1={type:3,value:"COMPLETION_G1"},s.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},s.SNOW_S={type:3,value:"SNOW_S"},s.WIND_W={type:3,value:"WIND_W"},s.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},s.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},s.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},s.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},s.FIRE={type:3,value:"FIRE"},s.IMPULSE={type:3,value:"IMPULSE"},s.IMPACT={type:3,value:"IMPACT"},s.TRANSPORT={type:3,value:"TRANSPORT"},s.ERECTION={type:3,value:"ERECTION"},s.PROPPING={type:3,value:"PROPPING"},s.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},s.SHRINKAGE={type:3,value:"SHRINKAGE"},s.CREEP={type:3,value:"CREEP"},s.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},s.BUOYANCY={type:3,value:"BUOYANCY"},s.ICE={type:3,value:"ICE"},s.CURRENT={type:3,value:"CURRENT"},s.WAVE={type:3,value:"WAVE"},s.RAIN={type:3,value:"RAIN"},s.BRAKES={type:3,value:"BRAKES"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=s;class i{}i.PERMANENT_G={type:3,value:"PERMANENT_G"},i.VARIABLE_Q={type:3,value:"VARIABLE_Q"},i.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=i;class r{}r.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},r.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},r.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},r.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},r.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=r;class o{}o.OFFICE={type:3,value:"OFFICE"},o.SITE={type:3,value:"SITE"},o.HOME={type:3,value:"HOME"},o.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},o.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=o;class n{}n.AHEAD={type:3,value:"AHEAD"},n.BEHIND={type:3,value:"BEHIND"},e.IfcAheadOrBehind=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.GRILLE={type:3,value:"GRILLE"},l.REGISTER={type:3,value:"REGISTER"},l.DIFFUSER={type:3,value:"DIFFUSER"},l.EYEBALL={type:3,value:"EYEBALL"},l.IRIS={type:3,value:"IRIS"},l.LINEARGRILLE={type:3,value:"LINEARGRILLE"},l.LINEARDIFFUSER={type:3,value:"LINEARDIFFUSER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},f.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},f.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},f.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},f.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},f.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=f;class E{}E.BEAM={type:3,value:"BEAM"},E.JOIST={type:3,value:"JOIST"},E.LINTEL={type:3,value:"LINTEL"},E.T_BEAM={type:3,value:"T_BEAM"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=E;class m{}m.GREATERTHAN={type:3,value:"GREATERTHAN"},m.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},m.LESSTHAN={type:3,value:"LESSTHAN"},m.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},m.EQUALTO={type:3,value:"EQUALTO"},m.NOTEQUALTO={type:3,value:"NOTEQUALTO"},e.IfcBenchmarkEnum=m;class y{}y.WATER={type:3,value:"WATER"},y.STEAM={type:3,value:"STEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=y;class g{}g.UNION={type:3,value:"UNION"},g.INTERSECTION={type:3,value:"INTERSECTION"},g.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=g;class I{}I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=I;class v{}v.BEND={type:3,value:"BEND"},v.CROSS={type:3,value:"CROSS"},v.REDUCER={type:3,value:"REDUCER"},v.TEE={type:3,value:"TEE"},v.USERDEFINED={type:3,value:"USERDEFINED"},v.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=v;class T{}T.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},T.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},T.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},T.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=T;class _{}_.CABLESEGMENT={type:3,value:"CABLESEGMENT"},_.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=_;class R{}R.NOCHANGE={type:3,value:"NOCHANGE"},R.MODIFIED={type:3,value:"MODIFIED"},R.ADDED={type:3,value:"ADDED"},R.DELETED={type:3,value:"DELETED"},R.MODIFIEDADDED={type:3,value:"MODIFIEDADDED"},R.MODIFIEDDELETED={type:3,value:"MODIFIEDDELETED"},e.IfcChangeActionEnum=R;class P{}P.AIRCOOLED={type:3,value:"AIRCOOLED"},P.WATERCOOLED={type:3,value:"WATERCOOLED"},P.HEATRECOVERY={type:3,value:"HEATRECOVERY"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=P;class D{}D.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},D.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},D.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},D.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},D.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},D.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=D;class N{}N.COLUMN={type:3,value:"COLUMN"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=N;class C{}C.DYNAMIC={type:3,value:"DYNAMIC"},C.RECIPROCATING={type:3,value:"RECIPROCATING"},C.ROTARY={type:3,value:"ROTARY"},C.SCROLL={type:3,value:"SCROLL"},C.TROCHOIDAL={type:3,value:"TROCHOIDAL"},C.SINGLESTAGE={type:3,value:"SINGLESTAGE"},C.BOOSTER={type:3,value:"BOOSTER"},C.OPENTYPE={type:3,value:"OPENTYPE"},C.HERMETIC={type:3,value:"HERMETIC"},C.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},C.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},C.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},C.ROTARYVANE={type:3,value:"ROTARYVANE"},C.SINGLESCREW={type:3,value:"SINGLESCREW"},C.TWINSCREW={type:3,value:"TWINSCREW"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=C;class O{}O.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},O.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},O.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},O.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},O.AIRCOOLED={type:3,value:"AIRCOOLED"},O.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=O;class b{}b.ATPATH={type:3,value:"ATPATH"},b.ATSTART={type:3,value:"ATSTART"},b.ATEND={type:3,value:"ATEND"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=b;class S{}S.HARD={type:3,value:"HARD"},S.SOFT={type:3,value:"SOFT"},S.ADVISORY={type:3,value:"ADVISORY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=S;class w{}w.FLOATING={type:3,value:"FLOATING"},w.PROPORTIONAL={type:3,value:"PROPORTIONAL"},w.PROPORTIONALINTEGRAL={type:3,value:"PROPORTIONALINTEGRAL"},w.PROPORTIONALINTEGRALDERIVATIVE={type:3,value:"PROPORTIONALINTEGRALDERIVATIVE"},w.TIMEDTWOPOSITION={type:3,value:"TIMEDTWOPOSITION"},w.TWOPOSITION={type:3,value:"TWOPOSITION"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=w;class x{}x.ACTIVE={type:3,value:"ACTIVE"},x.PASSIVE={type:3,value:"PASSIVE"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=x;class B{}B.NATURALDRAFT={type:3,value:"NATURALDRAFT"},B.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},B.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=B;class F{}F.BUDGET={type:3,value:"BUDGET"},F.COSTPLAN={type:3,value:"COSTPLAN"},F.ESTIMATE={type:3,value:"ESTIMATE"},F.TENDER={type:3,value:"TENDER"},F.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},F.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},F.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=F;class M{}M.CEILING={type:3,value:"CEILING"},M.FLOORING={type:3,value:"FLOORING"},M.CLADDING={type:3,value:"CLADDING"},M.ROOFING={type:3,value:"ROOFING"},M.INSULATION={type:3,value:"INSULATION"},M.MEMBRANE={type:3,value:"MEMBRANE"},M.SLEEVING={type:3,value:"SLEEVING"},M.WRAPPING={type:3,value:"WRAPPING"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=M;class L{}L.AED={type:3,value:"AED"},L.AES={type:3,value:"AES"},L.ATS={type:3,value:"ATS"},L.AUD={type:3,value:"AUD"},L.BBD={type:3,value:"BBD"},L.BEG={type:3,value:"BEG"},L.BGL={type:3,value:"BGL"},L.BHD={type:3,value:"BHD"},L.BMD={type:3,value:"BMD"},L.BND={type:3,value:"BND"},L.BRL={type:3,value:"BRL"},L.BSD={type:3,value:"BSD"},L.BWP={type:3,value:"BWP"},L.BZD={type:3,value:"BZD"},L.CAD={type:3,value:"CAD"},L.CBD={type:3,value:"CBD"},L.CHF={type:3,value:"CHF"},L.CLP={type:3,value:"CLP"},L.CNY={type:3,value:"CNY"},L.CYS={type:3,value:"CYS"},L.CZK={type:3,value:"CZK"},L.DDP={type:3,value:"DDP"},L.DEM={type:3,value:"DEM"},L.DKK={type:3,value:"DKK"},L.EGL={type:3,value:"EGL"},L.EST={type:3,value:"EST"},L.EUR={type:3,value:"EUR"},L.FAK={type:3,value:"FAK"},L.FIM={type:3,value:"FIM"},L.FJD={type:3,value:"FJD"},L.FKP={type:3,value:"FKP"},L.FRF={type:3,value:"FRF"},L.GBP={type:3,value:"GBP"},L.GIP={type:3,value:"GIP"},L.GMD={type:3,value:"GMD"},L.GRX={type:3,value:"GRX"},L.HKD={type:3,value:"HKD"},L.HUF={type:3,value:"HUF"},L.ICK={type:3,value:"ICK"},L.IDR={type:3,value:"IDR"},L.ILS={type:3,value:"ILS"},L.INR={type:3,value:"INR"},L.IRP={type:3,value:"IRP"},L.ITL={type:3,value:"ITL"},L.JMD={type:3,value:"JMD"},L.JOD={type:3,value:"JOD"},L.JPY={type:3,value:"JPY"},L.KES={type:3,value:"KES"},L.KRW={type:3,value:"KRW"},L.KWD={type:3,value:"KWD"},L.KYD={type:3,value:"KYD"},L.LKR={type:3,value:"LKR"},L.LUF={type:3,value:"LUF"},L.MTL={type:3,value:"MTL"},L.MUR={type:3,value:"MUR"},L.MXN={type:3,value:"MXN"},L.MYR={type:3,value:"MYR"},L.NLG={type:3,value:"NLG"},L.NZD={type:3,value:"NZD"},L.OMR={type:3,value:"OMR"},L.PGK={type:3,value:"PGK"},L.PHP={type:3,value:"PHP"},L.PKR={type:3,value:"PKR"},L.PLN={type:3,value:"PLN"},L.PTN={type:3,value:"PTN"},L.QAR={type:3,value:"QAR"},L.RUR={type:3,value:"RUR"},L.SAR={type:3,value:"SAR"},L.SCR={type:3,value:"SCR"},L.SEK={type:3,value:"SEK"},L.SGD={type:3,value:"SGD"},L.SKP={type:3,value:"SKP"},L.THB={type:3,value:"THB"},L.TRL={type:3,value:"TRL"},L.TTD={type:3,value:"TTD"},L.TWD={type:3,value:"TWD"},L.USD={type:3,value:"USD"},L.VEB={type:3,value:"VEB"},L.VND={type:3,value:"VND"},L.XEU={type:3,value:"XEU"},L.ZAR={type:3,value:"ZAR"},L.ZWD={type:3,value:"ZWD"},L.NOK={type:3,value:"NOK"},e.IfcCurrencyEnum=L;class U{}U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=U;class H{}H.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},H.FIREDAMPER={type:3,value:"FIREDAMPER"},H.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},H.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},H.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},H.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},H.BLASTDAMPER={type:3,value:"BLASTDAMPER"},H.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},H.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},H.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},H.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=H;class G{}G.MEASURED={type:3,value:"MEASURED"},G.PREDICTED={type:3,value:"PREDICTED"},G.SIMULATED={type:3,value:"SIMULATED"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=G;class k{}k.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},k.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},k.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},k.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},k.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},k.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},k.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},k.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},k.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},k.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},k.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},k.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},k.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},k.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},k.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},k.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},k.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},k.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},k.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},k.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},k.TORQUEUNIT={type:3,value:"TORQUEUNIT"},k.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},k.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},k.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},k.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},k.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},k.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},k.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},k.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},k.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},k.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},k.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},k.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},k.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},k.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},k.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},k.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},k.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},k.PHUNIT={type:3,value:"PHUNIT"},k.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},k.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},k.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},k.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},k.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},k.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},k.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},k.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},k.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},k.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=k;class V{}V.ORIGIN={type:3,value:"ORIGIN"},V.TARGET={type:3,value:"TARGET"},e.IfcDimensionExtentUsage=V;class j{}j.POSITIVE={type:3,value:"POSITIVE"},j.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=j;class Q{}Q.FORMEDDUCT={type:3,value:"FORMEDDUCT"},Q.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},Q.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},Q.MANHOLE={type:3,value:"MANHOLE"},Q.METERCHAMBER={type:3,value:"METERCHAMBER"},Q.SUMP={type:3,value:"SUMP"},Q.TRENCH={type:3,value:"TRENCH"},Q.VALVECHAMBER={type:3,value:"VALVECHAMBER"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=Q;class W{}W.PUBLIC={type:3,value:"PUBLIC"},W.RESTRICTED={type:3,value:"RESTRICTED"},W.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},W.PERSONAL={type:3,value:"PERSONAL"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=W;class z{}z.DRAFT={type:3,value:"DRAFT"},z.FINALDRAFT={type:3,value:"FINALDRAFT"},z.FINAL={type:3,value:"FINAL"},z.REVISION={type:3,value:"REVISION"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=z;class K{}K.SWINGING={type:3,value:"SWINGING"},K.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},K.SLIDING={type:3,value:"SLIDING"},K.FOLDING={type:3,value:"FOLDING"},K.REVOLVING={type:3,value:"REVOLVING"},K.ROLLINGUP={type:3,value:"ROLLINGUP"},K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=K;class Y{}Y.LEFT={type:3,value:"LEFT"},Y.MIDDLE={type:3,value:"MIDDLE"},Y.RIGHT={type:3,value:"RIGHT"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Y;class X{}X.ALUMINIUM={type:3,value:"ALUMINIUM"},X.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},X.STEEL={type:3,value:"STEEL"},X.WOOD={type:3,value:"WOOD"},X.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},X.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},X.PLASTIC={type:3,value:"PLASTIC"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=X;class Z{}Z.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Z.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Z.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},Z.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},Z.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Z.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Z.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},Z.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Z.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Z.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},Z.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Z.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Z.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},Z.REVOLVING={type:3,value:"REVOLVING"},Z.ROLLINGUP={type:3,value:"ROLLINGUP"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=Z;class q{}q.BEND={type:3,value:"BEND"},q.CONNECTOR={type:3,value:"CONNECTOR"},q.ENTRY={type:3,value:"ENTRY"},q.EXIT={type:3,value:"EXIT"},q.JUNCTION={type:3,value:"JUNCTION"},q.OBSTRUCTION={type:3,value:"OBSTRUCTION"},q.TRANSITION={type:3,value:"TRANSITION"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=q;class J{}J.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},J.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=J;class ${}$.FLATOVAL={type:3,value:"FLATOVAL"},$.RECTANGULAR={type:3,value:"RECTANGULAR"},$.ROUND={type:3,value:"ROUND"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=$;class ee{}ee.COMPUTER={type:3,value:"COMPUTER"},ee.DIRECTWATERHEATER={type:3,value:"DIRECTWATERHEATER"},ee.DISHWASHER={type:3,value:"DISHWASHER"},ee.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ee.ELECTRICHEATER={type:3,value:"ELECTRICHEATER"},ee.FACSIMILE={type:3,value:"FACSIMILE"},ee.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ee.FREEZER={type:3,value:"FREEZER"},ee.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ee.HANDDRYER={type:3,value:"HANDDRYER"},ee.INDIRECTWATERHEATER={type:3,value:"INDIRECTWATERHEATER"},ee.MICROWAVE={type:3,value:"MICROWAVE"},ee.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ee.PRINTER={type:3,value:"PRINTER"},ee.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ee.RADIANTHEATER={type:3,value:"RADIANTHEATER"},ee.SCANNER={type:3,value:"SCANNER"},ee.TELEPHONE={type:3,value:"TELEPHONE"},ee.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ee.TV={type:3,value:"TV"},ee.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ee.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ee.WATERHEATER={type:3,value:"WATERHEATER"},ee.WATERCOOLER={type:3,value:"WATERCOOLER"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ee;class te{}te.ALTERNATING={type:3,value:"ALTERNATING"},te.DIRECT={type:3,value:"DIRECT"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricCurrentEnum=te;class se{}se.ALARMPANEL={type:3,value:"ALARMPANEL"},se.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},se.CONTROLPANEL={type:3,value:"CONTROLPANEL"},se.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},se.GASDETECTORPANEL={type:3,value:"GASDETECTORPANEL"},se.INDICATORPANEL={type:3,value:"INDICATORPANEL"},se.MIMICPANEL={type:3,value:"MIMICPANEL"},se.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},se.SWITCHBOARD={type:3,value:"SWITCHBOARD"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionPointFunctionEnum=se;class ie{}ie.BATTERY={type:3,value:"BATTERY"},ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},ie.UPS={type:3,value:"UPS"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=ie;class re{}re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=re;class oe{}oe.ELECTRICPOINTHEATER={type:3,value:"ELECTRICPOINTHEATER"},oe.ELECTRICCABLEHEATER={type:3,value:"ELECTRICCABLEHEATER"},oe.ELECTRICMATHEATER={type:3,value:"ELECTRICMATHEATER"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricHeaterTypeEnum=oe;class ne{}ne.DC={type:3,value:"DC"},ne.INDUCTION={type:3,value:"INDUCTION"},ne.POLYPHASE={type:3,value:"POLYPHASE"},ne.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},ne.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=ne;class ae{}ae.TIMECLOCK={type:3,value:"TIMECLOCK"},ae.TIMEDELAY={type:3,value:"TIMEDELAY"},ae.RELAY={type:3,value:"RELAY"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=ae;class le{}le.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},le.ARCH={type:3,value:"ARCH"},le.BEAM_GRID={type:3,value:"BEAM_GRID"},le.BRACED_FRAME={type:3,value:"BRACED_FRAME"},le.GIRDER={type:3,value:"GIRDER"},le.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},le.RIGID_FRAME={type:3,value:"RIGID_FRAME"},le.SLAB_FIELD={type:3,value:"SLAB_FIELD"},le.TRUSS={type:3,value:"TRUSS"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=le;class he{}he.COMPLEX={type:3,value:"COMPLEX"},he.ELEMENT={type:3,value:"ELEMENT"},he.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=he;class ce{}ce.PRIMARY={type:3,value:"PRIMARY"},ce.SECONDARY={type:3,value:"SECONDARY"},ce.TERTIARY={type:3,value:"TERTIARY"},ce.AUXILIARY={type:3,value:"AUXILIARY"},ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnergySequenceEnum=ce;class Ae{}Ae.COMBINEDVALUE={type:3,value:"COMBINEDVALUE"},Ae.DISPOSAL={type:3,value:"DISPOSAL"},Ae.EXTRACTION={type:3,value:"EXTRACTION"},Ae.INSTALLATION={type:3,value:"INSTALLATION"},Ae.MANUFACTURE={type:3,value:"MANUFACTURE"},Ae.TRANSPORTATION={type:3,value:"TRANSPORTATION"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEnvironmentalImpactCategoryEnum=Ae;class ue{}ue.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},ue.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},ue.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},ue.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},ue.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},ue.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},ue.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},ue.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=ue;class pe{}pe.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},pe.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},pe.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},pe.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},pe.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=pe;class de{}de.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},de.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},de.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},de.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},de.TUBEAXIAL={type:3,value:"TUBEAXIAL"},de.VANEAXIAL={type:3,value:"VANEAXIAL"},de.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=de;class fe{}fe.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},fe.ODORFILTER={type:3,value:"ODORFILTER"},fe.OILFILTER={type:3,value:"OILFILTER"},fe.STRAINER={type:3,value:"STRAINER"},fe.WATERFILTER={type:3,value:"WATERFILTER"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=fe;class Ee{}Ee.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Ee.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Ee.HOSEREEL={type:3,value:"HOSEREEL"},Ee.SPRINKLER={type:3,value:"SPRINKLER"},Ee.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Ee;class me{}me.SOURCE={type:3,value:"SOURCE"},me.SINK={type:3,value:"SINK"},me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=me;class ye{}ye.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},ye.THERMOMETER={type:3,value:"THERMOMETER"},ye.AMMETER={type:3,value:"AMMETER"},ye.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},ye.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},ye.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},ye.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},ye.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=ye;class ge{}ge.ELECTRICMETER={type:3,value:"ELECTRICMETER"},ge.ENERGYMETER={type:3,value:"ENERGYMETER"},ge.FLOWMETER={type:3,value:"FLOWMETER"},ge.GASMETER={type:3,value:"GASMETER"},ge.OILMETER={type:3,value:"OILMETER"},ge.WATERMETER={type:3,value:"WATERMETER"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=ge;class Ie{}Ie.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},Ie.PAD_FOOTING={type:3,value:"PAD_FOOTING"},Ie.PILE_CAP={type:3,value:"PILE_CAP"},Ie.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=Ie;class ve{}ve.GASAPPLIANCE={type:3,value:"GASAPPLIANCE"},ve.GASBOOSTER={type:3,value:"GASBOOSTER"},ve.GASBURNER={type:3,value:"GASBURNER"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGasTerminalTypeEnum=ve;class Te{}Te.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Te.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Te.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Te.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Te.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Te.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Te.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Te;class _e{}_e.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},_e.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=_e;class Re{}Re.PLATE={type:3,value:"PLATE"},Re.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=Re;class Pe{}Pe.STEAMINJECTION={type:3,value:"STEAMINJECTION"},Pe.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},Pe.ADIABATICPAN={type:3,value:"ADIABATICPAN"},Pe.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},Pe.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},Pe.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},Pe.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},Pe.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},Pe.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},Pe.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},Pe.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},Pe.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},Pe.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=Pe;class De{}De.INTERNAL={type:3,value:"INTERNAL"},De.EXTERNAL={type:3,value:"EXTERNAL"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=De;class Ne{}Ne.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Ne.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Ne.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Ne;class Ce{}Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ce;class Oe{}Oe.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},Oe.FLUORESCENT={type:3,value:"FLUORESCENT"},Oe.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},Oe.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},Oe.METALHALIDE={type:3,value:"METALHALIDE"},Oe.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=Oe;class be{}be.AXIS1={type:3,value:"AXIS1"},be.AXIS2={type:3,value:"AXIS2"},be.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=be;class Se{}Se.TYPE_A={type:3,value:"TYPE_A"},Se.TYPE_B={type:3,value:"TYPE_B"},Se.TYPE_C={type:3,value:"TYPE_C"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Se;class we{}we.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},we.FLUORESCENT={type:3,value:"FLUORESCENT"},we.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},we.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},we.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},we.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},we.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},we.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},we.METALHALIDE={type:3,value:"METALHALIDE"},we.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=we;class xe{}xe.POINTSOURCE={type:3,value:"POINTSOURCE"},xe.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=xe;class Be{}Be.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Be.LOAD_CASE={type:3,value:"LOAD_CASE"},Be.LOAD_COMBINATION_GROUP={type:3,value:"LOAD_COMBINATION_GROUP"},Be.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Be;class Fe{}Fe.LOGICALAND={type:3,value:"LOGICALAND"},Fe.LOGICALOR={type:3,value:"LOGICALOR"},e.IfcLogicalOperatorEnum=Fe;class Me{}Me.BRACE={type:3,value:"BRACE"},Me.CHORD={type:3,value:"CHORD"},Me.COLLAR={type:3,value:"COLLAR"},Me.MEMBER={type:3,value:"MEMBER"},Me.MULLION={type:3,value:"MULLION"},Me.PLATE={type:3,value:"PLATE"},Me.POST={type:3,value:"POST"},Me.PURLIN={type:3,value:"PURLIN"},Me.RAFTER={type:3,value:"RAFTER"},Me.STRINGER={type:3,value:"STRINGER"},Me.STRUT={type:3,value:"STRUT"},Me.STUD={type:3,value:"STUD"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=Me;class Le{}Le.BELTDRIVE={type:3,value:"BELTDRIVE"},Le.COUPLING={type:3,value:"COUPLING"},Le.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Le;class Ue{}Ue.NULL={type:3,value:"NULL"},e.IfcNullStyle=Ue;class He{}He.PRODUCT={type:3,value:"PRODUCT"},He.PROCESS={type:3,value:"PROCESS"},He.CONTROL={type:3,value:"CONTROL"},He.RESOURCE={type:3,value:"RESOURCE"},He.ACTOR={type:3,value:"ACTOR"},He.GROUP={type:3,value:"GROUP"},He.PROJECT={type:3,value:"PROJECT"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=He;class Ge{}Ge.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ge.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ge.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ge.REQUIREMENT={type:3,value:"REQUIREMENT"},Ge.SPECIFICATION={type:3,value:"SPECIFICATION"},Ge.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ge;class ke{}ke.ASSIGNEE={type:3,value:"ASSIGNEE"},ke.ASSIGNOR={type:3,value:"ASSIGNOR"},ke.LESSEE={type:3,value:"LESSEE"},ke.LESSOR={type:3,value:"LESSOR"},ke.LETTINGAGENT={type:3,value:"LETTINGAGENT"},ke.OWNER={type:3,value:"OWNER"},ke.TENANT={type:3,value:"TENANT"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=ke;class Ve{}Ve.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},Ve.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},Ve.POWEROUTLET={type:3,value:"POWEROUTLET"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=Ve;class je{}je.GRILL={type:3,value:"GRILL"},je.LOUVER={type:3,value:"LOUVER"},je.SCREEN={type:3,value:"SCREEN"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=je;class Qe{}Qe.PHYSICAL={type:3,value:"PHYSICAL"},Qe.VIRTUAL={type:3,value:"VIRTUAL"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=Qe;class We{}We.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},We.COMPOSITE={type:3,value:"COMPOSITE"},We.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},We.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=We;class ze{}ze.COHESION={type:3,value:"COHESION"},ze.FRICTION={type:3,value:"FRICTION"},ze.SUPPORT={type:3,value:"SUPPORT"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=ze;class Ke{}Ke.BEND={type:3,value:"BEND"},Ke.CONNECTOR={type:3,value:"CONNECTOR"},Ke.ENTRY={type:3,value:"ENTRY"},Ke.EXIT={type:3,value:"EXIT"},Ke.JUNCTION={type:3,value:"JUNCTION"},Ke.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Ke.TRANSITION={type:3,value:"TRANSITION"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Ke;class Ye{}Ye.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ye.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ye.GUTTER={type:3,value:"GUTTER"},Ye.SPOOL={type:3,value:"SPOOL"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Ye;class Xe{}Xe.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Xe.SHEET={type:3,value:"SHEET"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Xe;class Ze{}Ze.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Ze.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Ze.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Ze.CALIBRATION={type:3,value:"CALIBRATION"},Ze.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Ze.SHUTDOWN={type:3,value:"SHUTDOWN"},Ze.STARTUP={type:3,value:"STARTUP"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Ze;class qe{}qe.CURVE={type:3,value:"CURVE"},qe.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=qe;class Je{}Je.CHANGE={type:3,value:"CHANGE"},Je.MAINTENANCE={type:3,value:"MAINTENANCE"},Je.MOVE={type:3,value:"MOVE"},Je.PURCHASE={type:3,value:"PURCHASE"},Je.WORK={type:3,value:"WORK"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderRecordTypeEnum=Je;class $e{}$e.CHANGEORDER={type:3,value:"CHANGEORDER"},$e.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},$e.MOVEORDER={type:3,value:"MOVEORDER"},$e.PURCHASEORDER={type:3,value:"PURCHASEORDER"},$e.WORKORDER={type:3,value:"WORKORDER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=$e;class et{}et.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},et.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=et;class tt{}tt.DESIGN={type:3,value:"DESIGN"},tt.DESIGNMAXIMUM={type:3,value:"DESIGNMAXIMUM"},tt.DESIGNMINIMUM={type:3,value:"DESIGNMINIMUM"},tt.SIMULATED={type:3,value:"SIMULATED"},tt.ASBUILT={type:3,value:"ASBUILT"},tt.COMMISSIONING={type:3,value:"COMMISSIONING"},tt.MEASURED={type:3,value:"MEASURED"},tt.USERDEFINED={type:3,value:"USERDEFINED"},tt.NOTKNOWN={type:3,value:"NOTKNOWN"},e.IfcPropertySourceEnum=tt;class st{}st.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},st.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},st.EARTHFAILUREDEVICE={type:3,value:"EARTHFAILUREDEVICE"},st.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},st.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},st.VARISTOR={type:3,value:"VARISTOR"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=st;class it{}it.CIRCULATOR={type:3,value:"CIRCULATOR"},it.ENDSUCTION={type:3,value:"ENDSUCTION"},it.SPLITCASE={type:3,value:"SPLITCASE"},it.VERTICALINLINE={type:3,value:"VERTICALINLINE"},it.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=it;class rt{}rt.HANDRAIL={type:3,value:"HANDRAIL"},rt.GUARDRAIL={type:3,value:"GUARDRAIL"},rt.BALUSTRADE={type:3,value:"BALUSTRADE"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=rt;class ot{}ot.STRAIGHT={type:3,value:"STRAIGHT"},ot.SPIRAL={type:3,value:"SPIRAL"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=ot;class nt{}nt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},nt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},nt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},nt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},nt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},nt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=nt;class at{}at.BLINN={type:3,value:"BLINN"},at.FLAT={type:3,value:"FLAT"},at.GLASS={type:3,value:"GLASS"},at.MATT={type:3,value:"MATT"},at.METAL={type:3,value:"METAL"},at.MIRROR={type:3,value:"MIRROR"},at.PHONG={type:3,value:"PHONG"},at.PLASTIC={type:3,value:"PLASTIC"},at.STRAUSS={type:3,value:"STRAUSS"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=at;class lt{}lt.MAIN={type:3,value:"MAIN"},lt.SHEAR={type:3,value:"SHEAR"},lt.LIGATURE={type:3,value:"LIGATURE"},lt.STUD={type:3,value:"STUD"},lt.PUNCHING={type:3,value:"PUNCHING"},lt.EDGE={type:3,value:"EDGE"},lt.RING={type:3,value:"RING"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=lt;class ht{}ht.PLAIN={type:3,value:"PLAIN"},ht.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=ht;class ct{}ct.CONSUMED={type:3,value:"CONSUMED"},ct.PARTIALLYCONSUMED={type:3,value:"PARTIALLYCONSUMED"},ct.NOTCONSUMED={type:3,value:"NOTCONSUMED"},ct.OCCUPIED={type:3,value:"OCCUPIED"},ct.PARTIALLYOCCUPIED={type:3,value:"PARTIALLYOCCUPIED"},ct.NOTOCCUPIED={type:3,value:"NOTOCCUPIED"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcResourceConsumptionEnum=ct;class At{}At.DIRECTION_X={type:3,value:"DIRECTION_X"},At.DIRECTION_Y={type:3,value:"DIRECTION_Y"},e.IfcRibPlateDirectionEnum=At;class ut{}ut.SUPPLIER={type:3,value:"SUPPLIER"},ut.MANUFACTURER={type:3,value:"MANUFACTURER"},ut.CONTRACTOR={type:3,value:"CONTRACTOR"},ut.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},ut.ARCHITECT={type:3,value:"ARCHITECT"},ut.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},ut.COSTENGINEER={type:3,value:"COSTENGINEER"},ut.CLIENT={type:3,value:"CLIENT"},ut.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},ut.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},ut.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},ut.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},ut.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},ut.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},ut.CIVILENGINEER={type:3,value:"CIVILENGINEER"},ut.COMISSIONINGENGINEER={type:3,value:"COMISSIONINGENGINEER"},ut.ENGINEER={type:3,value:"ENGINEER"},ut.OWNER={type:3,value:"OWNER"},ut.CONSULTANT={type:3,value:"CONSULTANT"},ut.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},ut.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},ut.RESELLER={type:3,value:"RESELLER"},ut.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=ut;class pt{}pt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},pt.SHED_ROOF={type:3,value:"SHED_ROOF"},pt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},pt.HIP_ROOF={type:3,value:"HIP_ROOF"},pt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},pt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},pt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},pt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},pt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},pt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},pt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},pt.DOME_ROOF={type:3,value:"DOME_ROOF"},pt.FREEFORM={type:3,value:"FREEFORM"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=pt;class dt{}dt.EXA={type:3,value:"EXA"},dt.PETA={type:3,value:"PETA"},dt.TERA={type:3,value:"TERA"},dt.GIGA={type:3,value:"GIGA"},dt.MEGA={type:3,value:"MEGA"},dt.KILO={type:3,value:"KILO"},dt.HECTO={type:3,value:"HECTO"},dt.DECA={type:3,value:"DECA"},dt.DECI={type:3,value:"DECI"},dt.CENTI={type:3,value:"CENTI"},dt.MILLI={type:3,value:"MILLI"},dt.MICRO={type:3,value:"MICRO"},dt.NANO={type:3,value:"NANO"},dt.PICO={type:3,value:"PICO"},dt.FEMTO={type:3,value:"FEMTO"},dt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=dt;class ft{}ft.AMPERE={type:3,value:"AMPERE"},ft.BECQUEREL={type:3,value:"BECQUEREL"},ft.CANDELA={type:3,value:"CANDELA"},ft.COULOMB={type:3,value:"COULOMB"},ft.CUBIC_METRE={type:3,value:"CUBIC_METRE"},ft.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},ft.FARAD={type:3,value:"FARAD"},ft.GRAM={type:3,value:"GRAM"},ft.GRAY={type:3,value:"GRAY"},ft.HENRY={type:3,value:"HENRY"},ft.HERTZ={type:3,value:"HERTZ"},ft.JOULE={type:3,value:"JOULE"},ft.KELVIN={type:3,value:"KELVIN"},ft.LUMEN={type:3,value:"LUMEN"},ft.LUX={type:3,value:"LUX"},ft.METRE={type:3,value:"METRE"},ft.MOLE={type:3,value:"MOLE"},ft.NEWTON={type:3,value:"NEWTON"},ft.OHM={type:3,value:"OHM"},ft.PASCAL={type:3,value:"PASCAL"},ft.RADIAN={type:3,value:"RADIAN"},ft.SECOND={type:3,value:"SECOND"},ft.SIEMENS={type:3,value:"SIEMENS"},ft.SIEVERT={type:3,value:"SIEVERT"},ft.SQUARE_METRE={type:3,value:"SQUARE_METRE"},ft.STERADIAN={type:3,value:"STERADIAN"},ft.TESLA={type:3,value:"TESLA"},ft.VOLT={type:3,value:"VOLT"},ft.WATT={type:3,value:"WATT"},ft.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=ft;class Et{}Et.BATH={type:3,value:"BATH"},Et.BIDET={type:3,value:"BIDET"},Et.CISTERN={type:3,value:"CISTERN"},Et.SHOWER={type:3,value:"SHOWER"},Et.SINK={type:3,value:"SINK"},Et.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Et.TOILETPAN={type:3,value:"TOILETPAN"},Et.URINAL={type:3,value:"URINAL"},Et.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Et.WCSEAT={type:3,value:"WCSEAT"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Et;class mt{}mt.UNIFORM={type:3,value:"UNIFORM"},mt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=mt;class yt{}yt.CO2SENSOR={type:3,value:"CO2SENSOR"},yt.FIRESENSOR={type:3,value:"FIRESENSOR"},yt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},yt.GASSENSOR={type:3,value:"GASSENSOR"},yt.HEATSENSOR={type:3,value:"HEATSENSOR"},yt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},yt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},yt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},yt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},yt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},yt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},yt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},yt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=yt;class gt{}gt.START_START={type:3,value:"START_START"},gt.START_FINISH={type:3,value:"START_FINISH"},gt.FINISH_START={type:3,value:"FINISH_START"},gt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=gt;class It{}It.A_QUALITYOFCOMPONENTS={type:3,value:"A_QUALITYOFCOMPONENTS"},It.B_DESIGNLEVEL={type:3,value:"B_DESIGNLEVEL"},It.C_WORKEXECUTIONLEVEL={type:3,value:"C_WORKEXECUTIONLEVEL"},It.D_INDOORENVIRONMENT={type:3,value:"D_INDOORENVIRONMENT"},It.E_OUTDOORENVIRONMENT={type:3,value:"E_OUTDOORENVIRONMENT"},It.F_INUSECONDITIONS={type:3,value:"F_INUSECONDITIONS"},It.G_MAINTENANCELEVEL={type:3,value:"G_MAINTENANCELEVEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcServiceLifeFactorTypeEnum=It;class vt{}vt.ACTUALSERVICELIFE={type:3,value:"ACTUALSERVICELIFE"},vt.EXPECTEDSERVICELIFE={type:3,value:"EXPECTEDSERVICELIFE"},vt.OPTIMISTICREFERENCESERVICELIFE={type:3,value:"OPTIMISTICREFERENCESERVICELIFE"},vt.PESSIMISTICREFERENCESERVICELIFE={type:3,value:"PESSIMISTICREFERENCESERVICELIFE"},vt.REFERENCESERVICELIFE={type:3,value:"REFERENCESERVICELIFE"},e.IfcServiceLifeTypeEnum=vt;class Tt{}Tt.FLOOR={type:3,value:"FLOOR"},Tt.ROOF={type:3,value:"ROOF"},Tt.LANDING={type:3,value:"LANDING"},Tt.BASESLAB={type:3,value:"BASESLAB"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Tt;class _t{}_t.DBA={type:3,value:"DBA"},_t.DBB={type:3,value:"DBB"},_t.DBC={type:3,value:"DBC"},_t.NC={type:3,value:"NC"},_t.NR={type:3,value:"NR"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSoundScaleEnum=_t;class Rt{}Rt.SECTIONALRADIATOR={type:3,value:"SECTIONALRADIATOR"},Rt.PANELRADIATOR={type:3,value:"PANELRADIATOR"},Rt.TUBULARRADIATOR={type:3,value:"TUBULARRADIATOR"},Rt.CONVECTOR={type:3,value:"CONVECTOR"},Rt.BASEBOARDHEATER={type:3,value:"BASEBOARDHEATER"},Rt.FINNEDTUBEUNIT={type:3,value:"FINNEDTUBEUNIT"},Rt.UNITHEATER={type:3,value:"UNITHEATER"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Rt;class Pt{}Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Pt;class Dt{}Dt.BIRDCAGE={type:3,value:"BIRDCAGE"},Dt.COWL={type:3,value:"COWL"},Dt.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=Dt;class Nt{}Nt.STRAIGHT={type:3,value:"STRAIGHT"},Nt.WINDER={type:3,value:"WINDER"},Nt.SPIRAL={type:3,value:"SPIRAL"},Nt.CURVED={type:3,value:"CURVED"},Nt.FREEFORM={type:3,value:"FREEFORM"},Nt.USERDEFINED={type:3,value:"USERDEFINED"},Nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Nt;class Ct{}Ct.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},Ct.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},Ct.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},Ct.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},Ct.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},Ct.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},Ct.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},Ct.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},Ct.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},Ct.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},Ct.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},Ct.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},Ct.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},Ct.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=Ct;class Ot{}Ot.READWRITE={type:3,value:"READWRITE"},Ot.READONLY={type:3,value:"READONLY"},Ot.LOCKED={type:3,value:"LOCKED"},Ot.READWRITELOCKED={type:3,value:"READWRITELOCKED"},Ot.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=Ot;class bt{}bt.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},bt.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},bt.CABLE={type:3,value:"CABLE"},bt.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},bt.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveTypeEnum=bt;class St{}St.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},St.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},St.SHELL={type:3,value:"SHELL"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceTypeEnum=St;class wt{}wt.POSITIVE={type:3,value:"POSITIVE"},wt.NEGATIVE={type:3,value:"NEGATIVE"},wt.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=wt;class xt{}xt.BUMP={type:3,value:"BUMP"},xt.OPACITY={type:3,value:"OPACITY"},xt.REFLECTION={type:3,value:"REFLECTION"},xt.SELFILLUMINATION={type:3,value:"SELFILLUMINATION"},xt.SHININESS={type:3,value:"SHININESS"},xt.SPECULAR={type:3,value:"SPECULAR"},xt.TEXTURE={type:3,value:"TEXTURE"},xt.TRANSPARENCYMAP={type:3,value:"TRANSPARENCYMAP"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceTextureEnum=xt;class Bt{}Bt.CONTACTOR={type:3,value:"CONTACTOR"},Bt.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Bt.STARTER={type:3,value:"STARTER"},Bt.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Bt.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Bt;class Ft{}Ft.PREFORMED={type:3,value:"PREFORMED"},Ft.SECTIONAL={type:3,value:"SECTIONAL"},Ft.EXPANSION={type:3,value:"EXPANSION"},Ft.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=Ft;class Mt{}Mt.STRAND={type:3,value:"STRAND"},Mt.WIRE={type:3,value:"WIRE"},Mt.BAR={type:3,value:"BAR"},Mt.COATED={type:3,value:"COATED"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Mt;class Lt{}Lt.LEFT={type:3,value:"LEFT"},Lt.RIGHT={type:3,value:"RIGHT"},Lt.UP={type:3,value:"UP"},Lt.DOWN={type:3,value:"DOWN"},e.IfcTextPath=Lt;class Ut{}Ut.PEOPLE={type:3,value:"PEOPLE"},Ut.LIGHTING={type:3,value:"LIGHTING"},Ut.EQUIPMENT={type:3,value:"EQUIPMENT"},Ut.VENTILATIONINDOORAIR={type:3,value:"VENTILATIONINDOORAIR"},Ut.VENTILATIONOUTSIDEAIR={type:3,value:"VENTILATIONOUTSIDEAIR"},Ut.RECIRCULATEDAIR={type:3,value:"RECIRCULATEDAIR"},Ut.EXHAUSTAIR={type:3,value:"EXHAUSTAIR"},Ut.AIREXCHANGERATE={type:3,value:"AIREXCHANGERATE"},Ut.DRYBULBTEMPERATURE={type:3,value:"DRYBULBTEMPERATURE"},Ut.RELATIVEHUMIDITY={type:3,value:"RELATIVEHUMIDITY"},Ut.INFILTRATION={type:3,value:"INFILTRATION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadSourceEnum=Ut;class Ht{}Ht.SENSIBLE={type:3,value:"SENSIBLE"},Ht.LATENT={type:3,value:"LATENT"},Ht.RADIANT={type:3,value:"RADIANT"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcThermalLoadTypeEnum=Ht;class Gt{}Gt.CONTINUOUS={type:3,value:"CONTINUOUS"},Gt.DISCRETE={type:3,value:"DISCRETE"},Gt.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Gt.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Gt.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Gt.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Gt;class kt{}kt.ANNUAL={type:3,value:"ANNUAL"},kt.MONTHLY={type:3,value:"MONTHLY"},kt.WEEKLY={type:3,value:"WEEKLY"},kt.DAILY={type:3,value:"DAILY"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesScheduleTypeEnum=kt;class Vt{}Vt.CURRENT={type:3,value:"CURRENT"},Vt.FREQUENCY={type:3,value:"FREQUENCY"},Vt.VOLTAGE={type:3,value:"VOLTAGE"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Vt;class jt{}jt.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},jt.CONTINUOUS={type:3,value:"CONTINUOUS"},jt.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},jt.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=jt;class Qt{}Qt.ELEVATOR={type:3,value:"ELEVATOR"},Qt.ESCALATOR={type:3,value:"ESCALATOR"},Qt.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Qt;class Wt{}Wt.CARTESIAN={type:3,value:"CARTESIAN"},Wt.PARAMETER={type:3,value:"PARAMETER"},Wt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Wt;class zt{}zt.FINNED={type:3,value:"FINNED"},zt.USERDEFINED={type:3,value:"USERDEFINED"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=zt;class Kt{}Kt.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},Kt.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},Kt.AREAUNIT={type:3,value:"AREAUNIT"},Kt.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},Kt.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},Kt.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},Kt.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},Kt.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},Kt.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},Kt.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},Kt.ENERGYUNIT={type:3,value:"ENERGYUNIT"},Kt.FORCEUNIT={type:3,value:"FORCEUNIT"},Kt.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},Kt.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},Kt.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},Kt.LENGTHUNIT={type:3,value:"LENGTHUNIT"},Kt.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},Kt.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},Kt.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},Kt.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},Kt.MASSUNIT={type:3,value:"MASSUNIT"},Kt.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},Kt.POWERUNIT={type:3,value:"POWERUNIT"},Kt.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},Kt.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},Kt.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},Kt.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},Kt.TIMEUNIT={type:3,value:"TIMEUNIT"},Kt.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=Kt;class Yt{}Yt.AIRHANDLER={type:3,value:"AIRHANDLER"},Yt.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Yt.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Yt.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Yt;class Xt{}Xt.AIRRELEASE={type:3,value:"AIRRELEASE"},Xt.ANTIVACUUM={type:3,value:"ANTIVACUUM"},Xt.CHANGEOVER={type:3,value:"CHANGEOVER"},Xt.CHECK={type:3,value:"CHECK"},Xt.COMMISSIONING={type:3,value:"COMMISSIONING"},Xt.DIVERTING={type:3,value:"DIVERTING"},Xt.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},Xt.DOUBLECHECK={type:3,value:"DOUBLECHECK"},Xt.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},Xt.FAUCET={type:3,value:"FAUCET"},Xt.FLUSHING={type:3,value:"FLUSHING"},Xt.GASCOCK={type:3,value:"GASCOCK"},Xt.GASTAP={type:3,value:"GASTAP"},Xt.ISOLATING={type:3,value:"ISOLATING"},Xt.MIXING={type:3,value:"MIXING"},Xt.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},Xt.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},Xt.REGULATING={type:3,value:"REGULATING"},Xt.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},Xt.STEAMTRAP={type:3,value:"STEAMTRAP"},Xt.STOPCOCK={type:3,value:"STOPCOCK"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=Xt;class Zt{}Zt.COMPRESSION={type:3,value:"COMPRESSION"},Zt.SPRING={type:3,value:"SPRING"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Zt;class qt{}qt.STANDARD={type:3,value:"STANDARD"},qt.POLYGONAL={type:3,value:"POLYGONAL"},qt.SHEAR={type:3,value:"SHEAR"},qt.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},qt.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=qt;class Jt{}Jt.FLOORTRAP={type:3,value:"FLOORTRAP"},Jt.FLOORWASTE={type:3,value:"FLOORWASTE"},Jt.GULLYSUMP={type:3,value:"GULLYSUMP"},Jt.GULLYTRAP={type:3,value:"GULLYTRAP"},Jt.GREASEINTERCEPTOR={type:3,value:"GREASEINTERCEPTOR"},Jt.OILINTERCEPTOR={type:3,value:"OILINTERCEPTOR"},Jt.PETROLINTERCEPTOR={type:3,value:"PETROLINTERCEPTOR"},Jt.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Jt.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Jt.WASTETRAP={type:3,value:"WASTETRAP"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Jt;class $t{}$t.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},$t.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},$t.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},$t.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},$t.TOPHUNG={type:3,value:"TOPHUNG"},$t.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},$t.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},$t.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},$t.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},$t.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},$t.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},$t.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},$t.OTHEROPERATION={type:3,value:"OTHEROPERATION"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=$t;class es{}es.LEFT={type:3,value:"LEFT"},es.MIDDLE={type:3,value:"MIDDLE"},es.RIGHT={type:3,value:"RIGHT"},es.BOTTOM={type:3,value:"BOTTOM"},es.TOP={type:3,value:"TOP"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=es;class ts{}ts.ALUMINIUM={type:3,value:"ALUMINIUM"},ts.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},ts.STEEL={type:3,value:"STEEL"},ts.WOOD={type:3,value:"WOOD"},ts.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},ts.PLASTIC={type:3,value:"PLASTIC"},ts.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=ts;class ss{}ss.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ss.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ss.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ss.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ss.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ss.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ss.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ss.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ss.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ss;class is{}is.ACTUAL={type:3,value:"ACTUAL"},is.BASELINE={type:3,value:"BASELINE"},is.PLANNED={type:3,value:"PLANNED"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkControlTypeEnum=is;e.IfcActorRole=class extends yI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class rs extends yI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=rs;e.IfcApplication=class extends yI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class os extends yI{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.type=411424972}}e.IfcAppliedValue=os;e.IfcAppliedValueRelationship=class extends yI{constructor(e,t,s,i,r,o){super(e),this.ComponentOfTotal=t,this.Components=s,this.ArithmeticOperator=i,this.Name=r,this.Description=o,this.type=1110488051}};e.IfcApproval=class extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.Description=t,this.ApprovalDateTime=s,this.ApprovalStatus=i,this.ApprovalLevel=r,this.ApprovalQualifier=o,this.Name=n,this.Identifier=a,this.type=130549933}};e.IfcApprovalActorRelationship=class extends yI{constructor(e,t,s,i){super(e),this.Actor=t,this.Approval=s,this.Role=i,this.type=2080292479}};e.IfcApprovalPropertyRelationship=class extends yI{constructor(e,t,s){super(e),this.ApprovedProperties=t,this.Approval=s,this.type=390851274}};e.IfcApprovalRelationship=class extends yI{constructor(e,t,s,i,r){super(e),this.RelatedApproval=t,this.RelatingApproval=s,this.Description=i,this.Name=r,this.type=3869604511}};class ns extends yI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=ns;e.IfcBoundaryEdgeCondition=class extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessByLengthX=s,this.LinearStiffnessByLengthY=i,this.LinearStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends ns{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.LinearStiffnessByAreaX=s,this.LinearStiffnessByAreaY=i,this.LinearStiffnessByAreaZ=r,this.type=3367102660}};class as extends ns{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=as;e.IfcBoundaryNodeConditionWarping=class extends as{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.LinearStiffnessX=s,this.LinearStiffnessY=i,this.LinearStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};e.IfcCalendarDate=class extends yI{constructor(e,t,s,i){super(e),this.DayComponent=t,this.MonthComponent=s,this.YearComponent=i,this.type=622194075}};e.IfcClassification=class extends yI{constructor(e,t,s,i,r){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.type=747523909}};e.IfcClassificationItem=class extends yI{constructor(e,t,s,i){super(e),this.Notation=t,this.ItemOf=s,this.Title=i,this.type=1767535486}};e.IfcClassificationItemRelationship=class extends yI{constructor(e,t,s){super(e),this.RelatingItem=t,this.RelatedItems=s,this.type=1098599126}};e.IfcClassificationNotation=class extends yI{constructor(e,t){super(e),this.NotationFacets=t,this.type=938368621}};e.IfcClassificationNotationFacet=class extends yI{constructor(e,t){super(e),this.NotationValue=t,this.type=3639012971}};class ls extends yI{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=ls;class hs extends yI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=hs;class cs extends hs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=cs;e.IfcConnectionPortGeometry=class extends hs{constructor(e,t,s,i){super(e),this.LocationAtRelatingElement=t,this.LocationAtRelatedElement=s,this.ProfileOfPort=i,this.type=4257277454}};e.IfcConnectionSurfaceGeometry=class extends hs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};class As extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=As;e.IfcConstraintAggregationRelationship=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.LogicalAggregator=o,this.type=1658513725}};e.IfcConstraintClassificationRelationship=class extends yI{constructor(e,t,s){super(e),this.ClassifiedConstraint=t,this.RelatedClassifications=s,this.type=613356794}};e.IfcConstraintRelationship=class extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedConstraints=r,this.type=347226245}};e.IfcCoordinatedUniversalTimeOffset=class extends yI{constructor(e,t,s,i){super(e),this.HourOffset=t,this.MinuteOffset=s,this.Sense=i,this.type=1065062679}};e.IfcCostValue=class extends os{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.CostType=a,this.Condition=l,this.type=602808272}};e.IfcCurrencyRelationship=class extends yI{constructor(e,t,s,i,r,o){super(e),this.RelatingMonetaryUnit=t,this.RelatedMonetaryUnit=s,this.ExchangeRate=i,this.RateDateTime=r,this.RateSource=o,this.type=539742890}};e.IfcCurveStyleFont=class extends yI{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends yI{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};e.IfcDateAndTime=class extends yI{constructor(e,t,s){super(e),this.DateComponent=t,this.TimeComponent=s,this.type=1072939445}};e.IfcDerivedUnit=class extends yI{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends yI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};e.IfcDocumentElectronicFormat=class extends yI{constructor(e,t,s,i){super(e),this.FileExtension=t,this.MimeContentType=s,this.MimeSubtype=i,this.type=1376555844}};e.IfcDocumentInformation=class extends yI{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.DocumentId=t,this.Name=s,this.Description=i,this.DocumentReferences=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends yI{constructor(e,t,s,i){super(e),this.RelatingDocument=t,this.RelatedDocuments=s,this.RelationshipType=i,this.type=770865208}};class us extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=3796139169}}e.IfcDraughtingCalloutRelationship=us;e.IfcEnvironmentalImpactValue=class extends os{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.ImpactType=a,this.Category=l,this.UserDefinedCategory=h,this.type=1648886627}};class ps extends yI{constructor(e,t,s,i){super(e),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ps;e.IfcExternallyDefinedHatchStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedSymbol=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3207319532}};e.IfcExternallyDefinedTextFont=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends yI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends yI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.LibraryReference=o,this.type=2655187982}};e.IfcLibraryReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3452421091}};e.IfcLightDistributionData=class extends yI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends yI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcLocalTime=class extends yI{constructor(e,t,s,i,r,o){super(e),this.HourComponent=t,this.MinuteComponent=s,this.SecondComponent=i,this.Zone=r,this.DaylightSavingOffset=o,this.type=30780891}};e.IfcMaterial=class extends yI{constructor(e,t){super(e),this.Name=t,this.type=1838606355}};e.IfcMaterialClassificationRelationship=class extends yI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};e.IfcMaterialLayer=class extends yI{constructor(e,t,s,i){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.type=248100487}};e.IfcMaterialLayerSet=class extends yI{constructor(e,t,s){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.type=3303938423}};e.IfcMaterialLayerSetUsage=class extends yI{constructor(e,t,s,i,r){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.type=1303795690}};e.IfcMaterialList=class extends yI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ds extends yI{constructor(e,t){super(e),this.Material=t,this.type=3265635763}}e.IfcMaterialProperties=ds;e.IfcMeasureWithUnit=class extends yI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};class fs extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.type=4256014907}}e.IfcMechanicalMaterialProperties=fs;e.IfcMechanicalSteelMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.YieldStress=a,this.UltimateStress=l,this.UltimateStrain=h,this.HardeningModule=c,this.ProportionalStress=A,this.PlasticStrain=u,this.Relaxations=p,this.type=677618848}};e.IfcMetric=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.type=3368373690}};e.IfcMonetaryUnit=class extends yI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Es extends yI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Es;class ms extends yI{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=ms;e.IfcObjective=class extends As{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.ResultValues=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOpticalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t),this.Material=t,this.VisibleTransmittance=s,this.SolarTransmittance=i,this.ThermalIrTransmittance=r,this.ThermalIrEmissivityBack=o,this.ThermalIrEmissivityFront=n,this.VisibleReflectanceBack=a,this.VisibleReflectanceFront=l,this.SolarReflectanceFront=h,this.SolarReflectanceBack=c,this.type=1227763645}};e.IfcOrganization=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Id=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOrganizationRelationship=class extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOwnerHistory=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Id=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends yI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ys extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ys;class gs extends ys{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=gs;e.IfcPostalAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class Is extends yI{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=Is;class vs extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=990879717}}e.IfcPreDefinedSymbol=vs;e.IfcPreDefinedTerminatorSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=3213052703}};class Ts extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=Ts;class _s extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=_s;e.IfcPresentationLayerWithStyle=class extends _s{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class Rs extends yI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=Rs;e.IfcPresentationStyleAssignment=class extends yI{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class Ps extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=Ps;e.IfcProductsOfCombustionProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.N20Content=i,this.COContent=r,this.CO2Content=o,this.type=2267347899}};class Ds extends yI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ds;class Ns extends yI{constructor(e,t,s){super(e),this.ProfileName=t,this.ProfileDefinition=s,this.type=2802850158}}e.IfcProfileProperties=Ns;class Cs extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Cs;e.IfcPropertyConstraintRelationship=class extends yI{constructor(e,t,s,i,r){super(e),this.RelatingConstraint=t,this.RelatedProperties=s,this.Name=i,this.Description=r,this.type=3896028662}};e.IfcPropertyDependencyRelationship=class extends yI{constructor(e,t,s,i,r,o){super(e),this.DependingProperty=t,this.DependantProperty=s,this.Name=i,this.Description=r,this.Expression=o,this.type=148025276}};e.IfcPropertyEnumeration=class extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.type=2044713172}};e.IfcQuantityCount=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.type=2093928680}};e.IfcQuantityLength=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.type=931644368}};e.IfcQuantityTime=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.type=3252649465}};e.IfcQuantityVolume=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.type=2405470396}};e.IfcQuantityWeight=class extends gs{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.type=825690147}};e.IfcReferencesValueDocument=class extends yI{constructor(e,t,s,i,r){super(e),this.ReferencedDocument=t,this.ReferencingValues=s,this.Name=i,this.Description=r,this.type=2692823254}};e.IfcReinforcementBarProperties=class extends yI{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};e.IfcRelaxation=class extends yI{constructor(e,t,s){super(e),this.RelaxationValue=t,this.InitialStress=s,this.type=1222501353}};class Os extends yI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=Os;class bs extends yI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=bs;class Ss extends yI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ss;e.IfcRepresentationMap=class extends yI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};e.IfcRibPlateProfileProperties=class extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.Thickness=i,this.RibHeight=r,this.RibWidth=o,this.RibSpacing=n,this.Direction=a,this.type=3679540991}};class ws extends yI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=ws;e.IfcSIUnit=class extends Es{constructor(e,t,s,i){super(e,new mI(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};e.IfcSectionProperties=class extends yI{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends yI{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcShapeAspect=class extends yI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class xs extends Os{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=xs;e.IfcShapeRepresentation=class extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Bs extends Cs{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=Bs;class Fs extends yI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Fs;class Ms extends yI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Ms;class Ls extends Ms{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ls;e.IfcStructuralLoadTemperature=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaT_Constant=s,this.DeltaT_Y=i,this.DeltaT_Z=r,this.type=3408363356}};class Us extends Os{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Us;class Hs extends Ss{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}}e.IfcStyledItem=Hs;e.IfcStyledRepresentation=class extends Us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceStyle=class extends Rs{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends yI{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends yI{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class Gs extends yI{constructor(e,t){super(e),this.SurfaceColour=t,this.type=846575682}}e.IfcSurfaceStyleShading=Gs;e.IfcSurfaceStyleWithTextures=class extends yI{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class ks extends yI{constructor(e,t,s,i,r){super(e),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.type=626085974}}e.IfcSurfaceTexture=ks;e.IfcSymbolStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.StyleOfSymbol=s,this.type=1290481447}};e.IfcTable=class extends yI{constructor(e,t,s){super(e),this.Name=t,this.Rows=s,this.type=985171141}};e.IfcTableRow=class extends yI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};e.IfcTelecomAddress=class extends rs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.type=912023232}};e.IfcTextStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.type=1447204868}};e.IfcTextStyleFontModel=class extends Ts{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTextStyleForDefinedFont=class extends yI{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};e.IfcTextStyleWithBoxCharacteristics=class extends yI{constructor(e,t,s,i,r,o){super(e),this.BoxHeight=t,this.BoxWidth=s,this.BoxSlantAngle=i,this.BoxRotateAngle=r,this.CharacterSpacing=o,this.type=1484833681}};class Vs extends yI{constructor(e){super(e),this.type=280115917}}e.IfcTextureCoordinate=Vs;e.IfcTextureCoordinateGenerator=class extends Vs{constructor(e,t,s){super(e),this.Mode=t,this.Parameter=s,this.type=1742049831}};e.IfcTextureMap=class extends Vs{constructor(e,t){super(e),this.TextureMaps=t,this.type=2552916305}};e.IfcTextureVertex=class extends yI{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcThermalMaterialProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.SpecificHeatCapacity=s,this.BoilingPoint=i,this.FreezingPoint=r,this.ThermalConductivity=o,this.type=3317419933}};class js extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=js;e.IfcTimeSeriesReferenceRelationship=class extends yI{constructor(e,t,s){super(e),this.ReferencedTimeSeries=t,this.TimeSeriesReferences=s,this.type=1718945513}};e.IfcTimeSeriesValue=class extends yI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Qs extends Ss{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Qs;e.IfcTopologyRepresentation=class extends xs{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends yI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Ws extends Qs{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Ws;e.IfcVertexBasedTextureMap=class extends yI{constructor(e,t,s){super(e),this.TextureVertices=t,this.TexturePoints=s,this.type=3304826586}};e.IfcVertexPoint=class extends Ws{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends yI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWaterProperties=class extends ds{constructor(e,t,s,i,r,o,n,a,l){super(e,t),this.Material=t,this.IsPotable=s,this.Hardness=i,this.AlkalinityConcentration=r,this.AcidityConcentration=o,this.ImpuritiesContent=n,this.PHLevel=a,this.DissolvedSolidsContent=l,this.type=1065908215}};class zs extends Hs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2442683028}}e.IfcAnnotationOccurrence=zs;e.IfcAnnotationSurfaceOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=962685235}};class Ks extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3612888222}}e.IfcAnnotationSymbolOccurrence=Ks;e.IfcAnnotationTextOccurrence=class extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=2297822566}};class Ys extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Ys;class Xs extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Xs;e.IfcArbitraryProfileDefWithVoids=class extends Ys{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends ks{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.RasterFormat=o,this.RasterCode=n,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Xs{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassificationReference=class extends ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.ReferencedSource=r,this.type=647927063}};e.IfcColourRgb=class extends ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Cs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};e.IfcCompositeProfileDef=class extends Ds{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Zs extends Qs{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Zs;e.IfcConnectionCurveGeometry=class extends hs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends cs{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Es{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};e.IfcConversionBasedUnit=class extends Es{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}};e.IfcCurveStyle=class extends Rs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.type=3800577675}};e.IfcDerivedProfileDef=class extends Ds{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}};e.IfcDimensionCalloutRelationship=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=2273265877}};e.IfcDimensionPair=class extends us{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.Description=s,this.RelatingDraughtingCallout=i,this.RelatedDraughtingCallout=r,this.type=1694125774}};e.IfcDocumentReference=class extends ps{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.ItemReference=s,this.Name=i,this.type=3732053477}};e.IfcDraughtingPreDefinedTextFont=class extends Ts{constructor(e,t){super(e,t),this.Name=t,this.type=4170525392}};class qs extends Qs{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=qs;e.IfcEdgeCurve=class extends qs{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcExtendedMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.ExtendedProperties=s,this.Description=i,this.Name=r,this.type=1860660968}};class Js extends Qs{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Js;class $s extends Qs{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=$s;e.IfcFaceOuterBound=class extends $s{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};e.IfcFaceSurface=class extends Js{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}};e.IfcFailureConnectionCondition=class extends Fs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends Rs{constructor(e,t,s){super(e,t),this.Name=t,this.FillStyles=s,this.type=738692330}};e.IfcFuelProperties=class extends ds{constructor(e,t,s,i,r,o){super(e,t),this.Material=t,this.CombustionTemperature=s,this.CarbonContent=i,this.LowerHeatingValue=r,this.HigherHeatingValue=o,this.type=3857492461}};e.IfcGeneralMaterialProperties=class extends ds{constructor(e,t,s,i,r){super(e,t),this.Material=t,this.MolecularWeight=s,this.Porosity=i,this.MassDensity=r,this.type=803998398}};class ei extends Ns{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.type=1446786286}}e.IfcGeneralProfileProperties=ei;class ti extends bs{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=ti;class si extends Ss{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=si;e.IfcGeometricRepresentationSubContext=class extends ti{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new mI(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class ii extends si{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=ii;e.IfcGridPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class ri extends si{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=ri;e.IfcHygroscopicMaterialProperties=class extends ds{constructor(e,t,s,i,r,o,n){super(e,t),this.Material=t,this.UpperVaporResistanceFactor=s,this.LowerVaporResistanceFactor=i,this.IsothermalMoistureCapacity=r,this.VaporPermeability=o,this.MoistureDiffusivity=n,this.type=2445078500}};e.IfcImageTexture=class extends ks{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.UrlReference=o,this.type=3905492369}};e.IfcIrregularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};class oi extends si{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=oi;e.IfcLightSourceAmbient=class extends oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends oi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class ni extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=ni;e.IfcLightSourceSpot=class extends ni{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends ms{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class ai extends Qs{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=ai;e.IfcMappedItem=class extends Ss{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterialDefinitionRepresentation=class extends Ps{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMechanicalConcreteMaterialProperties=class extends fs{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n),this.Material=t,this.DynamicViscosity=s,this.YoungModulus=i,this.ShearModulus=r,this.PoissonRatio=o,this.ThermalExpansionCoefficient=n,this.CompressiveStrength=a,this.MaxAggregateSize=l,this.AdmixturesDescription=h,this.Workability=c,this.ProtectivePoreRatio=A,this.WaterImpermeability=u,this.type=1430189142}};class li extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=li;class hi extends si{constructor(e,t){super(e),this.RepeatFactor=t,this.type=2833995503}}e.IfcOneDirectionRepeatFactor=hi;e.IfcOpenShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrientedEdge=class extends qs{constructor(e,t,s){super(e,new mI(0),new mI(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class ci extends Ds{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=ci;e.IfcPath=class extends Qs{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ys{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends ks{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.RepeatS=t,this.RepeatT=s,this.TextureType=i,this.TextureTransform=r,this.Width=o,this.Height=n,this.ColourComponents=a,this.Pixel=l,this.type=597895409}};class Ai extends si{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Ai;class ui extends si{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=ui;class pi extends si{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=pi;e.IfcPointOnCurve=class extends pi{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends pi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends ai{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends ri{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class di extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=di;class fi extends Is{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=fi;e.IfcPreDefinedDimensionSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=433424934}};e.IfcPreDefinedPointMarkerSymbol=class extends vs{constructor(e,t){super(e,t),this.Name=t,this.type=179317114}};e.IfcProductDefinitionShape=class extends Ps{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcPropertyBoundedValue=class extends Bs{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.type=871118103}};class Ei extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=Ei;e.IfcPropertyEnumeratedValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};class mi extends Ei{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=mi;e.IfcPropertySingleValue=class extends Bs{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends Bs{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.type=110355661}};class yi extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=yi;e.IfcRegularTimeSeries=class extends js{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementDefinitionProperties=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class gi extends ws{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=gi;e.IfcRoundedRectangleProfileDef=class extends yi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionedSpine=class extends si{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcServiceLifeFactor=class extends mi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PredefinedType=o,this.UpperValue=n,this.MostUsedValue=a,this.LowerValue=l,this.type=2411513650}};e.IfcShellBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};e.IfcSlippageConnectionCondition=class extends Fs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class Ii extends si{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=Ii;e.IfcSoundProperties=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.IsAttenuating=o,this.SoundScale=n,this.SoundValues=a,this.type=2485662743}};e.IfcSoundValue=class extends mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.SoundLevelTimeSeries=o,this.Frequency=n,this.SoundLevelSingleValue=a,this.type=1202362311}};e.IfcSpaceThermalLoadProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableValueRatio=o,this.ThermalLoadSource=n,this.PropertySource=a,this.SourceDescription=l,this.MaximumValue=h,this.MinimumValue=c,this.ThermalLoadTimeSeriesValues=A,this.UserDefinedThermalLoadSource=u,this.UserDefinedPropertySource=p,this.ThermalLoadType=d,this.type=390701378}};e.IfcStructuralLoadLinearForce=class extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ls{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class vi extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=vi;e.IfcStructuralLoadSingleDisplacementDistortion=class extends vi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ti extends Ls{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ti;e.IfcStructuralLoadSingleForceWarping=class extends Ti{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};class _i extends ei{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o,n,a),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.type=3843319758}}e.IfcStructuralProfileProperties=_i;e.IfcStructuralSteelProfileProperties=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_,R,P,D,N){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_),this.ProfileName=t,this.ProfileDefinition=s,this.PhysicalWeight=i,this.Perimeter=r,this.MinimumPlateThickness=o,this.MaximumPlateThickness=n,this.CrossSectionArea=a,this.TorsionalConstantX=l,this.MomentOfInertiaYZ=h,this.MomentOfInertiaY=c,this.MomentOfInertiaZ=A,this.WarpingConstant=u,this.ShearCentreZ=p,this.ShearCentreY=d,this.ShearDeformationAreaZ=f,this.ShearDeformationAreaY=E,this.MaximumSectionModulusY=m,this.MinimumSectionModulusY=y,this.MaximumSectionModulusZ=g,this.MinimumSectionModulusZ=I,this.TorsionalSectionModulus=v,this.CentreOfGravityInX=T,this.CentreOfGravityInY=_,this.ShearAreaZ=R,this.ShearAreaY=P,this.PlasticShapeFactorY=D,this.PlasticShapeFactorZ=N,this.type=3653947884}};e.IfcSubedge=class extends qs{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Ri extends si{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Ri;e.IfcSurfaceStyleRendering=class extends Gs{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class Pi extends Ii{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=Pi;e.IfcSweptDiskSolid=class extends Ii{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}};class Di extends Ri{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Di;e.IfcTShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.CentreOfGravityInY=p,this.type=3071757647}};class Ni extends Ks{constructor(e,t,s,i,r){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.type=3028897424}}e.IfcTerminatorSymbol=Ni;class Ci extends si{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Ci;e.IfcTextLiteralWithExtent=class extends Ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTrapeziumProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};e.IfcTwoDirectionRepeatFactor=class extends hi{constructor(e,t,s){super(e,t),this.RepeatFactor=t,this.SecondRepeatFactor=s,this.type=1345879162}};class Oi extends li{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Oi;class bi extends Oi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=bi;e.IfcUShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.CentreOfGravityInX=A,this.type=427810014}};e.IfcVector=class extends si{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends ai{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.type=336235671}};e.IfcWindowPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};e.IfcWindowStyle=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};class Si extends zs{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=3288037868}}e.IfcAnnotationCurveOccurrence=Si;e.IfcAnnotationFillArea=class extends si{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAnnotationFillAreaOccurrence=class extends zs{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.FillStyleTarget=r,this.GlobalOrLocal=o,this.type=2265737646}};e.IfcAnnotationSurface=class extends si{constructor(e,t,s){super(e),this.Item=t,this.TextureCoordinates=s,this.type=1302238472}};e.IfcAxis1Placement=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Ai{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Ai{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class wi extends si{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=wi;class xi extends Ri{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=xi;e.IfcBoundingBox=class extends si{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends ri{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.CentreOfGravityInX=h,this.type=2898889636}};e.IfcCartesianPoint=class extends pi{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Bi extends si{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Bi;class Fi extends Bi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Fi;e.IfcCartesianTransformationOperator2DnonUniform=class extends Fi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Mi extends Bi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Mi;e.IfcCartesianTransformationOperator3DnonUniform=class extends Mi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Li extends ci{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Li;e.IfcClosedShell=class extends Zs{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcCompositeCurveSegment=class extends si{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}};e.IfcCraneRailAShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.BaseWidth2=o,this.Radius=n,this.HeadWidth=a,this.HeadDepth2=l,this.HeadDepth3=h,this.WebThickness=c,this.BaseWidth4=A,this.BaseDepth1=u,this.BaseDepth2=p,this.BaseDepth3=d,this.CentreOfGravityInY=f,this.type=4133800736}};e.IfcCraneRailFShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallHeight=r,this.HeadWidth=o,this.Radius=n,this.HeadDepth2=a,this.HeadDepth3=l,this.WebThickness=h,this.BaseDepth1=c,this.BaseDepth2=A,this.CentreOfGravityInY=u,this.type=194851669}};class Ui extends si{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Ui;e.IfcCsgSolid=class extends Ii{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Hi extends si{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Hi;e.IfcCurveBoundedPlane=class extends xi{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcDefinedSymbol=class extends si{constructor(e,t,s){super(e),this.Definition=t,this.Target=s,this.type=693772133}};e.IfcDimensionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=606661476}};e.IfcDimensionCurveTerminator=class extends Ni{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Item=t,this.Styles=s,this.Name=i,this.AnnotatedCurve=r,this.Role=o,this.type=4054601972}};e.IfcDirection=class extends si{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorLiningProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.type=2963535650}};e.IfcDoorPanelProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorStyle=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};class Gi extends si{constructor(e,t){super(e),this.Contents=t,this.type=3073041342}}e.IfcDraughtingCallout=Gi;e.IfcDraughtingPreDefinedColour=class extends di{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends fi{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};e.IfcEdgeLoop=class extends ai{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class ki extends bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=ki;class Vi extends Ri{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Vi;e.IfcEllipseProfileDef=class extends ci{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};class ji extends mi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.type=80994333}}e.IfcEnergyProperties=ji;e.IfcExtrudedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}};e.IfcFaceBasedSurfaceModel=class extends si{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends si{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTileSymbolWithStyle=class extends si{constructor(e,t){super(e),this.Symbol=t,this.type=4203026998}};e.IfcFillAreaStyleTiles=class extends si{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFluidFlowProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PropertySource=o,this.FlowConditionTimeSeries=n,this.VelocityTimeSeries=a,this.FlowrateTimeSeries=l,this.Fluid=h,this.PressureTimeSeries=c,this.UserDefinedPropertySource=A,this.TemperatureSingleValue=u,this.WetBulbTemperatureSingleValue=p,this.WetBulbTemperatureTimeSeries=d,this.TemperatureTimeSeries=f,this.FlowrateSingleValue=E,this.FlowConditionSingleValue=m,this.VelocitySingleValue=y,this.PressureSingleValue=g,this.type=3455213021}};class Qi extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Qi;e.IfcFurnitureType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.type=1268542332}};e.IfcGeometricCurveSet=class extends ii{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};class Wi extends ci{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.type=1484403080}}e.IfcIShapeProfileDef=Wi;e.IfcLShapeProfileDef=class extends ci{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.CentreOfGravityInX=c,this.CentreOfGravityInY=A,this.type=572779678}};e.IfcLine=class extends Hi{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class zi extends Ii{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=zi;class Ki extends li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Ki;e.IfcOffsetCurve2D=class extends Hi{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Hi{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPermeableCoveringProperties=class extends mi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPlanarBox=class extends ui{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Vi{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class Yi extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2945172077}}e.IfcProcess=Yi;class Xi extends Ki{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xi;e.IfcProject=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectionCurve=class extends Si{constructor(e,t,s,i){super(e,t,s,i),this.Item=t,this.Styles=s,this.Name=i,this.type=4194566429}};e.IfcPropertySet=class extends mi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcProxy=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends xi{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};class Zi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=Zi;class qi extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}}e.IfcRelAssignsToActor=qi;class Ji extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}}e.IfcRelAssignsToControl=Ji;e.IfcRelAssignsToGroup=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}};e.IfcRelAssignsToProcess=class extends Zi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToProjectOrder=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=3372526763}};e.IfcRelAssignsToResource=class extends Zi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $i extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$i;e.IfcRelAssociatesAppliedValue=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingAppliedValue=n,this.type=1327628568}};e.IfcRelAssociatesApproval=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $i{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileProperties=class extends $i{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileProperties=n,this.ProfileSectionLocation=a,this.ProfileOrientation=l,this.type=2851387026}};class er extends gi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=er;class tr extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tr;e.IfcRelConnectsPathElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends er{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};e.IfcRelConnectsStructuralElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralMember=n,this.type=3912681535}};class sr extends er{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sr;e.IfcRelConnectsWithEccentricity=class extends sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedSpace=o,this.RelatedCoverings=n,this.type=2802773753}};class ir extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=2551354335}}e.IfcRelDecomposes=ir;class rr extends gi{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=693640335}}e.IfcRelDefines=rr;class or extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}}e.IfcRelDefinesByProperties=or;e.IfcRelDefinesByType=class extends rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInteractionRequirements=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DailyInteraction=o,this.ImportanceRating=n,this.LocationOfInteraction=a,this.RelatedSpaceProgram=l,this.RelatingSpaceProgram=h,this.type=4189434867}};e.IfcRelNests=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelOccupiesSpaces=class extends qi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=2051452291}};e.IfcRelOverridesProperties=class extends or{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.OverridingProperties=a,this.type=202636808}};e.IfcRelProjectsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSchedulesCostItems=class extends Ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=1058617721}};e.IfcRelSequence=class extends er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.type=4122056220}};e.IfcRelServicesBuildings=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};e.IfcRelSpaceBoundary=class extends er{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}};e.IfcRelVoidsElement=class extends er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};class nr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2914609552}}e.IfcResource=nr;e.IfcRevolvedAreaSolid=class extends Pi{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}};e.IfcRightCircularCone=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Ui{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class ar extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=ar;class lr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=lr;e.IfcSphere=class extends Ui{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};class hr extends Xi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=hr;class cr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=cr;class Ar extends cr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=Ar;class ur extends hr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=ur;class pr extends Ar{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=pr;e.IfcStructuralSurfaceMemberVarying=class extends pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.SubsequentThickness=c,this.VaryingThicknessLocation=A,this.type=2218152070}};e.IfcStructuredDimensionCallout=class extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=4070609034}};e.IfcSurfaceCurveSweptAreaSolid=class extends Pi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Di{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Di{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1580310250}};class dr extends Yi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.type=3473067441}}e.IfcTask=dr;e.IfcTransportElementType=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class fr extends Ki{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=fr;e.IfcAnnotation=class extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};e.IfcAsymmetricIShapeProfileDef=class extends Wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.CentreOfGravityInY=u,this.type=3207858831}};e.IfcBlock=class extends Ui{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends wi{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class Er extends Hi{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=Er;e.IfcBuilding=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class mr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=mr;e.IfcBuildingStorey=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcCircleHollowProfileDef=class extends Li{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcColumnType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};class yr extends Er{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=yr;class gr extends Hi{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=gr;class Ir extends nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=2559216714}}e.IfcConstructionResource=Ir;class vr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3293443760}}e.IfcControl=vr;e.IfcCostItem=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3895139033}};e.IfcCostSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SubmittedBy=n,this.PreparedBy=a,this.SubmittedOn=l,this.Status=h,this.TargetUsers=c,this.UpdateDate=A,this.ID=u,this.PredefinedType=p,this.type=1419761937}};e.IfcCoveringType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3295246426}};e.IfcCurtainWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};class Tr extends Gi{constructor(e,t){super(e,t),this.Contents=t,this.type=681481545}}e.IfcDimensionCurveDirectedCallout=Tr;class _r extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=_r;class Rr extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Rr;e.IfcElectricalBaseProperties=class extends ji{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.EnergySequence=o,this.UserDefinedEnergySequence=n,this.ElectricCurrentType=a,this.InputVoltage=l,this.InputFrequency=h,this.FullLoadCurrent=c,this.MinimumCircuitCurrent=A,this.MaximumPowerInput=u,this.RatedPowerInput=p,this.InputPhase=d,this.type=360485395}};class Pr extends Xi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Pr;e.IfcElementAssembly=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};class Dr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Dr;class Nr extends ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Nr;e.IfcEllipse=class extends gr{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Cr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Cr;e.IfcEquipmentElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1962604670}};e.IfcEquipmentStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3272907226}};e.IfcEvaporativeCoolerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcFacetedBrep=class extends zi{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}};e.IfcFacetedBrepWithVoids=class extends zi{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Or extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=647756555}}e.IfcFastener=Or;class br extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2489546625}}e.IfcFastenerType=br;class Sr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Sr;class wr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=wr;class xr extends Sr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=xr;class Br extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Br;class Fr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Fr;e.IfcFlowMeterType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Mr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Mr;class Lr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Lr;class Ur extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=Ur;class Hr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=Hr;class Gr extends Rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=Gr;e.IfcFurnishingElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}};e.IfcFurnitureStandard=class extends vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=814719939}};e.IfcGasTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=200128114}};e.IfcGrid=class extends Xi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.type=3009204131}};class kr extends Ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=kr;e.IfcHeatExchangerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcInventory=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.InventoryType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SkillSet=c,this.type=3827777499}};e.IfcLampType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcLinearDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2506943328}};e.IfcMechanicalFastener=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.type=377706215}};e.IfcMechanicalFastenerType=class extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2108223431}};e.IfcMemberType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcMove=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.MoveFrom=A,this.MoveTo=u,this.PunchList=p,this.type=1916936684}};e.IfcOccupant=class extends fr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends xr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3588315303}};e.IfcOrderAction=class extends dr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TaskId=n,this.Status=a,this.WorkMethod=l,this.IsMilestone=h,this.Priority=c,this.ActionID=A,this.type=3425660407}};e.IfcOutletType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LifeCyclePhase=n,this.type=2382730787}};e.IfcPermit=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PermitID=n,this.type=3327091369}};e.IfcPipeFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolyline=class extends Er{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class Vr extends Xi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=Vr;e.IfcProcedure=class extends Yi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ProcedureID=n,this.ProcedureType=a,this.UserDefinedProcedureType=l,this.type=2744685151}};e.IfcProjectOrder=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ID=n,this.PredefinedType=a,this.Status=l,this.type=2904328755}};e.IfcProjectOrderRecord=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Records=n,this.PredefinedType=a,this.type=3642467123}};e.IfcProjectionElement=class extends wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRadiusDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=3248260540}};e.IfcRailingType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRelAggregates=class extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRelAssignsTasks=class extends Ji{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.TimeForTask=l,this.type=2863920197}};e.IfcSanitaryTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcScheduleTimeControl=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v,T,_){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ActualStart=n,this.EarlyStart=a,this.LateStart=l,this.ScheduleStart=h,this.ActualFinish=c,this.EarlyFinish=A,this.LateFinish=u,this.ScheduleFinish=p,this.ScheduleDuration=d,this.ActualDuration=f,this.RemainingTime=E,this.FreeFloat=m,this.TotalFloat=y,this.IsCritical=g,this.StatusTime=I,this.StartFloat=v,this.FinishFloat=T,this.Completion=_,this.type=3517283431}};e.IfcServiceLife=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ServiceLifeType=n,this.ServiceLifeDuration=a,this.type=4105383287}};e.IfcSite=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSpace=class extends ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.InteriorOrExteriorSpace=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceProgram=class extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.SpaceProgramIdentifier=n,this.MaxRequiredArea=a,this.MinRequiredArea=l,this.RequestedLocation=h,this.StandardRequiredArea=c,this.type=652456506}};e.IfcSpaceType=class extends lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3812236995}};e.IfcStackTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};class jr extends hr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=682877961}}e.IfcStructuralAction=jr;class Qr extends cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=Qr;e.IfcStructuralCurveConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=4243806635}};class Wr extends Ar{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=214636428}}e.IfcStructuralCurveMember=Wr;e.IfcStructuralCurveMemberVarying=class extends Wr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=2445595289}};class zr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1807405624}}e.IfcStructuralLinearAction=zr;e.IfcStructuralLinearActionVarying=class extends zr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=1721250024}};e.IfcStructuralLoadGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}};class Kr extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.type=1621171031}}e.IfcStructuralPlanarAction=Kr;e.IfcStructuralPlanarActionVarying=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.ProjectedOrTrue=u,this.VaryingAppliedLoadLocation=p,this.SubsequentAppliedLoads=d,this.type=3987759626}};e.IfcStructuralPointAction=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.CausedBy=A,this.type=2082059205}};e.IfcStructuralPointConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=734778138}};e.IfcStructuralPointReaction=class extends ur{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};e.IfcStructuralSurfaceConnection=class extends Qr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.SubContractor=c,this.JobDescription=A,this.type=148013059}};e.IfcSwitchingDeviceType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class Yr extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=Yr;e.IfcTankType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTimeSeriesSchedule=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ApplicableDates=n,this.TimeSeriesScheduleType=a,this.TimeSeries=l,this.type=1637806684}};e.IfcTransformerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OperationType=h,this.CapacityByWeight=c,this.CapacityByNumber=A,this.type=1620046519}};e.IfcTrimmedCurve=class extends Er{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVirtualElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcWallType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};class Xr extends vr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=1028945134}}e.IfcWorkControl=Xr;e.IfcWorkPlan=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=4218914973}};e.IfcWorkSchedule=class extends Xr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identifier=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.WorkControlType=d,this.UserDefinedControlType=f,this.type=3342526732}};e.IfcZone=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1033361043}};e.Ifc2DCompositeCurve=class extends yr{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1213861670}};e.IfcActionRequest=class extends vr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.RequestID=n,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAngularDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=2470393545}};e.IfcAsset=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.AssetID=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};class Zr extends Er{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Zr;e.IfcBeamType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};class qr extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1916977116}}e.IfcBezierCurve=qr;e.IfcBoilerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Jr extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=Jr;class $r extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=52481810}}e.IfcBuildingElementComponent=$r;e.IfcBuildingElementPart=class extends $r{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2979338954}};e.IfcBuildingElementProxy=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.CompositionType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcCableCarrierFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcCircle=class extends gr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCoilType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=843113511}};e.IfcCompressorType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcCondition=class extends kr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2188551683}};e.IfcConditionCriterion=class extends vr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Criterion=n,this.CriterionDateTime=a,this.type=1163958913}};e.IfcConstructionEquipmentResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.Suppliers=c,this.UsageRatio=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ResourceIdentifier=n,this.ResourceGroup=a,this.ResourceConsumption=l,this.BaseQuantity=h,this.type=488727124}};e.IfcCooledBeamType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3495092785}};e.IfcDamperType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiameterDimension=class extends Tr{constructor(e,t){super(e,t),this.Contents=t,this.type=4147604152}};e.IfcDiscreteAccessory=class extends Dr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1335981549}};class eo extends Nr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2635815018}}e.IfcDiscreteAccessoryType=eo;e.IfcDistributionChamberElementType=class extends Rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class to extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=to;class so extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=so;class io extends so{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=io;e.IfcDistributionPort=class extends Vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.type=3041715199}};e.IfcDoor=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=395920057}};e.IfcDuctFittingType=class extends Fr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Lr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};class ro extends xr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.type=855621170}}e.IfcEdgeFeature=ro;e.IfcElectricApplianceType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricFlowStorageDeviceType=class extends Ur{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricHeaterType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1365060375}};e.IfcElectricMotorType=class extends Cr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Br{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};e.IfcElectricalCircuit=class extends Yr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=1634875225}};e.IfcElectricalElement=class extends Pr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=857184966}};e.IfcEnergyConversionDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}};e.IfcFanType=class extends Mr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends Hr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class oo extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=oo;e.IfcFlowFitting=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}};e.IfcFlowInstrumentType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMovingDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}};e.IfcFlowSegment=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}};e.IfcFlowStorageDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}};e.IfcFlowTerminal=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}};e.IfcFlowTreatmentDevice=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}};e.IfcFooting=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcMember=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1073191201}};e.IfcPile=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPlate=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3171933400}};e.IfcRailing=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=3024970846}};e.IfcRampFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3283111854}};e.IfcRationalBezierCurve=class extends qr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.WeightsData=n,this.type=3055160366}};class no extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=no;e.IfcReinforcingMesh=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.type=2320036040}};e.IfcRoof=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=2016517767}};e.IfcRoundedEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Radius=c,this.type=1376911519}};e.IfcSensorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcSlab=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcStair=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ShapeType=h,this.type=331165859}};e.IfcStairFlight=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRiser=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends Yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.type=2515109513}};e.IfcTendon=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=2347447852}};e.IfcVibrationIsolatorType=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};class ao extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2391406946}}e.IfcWall=ao;e.IfcWallStandardCase=class extends ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3512223829}};e.IfcWindow=class extends Jr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.type=3304561284}};e.IfcActuatorType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAlarmType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcBeam=class extends Jr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=753842376}};e.IfcChamferEdgeFeature=class extends ro{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.FeatureLength=h,this.Width=c,this.Height=A,this.type=2454782716}};e.IfcControllerType=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcDistributionChamberElement=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1052013943}};e.IfcDistributionControlElement=class extends so{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.ControlElementId=h,this.type=1062813311}};e.IfcElectricDistributionPoint=class extends oo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.DistributionPointFunction=h,this.UserDefinedFunction=c,this.type=3700593921}};e.IfcReinforcingBar=class extends no{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.BarRole=p,this.BarSurface=d,this.type=979691226}}}(hI||(hI={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.SNOW_S={type:3,value:"SNOW_S"},i.WIND_W={type:3,value:"WIND_W"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.FIRE={type:3,value:"FIRE"},i.IMPULSE={type:3,value:"IMPULSE"},i.IMPACT={type:3,value:"IMPACT"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.ERECTION={type:3,value:"ERECTION"},i.PROPPING={type:3,value:"PROPPING"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.CREEP={type:3,value:"CREEP"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.ICE={type:3,value:"ICE"},i.CURRENT={type:3,value:"CURRENT"},i.WAVE={type:3,value:"WAVE"},i.RAIN={type:3,value:"RAIN"},i.BRAKES={type:3,value:"BRAKES"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.HOME={type:3,value:"HOME"},n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},A.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},A.LOADING_3D={type:3,value:"LOADING_3D"},A.USERDEFINED={type:3,value:"USERDEFINED"},A.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=A;class u{}u.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},u.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},u.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},u.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},u.USERDEFINED={type:3,value:"USERDEFINED"},u.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=u;class p{}p.ADD={type:3,value:"ADD"},p.DIVIDE={type:3,value:"DIVIDE"},p.MULTIPLY={type:3,value:"MULTIPLY"},p.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=p;class d{}d.SITE={type:3,value:"SITE"},d.FACTORY={type:3,value:"FACTORY"},d.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=d;class f{}f.AMPLIFIER={type:3,value:"AMPLIFIER"},f.CAMERA={type:3,value:"CAMERA"},f.DISPLAY={type:3,value:"DISPLAY"},f.MICROPHONE={type:3,value:"MICROPHONE"},f.PLAYER={type:3,value:"PLAYER"},f.PROJECTOR={type:3,value:"PROJECTOR"},f.RECEIVER={type:3,value:"RECEIVER"},f.SPEAKER={type:3,value:"SPEAKER"},f.SWITCHER={type:3,value:"SWITCHER"},f.TELEPHONE={type:3,value:"TELEPHONE"},f.TUNER={type:3,value:"TUNER"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=f;class E{}E.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},E.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},E.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},E.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},E.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},E.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=E;class m{}m.PLANE_SURF={type:3,value:"PLANE_SURF"},m.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},m.CONICAL_SURF={type:3,value:"CONICAL_SURF"},m.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},m.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},m.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},m.RULED_SURF={type:3,value:"RULED_SURF"},m.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},m.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},m.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},m.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=m;class y{}y.BEAM={type:3,value:"BEAM"},y.JOIST={type:3,value:"JOIST"},y.HOLLOWCORE={type:3,value:"HOLLOWCORE"},y.LINTEL={type:3,value:"LINTEL"},y.SPANDREL={type:3,value:"SPANDREL"},y.T_BEAM={type:3,value:"T_BEAM"},y.USERDEFINED={type:3,value:"USERDEFINED"},y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=y;class g{}g.GREATERTHAN={type:3,value:"GREATERTHAN"},g.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},g.LESSTHAN={type:3,value:"LESSTHAN"},g.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},g.EQUALTO={type:3,value:"EQUALTO"},g.NOTEQUALTO={type:3,value:"NOTEQUALTO"},g.INCLUDES={type:3,value:"INCLUDES"},g.NOTINCLUDES={type:3,value:"NOTINCLUDES"},g.INCLUDEDIN={type:3,value:"INCLUDEDIN"},g.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},e.IfcBenchmarkEnum=g;class I{}I.WATER={type:3,value:"WATER"},I.STEAM={type:3,value:"STEAM"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=I;class v{}v.UNION={type:3,value:"UNION"},v.INTERSECTION={type:3,value:"INTERSECTION"},v.DIFFERENCE={type:3,value:"DIFFERENCE"},e.IfcBooleanOperator=v;class T{}T.INSULATION={type:3,value:"INSULATION"},T.PRECASTPANEL={type:3,value:"PRECASTPANEL"},T.USERDEFINED={type:3,value:"USERDEFINED"},T.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=T;class _{}_.COMPLEX={type:3,value:"COMPLEX"},_.ELEMENT={type:3,value:"ELEMENT"},_.PARTIAL={type:3,value:"PARTIAL"},_.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},_.PROVISIONFORSPACE={type:3,value:"PROVISIONFORSPACE"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=_;class R{}R.FENESTRATION={type:3,value:"FENESTRATION"},R.FOUNDATION={type:3,value:"FOUNDATION"},R.LOADBEARING={type:3,value:"LOADBEARING"},R.OUTERSHELL={type:3,value:"OUTERSHELL"},R.SHADING={type:3,value:"SHADING"},R.TRANSPORT={type:3,value:"TRANSPORT"},R.USERDEFINED={type:3,value:"USERDEFINED"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=R;class P{}P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=P;class D{}D.BEND={type:3,value:"BEND"},D.CROSS={type:3,value:"CROSS"},D.REDUCER={type:3,value:"REDUCER"},D.TEE={type:3,value:"TEE"},D.USERDEFINED={type:3,value:"USERDEFINED"},D.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=D;class N{}N.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},N.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},N.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},N.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=N;class C{}C.CONNECTOR={type:3,value:"CONNECTOR"},C.ENTRY={type:3,value:"ENTRY"},C.EXIT={type:3,value:"EXIT"},C.JUNCTION={type:3,value:"JUNCTION"},C.TRANSITION={type:3,value:"TRANSITION"},C.USERDEFINED={type:3,value:"USERDEFINED"},C.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=C;class O{}O.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},O.CABLESEGMENT={type:3,value:"CABLESEGMENT"},O.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},O.CORESEGMENT={type:3,value:"CORESEGMENT"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=O;class b{}b.NOCHANGE={type:3,value:"NOCHANGE"},b.MODIFIED={type:3,value:"MODIFIED"},b.ADDED={type:3,value:"ADDED"},b.DELETED={type:3,value:"DELETED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=b;class S{}S.AIRCOOLED={type:3,value:"AIRCOOLED"},S.WATERCOOLED={type:3,value:"WATERCOOLED"},S.HEATRECOVERY={type:3,value:"HEATRECOVERY"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=S;class w{}w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=w;class x{}x.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},x.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},x.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},x.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},x.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},x.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},x.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=x;class B{}B.COLUMN={type:3,value:"COLUMN"},B.PILASTER={type:3,value:"PILASTER"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=B;class F{}F.ANTENNA={type:3,value:"ANTENNA"},F.COMPUTER={type:3,value:"COMPUTER"},F.FAX={type:3,value:"FAX"},F.GATEWAY={type:3,value:"GATEWAY"},F.MODEM={type:3,value:"MODEM"},F.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},F.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},F.NETWORKHUB={type:3,value:"NETWORKHUB"},F.PRINTER={type:3,value:"PRINTER"},F.REPEATER={type:3,value:"REPEATER"},F.ROUTER={type:3,value:"ROUTER"},F.SCANNER={type:3,value:"SCANNER"},F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=F;class M{}M.P_COMPLEX={type:3,value:"P_COMPLEX"},M.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=M;class L{}L.DYNAMIC={type:3,value:"DYNAMIC"},L.RECIPROCATING={type:3,value:"RECIPROCATING"},L.ROTARY={type:3,value:"ROTARY"},L.SCROLL={type:3,value:"SCROLL"},L.TROCHOIDAL={type:3,value:"TROCHOIDAL"},L.SINGLESTAGE={type:3,value:"SINGLESTAGE"},L.BOOSTER={type:3,value:"BOOSTER"},L.OPENTYPE={type:3,value:"OPENTYPE"},L.HERMETIC={type:3,value:"HERMETIC"},L.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},L.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},L.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},L.ROTARYVANE={type:3,value:"ROTARYVANE"},L.SINGLESCREW={type:3,value:"SINGLESCREW"},L.TWINSCREW={type:3,value:"TWINSCREW"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=L;class U{}U.AIRCOOLED={type:3,value:"AIRCOOLED"},U.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},U.WATERCOOLED={type:3,value:"WATERCOOLED"},U.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},U.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},U.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},U.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=U;class H{}H.ATPATH={type:3,value:"ATPATH"},H.ATSTART={type:3,value:"ATSTART"},H.ATEND={type:3,value:"ATEND"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=H;class G{}G.HARD={type:3,value:"HARD"},G.SOFT={type:3,value:"SOFT"},G.ADVISORY={type:3,value:"ADVISORY"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=G;class k{}k.DEMOLISHING={type:3,value:"DEMOLISHING"},k.EARTHMOVING={type:3,value:"EARTHMOVING"},k.ERECTING={type:3,value:"ERECTING"},k.HEATING={type:3,value:"HEATING"},k.LIGHTING={type:3,value:"LIGHTING"},k.PAVING={type:3,value:"PAVING"},k.PUMPING={type:3,value:"PUMPING"},k.TRANSPORTING={type:3,value:"TRANSPORTING"},k.USERDEFINED={type:3,value:"USERDEFINED"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=k;class V{}V.AGGREGATES={type:3,value:"AGGREGATES"},V.CONCRETE={type:3,value:"CONCRETE"},V.DRYWALL={type:3,value:"DRYWALL"},V.FUEL={type:3,value:"FUEL"},V.GYPSUM={type:3,value:"GYPSUM"},V.MASONRY={type:3,value:"MASONRY"},V.METAL={type:3,value:"METAL"},V.PLASTIC={type:3,value:"PLASTIC"},V.WOOD={type:3,value:"WOOD"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},V.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=V;class j{}j.ASSEMBLY={type:3,value:"ASSEMBLY"},j.FORMWORK={type:3,value:"FORMWORK"},j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=j;class Q{}Q.FLOATING={type:3,value:"FLOATING"},Q.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},Q.PROPORTIONAL={type:3,value:"PROPORTIONAL"},Q.MULTIPOSITION={type:3,value:"MULTIPOSITION"},Q.TWOPOSITION={type:3,value:"TWOPOSITION"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=Q;class W{}W.ACTIVE={type:3,value:"ACTIVE"},W.PASSIVE={type:3,value:"PASSIVE"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=W;class z{}z.NATURALDRAFT={type:3,value:"NATURALDRAFT"},z.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},z.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=z;class K{}K.USERDEFINED={type:3,value:"USERDEFINED"},K.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=K;class Y{}Y.BUDGET={type:3,value:"BUDGET"},Y.COSTPLAN={type:3,value:"COSTPLAN"},Y.ESTIMATE={type:3,value:"ESTIMATE"},Y.TENDER={type:3,value:"TENDER"},Y.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},Y.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},Y.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=Y;class X{}X.CEILING={type:3,value:"CEILING"},X.FLOORING={type:3,value:"FLOORING"},X.CLADDING={type:3,value:"CLADDING"},X.ROOFING={type:3,value:"ROOFING"},X.MOLDING={type:3,value:"MOLDING"},X.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},X.INSULATION={type:3,value:"INSULATION"},X.MEMBRANE={type:3,value:"MEMBRANE"},X.SLEEVING={type:3,value:"SLEEVING"},X.WRAPPING={type:3,value:"WRAPPING"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=X;class Z{}Z.OFFICE={type:3,value:"OFFICE"},Z.SITE={type:3,value:"SITE"},Z.USERDEFINED={type:3,value:"USERDEFINED"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=Z;class q{}q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=q;class J{}J.LINEAR={type:3,value:"LINEAR"},J.LOG_LINEAR={type:3,value:"LOG_LINEAR"},J.LOG_LOG={type:3,value:"LOG_LOG"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=J;class ${}$.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},$.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},$.BLASTDAMPER={type:3,value:"BLASTDAMPER"},$.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},$.FIREDAMPER={type:3,value:"FIREDAMPER"},$.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},$.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},$.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},$.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},$.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},$.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=$;class ee{}ee.MEASURED={type:3,value:"MEASURED"},ee.PREDICTED={type:3,value:"PREDICTED"},ee.SIMULATED={type:3,value:"SIMULATED"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=ee;class te{}te.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},te.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},te.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},te.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},te.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},te.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},te.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},te.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},te.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},te.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},te.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},te.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},te.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},te.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},te.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},te.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},te.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},te.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},te.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},te.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},te.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},te.TORQUEUNIT={type:3,value:"TORQUEUNIT"},te.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},te.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},te.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},te.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},te.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},te.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},te.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},te.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},te.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},te.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},te.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},te.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},te.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},te.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},te.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},te.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},te.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},te.PHUNIT={type:3,value:"PHUNIT"},te.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},te.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},te.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},te.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},te.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},te.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},te.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},te.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},te.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},te.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},te.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},te.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},te.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=te;class se{}se.POSITIVE={type:3,value:"POSITIVE"},se.NEGATIVE={type:3,value:"NEGATIVE"},e.IfcDirectionSenseEnum=se;class ie{}ie.ANCHORPLATE={type:3,value:"ANCHORPLATE"},ie.BRACKET={type:3,value:"BRACKET"},ie.SHOE={type:3,value:"SHOE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=ie;class re{}re.FORMEDDUCT={type:3,value:"FORMEDDUCT"},re.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},re.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},re.MANHOLE={type:3,value:"MANHOLE"},re.METERCHAMBER={type:3,value:"METERCHAMBER"},re.SUMP={type:3,value:"SUMP"},re.TRENCH={type:3,value:"TRENCH"},re.VALVECHAMBER={type:3,value:"VALVECHAMBER"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=re;class oe{}oe.CABLE={type:3,value:"CABLE"},oe.CABLECARRIER={type:3,value:"CABLECARRIER"},oe.DUCT={type:3,value:"DUCT"},oe.PIPE={type:3,value:"PIPE"},oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=oe;class ne{}ne.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},ne.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},ne.CHEMICAL={type:3,value:"CHEMICAL"},ne.CHILLEDWATER={type:3,value:"CHILLEDWATER"},ne.COMMUNICATION={type:3,value:"COMMUNICATION"},ne.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},ne.CONDENSERWATER={type:3,value:"CONDENSERWATER"},ne.CONTROL={type:3,value:"CONTROL"},ne.CONVEYING={type:3,value:"CONVEYING"},ne.DATA={type:3,value:"DATA"},ne.DISPOSAL={type:3,value:"DISPOSAL"},ne.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},ne.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},ne.DRAINAGE={type:3,value:"DRAINAGE"},ne.EARTHING={type:3,value:"EARTHING"},ne.ELECTRICAL={type:3,value:"ELECTRICAL"},ne.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},ne.EXHAUST={type:3,value:"EXHAUST"},ne.FIREPROTECTION={type:3,value:"FIREPROTECTION"},ne.FUEL={type:3,value:"FUEL"},ne.GAS={type:3,value:"GAS"},ne.HAZARDOUS={type:3,value:"HAZARDOUS"},ne.HEATING={type:3,value:"HEATING"},ne.LIGHTING={type:3,value:"LIGHTING"},ne.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},ne.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},ne.OIL={type:3,value:"OIL"},ne.OPERATIONAL={type:3,value:"OPERATIONAL"},ne.POWERGENERATION={type:3,value:"POWERGENERATION"},ne.RAINWATER={type:3,value:"RAINWATER"},ne.REFRIGERATION={type:3,value:"REFRIGERATION"},ne.SECURITY={type:3,value:"SECURITY"},ne.SEWAGE={type:3,value:"SEWAGE"},ne.SIGNAL={type:3,value:"SIGNAL"},ne.STORMWATER={type:3,value:"STORMWATER"},ne.TELEPHONE={type:3,value:"TELEPHONE"},ne.TV={type:3,value:"TV"},ne.VACUUM={type:3,value:"VACUUM"},ne.VENT={type:3,value:"VENT"},ne.VENTILATION={type:3,value:"VENTILATION"},ne.WASTEWATER={type:3,value:"WASTEWATER"},ne.WATERSUPPLY={type:3,value:"WATERSUPPLY"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=ne;class ae{}ae.PUBLIC={type:3,value:"PUBLIC"},ae.RESTRICTED={type:3,value:"RESTRICTED"},ae.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ae.PERSONAL={type:3,value:"PERSONAL"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ae;class le{}le.DRAFT={type:3,value:"DRAFT"},le.FINALDRAFT={type:3,value:"FINALDRAFT"},le.FINAL={type:3,value:"FINAL"},le.REVISION={type:3,value:"REVISION"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=le;class he{}he.SWINGING={type:3,value:"SWINGING"},he.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},he.SLIDING={type:3,value:"SLIDING"},he.FOLDING={type:3,value:"FOLDING"},he.REVOLVING={type:3,value:"REVOLVING"},he.ROLLINGUP={type:3,value:"ROLLINGUP"},he.FIXEDPANEL={type:3,value:"FIXEDPANEL"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=he;class ce{}ce.LEFT={type:3,value:"LEFT"},ce.MIDDLE={type:3,value:"MIDDLE"},ce.RIGHT={type:3,value:"RIGHT"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=ce;class Ae{}Ae.ALUMINIUM={type:3,value:"ALUMINIUM"},Ae.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ae.STEEL={type:3,value:"STEEL"},Ae.WOOD={type:3,value:"WOOD"},Ae.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ae.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Ae.PLASTIC={type:3,value:"PLASTIC"},Ae.USERDEFINED={type:3,value:"USERDEFINED"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Ae;class ue{}ue.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},ue.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},ue.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},ue.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},ue.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},ue.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},ue.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},ue.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},ue.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},ue.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},ue.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},ue.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},ue.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},ue.REVOLVING={type:3,value:"REVOLVING"},ue.ROLLINGUP={type:3,value:"ROLLINGUP"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=ue;class pe{}pe.DOOR={type:3,value:"DOOR"},pe.GATE={type:3,value:"GATE"},pe.TRAPDOOR={type:3,value:"TRAPDOOR"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=pe;class de{}de.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},de.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},de.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},de.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},de.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},de.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},de.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},de.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},de.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},de.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},de.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},de.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},de.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},de.REVOLVING={type:3,value:"REVOLVING"},de.ROLLINGUP={type:3,value:"ROLLINGUP"},de.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},de.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},de.USERDEFINED={type:3,value:"USERDEFINED"},de.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=de;class fe{}fe.BEND={type:3,value:"BEND"},fe.CONNECTOR={type:3,value:"CONNECTOR"},fe.ENTRY={type:3,value:"ENTRY"},fe.EXIT={type:3,value:"EXIT"},fe.JUNCTION={type:3,value:"JUNCTION"},fe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},fe.TRANSITION={type:3,value:"TRANSITION"},fe.USERDEFINED={type:3,value:"USERDEFINED"},fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=fe;class Ee{}Ee.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Ee.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=Ee;class me{}me.FLATOVAL={type:3,value:"FLATOVAL"},me.RECTANGULAR={type:3,value:"RECTANGULAR"},me.ROUND={type:3,value:"ROUND"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=me;class ye{}ye.DISHWASHER={type:3,value:"DISHWASHER"},ye.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},ye.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},ye.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},ye.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},ye.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},ye.FREEZER={type:3,value:"FREEZER"},ye.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},ye.HANDDRYER={type:3,value:"HANDDRYER"},ye.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},ye.MICROWAVE={type:3,value:"MICROWAVE"},ye.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},ye.REFRIGERATOR={type:3,value:"REFRIGERATOR"},ye.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},ye.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},ye.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=ye;class ge{}ge.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},ge.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},ge.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},ge.SWITCHBOARD={type:3,value:"SWITCHBOARD"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=ge;class Ie{}Ie.BATTERY={type:3,value:"BATTERY"},Ie.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Ie.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Ie.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Ie.UPS={type:3,value:"UPS"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Ie;class ve{}ve.CHP={type:3,value:"CHP"},ve.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},ve.STANDALONE={type:3,value:"STANDALONE"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=ve;class Te{}Te.DC={type:3,value:"DC"},Te.INDUCTION={type:3,value:"INDUCTION"},Te.POLYPHASE={type:3,value:"POLYPHASE"},Te.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},Te.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},Te.USERDEFINED={type:3,value:"USERDEFINED"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=Te;class _e{}_e.TIMECLOCK={type:3,value:"TIMECLOCK"},_e.TIMEDELAY={type:3,value:"TIMEDELAY"},_e.RELAY={type:3,value:"RELAY"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=_e;class Re{}Re.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},Re.ARCH={type:3,value:"ARCH"},Re.BEAM_GRID={type:3,value:"BEAM_GRID"},Re.BRACED_FRAME={type:3,value:"BRACED_FRAME"},Re.GIRDER={type:3,value:"GIRDER"},Re.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},Re.RIGID_FRAME={type:3,value:"RIGID_FRAME"},Re.SLAB_FIELD={type:3,value:"SLAB_FIELD"},Re.TRUSS={type:3,value:"TRUSS"},Re.USERDEFINED={type:3,value:"USERDEFINED"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=Re;class Pe{}Pe.COMPLEX={type:3,value:"COMPLEX"},Pe.ELEMENT={type:3,value:"ELEMENT"},Pe.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Pe;class De{}De.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},De.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=De;class Ne{}Ne.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Ne.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Ne.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Ne.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Ne.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Ne.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Ne.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Ne.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Ne;class Ce{}Ce.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},Ce.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},Ce.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},Ce.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},Ce.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},Ce.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=Ce;class Oe{}Oe.EVENTRULE={type:3,value:"EVENTRULE"},Oe.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},Oe.EVENTTIME={type:3,value:"EVENTTIME"},Oe.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=Oe;class be{}be.STARTEVENT={type:3,value:"STARTEVENT"},be.ENDEVENT={type:3,value:"ENDEVENT"},be.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=be;class Se{}Se.EXTERNAL={type:3,value:"EXTERNAL"},Se.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Se.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Se.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Se;class we{}we.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},we.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},we.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},we.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},we.TUBEAXIAL={type:3,value:"TUBEAXIAL"},we.VANEAXIAL={type:3,value:"VANEAXIAL"},we.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=we;class xe{}xe.GLUE={type:3,value:"GLUE"},xe.MORTAR={type:3,value:"MORTAR"},xe.WELD={type:3,value:"WELD"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=xe;class Be{}Be.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},Be.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},Be.ODORFILTER={type:3,value:"ODORFILTER"},Be.OILFILTER={type:3,value:"OILFILTER"},Be.STRAINER={type:3,value:"STRAINER"},Be.WATERFILTER={type:3,value:"WATERFILTER"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=Be;class Fe{}Fe.BREECHINGINLET={type:3,value:"BREECHINGINLET"},Fe.FIREHYDRANT={type:3,value:"FIREHYDRANT"},Fe.HOSEREEL={type:3,value:"HOSEREEL"},Fe.SPRINKLER={type:3,value:"SPRINKLER"},Fe.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=Fe;class Me{}Me.SOURCE={type:3,value:"SOURCE"},Me.SINK={type:3,value:"SINK"},Me.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=Me;class Le{}Le.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},Le.THERMOMETER={type:3,value:"THERMOMETER"},Le.AMMETER={type:3,value:"AMMETER"},Le.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},Le.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},Le.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},Le.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},Le.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=Le;class Ue{}Ue.ENERGYMETER={type:3,value:"ENERGYMETER"},Ue.GASMETER={type:3,value:"GASMETER"},Ue.OILMETER={type:3,value:"OILMETER"},Ue.WATERMETER={type:3,value:"WATERMETER"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=Ue;class He{}He.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},He.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},He.PAD_FOOTING={type:3,value:"PAD_FOOTING"},He.PILE_CAP={type:3,value:"PILE_CAP"},He.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=He;class Ge{}Ge.CHAIR={type:3,value:"CHAIR"},Ge.TABLE={type:3,value:"TABLE"},Ge.DESK={type:3,value:"DESK"},Ge.BED={type:3,value:"BED"},Ge.FILECABINET={type:3,value:"FILECABINET"},Ge.SHELF={type:3,value:"SHELF"},Ge.SOFA={type:3,value:"SOFA"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=Ge;class ke{}ke.TERRAIN={type:3,value:"TERRAIN"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=ke;class Ve{}Ve.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},Ve.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},Ve.MODEL_VIEW={type:3,value:"MODEL_VIEW"},Ve.PLAN_VIEW={type:3,value:"PLAN_VIEW"},Ve.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},Ve.SECTION_VIEW={type:3,value:"SECTION_VIEW"},Ve.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},Ve.USERDEFINED={type:3,value:"USERDEFINED"},Ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=Ve;class je{}je.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},je.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=je;class Qe{}Qe.RECTANGULAR={type:3,value:"RECTANGULAR"},Qe.RADIAL={type:3,value:"RADIAL"},Qe.TRIANGULAR={type:3,value:"TRIANGULAR"},Qe.IRREGULAR={type:3,value:"IRREGULAR"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=Qe;class We{}We.PLATE={type:3,value:"PLATE"},We.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=We;class ze{}ze.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ze.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ze.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ze.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ze.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ze.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ze.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ze.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ze.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ze.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ze.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ze.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ze.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ze;class Ke{}Ke.CYCLONIC={type:3,value:"CYCLONIC"},Ke.GREASE={type:3,value:"GREASE"},Ke.OIL={type:3,value:"OIL"},Ke.PETROL={type:3,value:"PETROL"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=Ke;class Ye{}Ye.INTERNAL={type:3,value:"INTERNAL"},Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=Ye;class Xe{}Xe.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Xe.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Xe.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Xe;class Ze{}Ze.DATA={type:3,value:"DATA"},Ze.POWER={type:3,value:"POWER"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=Ze;class qe{}qe.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},qe.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},qe.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},qe.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=qe;class Je{}Je.ADMINISTRATION={type:3,value:"ADMINISTRATION"},Je.CARPENTRY={type:3,value:"CARPENTRY"},Je.CLEANING={type:3,value:"CLEANING"},Je.CONCRETE={type:3,value:"CONCRETE"},Je.DRYWALL={type:3,value:"DRYWALL"},Je.ELECTRIC={type:3,value:"ELECTRIC"},Je.FINISHING={type:3,value:"FINISHING"},Je.FLOORING={type:3,value:"FLOORING"},Je.GENERAL={type:3,value:"GENERAL"},Je.HVAC={type:3,value:"HVAC"},Je.LANDSCAPING={type:3,value:"LANDSCAPING"},Je.MASONRY={type:3,value:"MASONRY"},Je.PAINTING={type:3,value:"PAINTING"},Je.PAVING={type:3,value:"PAVING"},Je.PLUMBING={type:3,value:"PLUMBING"},Je.ROOFING={type:3,value:"ROOFING"},Je.SITEGRADING={type:3,value:"SITEGRADING"},Je.STEELWORK={type:3,value:"STEELWORK"},Je.SURVEYING={type:3,value:"SURVEYING"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=Je;class $e{}$e.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},$e.FLUORESCENT={type:3,value:"FLUORESCENT"},$e.HALOGEN={type:3,value:"HALOGEN"},$e.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},$e.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},$e.LED={type:3,value:"LED"},$e.METALHALIDE={type:3,value:"METALHALIDE"},$e.OLED={type:3,value:"OLED"},$e.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=$e;class et{}et.AXIS1={type:3,value:"AXIS1"},et.AXIS2={type:3,value:"AXIS2"},et.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=et;class tt{}tt.TYPE_A={type:3,value:"TYPE_A"},tt.TYPE_B={type:3,value:"TYPE_B"},tt.TYPE_C={type:3,value:"TYPE_C"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=tt;class st{}st.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},st.FLUORESCENT={type:3,value:"FLUORESCENT"},st.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},st.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},st.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},st.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},st.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},st.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},st.METALHALIDE={type:3,value:"METALHALIDE"},st.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=st;class it{}it.POINTSOURCE={type:3,value:"POINTSOURCE"},it.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},it.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=it;class rt{}rt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},rt.LOAD_CASE={type:3,value:"LOAD_CASE"},rt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=rt;class ot{}ot.LOGICALAND={type:3,value:"LOGICALAND"},ot.LOGICALOR={type:3,value:"LOGICALOR"},ot.LOGICALXOR={type:3,value:"LOGICALXOR"},ot.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},ot.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},e.IfcLogicalOperatorEnum=ot;class nt{}nt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},nt.BOLT={type:3,value:"BOLT"},nt.DOWEL={type:3,value:"DOWEL"},nt.NAIL={type:3,value:"NAIL"},nt.NAILPLATE={type:3,value:"NAILPLATE"},nt.RIVET={type:3,value:"RIVET"},nt.SCREW={type:3,value:"SCREW"},nt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},nt.STAPLE={type:3,value:"STAPLE"},nt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=nt;class at{}at.AIRSTATION={type:3,value:"AIRSTATION"},at.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},at.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},at.OXYGENPLANT={type:3,value:"OXYGENPLANT"},at.VACUUMSTATION={type:3,value:"VACUUMSTATION"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=at;class lt{}lt.BRACE={type:3,value:"BRACE"},lt.CHORD={type:3,value:"CHORD"},lt.COLLAR={type:3,value:"COLLAR"},lt.MEMBER={type:3,value:"MEMBER"},lt.MULLION={type:3,value:"MULLION"},lt.PLATE={type:3,value:"PLATE"},lt.POST={type:3,value:"POST"},lt.PURLIN={type:3,value:"PURLIN"},lt.RAFTER={type:3,value:"RAFTER"},lt.STRINGER={type:3,value:"STRINGER"},lt.STRUT={type:3,value:"STRUT"},lt.STUD={type:3,value:"STUD"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=lt;class ht{}ht.BELTDRIVE={type:3,value:"BELTDRIVE"},ht.COUPLING={type:3,value:"COUPLING"},ht.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},ht.USERDEFINED={type:3,value:"USERDEFINED"},ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=ht;class ct{}ct.NULL={type:3,value:"NULL"},e.IfcNullStyle=ct;class At{}At.PRODUCT={type:3,value:"PRODUCT"},At.PROCESS={type:3,value:"PROCESS"},At.CONTROL={type:3,value:"CONTROL"},At.RESOURCE={type:3,value:"RESOURCE"},At.ACTOR={type:3,value:"ACTOR"},At.GROUP={type:3,value:"GROUP"},At.PROJECT={type:3,value:"PROJECT"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=At;class ut{}ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},ut.CODEWAIVER={type:3,value:"CODEWAIVER"},ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},ut.EXTERNAL={type:3,value:"EXTERNAL"},ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},ut.MODELVIEW={type:3,value:"MODELVIEW"},ut.PARAMETER={type:3,value:"PARAMETER"},ut.REQUIREMENT={type:3,value:"REQUIREMENT"},ut.SPECIFICATION={type:3,value:"SPECIFICATION"},ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=ut;class pt{}pt.ASSIGNEE={type:3,value:"ASSIGNEE"},pt.ASSIGNOR={type:3,value:"ASSIGNOR"},pt.LESSEE={type:3,value:"LESSEE"},pt.LESSOR={type:3,value:"LESSOR"},pt.LETTINGAGENT={type:3,value:"LETTINGAGENT"},pt.OWNER={type:3,value:"OWNER"},pt.TENANT={type:3,value:"TENANT"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=pt;class dt{}dt.OPENING={type:3,value:"OPENING"},dt.RECESS={type:3,value:"RECESS"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=dt;class ft{}ft.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},ft.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},ft.POWEROUTLET={type:3,value:"POWEROUTLET"},ft.DATAOUTLET={type:3,value:"DATAOUTLET"},ft.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},ft.USERDEFINED={type:3,value:"USERDEFINED"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=ft;class Et{}Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=Et;class mt{}mt.GRILL={type:3,value:"GRILL"},mt.LOUVER={type:3,value:"LOUVER"},mt.SCREEN={type:3,value:"SCREEN"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=mt;class yt{}yt.ACCESS={type:3,value:"ACCESS"},yt.BUILDING={type:3,value:"BUILDING"},yt.WORK={type:3,value:"WORK"},yt.USERDEFINED={type:3,value:"USERDEFINED"},yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=yt;class gt{}gt.PHYSICAL={type:3,value:"PHYSICAL"},gt.VIRTUAL={type:3,value:"VIRTUAL"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=gt;class It{}It.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},It.COMPOSITE={type:3,value:"COMPOSITE"},It.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},It.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=It;class vt{}vt.BORED={type:3,value:"BORED"},vt.DRIVEN={type:3,value:"DRIVEN"},vt.JETGROUTING={type:3,value:"JETGROUTING"},vt.COHESION={type:3,value:"COHESION"},vt.FRICTION={type:3,value:"FRICTION"},vt.SUPPORT={type:3,value:"SUPPORT"},vt.USERDEFINED={type:3,value:"USERDEFINED"},vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=vt;class Tt{}Tt.BEND={type:3,value:"BEND"},Tt.CONNECTOR={type:3,value:"CONNECTOR"},Tt.ENTRY={type:3,value:"ENTRY"},Tt.EXIT={type:3,value:"EXIT"},Tt.JUNCTION={type:3,value:"JUNCTION"},Tt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Tt.TRANSITION={type:3,value:"TRANSITION"},Tt.USERDEFINED={type:3,value:"USERDEFINED"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Tt;class _t{}_t.CULVERT={type:3,value:"CULVERT"},_t.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},_t.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},_t.GUTTER={type:3,value:"GUTTER"},_t.SPOOL={type:3,value:"SPOOL"},_t.USERDEFINED={type:3,value:"USERDEFINED"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=_t;class Rt{}Rt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},Rt.SHEET={type:3,value:"SHEET"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=Rt;class Pt{}Pt.CURVE3D={type:3,value:"CURVE3D"},Pt.PCURVE_S1={type:3,value:"PCURVE_S1"},Pt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Pt;class Dt{}Dt.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},Dt.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},Dt.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},Dt.CALIBRATION={type:3,value:"CALIBRATION"},Dt.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},Dt.SHUTDOWN={type:3,value:"SHUTDOWN"},Dt.STARTUP={type:3,value:"STARTUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=Dt;class Nt{}Nt.CURVE={type:3,value:"CURVE"},Nt.AREA={type:3,value:"AREA"},e.IfcProfileTypeEnum=Nt;class Ct{}Ct.CHANGEORDER={type:3,value:"CHANGEORDER"},Ct.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},Ct.MOVEORDER={type:3,value:"MOVEORDER"},Ct.PURCHASEORDER={type:3,value:"PURCHASEORDER"},Ct.WORKORDER={type:3,value:"WORKORDER"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=Ct;class Ot{}Ot.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},Ot.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=Ot;class bt{}bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=bt;class St{}St.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},St.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},St.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},St.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},St.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},St.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},St.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=St;class wt{}wt.ELECTRONIC={type:3,value:"ELECTRONIC"},wt.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},wt.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},wt.THERMAL={type:3,value:"THERMAL"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=wt;class xt{}xt.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},xt.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},xt.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},xt.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},xt.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},xt.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},xt.VARISTOR={type:3,value:"VARISTOR"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=xt;class Bt{}Bt.CIRCULATOR={type:3,value:"CIRCULATOR"},Bt.ENDSUCTION={type:3,value:"ENDSUCTION"},Bt.SPLITCASE={type:3,value:"SPLITCASE"},Bt.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},Bt.SUMPPUMP={type:3,value:"SUMPPUMP"},Bt.VERTICALINLINE={type:3,value:"VERTICALINLINE"},Bt.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=Bt;class Ft{}Ft.HANDRAIL={type:3,value:"HANDRAIL"},Ft.GUARDRAIL={type:3,value:"GUARDRAIL"},Ft.BALUSTRADE={type:3,value:"BALUSTRADE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=Ft;class Mt{}Mt.STRAIGHT={type:3,value:"STRAIGHT"},Mt.SPIRAL={type:3,value:"SPIRAL"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=Mt;class Lt{}Lt.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},Lt.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},Lt.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},Lt.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},Lt.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},Lt.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},Lt.USERDEFINED={type:3,value:"USERDEFINED"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=Lt;class Ut{}Ut.DAILY={type:3,value:"DAILY"},Ut.WEEKLY={type:3,value:"WEEKLY"},Ut.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},Ut.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},Ut.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},Ut.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},Ut.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},Ut.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=Ut;class Ht{}Ht.BLINN={type:3,value:"BLINN"},Ht.FLAT={type:3,value:"FLAT"},Ht.GLASS={type:3,value:"GLASS"},Ht.MATT={type:3,value:"MATT"},Ht.METAL={type:3,value:"METAL"},Ht.MIRROR={type:3,value:"MIRROR"},Ht.PHONG={type:3,value:"PHONG"},Ht.PLASTIC={type:3,value:"PLASTIC"},Ht.STRAUSS={type:3,value:"STRAUSS"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Ht;class Gt{}Gt.MAIN={type:3,value:"MAIN"},Gt.SHEAR={type:3,value:"SHEAR"},Gt.LIGATURE={type:3,value:"LIGATURE"},Gt.STUD={type:3,value:"STUD"},Gt.PUNCHING={type:3,value:"PUNCHING"},Gt.EDGE={type:3,value:"EDGE"},Gt.RING={type:3,value:"RING"},Gt.ANCHORING={type:3,value:"ANCHORING"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=Gt;class kt{}kt.PLAIN={type:3,value:"PLAIN"},kt.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=kt;class Vt{}Vt.ANCHORING={type:3,value:"ANCHORING"},Vt.EDGE={type:3,value:"EDGE"},Vt.LIGATURE={type:3,value:"LIGATURE"},Vt.MAIN={type:3,value:"MAIN"},Vt.PUNCHING={type:3,value:"PUNCHING"},Vt.RING={type:3,value:"RING"},Vt.SHEAR={type:3,value:"SHEAR"},Vt.STUD={type:3,value:"STUD"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=jt;class Qt{}Qt.SUPPLIER={type:3,value:"SUPPLIER"},Qt.MANUFACTURER={type:3,value:"MANUFACTURER"},Qt.CONTRACTOR={type:3,value:"CONTRACTOR"},Qt.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Qt.ARCHITECT={type:3,value:"ARCHITECT"},Qt.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Qt.COSTENGINEER={type:3,value:"COSTENGINEER"},Qt.CLIENT={type:3,value:"CLIENT"},Qt.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Qt.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Qt.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Qt.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Qt.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Qt.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Qt.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Qt.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Qt.ENGINEER={type:3,value:"ENGINEER"},Qt.OWNER={type:3,value:"OWNER"},Qt.CONSULTANT={type:3,value:"CONSULTANT"},Qt.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Qt.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Qt.RESELLER={type:3,value:"RESELLER"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Qt;class Wt{}Wt.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Wt.SHED_ROOF={type:3,value:"SHED_ROOF"},Wt.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Wt.HIP_ROOF={type:3,value:"HIP_ROOF"},Wt.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Wt.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Wt.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Wt.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Wt.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Wt.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Wt.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Wt.DOME_ROOF={type:3,value:"DOME_ROOF"},Wt.FREEFORM={type:3,value:"FREEFORM"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Wt;class zt{}zt.EXA={type:3,value:"EXA"},zt.PETA={type:3,value:"PETA"},zt.TERA={type:3,value:"TERA"},zt.GIGA={type:3,value:"GIGA"},zt.MEGA={type:3,value:"MEGA"},zt.KILO={type:3,value:"KILO"},zt.HECTO={type:3,value:"HECTO"},zt.DECA={type:3,value:"DECA"},zt.DECI={type:3,value:"DECI"},zt.CENTI={type:3,value:"CENTI"},zt.MILLI={type:3,value:"MILLI"},zt.MICRO={type:3,value:"MICRO"},zt.NANO={type:3,value:"NANO"},zt.PICO={type:3,value:"PICO"},zt.FEMTO={type:3,value:"FEMTO"},zt.ATTO={type:3,value:"ATTO"},e.IfcSIPrefix=zt;class Kt{}Kt.AMPERE={type:3,value:"AMPERE"},Kt.BECQUEREL={type:3,value:"BECQUEREL"},Kt.CANDELA={type:3,value:"CANDELA"},Kt.COULOMB={type:3,value:"COULOMB"},Kt.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Kt.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Kt.FARAD={type:3,value:"FARAD"},Kt.GRAM={type:3,value:"GRAM"},Kt.GRAY={type:3,value:"GRAY"},Kt.HENRY={type:3,value:"HENRY"},Kt.HERTZ={type:3,value:"HERTZ"},Kt.JOULE={type:3,value:"JOULE"},Kt.KELVIN={type:3,value:"KELVIN"},Kt.LUMEN={type:3,value:"LUMEN"},Kt.LUX={type:3,value:"LUX"},Kt.METRE={type:3,value:"METRE"},Kt.MOLE={type:3,value:"MOLE"},Kt.NEWTON={type:3,value:"NEWTON"},Kt.OHM={type:3,value:"OHM"},Kt.PASCAL={type:3,value:"PASCAL"},Kt.RADIAN={type:3,value:"RADIAN"},Kt.SECOND={type:3,value:"SECOND"},Kt.SIEMENS={type:3,value:"SIEMENS"},Kt.SIEVERT={type:3,value:"SIEVERT"},Kt.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Kt.STERADIAN={type:3,value:"STERADIAN"},Kt.TESLA={type:3,value:"TESLA"},Kt.VOLT={type:3,value:"VOLT"},Kt.WATT={type:3,value:"WATT"},Kt.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Kt;class Yt{}Yt.BATH={type:3,value:"BATH"},Yt.BIDET={type:3,value:"BIDET"},Yt.CISTERN={type:3,value:"CISTERN"},Yt.SHOWER={type:3,value:"SHOWER"},Yt.SINK={type:3,value:"SINK"},Yt.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Yt.TOILETPAN={type:3,value:"TOILETPAN"},Yt.URINAL={type:3,value:"URINAL"},Yt.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Yt.WCSEAT={type:3,value:"WCSEAT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Yt;class Xt{}Xt.UNIFORM={type:3,value:"UNIFORM"},Xt.TAPERED={type:3,value:"TAPERED"},e.IfcSectionTypeEnum=Xt;class Zt{}Zt.COSENSOR={type:3,value:"COSENSOR"},Zt.CO2SENSOR={type:3,value:"CO2SENSOR"},Zt.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},Zt.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},Zt.FIRESENSOR={type:3,value:"FIRESENSOR"},Zt.FLOWSENSOR={type:3,value:"FLOWSENSOR"},Zt.FROSTSENSOR={type:3,value:"FROSTSENSOR"},Zt.GASSENSOR={type:3,value:"GASSENSOR"},Zt.HEATSENSOR={type:3,value:"HEATSENSOR"},Zt.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},Zt.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},Zt.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},Zt.LEVELSENSOR={type:3,value:"LEVELSENSOR"},Zt.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},Zt.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},Zt.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},Zt.PHSENSOR={type:3,value:"PHSENSOR"},Zt.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},Zt.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},Zt.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},Zt.SMOKESENSOR={type:3,value:"SMOKESENSOR"},Zt.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},Zt.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},Zt.WINDSENSOR={type:3,value:"WINDSENSOR"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=Zt;class qt{}qt.START_START={type:3,value:"START_START"},qt.START_FINISH={type:3,value:"START_FINISH"},qt.FINISH_START={type:3,value:"FINISH_START"},qt.FINISH_FINISH={type:3,value:"FINISH_FINISH"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=qt;class Jt{}Jt.JALOUSIE={type:3,value:"JALOUSIE"},Jt.SHUTTER={type:3,value:"SHUTTER"},Jt.AWNING={type:3,value:"AWNING"},Jt.USERDEFINED={type:3,value:"USERDEFINED"},Jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=Jt;class $t{}$t.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},$t.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},$t.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},$t.P_LISTVALUE={type:3,value:"P_LISTVALUE"},$t.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},$t.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},$t.Q_LENGTH={type:3,value:"Q_LENGTH"},$t.Q_AREA={type:3,value:"Q_AREA"},$t.Q_VOLUME={type:3,value:"Q_VOLUME"},$t.Q_COUNT={type:3,value:"Q_COUNT"},$t.Q_WEIGHT={type:3,value:"Q_WEIGHT"},$t.Q_TIME={type:3,value:"Q_TIME"},e.IfcSimplePropertyTemplateTypeEnum=$t;class es{}es.FLOOR={type:3,value:"FLOOR"},es.ROOF={type:3,value:"ROOF"},es.LANDING={type:3,value:"LANDING"},es.BASESLAB={type:3,value:"BASESLAB"},es.USERDEFINED={type:3,value:"USERDEFINED"},es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=es;class ts{}ts.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},ts.SOLARPANEL={type:3,value:"SOLARPANEL"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=ts;class ss{}ss.CONVECTOR={type:3,value:"CONVECTOR"},ss.RADIATOR={type:3,value:"RADIATOR"},ss.USERDEFINED={type:3,value:"USERDEFINED"},ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=ss;class is{}is.SPACE={type:3,value:"SPACE"},is.PARKING={type:3,value:"PARKING"},is.GFA={type:3,value:"GFA"},is.INTERNAL={type:3,value:"INTERNAL"},is.EXTERNAL={type:3,value:"EXTERNAL"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=is;class rs{}rs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},rs.FIRESAFETY={type:3,value:"FIRESAFETY"},rs.LIGHTING={type:3,value:"LIGHTING"},rs.OCCUPANCY={type:3,value:"OCCUPANCY"},rs.SECURITY={type:3,value:"SECURITY"},rs.THERMAL={type:3,value:"THERMAL"},rs.TRANSPORT={type:3,value:"TRANSPORT"},rs.VENTILATION={type:3,value:"VENTILATION"},rs.USERDEFINED={type:3,value:"USERDEFINED"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=rs;class os{}os.BIRDCAGE={type:3,value:"BIRDCAGE"},os.COWL={type:3,value:"COWL"},os.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=os;class ns{}ns.STRAIGHT={type:3,value:"STRAIGHT"},ns.WINDER={type:3,value:"WINDER"},ns.SPIRAL={type:3,value:"SPIRAL"},ns.CURVED={type:3,value:"CURVED"},ns.FREEFORM={type:3,value:"FREEFORM"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=ns;class as{}as.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},as.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},as.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},as.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},as.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},as.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},as.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},as.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},as.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},as.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},as.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},as.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},as.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},as.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=as;class ls{}ls.READWRITE={type:3,value:"READWRITE"},ls.READONLY={type:3,value:"READONLY"},ls.LOCKED={type:3,value:"LOCKED"},ls.READWRITELOCKED={type:3,value:"READWRITELOCKED"},ls.READONLYLOCKED={type:3,value:"READONLYLOCKED"},e.IfcStateEnum=ls;class hs{}hs.CONST={type:3,value:"CONST"},hs.LINEAR={type:3,value:"LINEAR"},hs.POLYGONAL={type:3,value:"POLYGONAL"},hs.EQUIDISTANT={type:3,value:"EQUIDISTANT"},hs.SINUS={type:3,value:"SINUS"},hs.PARABOLA={type:3,value:"PARABOLA"},hs.DISCRETE={type:3,value:"DISCRETE"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=hs;class cs{}cs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},cs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},cs.CABLE={type:3,value:"CABLE"},cs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},cs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=cs;class As{}As.CONST={type:3,value:"CONST"},As.BILINEAR={type:3,value:"BILINEAR"},As.DISCRETE={type:3,value:"DISCRETE"},As.ISOCONTOUR={type:3,value:"ISOCONTOUR"},As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=As;class us{}us.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},us.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},us.SHELL={type:3,value:"SHELL"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=us;class ps{}ps.PURCHASE={type:3,value:"PURCHASE"},ps.WORK={type:3,value:"WORK"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=ps;class ds{}ds.MARK={type:3,value:"MARK"},ds.TAG={type:3,value:"TAG"},ds.TREATMENT={type:3,value:"TREATMENT"},ds.USERDEFINED={type:3,value:"USERDEFINED"},ds.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=ds;class fs{}fs.POSITIVE={type:3,value:"POSITIVE"},fs.NEGATIVE={type:3,value:"NEGATIVE"},fs.BOTH={type:3,value:"BOTH"},e.IfcSurfaceSide=fs;class Es{}Es.CONTACTOR={type:3,value:"CONTACTOR"},Es.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Es.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Es.KEYPAD={type:3,value:"KEYPAD"},Es.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Es.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Es.STARTER={type:3,value:"STARTER"},Es.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Es.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Es.USERDEFINED={type:3,value:"USERDEFINED"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Es;class ms{}ms.PANEL={type:3,value:"PANEL"},ms.WORKSURFACE={type:3,value:"WORKSURFACE"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=ms;class ys{}ys.BASIN={type:3,value:"BASIN"},ys.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ys.EXPANSION={type:3,value:"EXPANSION"},ys.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ys.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ys.STORAGE={type:3,value:"STORAGE"},ys.VESSEL={type:3,value:"VESSEL"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ys;class gs{}gs.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},gs.WORKTIME={type:3,value:"WORKTIME"},gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=gs;class Is{}Is.ATTENDANCE={type:3,value:"ATTENDANCE"},Is.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Is.DEMOLITION={type:3,value:"DEMOLITION"},Is.DISMANTLE={type:3,value:"DISMANTLE"},Is.DISPOSAL={type:3,value:"DISPOSAL"},Is.INSTALLATION={type:3,value:"INSTALLATION"},Is.LOGISTIC={type:3,value:"LOGISTIC"},Is.MAINTENANCE={type:3,value:"MAINTENANCE"},Is.MOVE={type:3,value:"MOVE"},Is.OPERATION={type:3,value:"OPERATION"},Is.REMOVAL={type:3,value:"REMOVAL"},Is.RENOVATION={type:3,value:"RENOVATION"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=Is;class vs{}vs.COUPLER={type:3,value:"COUPLER"},vs.FIXED_END={type:3,value:"FIXED_END"},vs.TENSIONING_END={type:3,value:"TENSIONING_END"},vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=vs;class Ts{}Ts.BAR={type:3,value:"BAR"},Ts.COATED={type:3,value:"COATED"},Ts.STRAND={type:3,value:"STRAND"},Ts.WIRE={type:3,value:"WIRE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=Ts;class _s{}_s.LEFT={type:3,value:"LEFT"},_s.RIGHT={type:3,value:"RIGHT"},_s.UP={type:3,value:"UP"},_s.DOWN={type:3,value:"DOWN"},e.IfcTextPath=_s;class Rs{}Rs.CONTINUOUS={type:3,value:"CONTINUOUS"},Rs.DISCRETE={type:3,value:"DISCRETE"},Rs.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},Rs.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},Rs.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},Rs.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},Rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=Rs;class Ps{}Ps.CURRENT={type:3,value:"CURRENT"},Ps.FREQUENCY={type:3,value:"FREQUENCY"},Ps.INVERTER={type:3,value:"INVERTER"},Ps.RECTIFIER={type:3,value:"RECTIFIER"},Ps.VOLTAGE={type:3,value:"VOLTAGE"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=Ps;class Ds{}Ds.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},Ds.CONTINUOUS={type:3,value:"CONTINUOUS"},Ds.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},Ds.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},e.IfcTransitionCode=Ds;class Ns{}Ns.ELEVATOR={type:3,value:"ELEVATOR"},Ns.ESCALATOR={type:3,value:"ESCALATOR"},Ns.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ns.CRANEWAY={type:3,value:"CRANEWAY"},Ns.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ns.USERDEFINED={type:3,value:"USERDEFINED"},Ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ns;class Cs{}Cs.CARTESIAN={type:3,value:"CARTESIAN"},Cs.PARAMETER={type:3,value:"PARAMETER"},Cs.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=Cs;class Os{}Os.FINNED={type:3,value:"FINNED"},Os.USERDEFINED={type:3,value:"USERDEFINED"},Os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=Os;class bs{}bs.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},bs.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},bs.AREAUNIT={type:3,value:"AREAUNIT"},bs.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},bs.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},bs.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},bs.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},bs.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},bs.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},bs.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},bs.ENERGYUNIT={type:3,value:"ENERGYUNIT"},bs.FORCEUNIT={type:3,value:"FORCEUNIT"},bs.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},bs.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},bs.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},bs.LENGTHUNIT={type:3,value:"LENGTHUNIT"},bs.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},bs.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},bs.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},bs.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},bs.MASSUNIT={type:3,value:"MASSUNIT"},bs.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},bs.POWERUNIT={type:3,value:"POWERUNIT"},bs.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},bs.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},bs.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},bs.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},bs.TIMEUNIT={type:3,value:"TIMEUNIT"},bs.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},bs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=bs;class Ss{}Ss.ALARMPANEL={type:3,value:"ALARMPANEL"},Ss.CONTROLPANEL={type:3,value:"CONTROLPANEL"},Ss.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},Ss.INDICATORPANEL={type:3,value:"INDICATORPANEL"},Ss.MIMICPANEL={type:3,value:"MIMICPANEL"},Ss.HUMIDISTAT={type:3,value:"HUMIDISTAT"},Ss.THERMOSTAT={type:3,value:"THERMOSTAT"},Ss.WEATHERSTATION={type:3,value:"WEATHERSTATION"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=Ss;class ws{}ws.AIRHANDLER={type:3,value:"AIRHANDLER"},ws.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},ws.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},ws.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},ws.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=ws;class xs{}xs.AIRRELEASE={type:3,value:"AIRRELEASE"},xs.ANTIVACUUM={type:3,value:"ANTIVACUUM"},xs.CHANGEOVER={type:3,value:"CHANGEOVER"},xs.CHECK={type:3,value:"CHECK"},xs.COMMISSIONING={type:3,value:"COMMISSIONING"},xs.DIVERTING={type:3,value:"DIVERTING"},xs.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},xs.DOUBLECHECK={type:3,value:"DOUBLECHECK"},xs.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},xs.FAUCET={type:3,value:"FAUCET"},xs.FLUSHING={type:3,value:"FLUSHING"},xs.GASCOCK={type:3,value:"GASCOCK"},xs.GASTAP={type:3,value:"GASTAP"},xs.ISOLATING={type:3,value:"ISOLATING"},xs.MIXING={type:3,value:"MIXING"},xs.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},xs.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},xs.REGULATING={type:3,value:"REGULATING"},xs.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},xs.STEAMTRAP={type:3,value:"STEAMTRAP"},xs.STOPCOCK={type:3,value:"STOPCOCK"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=xs;class Bs{}Bs.COMPRESSION={type:3,value:"COMPRESSION"},Bs.SPRING={type:3,value:"SPRING"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Bs;class Fs{}Fs.CUTOUT={type:3,value:"CUTOUT"},Fs.NOTCH={type:3,value:"NOTCH"},Fs.HOLE={type:3,value:"HOLE"},Fs.MITER={type:3,value:"MITER"},Fs.CHAMFER={type:3,value:"CHAMFER"},Fs.EDGE={type:3,value:"EDGE"},Fs.USERDEFINED={type:3,value:"USERDEFINED"},Fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Fs;class Ms{}Ms.MOVABLE={type:3,value:"MOVABLE"},Ms.PARAPET={type:3,value:"PARAPET"},Ms.PARTITIONING={type:3,value:"PARTITIONING"},Ms.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},Ms.SHEAR={type:3,value:"SHEAR"},Ms.SOLIDWALL={type:3,value:"SOLIDWALL"},Ms.STANDARD={type:3,value:"STANDARD"},Ms.POLYGONAL={type:3,value:"POLYGONAL"},Ms.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=Ms;class Ls{}Ls.FLOORTRAP={type:3,value:"FLOORTRAP"},Ls.FLOORWASTE={type:3,value:"FLOORWASTE"},Ls.GULLYSUMP={type:3,value:"GULLYSUMP"},Ls.GULLYTRAP={type:3,value:"GULLYTRAP"},Ls.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ls.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ls.WASTETRAP={type:3,value:"WASTETRAP"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ls;class Us{}Us.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Us.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Us.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Us.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Us.TOPHUNG={type:3,value:"TOPHUNG"},Us.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Us.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Us.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Us.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Us.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Us.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Us.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Us.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Us;class Hs{}Hs.LEFT={type:3,value:"LEFT"},Hs.MIDDLE={type:3,value:"MIDDLE"},Hs.RIGHT={type:3,value:"RIGHT"},Hs.BOTTOM={type:3,value:"BOTTOM"},Hs.TOP={type:3,value:"TOP"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Hs;class Gs{}Gs.ALUMINIUM={type:3,value:"ALUMINIUM"},Gs.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Gs.STEEL={type:3,value:"STEEL"},Gs.WOOD={type:3,value:"WOOD"},Gs.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Gs.PLASTIC={type:3,value:"PLASTIC"},Gs.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Gs;class ks{}ks.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},ks.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},ks.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},ks.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},ks.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},ks.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},ks.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},ks.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},ks.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=ks;class Vs{}Vs.WINDOW={type:3,value:"WINDOW"},Vs.SKYLIGHT={type:3,value:"SKYLIGHT"},Vs.LIGHTDOME={type:3,value:"LIGHTDOME"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Vs;class js{}js.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},js.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},js.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},js.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},js.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},js.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},js.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},js.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},js.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=js;class Qs{}Qs.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Qs.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Qs.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Qs.USERDEFINED={type:3,value:"USERDEFINED"},Qs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Qs;class Ws{}Ws.ACTUAL={type:3,value:"ACTUAL"},Ws.BASELINE={type:3,value:"BASELINE"},Ws.PLANNED={type:3,value:"PLANNED"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=Ws;class zs{}zs.ACTUAL={type:3,value:"ACTUAL"},zs.BASELINE={type:3,value:"BASELINE"},zs.PLANNED={type:3,value:"PLANNED"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=zs;e.IfcActorRole=class extends yI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Ks extends yI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Ks;e.IfcApplication=class extends yI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Ys extends yI{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Ys;e.IfcApproval=class extends yI{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Xs extends yI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Xs;e.IfcBoundaryEdgeCondition=class extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Xs{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Zs extends Xs{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Zs;e.IfcBoundaryNodeConditionWarping=class extends Zs{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class qs extends yI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=qs;class Js extends qs{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Js;e.IfcConnectionSurfaceGeometry=class extends qs{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends qs{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class $s extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=$s;class ei extends yI{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=ei;class ti extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ti;e.IfcCostValue=class extends Ys{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends yI{constructor(e,t,s,i){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.type=1765591967}};e.IfcDerivedUnitElement=class extends yI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class si extends yI{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=si;class ii extends yI{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=ii;e.IfcExternallyDefinedHatchStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends ii{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends yI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends yI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends si{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends yI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends yI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends ei{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends yI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class ri extends yI{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=ri;class oi extends ri{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=oi;e.IfcMaterialLayerSet=class extends ri{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends oi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends yI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class ni extends ri{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=ni;e.IfcMaterialProfileSet=class extends ri{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends ni{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class ai extends yI{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=ai;e.IfcMeasureWithUnit=class extends yI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends yI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class li extends yI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=li;class hi extends yI{constructor(e){super(e),this.type=3701648758}}e.IfcObjectPlacement=hi;e.IfcObjective=class extends $s{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends yI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class ci extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=ci;class Ai extends ci{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=Ai;e.IfcPostalAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class ui extends yI{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=ui;class pi extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=pi;e.IfcPresentationLayerWithStyle=class extends pi{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class di extends yI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=di;e.IfcPresentationStyleAssignment=class extends yI{constructor(e,t){super(e),this.Styles=t,this.type=2417041796}};class fi extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=fi;class Ei extends yI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=Ei;e.IfcProjectedCRS=class extends ti{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class mi extends yI{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=mi;e.IfcPropertyEnumeration=class extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityTime=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends Ai{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends yI{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class yi extends yI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=yi;class gi extends yI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=gi;class Ii extends yI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=Ii;e.IfcRepresentationMap=class extends yI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class vi extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=vi;class Ti extends yI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=Ti;e.IfcSIUnit=class extends li{constructor(e,t,s,i){super(e,new mI(0),t),this.UnitType=t,this.Prefix=s,this.Name=i,this.type=448429030}};class _i extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=_i;e.IfcShapeAspect=class extends yI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class Ri extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=Ri;e.IfcShapeRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class Pi extends yI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=Pi;class Di extends yI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=Di;e.IfcStructuralLoadConfiguration=class extends Di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class Ni extends Di{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=Ni;class Ci extends Ni{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Ci;e.IfcStructuralLoadTemperature=class extends Ci{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class Oi extends yi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=Oi;e.IfcStyledItem=class extends Ii{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends Oi{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends Ni{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends ui{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends ui{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class bi extends ui{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=bi;e.IfcSurfaceStyleWithTextures=class extends ui{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class Si extends ui{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=Si;e.IfcTable=class extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends yI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class wi extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=wi;e.IfcTaskTimeRecurring=class extends wi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Ks{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends ui{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends ui{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class xi extends ui{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=xi;e.IfcTextureCoordinateGenerator=class extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};e.IfcTextureMap=class extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends ui{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends ui{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends yI{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class Bi extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=Bi;e.IfcTimeSeriesValue=class extends yI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Fi extends Ii{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Fi;e.IfcTopologyRepresentation=class extends Ri{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends yI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Mi extends Fi{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Mi;e.IfcVertexPoint=class extends Mi{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends yI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends _i{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.Start=o,this.Finish=n,this.type=1236880293}};e.IfcApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Li extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Li;class Ui extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Ui;e.IfcArbitraryProfileDefWithVoids=class extends Li{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends Si{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Ui{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends si{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Location=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends ii{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends ui{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Hi extends ui{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Hi;e.IfcCompositeProfileDef=class extends Ei{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Gi extends Fi{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Gi;e.IfcConnectionCurveGeometry=class extends qs{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Js{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends li{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class ki extends li{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=ki;e.IfcConversionBasedUnitWithOffset=class extends ki{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends vi{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends di{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends ui{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends ui{constructor(e,t,s,i){super(e),this.Name=t,this.CurveFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends ui{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Vi extends Ei{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Vi;e.IfcDocumentInformation=class extends si{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends ii{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class ji extends Fi{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=ji;e.IfcEdgeCurve=class extends ji{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends _i{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class Qi extends mi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=Qi;e.IfcExternalReferenceRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Wi extends Fi{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Wi;class zi extends Fi{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=zi;e.IfcFaceOuterBound=class extends zi{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Ki extends Wi{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Ki;e.IfcFailureConnectionCondition=class extends Pi{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends di{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelorDraughting=i,this.type=738692330}};class Yi extends gi{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Yi;class Xi extends Ii{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Xi;e.IfcGeometricRepresentationSubContext=class extends Yi{constructor(e,s,i,r,o,n,a){super(e,s,i,new t(0),null,new mI(0),null),this.ContextIdentifier=s,this.ContextType=i,this.ParentContext=r,this.TargetScale=o,this.TargetView=n,this.UserDefinedTargetView=a,this.type=4142052618}};class Zi extends Xi{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Zi;e.IfcGridPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementLocation=t,this.PlacementRefDirection=s,this.type=178086475}};class qi extends Xi{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=qi;e.IfcImageTexture=class extends Si{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends ui{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class Ji extends xi{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=Ji;e.IfcIndexedTriangleTextureMap=class extends Ji{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends _i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class $i extends Xi{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=$i;e.IfcLightSourceAmbient=class extends $i{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends $i{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class er extends $i{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=er;e.IfcLightSourceSpot=class extends er{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLocalPlacement=class extends hi{constructor(e,t,s){super(e),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class tr extends Fi{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=tr;e.IfcMappedItem=class extends Ii{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends ri{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends ri{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends fi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends ai{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class sr extends ai{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=sr;e.IfcMaterialProfileSetUsageTapering=class extends sr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.Expression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Vi{constructor(e,t,s,i,r){super(e,t,s,i,new mI(0),r),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Label=r,this.type=2998442950}};class ir extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=ir;e.IfcOpenShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends ji{constructor(e,t,s){super(e,new mI(0),new mI(0)),this.EdgeElement=t,this.Orientation=s,this.type=1029017970}};class rr extends Ei{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=rr;e.IfcPath=class extends Fi{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends ci{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends Si{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class or extends Xi{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=or;class nr extends Xi{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=nr;class ar extends Xi{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=ar;e.IfcPointOnCurve=class extends ar{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends ar{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends tr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends qi{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class lr extends ui{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=lr;class hr extends mi{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=hr;class cr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=cr;e.IfcProductDefinitionShape=class extends fi{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends Qi{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class Ar extends mi{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2598011224}}e.IfcProperty=Ar;class ur extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=ur;e.IfcPropertyDependencyRelationship=class extends vi{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class pr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=pr;class dr extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=dr;class fr extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=fr;class Er extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=Er;e.IfcRegularTimeSeries=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class mr extends Ti{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=mr;e.IfcResourceApprovalRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends vi{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends _i{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends Er{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends hr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends hr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Xi{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};e.IfcShellBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class yr extends Ar{constructor(e,t,s){super(e,t,s),this.Name=t,this.Description=s,this.type=3692461612}}e.IfcSimpleProperty=yr;e.IfcSlippageConnectionCondition=class extends Pi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class gr extends Xi{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=gr;e.IfcStructuralLoadLinearForce=class extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Ci{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class Ir extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=Ir;e.IfcStructuralLoadSingleDisplacementDistortion=class extends Ir{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class vr extends Ci{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=vr;e.IfcStructuralLoadSingleForceWarping=class extends vr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends ji{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class Tr extends Xi{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=Tr;e.IfcSurfaceStyleRendering=class extends bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class _r extends gr{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=_r;class Rr extends gr{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=Rr;e.IfcSweptDiskSolidPolygonal=class extends Rr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Pr extends Tr{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Pr;e.IfcTShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class Dr extends Xi{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=Dr;class Nr extends Xi{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=Nr;e.IfcTextLiteralWithExtent=class extends Nr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends cr{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class Cr extends ir{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=Cr;class Or extends Cr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Or;class br extends Cr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=br;class Sr extends Cr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=Sr;e.IfcUShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Xi{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends tr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcWindowStyle=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ConstructionType=h,this.OperationType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=1299126871}};e.IfcZShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Ki{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Xi{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends or{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends or{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};class wr extends Xi{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=wr;class xr extends Tr{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=xr;e.IfcBoundingBox=class extends Xi{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends qi{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends ar{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Br extends Xi{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Br;e.IfcCartesianPointList2D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Br{constructor(e,t){super(e),this.CoordList=t,this.type=2059837836}};class Fr extends Xi{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Fr;class Mr extends Fr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=Mr;e.IfcCartesianTransformationOperator2DnonUniform=class extends Mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Lr extends Fr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Lr;e.IfcCartesianTransformationOperator3DnonUniform=class extends Lr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Ur extends rr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Ur;e.IfcClosedShell=class extends Gi{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Hi{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends Ar{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class Hr extends Xi{constructor(e,t,s,i){super(e),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=Hr;class Gr extends Sr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=Gr;class kr extends ir{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=kr;e.IfcCrewResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class Vr extends Xi{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=Vr;e.IfcCsgSolid=class extends gr{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class jr extends Xi{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=jr;e.IfcCurveBoundedPlane=class extends xr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends xr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcDirection=class extends Xi{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};e.IfcDoorStyle=class extends br{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.OperationType=h,this.ConstructionType=c,this.ParameterTakesPrecedence=A,this.Sizeable=u,this.type=526551008}};e.IfcEdgeLoop=class extends tr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends fr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Qr extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Qr;class Wr extends Tr{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Wr;e.IfcEllipseProfileDef=class extends rr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class zr extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=zr;e.IfcExtrudedAreaSolidTapered=class extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Xi{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Xi{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};e.IfcFixedReferenceSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}};class Kr extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Kr;e.IfcFurnitureType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Zi{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class Yr extends Dr{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=Yr;e.IfcIndexedPolygonalFaceWithVoids=class extends Yr{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcLShapeProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends jr{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Xr extends gr{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Xr;class Zr extends ir{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=Zr;e.IfcOffsetCurve2D=class extends jr{constructor(e,t,s,i){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends jr{constructor(e,t,s,i,r){super(e),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcPcurve=class extends jr{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends nr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Wr{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};class qr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=qr;class Jr extends lr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=Jr;class $r extends pr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=$r;e.IfcProcedureType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class eo extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=eo;class to extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=to;e.IfcProject=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends yr{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends pr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends dr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends yr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends yr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Description=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class so extends dr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=so;e.IfcProxy=class extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.ProxyType=l,this.Tag=h,this.type=3219374653}};e.IfcRectangleHollowProfileDef=class extends Er{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends xr{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class io extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=io;e.IfcRelAssignsToActor=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class ro extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=ro;e.IfcRelAssignsToGroupByFactor=class extends ro{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends io{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class oo extends mr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=oo;e.IfcRelAssociatesApproval=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends oo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};class no extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=no;class ao extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=ao;e.IfcRelConnectsPathElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends no{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class lo extends no{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=lo;e.IfcRelConnectsWithEccentricity=class extends lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends ao{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends mr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class ho extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=ho;class co extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=co;e.IfcRelDefinesByObject=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends co{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceType=l,this.ImpliedOrder=h,this.type=427948657}};e.IfcRelNests=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelProjectsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class Ao extends no{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=Ao;class uo extends Ao{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=uo;e.IfcRelSpaceBoundary2ndLevel=class extends uo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends Hr{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class po extends Zr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=po;class fo extends _r{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=fo;e.IfcRevolvedAreaSolidTapered=class extends fo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends Vr{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};e.IfcSimplePropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class Eo extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=Eo;class mo extends br{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=mo;class yo extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=yo;class go extends mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=go;e.IfcSpatialZone=class extends Eo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends Vr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class Io extends to{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=Io;class vo extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=vo;class To extends vo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=To;class _o extends Io{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=_o;class Ro extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=Ro;e.IfcStructuralSurfaceMemberVarying=class extends Ro{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class Po extends jr{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=Po;e.IfcSurfaceCurveSweptAreaSolid=class extends _r{constructor(e,t,s,i,r,o,n){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Pr{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Pr{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Or{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Do extends Dr{constructor(e,t){super(e),this.Coordinates=t,this.type=2387106220}}e.IfcTessellatedFaceSet=Do;e.IfcToroidalSurface=class extends Wr{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};e.IfcTransportElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};e.IfcTriangulatedFaceSet=class extends Do{constructor(e,t,s,i,r,o){super(e,t),this.Coordinates=t,this.Normals=s,this.Closed=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}};e.IfcWindowLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class No extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=No;class Co extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Co;e.IfcAdvancedBrepWithVoids=class extends Co{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1674181508}};class Oo extends xr{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Oo;class bo extends Oo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=bo;e.IfcBlock=class extends Vr{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends wr{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class So extends jr{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=So;e.IfcBuilding=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};class wo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1950629157}}e.IfcBuildingElementType=wo;e.IfcBuildingStorey=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};e.IfcChimneyType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Ur{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcColumnType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends so{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class xo extends So{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=xo;class Bo extends xo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=Bo;class Fo extends jr{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=Fo;e.IfcConstructionEquipmentResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends Gr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Mo extends po{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Mo;class Lo extends Zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Lo;e.IfcCostItem=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCoveringType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Wr{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Uo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Uo;class Ho extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Ho;e.IfcDoorLiningProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends Jr{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Go extends to{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Go;e.IfcElementAssembly=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Qr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class ko extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=ko;class Vo extends Qr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=Vo;e.IfcEllipse=class extends Fo{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=jo;e.IfcEngineType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends eo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class Qo extends Eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=Qo;class Wo extends Xr{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Wo;e.IfcFacetedBrepWithVoids=class extends Wo{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};e.IfcFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class zo extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=zo;class Ko extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Ko;class Yo extends zo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Yo;class Xo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Xo;class Zo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=Zo;e.IfcFlowMeterType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class qo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=qo;class Jo extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=Jo;class $o extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=$o;class en extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=en;class tn extends Ho{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=tn;e.IfcFootingType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class sn extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=sn;e.IfcFurniture=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};e.IfcGrid=class extends to{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};class rn extends Zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=rn;e.IfcHeatExchangerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcIndexedPolyCurve=class extends So{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcLaborResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};e.IfcMechanicalFastener=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMotorConnectionType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcOccupant=class extends No{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};class on extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}}e.IfcOpeningElement=on;e.IfcOpeningStandardCase=class extends on{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3079942009}};e.IfcOutletType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPerformanceHistory=class extends Lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends $r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Do{constructor(e,t,s,i,r){super(e,t),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends So{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class nn extends to{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=nn;e.IfcProcedure=class extends eo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailingType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRampFlightType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends bo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};class an extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=an;class ln extends Vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ln;e.IfcReinforcingMesh=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAggregates=class extends ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoofType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends Po{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcShadingDeviceType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSite=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class hn extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=hn;class cn extends vo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=cn;class An extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=An;e.IfcStructuralCurveConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.Axis=h,this.type=4243806635}};class un extends To{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=un;e.IfcStructuralCurveMemberVarying=class extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends An{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class pn extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=pn;e.IfcStructuralPointAction=class extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends _o{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class dn extends hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=dn;e.IfcStructuralSurfaceConnection=class extends cn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends zo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class fn extends rn{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=fn;e.IfcSystemFurnitureElement=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTransformerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTrimmedCurve=class extends So{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVibrationIsolator=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2769231204}};e.IfcVoidingFeature=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class En extends Lo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=En;e.IfcWorkPlan=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends En{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends fn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Lo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAsset=class extends rn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class mn extends So{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=yn;e.IfcBeamType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBoilerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class gn extends Bo{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=gn;class In extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3299480353}}e.IfcBuildingElement=In;e.IfcBuildingElementPart=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxy=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBuildingElementProxyType=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};e.IfcBurnerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcChillerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends Fo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};class vn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}}e.IfcColumn=vn;e.IfcColumnStandardCase=class extends vn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=905975707}};e.IfcCommunicationsApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcCooledBeamType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCovering=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};e.IfcDiscreteAccessory=class extends ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends Vo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionChamberElementType=class extends Ho{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Tn extends Uo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Tn;class _n extends Go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=_n;class Rn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Rn;e.IfcDistributionPort=class extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Pn extends fn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Pn;class Dn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}}e.IfcDoor=Dn;e.IfcDoorStandardCase=class extends Dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=3242481149}};e.IfcDuctFittingType=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends Jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcElectricApplianceType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends $o{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricGeneratorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends jo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Xo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class Nn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=Nn;e.IfcEngine=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends Qo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends qo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Cn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Cn;class On extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=On;e.IfcFlowInstrumentType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=bn;class Sn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Sn;class wn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=wn;class xn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=xn;class Bn extends Rn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=Bn;e.IfcFooting=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};e.IfcHeatExchanger=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcLamp=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};e.IfcMedicalDevice=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};class Fn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}}e.IfcMember=Fn;e.IfcMemberStandardCase=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1911478936}};e.IfcMotorConnection=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcOuterBoundaryCurve=class extends gn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPile=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};class Mn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}}e.IfcPlate=Mn;e.IfcPlateStandardCase=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1156407060}};e.IfcProtectiveDevice=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRailing=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcingBar=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};class Ln extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}}e.IfcSlab=Ln;e.IfcSlabElementedCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3127900445}};e.IfcSlabStandardCase=class extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3027962421}};e.IfcSolarDevice=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTransformer=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTubeBundle=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Un extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Un;e.IfcWallElementedCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4156078855}};e.IfcWallStandardCase=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};class Hn extends In{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}}e.IfcWindow=Hn;e.IfcWindowStandardCase=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=486154966}};e.IfcActuatorType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAudioVisualAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};class Gn extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}}e.IfcBeam=Gn;e.IfcBeamStandardCase=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2906023776}};e.IfcBoiler=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBurner=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcChiller=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Tn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcCooledBeam=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionChamberElement=class extends Rn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class kn extends _n{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=kn;e.IfcDuctFitting=class extends On{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Sn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends wn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricGenerator=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends Nn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcProtectiveDeviceTrippingUnit=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(cI||(cI={})),function(e){e.IfcAbsorbedDoseMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAccelerationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAmountOfSubstanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAngularVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcArcIndex=class{constructor(e){this.value=e}};e.IfcAreaDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcAreaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBinary=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcBoolean=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcBoxAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcCardinalPointReference=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcComplexNumber=class{constructor(e){this.value=e}};e.IfcCompoundPlaneAngleMeasure=class{constructor(e){this.value=e}};e.IfcContextDependentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCountMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcCurvatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDate=class{constructor(e){this.value=e,this.type=1}};e.IfcDateTime=class{constructor(e){this.value=e,this.type=1}};e.IfcDayInMonthNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDayInWeekNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDescriptiveMeasure=class{constructor(e){this.value=e,this.type=1}};class t{constructor(e){this.type=4,this.value=parseFloat(e)}}e.IfcDimensionCount=t;e.IfcDoseEquivalentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcDuration=class{constructor(e){this.value=e,this.type=1}};e.IfcDynamicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCapacitanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricChargeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricConductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricCurrentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcElectricVoltageMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcEnergyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFontStyle=class{constructor(e){this.value=e,this.type=1}};e.IfcFontVariant=class{constructor(e){this.value=e,this.type=1}};e.IfcFontWeight=class{constructor(e){this.value=e,this.type=1}};e.IfcForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcGloballyUniqueId=class{constructor(e){this.value=e,this.type=1}};e.IfcHeatFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcHeatingValueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIdentifier=class{constructor(e){this.value=e,this.type=1}};e.IfcIlluminanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInductanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIntegerCountRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIonConcentrationMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcIsothermalMoistureCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcKinematicViscosityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLabel=class{constructor(e){this.value=e,this.type=1}};e.IfcLanguageId=class{constructor(e){this.value=e,this.type=1}};e.IfcLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLineIndex=class{constructor(e){this.value=e}};e.IfcLinearForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLinearVelocityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLogical=class{constructor(e){this.type=3,this.value="true"==e}};e.IfcLuminousFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityDistributionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcLuminousIntensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMagneticFluxMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassDensityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMassPerLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfElasticityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfLinearSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfRotationalSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcModulusOfSubgradeReactionMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMoistureDiffusivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMolecularWeightMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMomentOfInertiaMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonetaryMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcMonthInYearNumber=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNonNegativeLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNormalisedRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcNumericMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPHMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcParameterValue=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlanarForceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveInteger=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveLengthMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositivePlaneAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPositiveRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPresentableText=class{constructor(e){this.value=e,this.type=1}};e.IfcPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcPropertySetDefinitionSet=class{constructor(e){this.value=e}};e.IfcRadioActivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRatioMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcReal=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalFrequencyMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalMassMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcRotationalStiffnessMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSectionalAreaIntegralMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcShearModulusMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSolidAngleMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPowerMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureLevelMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSoundPressureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecificHeatCapacityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularExponent=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcSpecularRoughness=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureGradientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTemperatureRateOfChangeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcText=class{constructor(e){this.value=e,this.type=1}};e.IfcTextAlignment=class{constructor(e){this.value=e,this.type=1}};e.IfcTextDecoration=class{constructor(e){this.value=e,this.type=1}};e.IfcTextFontName=class{constructor(e){this.value=e,this.type=1}};e.IfcTextTransformation=class{constructor(e){this.value=e,this.type=1}};e.IfcThermalAdmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalConductivityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalExpansionCoefficientMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalResistanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermalTransmittanceMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcThermodynamicTemperatureMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTime=class{constructor(e){this.value=e,this.type=1}};e.IfcTimeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTimeStamp=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcTorqueMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcURIReference=class{constructor(e){this.value=e,this.type=1}};e.IfcVaporPermeabilityMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumeMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcVolumetricFlowRateMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingConstantMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};e.IfcWarpingMomentMeasure=class{constructor(e){this.type=4,this.value=parseFloat(e)}};class s{}s.EMAIL={type:3,value:"EMAIL"},s.FAX={type:3,value:"FAX"},s.PHONE={type:3,value:"PHONE"},s.POST={type:3,value:"POST"},s.VERBAL={type:3,value:"VERBAL"},s.USERDEFINED={type:3,value:"USERDEFINED"},s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionRequestTypeEnum=s;class i{}i.BRAKES={type:3,value:"BRAKES"},i.BUOYANCY={type:3,value:"BUOYANCY"},i.COMPLETION_G1={type:3,value:"COMPLETION_G1"},i.CREEP={type:3,value:"CREEP"},i.CURRENT={type:3,value:"CURRENT"},i.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"},i.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"},i.ERECTION={type:3,value:"ERECTION"},i.FIRE={type:3,value:"FIRE"},i.ICE={type:3,value:"ICE"},i.IMPACT={type:3,value:"IMPACT"},i.IMPULSE={type:3,value:"IMPULSE"},i.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"},i.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"},i.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"},i.PROPPING={type:3,value:"PROPPING"},i.RAIN={type:3,value:"RAIN"},i.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"},i.SHRINKAGE={type:3,value:"SHRINKAGE"},i.SNOW_S={type:3,value:"SNOW_S"},i.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"},i.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"},i.TRANSPORT={type:3,value:"TRANSPORT"},i.WAVE={type:3,value:"WAVE"},i.WIND_W={type:3,value:"WIND_W"},i.USERDEFINED={type:3,value:"USERDEFINED"},i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionSourceTypeEnum=i;class r{}r.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"},r.PERMANENT_G={type:3,value:"PERMANENT_G"},r.VARIABLE_Q={type:3,value:"VARIABLE_Q"},r.USERDEFINED={type:3,value:"USERDEFINED"},r.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActionTypeEnum=r;class o{}o.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"},o.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"},o.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"},o.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"},o.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"},o.USERDEFINED={type:3,value:"USERDEFINED"},o.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcActuatorTypeEnum=o;class n{}n.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"},n.HOME={type:3,value:"HOME"},n.OFFICE={type:3,value:"OFFICE"},n.SITE={type:3,value:"SITE"},n.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcAddressTypeEnum=n;class a{}a.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"},a.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"},a.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"},a.USERDEFINED={type:3,value:"USERDEFINED"},a.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalBoxTypeEnum=a;class l{}l.DIFFUSER={type:3,value:"DIFFUSER"},l.GRILLE={type:3,value:"GRILLE"},l.LOUVRE={type:3,value:"LOUVRE"},l.REGISTER={type:3,value:"REGISTER"},l.USERDEFINED={type:3,value:"USERDEFINED"},l.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirTerminalTypeEnum=l;class h{}h.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"},h.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"},h.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"},h.HEATPIPE={type:3,value:"HEATPIPE"},h.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"},h.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"},h.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"},h.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"},h.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"},h.USERDEFINED={type:3,value:"USERDEFINED"},h.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAirToAirHeatRecoveryTypeEnum=h;class c{}c.BELL={type:3,value:"BELL"},c.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"},c.LIGHT={type:3,value:"LIGHT"},c.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"},c.RAILWAYCROCODILE={type:3,value:"RAILWAYCROCODILE"},c.RAILWAYDETONATOR={type:3,value:"RAILWAYDETONATOR"},c.SIREN={type:3,value:"SIREN"},c.WHISTLE={type:3,value:"WHISTLE"},c.USERDEFINED={type:3,value:"USERDEFINED"},c.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlarmTypeEnum=c;class A{}A.BLOSSCURVE={type:3,value:"BLOSSCURVE"},A.CONSTANTCANT={type:3,value:"CONSTANTCANT"},A.COSINECURVE={type:3,value:"COSINECURVE"},A.HELMERTCURVE={type:3,value:"HELMERTCURVE"},A.LINEARTRANSITION={type:3,value:"LINEARTRANSITION"},A.SINECURVE={type:3,value:"SINECURVE"},A.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentCantSegmentTypeEnum=A;class u{}u.BLOSSCURVE={type:3,value:"BLOSSCURVE"},u.CIRCULARARC={type:3,value:"CIRCULARARC"},u.CLOTHOID={type:3,value:"CLOTHOID"},u.COSINECURVE={type:3,value:"COSINECURVE"},u.CUBIC={type:3,value:"CUBIC"},u.HELMERTCURVE={type:3,value:"HELMERTCURVE"},u.LINE={type:3,value:"LINE"},u.SINECURVE={type:3,value:"SINECURVE"},u.VIENNESEBEND={type:3,value:"VIENNESEBEND"},e.IfcAlignmentHorizontalSegmentTypeEnum=u;class p{}p.USERDEFINED={type:3,value:"USERDEFINED"},p.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAlignmentTypeEnum=p;class d{}d.CIRCULARARC={type:3,value:"CIRCULARARC"},d.CLOTHOID={type:3,value:"CLOTHOID"},d.CONSTANTGRADIENT={type:3,value:"CONSTANTGRADIENT"},d.PARABOLICARC={type:3,value:"PARABOLICARC"},e.IfcAlignmentVerticalSegmentTypeEnum=d;class f{}f.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"},f.LOADING_3D={type:3,value:"LOADING_3D"},f.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"},f.USERDEFINED={type:3,value:"USERDEFINED"},f.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisModelTypeEnum=f;class E{}E.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"},E.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"},E.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"},E.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"},E.USERDEFINED={type:3,value:"USERDEFINED"},E.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnalysisTheoryTypeEnum=E;class m{}m.ASBUILTAREA={type:3,value:"ASBUILTAREA"},m.ASBUILTLINE={type:3,value:"ASBUILTLINE"},m.ASBUILTPOINT={type:3,value:"ASBUILTPOINT"},m.ASSUMEDAREA={type:3,value:"ASSUMEDAREA"},m.ASSUMEDLINE={type:3,value:"ASSUMEDLINE"},m.ASSUMEDPOINT={type:3,value:"ASSUMEDPOINT"},m.NON_PHYSICAL_SIGNAL={type:3,value:"NON_PHYSICAL_SIGNAL"},m.SUPERELEVATIONEVENT={type:3,value:"SUPERELEVATIONEVENT"},m.WIDTHEVENT={type:3,value:"WIDTHEVENT"},m.USERDEFINED={type:3,value:"USERDEFINED"},m.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAnnotationTypeEnum=m;class y{}y.ADD={type:3,value:"ADD"},y.DIVIDE={type:3,value:"DIVIDE"},y.MULTIPLY={type:3,value:"MULTIPLY"},y.SUBTRACT={type:3,value:"SUBTRACT"},e.IfcArithmeticOperatorEnum=y;class g{}g.FACTORY={type:3,value:"FACTORY"},g.SITE={type:3,value:"SITE"},g.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAssemblyPlaceEnum=g;class I{}I.AMPLIFIER={type:3,value:"AMPLIFIER"},I.CAMERA={type:3,value:"CAMERA"},I.COMMUNICATIONTERMINAL={type:3,value:"COMMUNICATIONTERMINAL"},I.DISPLAY={type:3,value:"DISPLAY"},I.MICROPHONE={type:3,value:"MICROPHONE"},I.PLAYER={type:3,value:"PLAYER"},I.PROJECTOR={type:3,value:"PROJECTOR"},I.RECEIVER={type:3,value:"RECEIVER"},I.RECORDINGEQUIPMENT={type:3,value:"RECORDINGEQUIPMENT"},I.SPEAKER={type:3,value:"SPEAKER"},I.SWITCHER={type:3,value:"SWITCHER"},I.TELEPHONE={type:3,value:"TELEPHONE"},I.TUNER={type:3,value:"TUNER"},I.USERDEFINED={type:3,value:"USERDEFINED"},I.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcAudioVisualApplianceTypeEnum=I;class v{}v.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"},v.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"},v.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"},v.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"},v.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"},v.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineCurveForm=v;class T{}T.CONICAL_SURF={type:3,value:"CONICAL_SURF"},T.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"},T.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"},T.PLANE_SURF={type:3,value:"PLANE_SURF"},T.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"},T.RULED_SURF={type:3,value:"RULED_SURF"},T.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"},T.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"},T.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"},T.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"},T.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcBSplineSurfaceForm=T;class _{}_.BEAM={type:3,value:"BEAM"},_.CORNICE={type:3,value:"CORNICE"},_.DIAPHRAGM={type:3,value:"DIAPHRAGM"},_.EDGEBEAM={type:3,value:"EDGEBEAM"},_.GIRDER_SEGMENT={type:3,value:"GIRDER_SEGMENT"},_.HATSTONE={type:3,value:"HATSTONE"},_.HOLLOWCORE={type:3,value:"HOLLOWCORE"},_.JOIST={type:3,value:"JOIST"},_.LINTEL={type:3,value:"LINTEL"},_.PIERCAP={type:3,value:"PIERCAP"},_.SPANDREL={type:3,value:"SPANDREL"},_.T_BEAM={type:3,value:"T_BEAM"},_.USERDEFINED={type:3,value:"USERDEFINED"},_.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBeamTypeEnum=_;class R{}R.FIXED_MOVEMENT={type:3,value:"FIXED_MOVEMENT"},R.FREE_MOVEMENT={type:3,value:"FREE_MOVEMENT"},R.GUIDED_LONGITUDINAL={type:3,value:"GUIDED_LONGITUDINAL"},R.GUIDED_TRANSVERSAL={type:3,value:"GUIDED_TRANSVERSAL"},R.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeDisplacementEnum=R;class P{}P.CYLINDRICAL={type:3,value:"CYLINDRICAL"},P.DISK={type:3,value:"DISK"},P.ELASTOMERIC={type:3,value:"ELASTOMERIC"},P.GUIDE={type:3,value:"GUIDE"},P.POT={type:3,value:"POT"},P.ROCKER={type:3,value:"ROCKER"},P.ROLLER={type:3,value:"ROLLER"},P.SPHERICAL={type:3,value:"SPHERICAL"},P.USERDEFINED={type:3,value:"USERDEFINED"},P.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBearingTypeEnum=P;class D{}D.EQUALTO={type:3,value:"EQUALTO"},D.GREATERTHAN={type:3,value:"GREATERTHAN"},D.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"},D.INCLUDEDIN={type:3,value:"INCLUDEDIN"},D.INCLUDES={type:3,value:"INCLUDES"},D.LESSTHAN={type:3,value:"LESSTHAN"},D.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"},D.NOTEQUALTO={type:3,value:"NOTEQUALTO"},D.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"},D.NOTINCLUDES={type:3,value:"NOTINCLUDES"},e.IfcBenchmarkEnum=D;class N{}N.STEAM={type:3,value:"STEAM"},N.WATER={type:3,value:"WATER"},N.USERDEFINED={type:3,value:"USERDEFINED"},N.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBoilerTypeEnum=N;class C{}C.DIFFERENCE={type:3,value:"DIFFERENCE"},C.INTERSECTION={type:3,value:"INTERSECTION"},C.UNION={type:3,value:"UNION"},e.IfcBooleanOperator=C;class O{}O.ABUTMENT={type:3,value:"ABUTMENT"},O.DECK={type:3,value:"DECK"},O.DECK_SEGMENT={type:3,value:"DECK_SEGMENT"},O.FOUNDATION={type:3,value:"FOUNDATION"},O.PIER={type:3,value:"PIER"},O.PIER_SEGMENT={type:3,value:"PIER_SEGMENT"},O.PYLON={type:3,value:"PYLON"},O.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},O.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},O.SURFACESTRUCTURE={type:3,value:"SURFACESTRUCTURE"},O.USERDEFINED={type:3,value:"USERDEFINED"},O.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgePartTypeEnum=O;class b{}b.ARCHED={type:3,value:"ARCHED"},b.CABLE_STAYED={type:3,value:"CABLE_STAYED"},b.CANTILEVER={type:3,value:"CANTILEVER"},b.CULVERT={type:3,value:"CULVERT"},b.FRAMEWORK={type:3,value:"FRAMEWORK"},b.GIRDER={type:3,value:"GIRDER"},b.SUSPENSION={type:3,value:"SUSPENSION"},b.TRUSS={type:3,value:"TRUSS"},b.USERDEFINED={type:3,value:"USERDEFINED"},b.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBridgeTypeEnum=b;class S{}S.APRON={type:3,value:"APRON"},S.ARMOURUNIT={type:3,value:"ARMOURUNIT"},S.INSULATION={type:3,value:"INSULATION"},S.PRECASTPANEL={type:3,value:"PRECASTPANEL"},S.SAFETYCAGE={type:3,value:"SAFETYCAGE"},S.USERDEFINED={type:3,value:"USERDEFINED"},S.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementPartTypeEnum=S;class w{}w.COMPLEX={type:3,value:"COMPLEX"},w.ELEMENT={type:3,value:"ELEMENT"},w.PARTIAL={type:3,value:"PARTIAL"},w.USERDEFINED={type:3,value:"USERDEFINED"},w.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingElementProxyTypeEnum=w;class x{}x.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},x.FENESTRATION={type:3,value:"FENESTRATION"},x.FOUNDATION={type:3,value:"FOUNDATION"},x.LOADBEARING={type:3,value:"LOADBEARING"},x.OUTERSHELL={type:3,value:"OUTERSHELL"},x.PRESTRESSING={type:3,value:"PRESTRESSING"},x.REINFORCING={type:3,value:"REINFORCING"},x.SHADING={type:3,value:"SHADING"},x.TRANSPORT={type:3,value:"TRANSPORT"},x.USERDEFINED={type:3,value:"USERDEFINED"},x.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuildingSystemTypeEnum=x;class B{}B.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"},B.FENESTRATION={type:3,value:"FENESTRATION"},B.FOUNDATION={type:3,value:"FOUNDATION"},B.LOADBEARING={type:3,value:"LOADBEARING"},B.MOORING={type:3,value:"MOORING"},B.OUTERSHELL={type:3,value:"OUTERSHELL"},B.PRESTRESSING={type:3,value:"PRESTRESSING"},B.RAILWAYLINE={type:3,value:"RAILWAYLINE"},B.RAILWAYTRACK={type:3,value:"RAILWAYTRACK"},B.REINFORCING={type:3,value:"REINFORCING"},B.SHADING={type:3,value:"SHADING"},B.TRACKCIRCUIT={type:3,value:"TRACKCIRCUIT"},B.TRANSPORT={type:3,value:"TRANSPORT"},B.USERDEFINED={type:3,value:"USERDEFINED"},B.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBuiltSystemTypeEnum=B;class F{}F.USERDEFINED={type:3,value:"USERDEFINED"},F.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcBurnerTypeEnum=F;class M{}M.BEND={type:3,value:"BEND"},M.CONNECTOR={type:3,value:"CONNECTOR"},M.CROSS={type:3,value:"CROSS"},M.JUNCTION={type:3,value:"JUNCTION"},M.TEE={type:3,value:"TEE"},M.TRANSITION={type:3,value:"TRANSITION"},M.USERDEFINED={type:3,value:"USERDEFINED"},M.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierFittingTypeEnum=M;class L{}L.CABLEBRACKET={type:3,value:"CABLEBRACKET"},L.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"},L.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"},L.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"},L.CATENARYWIRE={type:3,value:"CATENARYWIRE"},L.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"},L.DROPPER={type:3,value:"DROPPER"},L.USERDEFINED={type:3,value:"USERDEFINED"},L.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableCarrierSegmentTypeEnum=L;class U{}U.CONNECTOR={type:3,value:"CONNECTOR"},U.ENTRY={type:3,value:"ENTRY"},U.EXIT={type:3,value:"EXIT"},U.FANOUT={type:3,value:"FANOUT"},U.JUNCTION={type:3,value:"JUNCTION"},U.TRANSITION={type:3,value:"TRANSITION"},U.USERDEFINED={type:3,value:"USERDEFINED"},U.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableFittingTypeEnum=U;class H{}H.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"},H.CABLESEGMENT={type:3,value:"CABLESEGMENT"},H.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"},H.CONTACTWIRESEGMENT={type:3,value:"CONTACTWIRESEGMENT"},H.CORESEGMENT={type:3,value:"CORESEGMENT"},H.FIBERSEGMENT={type:3,value:"FIBERSEGMENT"},H.FIBERTUBE={type:3,value:"FIBERTUBE"},H.OPTICALCABLESEGMENT={type:3,value:"OPTICALCABLESEGMENT"},H.STITCHWIRE={type:3,value:"STITCHWIRE"},H.WIREPAIRSEGMENT={type:3,value:"WIREPAIRSEGMENT"},H.USERDEFINED={type:3,value:"USERDEFINED"},H.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCableSegmentTypeEnum=H;class G{}G.CAISSON={type:3,value:"CAISSON"},G.WELL={type:3,value:"WELL"},G.USERDEFINED={type:3,value:"USERDEFINED"},G.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCaissonFoundationTypeEnum=G;class k{}k.ADDED={type:3,value:"ADDED"},k.DELETED={type:3,value:"DELETED"},k.MODIFIED={type:3,value:"MODIFIED"},k.NOCHANGE={type:3,value:"NOCHANGE"},k.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChangeActionEnum=k;class V{}V.AIRCOOLED={type:3,value:"AIRCOOLED"},V.HEATRECOVERY={type:3,value:"HEATRECOVERY"},V.WATERCOOLED={type:3,value:"WATERCOOLED"},V.USERDEFINED={type:3,value:"USERDEFINED"},V.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChillerTypeEnum=V;class j{}j.USERDEFINED={type:3,value:"USERDEFINED"},j.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcChimneyTypeEnum=j;class Q{}Q.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"},Q.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"},Q.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"},Q.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"},Q.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"},Q.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"},Q.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"},Q.USERDEFINED={type:3,value:"USERDEFINED"},Q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoilTypeEnum=Q;class W{}W.COLUMN={type:3,value:"COLUMN"},W.PIERSTEM={type:3,value:"PIERSTEM"},W.PIERSTEM_SEGMENT={type:3,value:"PIERSTEM_SEGMENT"},W.PILASTER={type:3,value:"PILASTER"},W.STANDCOLUMN={type:3,value:"STANDCOLUMN"},W.USERDEFINED={type:3,value:"USERDEFINED"},W.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcColumnTypeEnum=W;class z{}z.ANTENNA={type:3,value:"ANTENNA"},z.AUTOMATON={type:3,value:"AUTOMATON"},z.COMPUTER={type:3,value:"COMPUTER"},z.FAX={type:3,value:"FAX"},z.GATEWAY={type:3,value:"GATEWAY"},z.INTELLIGENTPERIPHERAL={type:3,value:"INTELLIGENTPERIPHERAL"},z.IPNETWORKEQUIPMENT={type:3,value:"IPNETWORKEQUIPMENT"},z.LINESIDEELECTRONICUNIT={type:3,value:"LINESIDEELECTRONICUNIT"},z.MODEM={type:3,value:"MODEM"},z.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"},z.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"},z.NETWORKHUB={type:3,value:"NETWORKHUB"},z.OPTICALLINETERMINAL={type:3,value:"OPTICALLINETERMINAL"},z.OPTICALNETWORKUNIT={type:3,value:"OPTICALNETWORKUNIT"},z.PRINTER={type:3,value:"PRINTER"},z.RADIOBLOCKCENTER={type:3,value:"RADIOBLOCKCENTER"},z.REPEATER={type:3,value:"REPEATER"},z.ROUTER={type:3,value:"ROUTER"},z.SCANNER={type:3,value:"SCANNER"},z.TELECOMMAND={type:3,value:"TELECOMMAND"},z.TELEPHONYEXCHANGE={type:3,value:"TELEPHONYEXCHANGE"},z.TRANSITIONCOMPONENT={type:3,value:"TRANSITIONCOMPONENT"},z.TRANSPONDER={type:3,value:"TRANSPONDER"},z.TRANSPORTEQUIPMENT={type:3,value:"TRANSPORTEQUIPMENT"},z.USERDEFINED={type:3,value:"USERDEFINED"},z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCommunicationsApplianceTypeEnum=z;class K{}K.P_COMPLEX={type:3,value:"P_COMPLEX"},K.Q_COMPLEX={type:3,value:"Q_COMPLEX"},e.IfcComplexPropertyTemplateTypeEnum=K;class Y{}Y.BOOSTER={type:3,value:"BOOSTER"},Y.DYNAMIC={type:3,value:"DYNAMIC"},Y.HERMETIC={type:3,value:"HERMETIC"},Y.OPENTYPE={type:3,value:"OPENTYPE"},Y.RECIPROCATING={type:3,value:"RECIPROCATING"},Y.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"},Y.ROTARY={type:3,value:"ROTARY"},Y.ROTARYVANE={type:3,value:"ROTARYVANE"},Y.SCROLL={type:3,value:"SCROLL"},Y.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"},Y.SINGLESCREW={type:3,value:"SINGLESCREW"},Y.SINGLESTAGE={type:3,value:"SINGLESTAGE"},Y.TROCHOIDAL={type:3,value:"TROCHOIDAL"},Y.TWINSCREW={type:3,value:"TWINSCREW"},Y.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"},Y.USERDEFINED={type:3,value:"USERDEFINED"},Y.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCompressorTypeEnum=Y;class X{}X.AIRCOOLED={type:3,value:"AIRCOOLED"},X.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"},X.WATERCOOLED={type:3,value:"WATERCOOLED"},X.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"},X.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"},X.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"},X.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"},X.USERDEFINED={type:3,value:"USERDEFINED"},X.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCondenserTypeEnum=X;class Z{}Z.ATEND={type:3,value:"ATEND"},Z.ATPATH={type:3,value:"ATPATH"},Z.ATSTART={type:3,value:"ATSTART"},Z.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConnectionTypeEnum=Z;class q{}q.ADVISORY={type:3,value:"ADVISORY"},q.HARD={type:3,value:"HARD"},q.SOFT={type:3,value:"SOFT"},q.USERDEFINED={type:3,value:"USERDEFINED"},q.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstraintEnum=q;class J{}J.DEMOLISHING={type:3,value:"DEMOLISHING"},J.EARTHMOVING={type:3,value:"EARTHMOVING"},J.ERECTING={type:3,value:"ERECTING"},J.HEATING={type:3,value:"HEATING"},J.LIGHTING={type:3,value:"LIGHTING"},J.PAVING={type:3,value:"PAVING"},J.PUMPING={type:3,value:"PUMPING"},J.TRANSPORTING={type:3,value:"TRANSPORTING"},J.USERDEFINED={type:3,value:"USERDEFINED"},J.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionEquipmentResourceTypeEnum=J;class ${}$.AGGREGATES={type:3,value:"AGGREGATES"},$.CONCRETE={type:3,value:"CONCRETE"},$.DRYWALL={type:3,value:"DRYWALL"},$.FUEL={type:3,value:"FUEL"},$.GYPSUM={type:3,value:"GYPSUM"},$.MASONRY={type:3,value:"MASONRY"},$.METAL={type:3,value:"METAL"},$.PLASTIC={type:3,value:"PLASTIC"},$.WOOD={type:3,value:"WOOD"},$.USERDEFINED={type:3,value:"USERDEFINED"},$.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionMaterialResourceTypeEnum=$;class ee{}ee.ASSEMBLY={type:3,value:"ASSEMBLY"},ee.FORMWORK={type:3,value:"FORMWORK"},ee.USERDEFINED={type:3,value:"USERDEFINED"},ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConstructionProductResourceTypeEnum=ee;class te{}te.FLOATING={type:3,value:"FLOATING"},te.MULTIPOSITION={type:3,value:"MULTIPOSITION"},te.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"},te.PROPORTIONAL={type:3,value:"PROPORTIONAL"},te.TWOPOSITION={type:3,value:"TWOPOSITION"},te.USERDEFINED={type:3,value:"USERDEFINED"},te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcControllerTypeEnum=te;class se{}se.BELTCONVEYOR={type:3,value:"BELTCONVEYOR"},se.BUCKETCONVEYOR={type:3,value:"BUCKETCONVEYOR"},se.CHUTECONVEYOR={type:3,value:"CHUTECONVEYOR"},se.SCREWCONVEYOR={type:3,value:"SCREWCONVEYOR"},se.USERDEFINED={type:3,value:"USERDEFINED"},se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcConveyorSegmentTypeEnum=se;class ie{}ie.ACTIVE={type:3,value:"ACTIVE"},ie.PASSIVE={type:3,value:"PASSIVE"},ie.USERDEFINED={type:3,value:"USERDEFINED"},ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCooledBeamTypeEnum=ie;class re{}re.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"},re.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"},re.NATURALDRAFT={type:3,value:"NATURALDRAFT"},re.USERDEFINED={type:3,value:"USERDEFINED"},re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoolingTowerTypeEnum=re;class oe{}oe.USERDEFINED={type:3,value:"USERDEFINED"},oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostItemTypeEnum=oe;class ne{}ne.BUDGET={type:3,value:"BUDGET"},ne.COSTPLAN={type:3,value:"COSTPLAN"},ne.ESTIMATE={type:3,value:"ESTIMATE"},ne.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"},ne.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"},ne.TENDER={type:3,value:"TENDER"},ne.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"},ne.USERDEFINED={type:3,value:"USERDEFINED"},ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCostScheduleTypeEnum=ne;class ae{}ae.ARMOUR={type:3,value:"ARMOUR"},ae.BALLASTBED={type:3,value:"BALLASTBED"},ae.CORE={type:3,value:"CORE"},ae.FILTER={type:3,value:"FILTER"},ae.PAVEMENT={type:3,value:"PAVEMENT"},ae.PROTECTION={type:3,value:"PROTECTION"},ae.USERDEFINED={type:3,value:"USERDEFINED"},ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCourseTypeEnum=ae;class le{}le.CEILING={type:3,value:"CEILING"},le.CLADDING={type:3,value:"CLADDING"},le.COPING={type:3,value:"COPING"},le.FLOORING={type:3,value:"FLOORING"},le.INSULATION={type:3,value:"INSULATION"},le.MEMBRANE={type:3,value:"MEMBRANE"},le.MOLDING={type:3,value:"MOLDING"},le.ROOFING={type:3,value:"ROOFING"},le.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"},le.SLEEVING={type:3,value:"SLEEVING"},le.TOPPING={type:3,value:"TOPPING"},le.WRAPPING={type:3,value:"WRAPPING"},le.USERDEFINED={type:3,value:"USERDEFINED"},le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCoveringTypeEnum=le;class he{}he.OFFICE={type:3,value:"OFFICE"},he.SITE={type:3,value:"SITE"},he.USERDEFINED={type:3,value:"USERDEFINED"},he.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCrewResourceTypeEnum=he;class ce{}ce.USERDEFINED={type:3,value:"USERDEFINED"},ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurtainWallTypeEnum=ce;class Ae{}Ae.LINEAR={type:3,value:"LINEAR"},Ae.LOG_LINEAR={type:3,value:"LOG_LINEAR"},Ae.LOG_LOG={type:3,value:"LOG_LOG"},Ae.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcCurveInterpolationEnum=Ae;class ue{}ue.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"},ue.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"},ue.BLASTDAMPER={type:3,value:"BLASTDAMPER"},ue.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"},ue.FIREDAMPER={type:3,value:"FIREDAMPER"},ue.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"},ue.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"},ue.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"},ue.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"},ue.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"},ue.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"},ue.USERDEFINED={type:3,value:"USERDEFINED"},ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDamperTypeEnum=ue;class pe{}pe.MEASURED={type:3,value:"MEASURED"},pe.PREDICTED={type:3,value:"PREDICTED"},pe.SIMULATED={type:3,value:"SIMULATED"},pe.USERDEFINED={type:3,value:"USERDEFINED"},pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDataOriginEnum=pe;class de{}de.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"},de.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"},de.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"},de.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"},de.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"},de.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"},de.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"},de.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"},de.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"},de.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"},de.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"},de.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"},de.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"},de.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"},de.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"},de.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"},de.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"},de.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"},de.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"},de.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"},de.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"},de.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"},de.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"},de.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"},de.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"},de.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"},de.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"},de.PHUNIT={type:3,value:"PHUNIT"},de.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"},de.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"},de.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"},de.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"},de.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"},de.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"},de.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"},de.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"},de.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"},de.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"},de.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"},de.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"},de.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"},de.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"},de.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"},de.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"},de.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"},de.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"},de.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"},de.TORQUEUNIT={type:3,value:"TORQUEUNIT"},de.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"},de.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"},de.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"},de.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"},de.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcDerivedUnitEnum=de;class fe{}fe.NEGATIVE={type:3,value:"NEGATIVE"},fe.POSITIVE={type:3,value:"POSITIVE"},e.IfcDirectionSenseEnum=fe;class Ee{}Ee.ANCHORPLATE={type:3,value:"ANCHORPLATE"},Ee.BIRDPROTECTION={type:3,value:"BIRDPROTECTION"},Ee.BRACKET={type:3,value:"BRACKET"},Ee.CABLEARRANGER={type:3,value:"CABLEARRANGER"},Ee.ELASTIC_CUSHION={type:3,value:"ELASTIC_CUSHION"},Ee.EXPANSION_JOINT_DEVICE={type:3,value:"EXPANSION_JOINT_DEVICE"},Ee.FILLER={type:3,value:"FILLER"},Ee.FLASHING={type:3,value:"FLASHING"},Ee.INSULATOR={type:3,value:"INSULATOR"},Ee.LOCK={type:3,value:"LOCK"},Ee.PANEL_STRENGTHENING={type:3,value:"PANEL_STRENGTHENING"},Ee.POINTMACHINEMOUNTINGDEVICE={type:3,value:"POINTMACHINEMOUNTINGDEVICE"},Ee.POINT_MACHINE_LOCKING_DEVICE={type:3,value:"POINT_MACHINE_LOCKING_DEVICE"},Ee.RAILBRACE={type:3,value:"RAILBRACE"},Ee.RAILPAD={type:3,value:"RAILPAD"},Ee.RAIL_LUBRICATION={type:3,value:"RAIL_LUBRICATION"},Ee.RAIL_MECHANICAL_EQUIPMENT={type:3,value:"RAIL_MECHANICAL_EQUIPMENT"},Ee.SHOE={type:3,value:"SHOE"},Ee.SLIDINGCHAIR={type:3,value:"SLIDINGCHAIR"},Ee.SOUNDABSORPTION={type:3,value:"SOUNDABSORPTION"},Ee.TENSIONINGEQUIPMENT={type:3,value:"TENSIONINGEQUIPMENT"},Ee.USERDEFINED={type:3,value:"USERDEFINED"},Ee.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDiscreteAccessoryTypeEnum=Ee;class me{}me.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},me.DISPATCHINGBOARD={type:3,value:"DISPATCHINGBOARD"},me.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},me.DISTRIBUTIONFRAME={type:3,value:"DISTRIBUTIONFRAME"},me.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},me.SWITCHBOARD={type:3,value:"SWITCHBOARD"},me.USERDEFINED={type:3,value:"USERDEFINED"},me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionBoardTypeEnum=me;class ye{}ye.FORMEDDUCT={type:3,value:"FORMEDDUCT"},ye.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"},ye.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"},ye.MANHOLE={type:3,value:"MANHOLE"},ye.METERCHAMBER={type:3,value:"METERCHAMBER"},ye.SUMP={type:3,value:"SUMP"},ye.TRENCH={type:3,value:"TRENCH"},ye.VALVECHAMBER={type:3,value:"VALVECHAMBER"},ye.USERDEFINED={type:3,value:"USERDEFINED"},ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionChamberElementTypeEnum=ye;class ge{}ge.CABLE={type:3,value:"CABLE"},ge.CABLECARRIER={type:3,value:"CABLECARRIER"},ge.DUCT={type:3,value:"DUCT"},ge.PIPE={type:3,value:"PIPE"},ge.WIRELESS={type:3,value:"WIRELESS"},ge.USERDEFINED={type:3,value:"USERDEFINED"},ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionPortTypeEnum=ge;class Ie{}Ie.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"},Ie.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"},Ie.CATENARY_SYSTEM={type:3,value:"CATENARY_SYSTEM"},Ie.CHEMICAL={type:3,value:"CHEMICAL"},Ie.CHILLEDWATER={type:3,value:"CHILLEDWATER"},Ie.COMMUNICATION={type:3,value:"COMMUNICATION"},Ie.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"},Ie.CONDENSERWATER={type:3,value:"CONDENSERWATER"},Ie.CONTROL={type:3,value:"CONTROL"},Ie.CONVEYING={type:3,value:"CONVEYING"},Ie.DATA={type:3,value:"DATA"},Ie.DISPOSAL={type:3,value:"DISPOSAL"},Ie.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"},Ie.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"},Ie.DRAINAGE={type:3,value:"DRAINAGE"},Ie.EARTHING={type:3,value:"EARTHING"},Ie.ELECTRICAL={type:3,value:"ELECTRICAL"},Ie.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"},Ie.EXHAUST={type:3,value:"EXHAUST"},Ie.FIREPROTECTION={type:3,value:"FIREPROTECTION"},Ie.FIXEDTRANSMISSIONNETWORK={type:3,value:"FIXEDTRANSMISSIONNETWORK"},Ie.FUEL={type:3,value:"FUEL"},Ie.GAS={type:3,value:"GAS"},Ie.HAZARDOUS={type:3,value:"HAZARDOUS"},Ie.HEATING={type:3,value:"HEATING"},Ie.LIGHTING={type:3,value:"LIGHTING"},Ie.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"},Ie.MOBILENETWORK={type:3,value:"MOBILENETWORK"},Ie.MONITORINGSYSTEM={type:3,value:"MONITORINGSYSTEM"},Ie.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"},Ie.OIL={type:3,value:"OIL"},Ie.OPERATIONAL={type:3,value:"OPERATIONAL"},Ie.OPERATIONALTELEPHONYSYSTEM={type:3,value:"OPERATIONALTELEPHONYSYSTEM"},Ie.OVERHEAD_CONTACTLINE_SYSTEM={type:3,value:"OVERHEAD_CONTACTLINE_SYSTEM"},Ie.POWERGENERATION={type:3,value:"POWERGENERATION"},Ie.RAINWATER={type:3,value:"RAINWATER"},Ie.REFRIGERATION={type:3,value:"REFRIGERATION"},Ie.RETURN_CIRCUIT={type:3,value:"RETURN_CIRCUIT"},Ie.SECURITY={type:3,value:"SECURITY"},Ie.SEWAGE={type:3,value:"SEWAGE"},Ie.SIGNAL={type:3,value:"SIGNAL"},Ie.STORMWATER={type:3,value:"STORMWATER"},Ie.TELEPHONE={type:3,value:"TELEPHONE"},Ie.TV={type:3,value:"TV"},Ie.VACUUM={type:3,value:"VACUUM"},Ie.VENT={type:3,value:"VENT"},Ie.VENTILATION={type:3,value:"VENTILATION"},Ie.WASTEWATER={type:3,value:"WASTEWATER"},Ie.WATERSUPPLY={type:3,value:"WATERSUPPLY"},Ie.USERDEFINED={type:3,value:"USERDEFINED"},Ie.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDistributionSystemEnum=Ie;class ve{}ve.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"},ve.PERSONAL={type:3,value:"PERSONAL"},ve.PUBLIC={type:3,value:"PUBLIC"},ve.RESTRICTED={type:3,value:"RESTRICTED"},ve.USERDEFINED={type:3,value:"USERDEFINED"},ve.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentConfidentialityEnum=ve;class Te{}Te.DRAFT={type:3,value:"DRAFT"},Te.FINAL={type:3,value:"FINAL"},Te.FINALDRAFT={type:3,value:"FINALDRAFT"},Te.REVISION={type:3,value:"REVISION"},Te.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDocumentStatusEnum=Te;class _e{}_e.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"},_e.FIXEDPANEL={type:3,value:"FIXEDPANEL"},_e.FOLDING={type:3,value:"FOLDING"},_e.REVOLVING={type:3,value:"REVOLVING"},_e.ROLLINGUP={type:3,value:"ROLLINGUP"},_e.SLIDING={type:3,value:"SLIDING"},_e.SWINGING={type:3,value:"SWINGING"},_e.USERDEFINED={type:3,value:"USERDEFINED"},_e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelOperationEnum=_e;class Re{}Re.LEFT={type:3,value:"LEFT"},Re.MIDDLE={type:3,value:"MIDDLE"},Re.RIGHT={type:3,value:"RIGHT"},Re.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorPanelPositionEnum=Re;class Pe{}Pe.ALUMINIUM={type:3,value:"ALUMINIUM"},Pe.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"},Pe.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Pe.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Pe.PLASTIC={type:3,value:"PLASTIC"},Pe.STEEL={type:3,value:"STEEL"},Pe.WOOD={type:3,value:"WOOD"},Pe.USERDEFINED={type:3,value:"USERDEFINED"},Pe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleConstructionEnum=Pe;class De{}De.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"},De.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"},De.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"},De.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"},De.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"},De.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},De.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},De.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},De.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},De.REVOLVING={type:3,value:"REVOLVING"},De.ROLLINGUP={type:3,value:"ROLLINGUP"},De.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},De.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},De.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},De.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},De.USERDEFINED={type:3,value:"USERDEFINED"},De.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorStyleOperationEnum=De;class Ne{}Ne.BOOM_BARRIER={type:3,value:"BOOM_BARRIER"},Ne.DOOR={type:3,value:"DOOR"},Ne.GATE={type:3,value:"GATE"},Ne.TRAPDOOR={type:3,value:"TRAPDOOR"},Ne.TURNSTILE={type:3,value:"TURNSTILE"},Ne.USERDEFINED={type:3,value:"USERDEFINED"},Ne.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeEnum=Ne;class Ce{}Ce.DOUBLE_PANEL_DOUBLE_SWING={type:3,value:"DOUBLE_PANEL_DOUBLE_SWING"},Ce.DOUBLE_PANEL_FOLDING={type:3,value:"DOUBLE_PANEL_FOLDING"},Ce.DOUBLE_PANEL_LIFTING_VERTICAL={type:3,value:"DOUBLE_PANEL_LIFTING_VERTICAL"},Ce.DOUBLE_PANEL_SINGLE_SWING={type:3,value:"DOUBLE_PANEL_SINGLE_SWING"},Ce.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT"},Ce.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT"},Ce.DOUBLE_PANEL_SLIDING={type:3,value:"DOUBLE_PANEL_SLIDING"},Ce.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"},Ce.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"},Ce.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"},Ce.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"},Ce.LIFTING_HORIZONTAL={type:3,value:"LIFTING_HORIZONTAL"},Ce.LIFTING_VERTICAL_LEFT={type:3,value:"LIFTING_VERTICAL_LEFT"},Ce.LIFTING_VERTICAL_RIGHT={type:3,value:"LIFTING_VERTICAL_RIGHT"},Ce.REVOLVING_HORIZONTAL={type:3,value:"REVOLVING_HORIZONTAL"},Ce.REVOLVING_VERTICAL={type:3,value:"REVOLVING_VERTICAL"},Ce.ROLLINGUP={type:3,value:"ROLLINGUP"},Ce.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"},Ce.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"},Ce.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"},Ce.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"},Ce.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"},Ce.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"},Ce.USERDEFINED={type:3,value:"USERDEFINED"},Ce.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDoorTypeOperationEnum=Ce;class Oe{}Oe.BEND={type:3,value:"BEND"},Oe.CONNECTOR={type:3,value:"CONNECTOR"},Oe.ENTRY={type:3,value:"ENTRY"},Oe.EXIT={type:3,value:"EXIT"},Oe.JUNCTION={type:3,value:"JUNCTION"},Oe.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Oe.TRANSITION={type:3,value:"TRANSITION"},Oe.USERDEFINED={type:3,value:"USERDEFINED"},Oe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctFittingTypeEnum=Oe;class be{}be.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},be.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},be.USERDEFINED={type:3,value:"USERDEFINED"},be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSegmentTypeEnum=be;class Se{}Se.FLATOVAL={type:3,value:"FLATOVAL"},Se.RECTANGULAR={type:3,value:"RECTANGULAR"},Se.ROUND={type:3,value:"ROUND"},Se.USERDEFINED={type:3,value:"USERDEFINED"},Se.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcDuctSilencerTypeEnum=Se;class we{}we.BASE_EXCAVATION={type:3,value:"BASE_EXCAVATION"},we.CUT={type:3,value:"CUT"},we.DREDGING={type:3,value:"DREDGING"},we.EXCAVATION={type:3,value:"EXCAVATION"},we.OVEREXCAVATION={type:3,value:"OVEREXCAVATION"},we.PAVEMENTMILLING={type:3,value:"PAVEMENTMILLING"},we.STEPEXCAVATION={type:3,value:"STEPEXCAVATION"},we.TOPSOILREMOVAL={type:3,value:"TOPSOILREMOVAL"},we.TRENCH={type:3,value:"TRENCH"},we.USERDEFINED={type:3,value:"USERDEFINED"},we.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksCutTypeEnum=we;class xe{}xe.BACKFILL={type:3,value:"BACKFILL"},xe.COUNTERWEIGHT={type:3,value:"COUNTERWEIGHT"},xe.EMBANKMENT={type:3,value:"EMBANKMENT"},xe.SLOPEFILL={type:3,value:"SLOPEFILL"},xe.SUBGRADE={type:3,value:"SUBGRADE"},xe.SUBGRADEBED={type:3,value:"SUBGRADEBED"},xe.TRANSITIONSECTION={type:3,value:"TRANSITIONSECTION"},xe.USERDEFINED={type:3,value:"USERDEFINED"},xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEarthworksFillTypeEnum=xe;class Be{}Be.DISHWASHER={type:3,value:"DISHWASHER"},Be.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"},Be.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"},Be.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"},Be.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"},Be.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"},Be.FREEZER={type:3,value:"FREEZER"},Be.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"},Be.HANDDRYER={type:3,value:"HANDDRYER"},Be.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"},Be.MICROWAVE={type:3,value:"MICROWAVE"},Be.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"},Be.REFRIGERATOR={type:3,value:"REFRIGERATOR"},Be.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"},Be.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"},Be.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"},Be.USERDEFINED={type:3,value:"USERDEFINED"},Be.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricApplianceTypeEnum=Be;class Fe{}Fe.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"},Fe.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"},Fe.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"},Fe.SWITCHBOARD={type:3,value:"SWITCHBOARD"},Fe.USERDEFINED={type:3,value:"USERDEFINED"},Fe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricDistributionBoardTypeEnum=Fe;class Me{}Me.BATTERY={type:3,value:"BATTERY"},Me.CAPACITOR={type:3,value:"CAPACITOR"},Me.CAPACITORBANK={type:3,value:"CAPACITORBANK"},Me.COMPENSATOR={type:3,value:"COMPENSATOR"},Me.HARMONICFILTER={type:3,value:"HARMONICFILTER"},Me.INDUCTOR={type:3,value:"INDUCTOR"},Me.INDUCTORBANK={type:3,value:"INDUCTORBANK"},Me.RECHARGER={type:3,value:"RECHARGER"},Me.UPS={type:3,value:"UPS"},Me.USERDEFINED={type:3,value:"USERDEFINED"},Me.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowStorageDeviceTypeEnum=Me;class Le{}Le.ELECTRONICFILTER={type:3,value:"ELECTRONICFILTER"},Le.USERDEFINED={type:3,value:"USERDEFINED"},Le.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricFlowTreatmentDeviceTypeEnum=Le;class Ue{}Ue.CHP={type:3,value:"CHP"},Ue.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"},Ue.STANDALONE={type:3,value:"STANDALONE"},Ue.USERDEFINED={type:3,value:"USERDEFINED"},Ue.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricGeneratorTypeEnum=Ue;class He{}He.DC={type:3,value:"DC"},He.INDUCTION={type:3,value:"INDUCTION"},He.POLYPHASE={type:3,value:"POLYPHASE"},He.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"},He.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"},He.USERDEFINED={type:3,value:"USERDEFINED"},He.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricMotorTypeEnum=He;class Ge{}Ge.RELAY={type:3,value:"RELAY"},Ge.TIMECLOCK={type:3,value:"TIMECLOCK"},Ge.TIMEDELAY={type:3,value:"TIMEDELAY"},Ge.USERDEFINED={type:3,value:"USERDEFINED"},Ge.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElectricTimeControlTypeEnum=Ge;class ke{}ke.ABUTMENT={type:3,value:"ABUTMENT"},ke.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"},ke.ARCH={type:3,value:"ARCH"},ke.BEAM_GRID={type:3,value:"BEAM_GRID"},ke.BRACED_FRAME={type:3,value:"BRACED_FRAME"},ke.CROSS_BRACING={type:3,value:"CROSS_BRACING"},ke.DECK={type:3,value:"DECK"},ke.DILATATIONPANEL={type:3,value:"DILATATIONPANEL"},ke.ENTRANCEWORKS={type:3,value:"ENTRANCEWORKS"},ke.GIRDER={type:3,value:"GIRDER"},ke.GRID={type:3,value:"GRID"},ke.MAST={type:3,value:"MAST"},ke.PIER={type:3,value:"PIER"},ke.PYLON={type:3,value:"PYLON"},ke.RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY={type:3,value:"RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY"},ke.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"},ke.RIGID_FRAME={type:3,value:"RIGID_FRAME"},ke.SHELTER={type:3,value:"SHELTER"},ke.SIGNALASSEMBLY={type:3,value:"SIGNALASSEMBLY"},ke.SLAB_FIELD={type:3,value:"SLAB_FIELD"},ke.SUMPBUSTER={type:3,value:"SUMPBUSTER"},ke.SUPPORTINGASSEMBLY={type:3,value:"SUPPORTINGASSEMBLY"},ke.SUSPENSIONASSEMBLY={type:3,value:"SUSPENSIONASSEMBLY"},ke.TRACKPANEL={type:3,value:"TRACKPANEL"},ke.TRACTION_SWITCHING_ASSEMBLY={type:3,value:"TRACTION_SWITCHING_ASSEMBLY"},ke.TRAFFIC_CALMING_DEVICE={type:3,value:"TRAFFIC_CALMING_DEVICE"},ke.TRUSS={type:3,value:"TRUSS"},ke.TURNOUTPANEL={type:3,value:"TURNOUTPANEL"},ke.USERDEFINED={type:3,value:"USERDEFINED"},ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcElementAssemblyTypeEnum=ke;class Ve{}Ve.COMPLEX={type:3,value:"COMPLEX"},Ve.ELEMENT={type:3,value:"ELEMENT"},Ve.PARTIAL={type:3,value:"PARTIAL"},e.IfcElementCompositionEnum=Ve;class je{}je.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"},je.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"},je.USERDEFINED={type:3,value:"USERDEFINED"},je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEngineTypeEnum=je;class Qe{}Qe.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"},Qe.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"},Qe.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"},Qe.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"},Qe.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"},Qe.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"},Qe.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"},Qe.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"},Qe.USERDEFINED={type:3,value:"USERDEFINED"},Qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporativeCoolerTypeEnum=Qe;class We{}We.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"},We.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"},We.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"},We.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"},We.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"},We.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"},We.USERDEFINED={type:3,value:"USERDEFINED"},We.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEvaporatorTypeEnum=We;class ze{}ze.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"},ze.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"},ze.EVENTRULE={type:3,value:"EVENTRULE"},ze.EVENTTIME={type:3,value:"EVENTTIME"},ze.USERDEFINED={type:3,value:"USERDEFINED"},ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTriggerTypeEnum=ze;class Ke{}Ke.ENDEVENT={type:3,value:"ENDEVENT"},Ke.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"},Ke.STARTEVENT={type:3,value:"STARTEVENT"},Ke.USERDEFINED={type:3,value:"USERDEFINED"},Ke.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcEventTypeEnum=Ke;class Ye{}Ye.EXTERNAL={type:3,value:"EXTERNAL"},Ye.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},Ye.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},Ye.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},Ye.USERDEFINED={type:3,value:"USERDEFINED"},Ye.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcExternalSpatialElementTypeEnum=Ye;class Xe{}Xe.ABOVEGROUND={type:3,value:"ABOVEGROUND"},Xe.BELOWGROUND={type:3,value:"BELOWGROUND"},Xe.JUNCTION={type:3,value:"JUNCTION"},Xe.LEVELCROSSING={type:3,value:"LEVELCROSSING"},Xe.SEGMENT={type:3,value:"SEGMENT"},Xe.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"},Xe.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},Xe.TERMINAL={type:3,value:"TERMINAL"},Xe.USERDEFINED={type:3,value:"USERDEFINED"},Xe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityPartCommonTypeEnum=Xe;class Ze{}Ze.LATERAL={type:3,value:"LATERAL"},Ze.LONGITUDINAL={type:3,value:"LONGITUDINAL"},Ze.REGION={type:3,value:"REGION"},Ze.VERTICAL={type:3,value:"VERTICAL"},Ze.USERDEFINED={type:3,value:"USERDEFINED"},Ze.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFacilityUsageEnum=Ze;class qe{}qe.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"},qe.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"},qe.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"},qe.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"},qe.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"},qe.TUBEAXIAL={type:3,value:"TUBEAXIAL"},qe.VANEAXIAL={type:3,value:"VANEAXIAL"},qe.USERDEFINED={type:3,value:"USERDEFINED"},qe.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFanTypeEnum=qe;class Je{}Je.GLUE={type:3,value:"GLUE"},Je.MORTAR={type:3,value:"MORTAR"},Je.WELD={type:3,value:"WELD"},Je.USERDEFINED={type:3,value:"USERDEFINED"},Je.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFastenerTypeEnum=Je;class $e{}$e.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"},$e.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"},$e.ODORFILTER={type:3,value:"ODORFILTER"},$e.OILFILTER={type:3,value:"OILFILTER"},$e.STRAINER={type:3,value:"STRAINER"},$e.WATERFILTER={type:3,value:"WATERFILTER"},$e.USERDEFINED={type:3,value:"USERDEFINED"},$e.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFilterTypeEnum=$e;class et{}et.BREECHINGINLET={type:3,value:"BREECHINGINLET"},et.FIREHYDRANT={type:3,value:"FIREHYDRANT"},et.FIREMONITOR={type:3,value:"FIREMONITOR"},et.HOSEREEL={type:3,value:"HOSEREEL"},et.SPRINKLER={type:3,value:"SPRINKLER"},et.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"},et.USERDEFINED={type:3,value:"USERDEFINED"},et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFireSuppressionTerminalTypeEnum=et;class tt{}tt.SINK={type:3,value:"SINK"},tt.SOURCE={type:3,value:"SOURCE"},tt.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"},tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowDirectionEnum=tt;class st{}st.AMMETER={type:3,value:"AMMETER"},st.COMBINED={type:3,value:"COMBINED"},st.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"},st.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"},st.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"},st.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"},st.THERMOMETER={type:3,value:"THERMOMETER"},st.VOLTMETER={type:3,value:"VOLTMETER"},st.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"},st.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"},st.USERDEFINED={type:3,value:"USERDEFINED"},st.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowInstrumentTypeEnum=st;class it{}it.ENERGYMETER={type:3,value:"ENERGYMETER"},it.GASMETER={type:3,value:"GASMETER"},it.OILMETER={type:3,value:"OILMETER"},it.WATERMETER={type:3,value:"WATERMETER"},it.USERDEFINED={type:3,value:"USERDEFINED"},it.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFlowMeterTypeEnum=it;class rt{}rt.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"},rt.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"},rt.PAD_FOOTING={type:3,value:"PAD_FOOTING"},rt.PILE_CAP={type:3,value:"PILE_CAP"},rt.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"},rt.USERDEFINED={type:3,value:"USERDEFINED"},rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFootingTypeEnum=rt;class ot{}ot.BED={type:3,value:"BED"},ot.CHAIR={type:3,value:"CHAIR"},ot.DESK={type:3,value:"DESK"},ot.FILECABINET={type:3,value:"FILECABINET"},ot.SHELF={type:3,value:"SHELF"},ot.SOFA={type:3,value:"SOFA"},ot.TABLE={type:3,value:"TABLE"},ot.TECHNICALCABINET={type:3,value:"TECHNICALCABINET"},ot.USERDEFINED={type:3,value:"USERDEFINED"},ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcFurnitureTypeEnum=ot;class nt{}nt.SOIL_BORING_POINT={type:3,value:"SOIL_BORING_POINT"},nt.TERRAIN={type:3,value:"TERRAIN"},nt.VEGETATION={type:3,value:"VEGETATION"},nt.USERDEFINED={type:3,value:"USERDEFINED"},nt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeographicElementTypeEnum=nt;class at{}at.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"},at.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"},at.MODEL_VIEW={type:3,value:"MODEL_VIEW"},at.PLAN_VIEW={type:3,value:"PLAN_VIEW"},at.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"},at.SECTION_VIEW={type:3,value:"SECTION_VIEW"},at.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"},at.USERDEFINED={type:3,value:"USERDEFINED"},at.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeometricProjectionEnum=at;class lt{}lt.SOLID={type:3,value:"SOLID"},lt.VOID={type:3,value:"VOID"},lt.WATER={type:3,value:"WATER"},lt.USERDEFINED={type:3,value:"USERDEFINED"},lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGeotechnicalStratumTypeEnum=lt;class ht{}ht.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"},ht.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"},e.IfcGlobalOrLocalEnum=ht;class ct{}ct.IRREGULAR={type:3,value:"IRREGULAR"},ct.RADIAL={type:3,value:"RADIAL"},ct.RECTANGULAR={type:3,value:"RECTANGULAR"},ct.TRIANGULAR={type:3,value:"TRIANGULAR"},ct.USERDEFINED={type:3,value:"USERDEFINED"},ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcGridTypeEnum=ct;class At{}At.PLATE={type:3,value:"PLATE"},At.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"},At.TURNOUTHEATING={type:3,value:"TURNOUTHEATING"},At.USERDEFINED={type:3,value:"USERDEFINED"},At.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHeatExchangerTypeEnum=At;class ut{}ut.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"},ut.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"},ut.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"},ut.ADIABATICPAN={type:3,value:"ADIABATICPAN"},ut.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"},ut.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"},ut.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"},ut.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"},ut.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"},ut.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"},ut.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"},ut.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"},ut.STEAMINJECTION={type:3,value:"STEAMINJECTION"},ut.USERDEFINED={type:3,value:"USERDEFINED"},ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcHumidifierTypeEnum=ut;class pt{}pt.BUMPER={type:3,value:"BUMPER"},pt.CRASHCUSHION={type:3,value:"CRASHCUSHION"},pt.DAMPINGSYSTEM={type:3,value:"DAMPINGSYSTEM"},pt.FENDER={type:3,value:"FENDER"},pt.USERDEFINED={type:3,value:"USERDEFINED"},pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcImpactProtectionDeviceTypeEnum=pt;class dt{}dt.CYCLONIC={type:3,value:"CYCLONIC"},dt.GREASE={type:3,value:"GREASE"},dt.OIL={type:3,value:"OIL"},dt.PETROL={type:3,value:"PETROL"},dt.USERDEFINED={type:3,value:"USERDEFINED"},dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInterceptorTypeEnum=dt;class ft{}ft.EXTERNAL={type:3,value:"EXTERNAL"},ft.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"},ft.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"},ft.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"},ft.INTERNAL={type:3,value:"INTERNAL"},ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInternalOrExternalEnum=ft;class Et{}Et.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"},Et.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"},Et.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"},Et.USERDEFINED={type:3,value:"USERDEFINED"},Et.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcInventoryTypeEnum=Et;class mt{}mt.DATA={type:3,value:"DATA"},mt.POWER={type:3,value:"POWER"},mt.USERDEFINED={type:3,value:"USERDEFINED"},mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcJunctionBoxTypeEnum=mt;class yt{}yt.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"},yt.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"},yt.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"},yt.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcKnotType=yt;class gt{}gt.ADMINISTRATION={type:3,value:"ADMINISTRATION"},gt.CARPENTRY={type:3,value:"CARPENTRY"},gt.CLEANING={type:3,value:"CLEANING"},gt.CONCRETE={type:3,value:"CONCRETE"},gt.DRYWALL={type:3,value:"DRYWALL"},gt.ELECTRIC={type:3,value:"ELECTRIC"},gt.FINISHING={type:3,value:"FINISHING"},gt.FLOORING={type:3,value:"FLOORING"},gt.GENERAL={type:3,value:"GENERAL"},gt.HVAC={type:3,value:"HVAC"},gt.LANDSCAPING={type:3,value:"LANDSCAPING"},gt.MASONRY={type:3,value:"MASONRY"},gt.PAINTING={type:3,value:"PAINTING"},gt.PAVING={type:3,value:"PAVING"},gt.PLUMBING={type:3,value:"PLUMBING"},gt.ROOFING={type:3,value:"ROOFING"},gt.SITEGRADING={type:3,value:"SITEGRADING"},gt.STEELWORK={type:3,value:"STEELWORK"},gt.SURVEYING={type:3,value:"SURVEYING"},gt.USERDEFINED={type:3,value:"USERDEFINED"},gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLaborResourceTypeEnum=gt;class It{}It.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},It.FLUORESCENT={type:3,value:"FLUORESCENT"},It.HALOGEN={type:3,value:"HALOGEN"},It.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},It.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},It.LED={type:3,value:"LED"},It.METALHALIDE={type:3,value:"METALHALIDE"},It.OLED={type:3,value:"OLED"},It.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},It.USERDEFINED={type:3,value:"USERDEFINED"},It.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLampTypeEnum=It;class vt{}vt.AXIS1={type:3,value:"AXIS1"},vt.AXIS2={type:3,value:"AXIS2"},vt.AXIS3={type:3,value:"AXIS3"},e.IfcLayerSetDirectionEnum=vt;class Tt{}Tt.TYPE_A={type:3,value:"TYPE_A"},Tt.TYPE_B={type:3,value:"TYPE_B"},Tt.TYPE_C={type:3,value:"TYPE_C"},Tt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightDistributionCurveEnum=Tt;class _t{}_t.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"},_t.FLUORESCENT={type:3,value:"FLUORESCENT"},_t.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"},_t.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"},_t.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"},_t.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"},_t.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"},_t.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"},_t.METALHALIDE={type:3,value:"METALHALIDE"},_t.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"},_t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightEmissionSourceEnum=_t;class Rt{}Rt.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"},Rt.POINTSOURCE={type:3,value:"POINTSOURCE"},Rt.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"},Rt.USERDEFINED={type:3,value:"USERDEFINED"},Rt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLightFixtureTypeEnum=Rt;class Pt{}Pt.HOSEREEL={type:3,value:"HOSEREEL"},Pt.LOADINGARM={type:3,value:"LOADINGARM"},Pt.USERDEFINED={type:3,value:"USERDEFINED"},Pt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLiquidTerminalTypeEnum=Pt;class Dt{}Dt.LOAD_CASE={type:3,value:"LOAD_CASE"},Dt.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"},Dt.LOAD_GROUP={type:3,value:"LOAD_GROUP"},Dt.USERDEFINED={type:3,value:"USERDEFINED"},Dt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcLoadGroupTypeEnum=Dt;class Nt{}Nt.LOGICALAND={type:3,value:"LOGICALAND"},Nt.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"},Nt.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"},Nt.LOGICALOR={type:3,value:"LOGICALOR"},Nt.LOGICALXOR={type:3,value:"LOGICALXOR"},e.IfcLogicalOperatorEnum=Nt;class Ct{}Ct.BARRIERBEACH={type:3,value:"BARRIERBEACH"},Ct.BREAKWATER={type:3,value:"BREAKWATER"},Ct.CANAL={type:3,value:"CANAL"},Ct.DRYDOCK={type:3,value:"DRYDOCK"},Ct.FLOATINGDOCK={type:3,value:"FLOATINGDOCK"},Ct.HYDROLIFT={type:3,value:"HYDROLIFT"},Ct.JETTY={type:3,value:"JETTY"},Ct.LAUNCHRECOVERY={type:3,value:"LAUNCHRECOVERY"},Ct.MARINEDEFENCE={type:3,value:"MARINEDEFENCE"},Ct.NAVIGATIONALCHANNEL={type:3,value:"NAVIGATIONALCHANNEL"},Ct.PORT={type:3,value:"PORT"},Ct.QUAY={type:3,value:"QUAY"},Ct.REVETMENT={type:3,value:"REVETMENT"},Ct.SHIPLIFT={type:3,value:"SHIPLIFT"},Ct.SHIPLOCK={type:3,value:"SHIPLOCK"},Ct.SHIPYARD={type:3,value:"SHIPYARD"},Ct.SLIPWAY={type:3,value:"SLIPWAY"},Ct.WATERWAY={type:3,value:"WATERWAY"},Ct.WATERWAYSHIPLIFT={type:3,value:"WATERWAYSHIPLIFT"},Ct.USERDEFINED={type:3,value:"USERDEFINED"},Ct.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarineFacilityTypeEnum=Ct;class Ot{}Ot.ABOVEWATERLINE={type:3,value:"ABOVEWATERLINE"},Ot.ANCHORAGE={type:3,value:"ANCHORAGE"},Ot.APPROACHCHANNEL={type:3,value:"APPROACHCHANNEL"},Ot.BELOWWATERLINE={type:3,value:"BELOWWATERLINE"},Ot.BERTHINGSTRUCTURE={type:3,value:"BERTHINGSTRUCTURE"},Ot.CHAMBER={type:3,value:"CHAMBER"},Ot.CILL_LEVEL={type:3,value:"CILL_LEVEL"},Ot.COPELEVEL={type:3,value:"COPELEVEL"},Ot.CORE={type:3,value:"CORE"},Ot.CREST={type:3,value:"CREST"},Ot.GATEHEAD={type:3,value:"GATEHEAD"},Ot.GUDINGSTRUCTURE={type:3,value:"GUDINGSTRUCTURE"},Ot.HIGHWATERLINE={type:3,value:"HIGHWATERLINE"},Ot.LANDFIELD={type:3,value:"LANDFIELD"},Ot.LEEWARDSIDE={type:3,value:"LEEWARDSIDE"},Ot.LOWWATERLINE={type:3,value:"LOWWATERLINE"},Ot.MANUFACTURING={type:3,value:"MANUFACTURING"},Ot.NAVIGATIONALAREA={type:3,value:"NAVIGATIONALAREA"},Ot.PROTECTION={type:3,value:"PROTECTION"},Ot.SHIPTRANSFER={type:3,value:"SHIPTRANSFER"},Ot.STORAGEAREA={type:3,value:"STORAGEAREA"},Ot.VEHICLESERVICING={type:3,value:"VEHICLESERVICING"},Ot.WATERFIELD={type:3,value:"WATERFIELD"},Ot.WEATHERSIDE={type:3,value:"WEATHERSIDE"},Ot.USERDEFINED={type:3,value:"USERDEFINED"},Ot.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMarinePartTypeEnum=Ot;class bt{}bt.ANCHORBOLT={type:3,value:"ANCHORBOLT"},bt.BOLT={type:3,value:"BOLT"},bt.CHAIN={type:3,value:"CHAIN"},bt.COUPLER={type:3,value:"COUPLER"},bt.DOWEL={type:3,value:"DOWEL"},bt.NAIL={type:3,value:"NAIL"},bt.NAILPLATE={type:3,value:"NAILPLATE"},bt.RAILFASTENING={type:3,value:"RAILFASTENING"},bt.RAILJOINT={type:3,value:"RAILJOINT"},bt.RIVET={type:3,value:"RIVET"},bt.ROPE={type:3,value:"ROPE"},bt.SCREW={type:3,value:"SCREW"},bt.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"},bt.STAPLE={type:3,value:"STAPLE"},bt.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"},bt.USERDEFINED={type:3,value:"USERDEFINED"},bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMechanicalFastenerTypeEnum=bt;class St{}St.AIRSTATION={type:3,value:"AIRSTATION"},St.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"},St.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"},St.OXYGENPLANT={type:3,value:"OXYGENPLANT"},St.VACUUMSTATION={type:3,value:"VACUUMSTATION"},St.USERDEFINED={type:3,value:"USERDEFINED"},St.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMedicalDeviceTypeEnum=St;class wt{}wt.ARCH_SEGMENT={type:3,value:"ARCH_SEGMENT"},wt.BRACE={type:3,value:"BRACE"},wt.CHORD={type:3,value:"CHORD"},wt.COLLAR={type:3,value:"COLLAR"},wt.MEMBER={type:3,value:"MEMBER"},wt.MULLION={type:3,value:"MULLION"},wt.PLATE={type:3,value:"PLATE"},wt.POST={type:3,value:"POST"},wt.PURLIN={type:3,value:"PURLIN"},wt.RAFTER={type:3,value:"RAFTER"},wt.STAY_CABLE={type:3,value:"STAY_CABLE"},wt.STIFFENING_RIB={type:3,value:"STIFFENING_RIB"},wt.STRINGER={type:3,value:"STRINGER"},wt.STRUCTURALCABLE={type:3,value:"STRUCTURALCABLE"},wt.STRUT={type:3,value:"STRUT"},wt.STUD={type:3,value:"STUD"},wt.SUSPENDER={type:3,value:"SUSPENDER"},wt.SUSPENSION_CABLE={type:3,value:"SUSPENSION_CABLE"},wt.TIEBAR={type:3,value:"TIEBAR"},wt.USERDEFINED={type:3,value:"USERDEFINED"},wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMemberTypeEnum=wt;class xt{}xt.ACCESSPOINT={type:3,value:"ACCESSPOINT"},xt.BASEBANDUNIT={type:3,value:"BASEBANDUNIT"},xt.BASETRANSCEIVERSTATION={type:3,value:"BASETRANSCEIVERSTATION"},xt.E_UTRAN_NODE_B={type:3,value:"E_UTRAN_NODE_B"},xt.GATEWAY_GPRS_SUPPORT_NODE={type:3,value:"GATEWAY_GPRS_SUPPORT_NODE"},xt.MASTERUNIT={type:3,value:"MASTERUNIT"},xt.MOBILESWITCHINGCENTER={type:3,value:"MOBILESWITCHINGCENTER"},xt.MSCSERVER={type:3,value:"MSCSERVER"},xt.PACKETCONTROLUNIT={type:3,value:"PACKETCONTROLUNIT"},xt.REMOTERADIOUNIT={type:3,value:"REMOTERADIOUNIT"},xt.REMOTEUNIT={type:3,value:"REMOTEUNIT"},xt.SERVICE_GPRS_SUPPORT_NODE={type:3,value:"SERVICE_GPRS_SUPPORT_NODE"},xt.SUBSCRIBERSERVER={type:3,value:"SUBSCRIBERSERVER"},xt.USERDEFINED={type:3,value:"USERDEFINED"},xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMobileTelecommunicationsApplianceTypeEnum=xt;class Bt{}Bt.BOLLARD={type:3,value:"BOLLARD"},Bt.LINETENSIONER={type:3,value:"LINETENSIONER"},Bt.MAGNETICDEVICE={type:3,value:"MAGNETICDEVICE"},Bt.MOORINGHOOKS={type:3,value:"MOORINGHOOKS"},Bt.VACUUMDEVICE={type:3,value:"VACUUMDEVICE"},Bt.USERDEFINED={type:3,value:"USERDEFINED"},Bt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMooringDeviceTypeEnum=Bt;class Ft{}Ft.BELTDRIVE={type:3,value:"BELTDRIVE"},Ft.COUPLING={type:3,value:"COUPLING"},Ft.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"},Ft.USERDEFINED={type:3,value:"USERDEFINED"},Ft.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcMotorConnectionTypeEnum=Ft;class Mt{}Mt.BEACON={type:3,value:"BEACON"},Mt.BUOY={type:3,value:"BUOY"},Mt.USERDEFINED={type:3,value:"USERDEFINED"},Mt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcNavigationElementTypeEnum=Mt;class Lt{}Lt.ACTOR={type:3,value:"ACTOR"},Lt.CONTROL={type:3,value:"CONTROL"},Lt.GROUP={type:3,value:"GROUP"},Lt.PROCESS={type:3,value:"PROCESS"},Lt.PRODUCT={type:3,value:"PRODUCT"},Lt.PROJECT={type:3,value:"PROJECT"},Lt.RESOURCE={type:3,value:"RESOURCE"},Lt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectTypeEnum=Lt;class Ut{}Ut.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"},Ut.CODEWAIVER={type:3,value:"CODEWAIVER"},Ut.DESIGNINTENT={type:3,value:"DESIGNINTENT"},Ut.EXTERNAL={type:3,value:"EXTERNAL"},Ut.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"},Ut.MERGECONFLICT={type:3,value:"MERGECONFLICT"},Ut.MODELVIEW={type:3,value:"MODELVIEW"},Ut.PARAMETER={type:3,value:"PARAMETER"},Ut.REQUIREMENT={type:3,value:"REQUIREMENT"},Ut.SPECIFICATION={type:3,value:"SPECIFICATION"},Ut.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"},Ut.USERDEFINED={type:3,value:"USERDEFINED"},Ut.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcObjectiveEnum=Ut;class Ht{}Ht.ASSIGNEE={type:3,value:"ASSIGNEE"},Ht.ASSIGNOR={type:3,value:"ASSIGNOR"},Ht.LESSEE={type:3,value:"LESSEE"},Ht.LESSOR={type:3,value:"LESSOR"},Ht.LETTINGAGENT={type:3,value:"LETTINGAGENT"},Ht.OWNER={type:3,value:"OWNER"},Ht.TENANT={type:3,value:"TENANT"},Ht.USERDEFINED={type:3,value:"USERDEFINED"},Ht.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOccupantTypeEnum=Ht;class Gt{}Gt.OPENING={type:3,value:"OPENING"},Gt.RECESS={type:3,value:"RECESS"},Gt.USERDEFINED={type:3,value:"USERDEFINED"},Gt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOpeningElementTypeEnum=Gt;class kt{}kt.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"},kt.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"},kt.DATAOUTLET={type:3,value:"DATAOUTLET"},kt.POWEROUTLET={type:3,value:"POWEROUTLET"},kt.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"},kt.USERDEFINED={type:3,value:"USERDEFINED"},kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcOutletTypeEnum=kt;class Vt{}Vt.FLEXIBLE={type:3,value:"FLEXIBLE"},Vt.RIGID={type:3,value:"RIGID"},Vt.USERDEFINED={type:3,value:"USERDEFINED"},Vt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPavementTypeEnum=Vt;class jt{}jt.USERDEFINED={type:3,value:"USERDEFINED"},jt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPerformanceHistoryTypeEnum=jt;class Qt{}Qt.GRILL={type:3,value:"GRILL"},Qt.LOUVER={type:3,value:"LOUVER"},Qt.SCREEN={type:3,value:"SCREEN"},Qt.USERDEFINED={type:3,value:"USERDEFINED"},Qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermeableCoveringOperationEnum=Qt;class Wt{}Wt.ACCESS={type:3,value:"ACCESS"},Wt.BUILDING={type:3,value:"BUILDING"},Wt.WORK={type:3,value:"WORK"},Wt.USERDEFINED={type:3,value:"USERDEFINED"},Wt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPermitTypeEnum=Wt;class zt{}zt.PHYSICAL={type:3,value:"PHYSICAL"},zt.VIRTUAL={type:3,value:"VIRTUAL"},zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPhysicalOrVirtualEnum=zt;class Kt{}Kt.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"},Kt.COMPOSITE={type:3,value:"COMPOSITE"},Kt.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"},Kt.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"},Kt.USERDEFINED={type:3,value:"USERDEFINED"},Kt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileConstructionEnum=Kt;class Yt{}Yt.BORED={type:3,value:"BORED"},Yt.COHESION={type:3,value:"COHESION"},Yt.DRIVEN={type:3,value:"DRIVEN"},Yt.FRICTION={type:3,value:"FRICTION"},Yt.JETGROUTING={type:3,value:"JETGROUTING"},Yt.SUPPORT={type:3,value:"SUPPORT"},Yt.USERDEFINED={type:3,value:"USERDEFINED"},Yt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPileTypeEnum=Yt;class Xt{}Xt.BEND={type:3,value:"BEND"},Xt.CONNECTOR={type:3,value:"CONNECTOR"},Xt.ENTRY={type:3,value:"ENTRY"},Xt.EXIT={type:3,value:"EXIT"},Xt.JUNCTION={type:3,value:"JUNCTION"},Xt.OBSTRUCTION={type:3,value:"OBSTRUCTION"},Xt.TRANSITION={type:3,value:"TRANSITION"},Xt.USERDEFINED={type:3,value:"USERDEFINED"},Xt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeFittingTypeEnum=Xt;class Zt{}Zt.CULVERT={type:3,value:"CULVERT"},Zt.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"},Zt.GUTTER={type:3,value:"GUTTER"},Zt.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"},Zt.SPOOL={type:3,value:"SPOOL"},Zt.USERDEFINED={type:3,value:"USERDEFINED"},Zt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPipeSegmentTypeEnum=Zt;class qt{}qt.BASE_PLATE={type:3,value:"BASE_PLATE"},qt.COVER_PLATE={type:3,value:"COVER_PLATE"},qt.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"},qt.FLANGE_PLATE={type:3,value:"FLANGE_PLATE"},qt.GUSSET_PLATE={type:3,value:"GUSSET_PLATE"},qt.SHEET={type:3,value:"SHEET"},qt.SPLICE_PLATE={type:3,value:"SPLICE_PLATE"},qt.STIFFENER_PLATE={type:3,value:"STIFFENER_PLATE"},qt.WEB_PLATE={type:3,value:"WEB_PLATE"},qt.USERDEFINED={type:3,value:"USERDEFINED"},qt.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPlateTypeEnum=qt;class Jt{}Jt.CURVE3D={type:3,value:"CURVE3D"},Jt.PCURVE_S1={type:3,value:"PCURVE_S1"},Jt.PCURVE_S2={type:3,value:"PCURVE_S2"},e.IfcPreferredSurfaceCurveRepresentation=Jt;class $t{}$t.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"},$t.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"},$t.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"},$t.CALIBRATION={type:3,value:"CALIBRATION"},$t.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"},$t.SHUTDOWN={type:3,value:"SHUTDOWN"},$t.STARTUP={type:3,value:"STARTUP"},$t.USERDEFINED={type:3,value:"USERDEFINED"},$t.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProcedureTypeEnum=$t;class es{}es.AREA={type:3,value:"AREA"},es.CURVE={type:3,value:"CURVE"},e.IfcProfileTypeEnum=es;class ts{}ts.CHANGEORDER={type:3,value:"CHANGEORDER"},ts.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"},ts.MOVEORDER={type:3,value:"MOVEORDER"},ts.PURCHASEORDER={type:3,value:"PURCHASEORDER"},ts.WORKORDER={type:3,value:"WORKORDER"},ts.USERDEFINED={type:3,value:"USERDEFINED"},ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectOrderTypeEnum=ts;class ss{}ss.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"},ss.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"},e.IfcProjectedOrTrueLengthEnum=ss;class is{}is.BLISTER={type:3,value:"BLISTER"},is.DEVIATOR={type:3,value:"DEVIATOR"},is.USERDEFINED={type:3,value:"USERDEFINED"},is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProjectionElementTypeEnum=is;class rs{}rs.PSET_MATERIALDRIVEN={type:3,value:"PSET_MATERIALDRIVEN"},rs.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"},rs.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"},rs.PSET_PROFILEDRIVEN={type:3,value:"PSET_PROFILEDRIVEN"},rs.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"},rs.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"},rs.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"},rs.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"},rs.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"},rs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPropertySetTemplateTypeEnum=rs;class os{}os.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"},os.ELECTRONIC={type:3,value:"ELECTRONIC"},os.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"},os.THERMAL={type:3,value:"THERMAL"},os.USERDEFINED={type:3,value:"USERDEFINED"},os.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTrippingUnitTypeEnum=os;class ns{}ns.ANTI_ARCING_DEVICE={type:3,value:"ANTI_ARCING_DEVICE"},ns.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"},ns.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"},ns.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"},ns.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"},ns.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"},ns.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"},ns.SPARKGAP={type:3,value:"SPARKGAP"},ns.VARISTOR={type:3,value:"VARISTOR"},ns.VOLTAGELIMITER={type:3,value:"VOLTAGELIMITER"},ns.USERDEFINED={type:3,value:"USERDEFINED"},ns.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcProtectiveDeviceTypeEnum=ns;class as{}as.CIRCULATOR={type:3,value:"CIRCULATOR"},as.ENDSUCTION={type:3,value:"ENDSUCTION"},as.SPLITCASE={type:3,value:"SPLITCASE"},as.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"},as.SUMPPUMP={type:3,value:"SUMPPUMP"},as.VERTICALINLINE={type:3,value:"VERTICALINLINE"},as.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"},as.USERDEFINED={type:3,value:"USERDEFINED"},as.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcPumpTypeEnum=as;class ls{}ls.BLADE={type:3,value:"BLADE"},ls.CHECKRAIL={type:3,value:"CHECKRAIL"},ls.GUARDRAIL={type:3,value:"GUARDRAIL"},ls.RACKRAIL={type:3,value:"RACKRAIL"},ls.RAIL={type:3,value:"RAIL"},ls.STOCKRAIL={type:3,value:"STOCKRAIL"},ls.USERDEFINED={type:3,value:"USERDEFINED"},ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailTypeEnum=ls;class hs{}hs.BALUSTRADE={type:3,value:"BALUSTRADE"},hs.FENCE={type:3,value:"FENCE"},hs.GUARDRAIL={type:3,value:"GUARDRAIL"},hs.HANDRAIL={type:3,value:"HANDRAIL"},hs.USERDEFINED={type:3,value:"USERDEFINED"},hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailingTypeEnum=hs;class cs{}cs.DILATATIONSUPERSTRUCTURE={type:3,value:"DILATATIONSUPERSTRUCTURE"},cs.LINESIDESTRUCTURE={type:3,value:"LINESIDESTRUCTURE"},cs.LINESIDESTRUCTUREPART={type:3,value:"LINESIDESTRUCTUREPART"},cs.PLAINTRACKSUPERSTRUCTURE={type:3,value:"PLAINTRACKSUPERSTRUCTURE"},cs.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"},cs.TRACKSTRUCTURE={type:3,value:"TRACKSTRUCTURE"},cs.TRACKSTRUCTUREPART={type:3,value:"TRACKSTRUCTUREPART"},cs.TURNOUTSUPERSTRUCTURE={type:3,value:"TURNOUTSUPERSTRUCTURE"},cs.USERDEFINED={type:3,value:"USERDEFINED"},cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayPartTypeEnum=cs;class As{}As.USERDEFINED={type:3,value:"USERDEFINED"},As.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRailwayTypeEnum=As;class us{}us.SPIRAL={type:3,value:"SPIRAL"},us.STRAIGHT={type:3,value:"STRAIGHT"},us.USERDEFINED={type:3,value:"USERDEFINED"},us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampFlightTypeEnum=us;class ps{}ps.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"},ps.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"},ps.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"},ps.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"},ps.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"},ps.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"},ps.USERDEFINED={type:3,value:"USERDEFINED"},ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRampTypeEnum=ps;class ds{}ds.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"},ds.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"},ds.DAILY={type:3,value:"DAILY"},ds.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"},ds.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"},ds.WEEKLY={type:3,value:"WEEKLY"},ds.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"},ds.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"},e.IfcRecurrenceTypeEnum=ds;class fs{}fs.BOUNDARY={type:3,value:"BOUNDARY"},fs.INTERSECTION={type:3,value:"INTERSECTION"},fs.KILOPOINT={type:3,value:"KILOPOINT"},fs.LANDMARK={type:3,value:"LANDMARK"},fs.MILEPOINT={type:3,value:"MILEPOINT"},fs.POSITION={type:3,value:"POSITION"},fs.REFERENCEMARKER={type:3,value:"REFERENCEMARKER"},fs.STATION={type:3,value:"STATION"},fs.USERDEFINED={type:3,value:"USERDEFINED"},fs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReferentTypeEnum=fs;class Es{}Es.BLINN={type:3,value:"BLINN"},Es.FLAT={type:3,value:"FLAT"},Es.GLASS={type:3,value:"GLASS"},Es.MATT={type:3,value:"MATT"},Es.METAL={type:3,value:"METAL"},Es.MIRROR={type:3,value:"MIRROR"},Es.PHONG={type:3,value:"PHONG"},Es.PHYSICAL={type:3,value:"PHYSICAL"},Es.PLASTIC={type:3,value:"PLASTIC"},Es.STRAUSS={type:3,value:"STRAUSS"},Es.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReflectanceMethodEnum=Es;class ms{}ms.DYNAMICALLYCOMPACTED={type:3,value:"DYNAMICALLYCOMPACTED"},ms.GROUTED={type:3,value:"GROUTED"},ms.REPLACED={type:3,value:"REPLACED"},ms.ROLLERCOMPACTED={type:3,value:"ROLLERCOMPACTED"},ms.SURCHARGEPRELOADED={type:3,value:"SURCHARGEPRELOADED"},ms.VERTICALLYDRAINED={type:3,value:"VERTICALLYDRAINED"},ms.USERDEFINED={type:3,value:"USERDEFINED"},ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcedSoilTypeEnum=ms;class ys{}ys.ANCHORING={type:3,value:"ANCHORING"},ys.EDGE={type:3,value:"EDGE"},ys.LIGATURE={type:3,value:"LIGATURE"},ys.MAIN={type:3,value:"MAIN"},ys.PUNCHING={type:3,value:"PUNCHING"},ys.RING={type:3,value:"RING"},ys.SHEAR={type:3,value:"SHEAR"},ys.STUD={type:3,value:"STUD"},ys.USERDEFINED={type:3,value:"USERDEFINED"},ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarRoleEnum=ys;class gs{}gs.PLAIN={type:3,value:"PLAIN"},gs.TEXTURED={type:3,value:"TEXTURED"},e.IfcReinforcingBarSurfaceEnum=gs;class Is{}Is.ANCHORING={type:3,value:"ANCHORING"},Is.EDGE={type:3,value:"EDGE"},Is.LIGATURE={type:3,value:"LIGATURE"},Is.MAIN={type:3,value:"MAIN"},Is.PUNCHING={type:3,value:"PUNCHING"},Is.RING={type:3,value:"RING"},Is.SHEAR={type:3,value:"SHEAR"},Is.SPACEBAR={type:3,value:"SPACEBAR"},Is.STUD={type:3,value:"STUD"},Is.USERDEFINED={type:3,value:"USERDEFINED"},Is.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingBarTypeEnum=Is;class vs{}vs.USERDEFINED={type:3,value:"USERDEFINED"},vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcReinforcingMeshTypeEnum=vs;class Ts{}Ts.BICYCLECROSSING={type:3,value:"BICYCLECROSSING"},Ts.BUS_STOP={type:3,value:"BUS_STOP"},Ts.CARRIAGEWAY={type:3,value:"CARRIAGEWAY"},Ts.CENTRALISLAND={type:3,value:"CENTRALISLAND"},Ts.CENTRALRESERVE={type:3,value:"CENTRALRESERVE"},Ts.HARDSHOULDER={type:3,value:"HARDSHOULDER"},Ts.INTERSECTION={type:3,value:"INTERSECTION"},Ts.LAYBY={type:3,value:"LAYBY"},Ts.PARKINGBAY={type:3,value:"PARKINGBAY"},Ts.PASSINGBAY={type:3,value:"PASSINGBAY"},Ts.PEDESTRIAN_CROSSING={type:3,value:"PEDESTRIAN_CROSSING"},Ts.RAILWAYCROSSING={type:3,value:"RAILWAYCROSSING"},Ts.REFUGEISLAND={type:3,value:"REFUGEISLAND"},Ts.ROADSEGMENT={type:3,value:"ROADSEGMENT"},Ts.ROADSIDE={type:3,value:"ROADSIDE"},Ts.ROADSIDEPART={type:3,value:"ROADSIDEPART"},Ts.ROADWAYPLATEAU={type:3,value:"ROADWAYPLATEAU"},Ts.ROUNDABOUT={type:3,value:"ROUNDABOUT"},Ts.SHOULDER={type:3,value:"SHOULDER"},Ts.SIDEWALK={type:3,value:"SIDEWALK"},Ts.SOFTSHOULDER={type:3,value:"SOFTSHOULDER"},Ts.TOLLPLAZA={type:3,value:"TOLLPLAZA"},Ts.TRAFFICISLAND={type:3,value:"TRAFFICISLAND"},Ts.TRAFFICLANE={type:3,value:"TRAFFICLANE"},Ts.USERDEFINED={type:3,value:"USERDEFINED"},Ts.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadPartTypeEnum=Ts;class _s{}_s.USERDEFINED={type:3,value:"USERDEFINED"},_s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoadTypeEnum=_s;class Rs{}Rs.ARCHITECT={type:3,value:"ARCHITECT"},Rs.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"},Rs.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"},Rs.CIVILENGINEER={type:3,value:"CIVILENGINEER"},Rs.CLIENT={type:3,value:"CLIENT"},Rs.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"},Rs.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"},Rs.CONSULTANT={type:3,value:"CONSULTANT"},Rs.CONTRACTOR={type:3,value:"CONTRACTOR"},Rs.COSTENGINEER={type:3,value:"COSTENGINEER"},Rs.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"},Rs.ENGINEER={type:3,value:"ENGINEER"},Rs.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"},Rs.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"},Rs.MANUFACTURER={type:3,value:"MANUFACTURER"},Rs.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"},Rs.OWNER={type:3,value:"OWNER"},Rs.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"},Rs.RESELLER={type:3,value:"RESELLER"},Rs.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"},Rs.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"},Rs.SUPPLIER={type:3,value:"SUPPLIER"},Rs.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcRoleEnum=Rs;class Ps{}Ps.BARREL_ROOF={type:3,value:"BARREL_ROOF"},Ps.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"},Ps.DOME_ROOF={type:3,value:"DOME_ROOF"},Ps.FLAT_ROOF={type:3,value:"FLAT_ROOF"},Ps.FREEFORM={type:3,value:"FREEFORM"},Ps.GABLE_ROOF={type:3,value:"GABLE_ROOF"},Ps.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"},Ps.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"},Ps.HIP_ROOF={type:3,value:"HIP_ROOF"},Ps.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"},Ps.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"},Ps.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"},Ps.SHED_ROOF={type:3,value:"SHED_ROOF"},Ps.USERDEFINED={type:3,value:"USERDEFINED"},Ps.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcRoofTypeEnum=Ps;class Ds{}Ds.ATTO={type:3,value:"ATTO"},Ds.CENTI={type:3,value:"CENTI"},Ds.DECA={type:3,value:"DECA"},Ds.DECI={type:3,value:"DECI"},Ds.EXA={type:3,value:"EXA"},Ds.FEMTO={type:3,value:"FEMTO"},Ds.GIGA={type:3,value:"GIGA"},Ds.HECTO={type:3,value:"HECTO"},Ds.KILO={type:3,value:"KILO"},Ds.MEGA={type:3,value:"MEGA"},Ds.MICRO={type:3,value:"MICRO"},Ds.MILLI={type:3,value:"MILLI"},Ds.NANO={type:3,value:"NANO"},Ds.PETA={type:3,value:"PETA"},Ds.PICO={type:3,value:"PICO"},Ds.TERA={type:3,value:"TERA"},e.IfcSIPrefix=Ds;class Ns{}Ns.AMPERE={type:3,value:"AMPERE"},Ns.BECQUEREL={type:3,value:"BECQUEREL"},Ns.CANDELA={type:3,value:"CANDELA"},Ns.COULOMB={type:3,value:"COULOMB"},Ns.CUBIC_METRE={type:3,value:"CUBIC_METRE"},Ns.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"},Ns.FARAD={type:3,value:"FARAD"},Ns.GRAM={type:3,value:"GRAM"},Ns.GRAY={type:3,value:"GRAY"},Ns.HENRY={type:3,value:"HENRY"},Ns.HERTZ={type:3,value:"HERTZ"},Ns.JOULE={type:3,value:"JOULE"},Ns.KELVIN={type:3,value:"KELVIN"},Ns.LUMEN={type:3,value:"LUMEN"},Ns.LUX={type:3,value:"LUX"},Ns.METRE={type:3,value:"METRE"},Ns.MOLE={type:3,value:"MOLE"},Ns.NEWTON={type:3,value:"NEWTON"},Ns.OHM={type:3,value:"OHM"},Ns.PASCAL={type:3,value:"PASCAL"},Ns.RADIAN={type:3,value:"RADIAN"},Ns.SECOND={type:3,value:"SECOND"},Ns.SIEMENS={type:3,value:"SIEMENS"},Ns.SIEVERT={type:3,value:"SIEVERT"},Ns.SQUARE_METRE={type:3,value:"SQUARE_METRE"},Ns.STERADIAN={type:3,value:"STERADIAN"},Ns.TESLA={type:3,value:"TESLA"},Ns.VOLT={type:3,value:"VOLT"},Ns.WATT={type:3,value:"WATT"},Ns.WEBER={type:3,value:"WEBER"},e.IfcSIUnitName=Ns;class Cs{}Cs.BATH={type:3,value:"BATH"},Cs.BIDET={type:3,value:"BIDET"},Cs.CISTERN={type:3,value:"CISTERN"},Cs.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"},Cs.SHOWER={type:3,value:"SHOWER"},Cs.SINK={type:3,value:"SINK"},Cs.TOILETPAN={type:3,value:"TOILETPAN"},Cs.URINAL={type:3,value:"URINAL"},Cs.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"},Cs.WCSEAT={type:3,value:"WCSEAT"},Cs.USERDEFINED={type:3,value:"USERDEFINED"},Cs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSanitaryTerminalTypeEnum=Cs;class Os{}Os.TAPERED={type:3,value:"TAPERED"},Os.UNIFORM={type:3,value:"UNIFORM"},e.IfcSectionTypeEnum=Os;class bs{}bs.CO2SENSOR={type:3,value:"CO2SENSOR"},bs.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"},bs.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"},bs.COSENSOR={type:3,value:"COSENSOR"},bs.EARTHQUAKESENSOR={type:3,value:"EARTHQUAKESENSOR"},bs.FIRESENSOR={type:3,value:"FIRESENSOR"},bs.FLOWSENSOR={type:3,value:"FLOWSENSOR"},bs.FOREIGNOBJECTDETECTIONSENSOR={type:3,value:"FOREIGNOBJECTDETECTIONSENSOR"},bs.FROSTSENSOR={type:3,value:"FROSTSENSOR"},bs.GASSENSOR={type:3,value:"GASSENSOR"},bs.HEATSENSOR={type:3,value:"HEATSENSOR"},bs.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"},bs.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"},bs.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"},bs.LEVELSENSOR={type:3,value:"LEVELSENSOR"},bs.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"},bs.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"},bs.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"},bs.OBSTACLESENSOR={type:3,value:"OBSTACLESENSOR"},bs.PHSENSOR={type:3,value:"PHSENSOR"},bs.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"},bs.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"},bs.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"},bs.RAINSENSOR={type:3,value:"RAINSENSOR"},bs.SMOKESENSOR={type:3,value:"SMOKESENSOR"},bs.SNOWDEPTHSENSOR={type:3,value:"SNOWDEPTHSENSOR"},bs.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"},bs.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"},bs.TRAINSENSOR={type:3,value:"TRAINSENSOR"},bs.TURNOUTCLOSURESENSOR={type:3,value:"TURNOUTCLOSURESENSOR"},bs.WHEELSENSOR={type:3,value:"WHEELSENSOR"},bs.WINDSENSOR={type:3,value:"WINDSENSOR"},bs.USERDEFINED={type:3,value:"USERDEFINED"},bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSensorTypeEnum=bs;class Ss{}Ss.FINISH_FINISH={type:3,value:"FINISH_FINISH"},Ss.FINISH_START={type:3,value:"FINISH_START"},Ss.START_FINISH={type:3,value:"START_FINISH"},Ss.START_START={type:3,value:"START_START"},Ss.USERDEFINED={type:3,value:"USERDEFINED"},Ss.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSequenceEnum=Ss;class ws{}ws.AWNING={type:3,value:"AWNING"},ws.JALOUSIE={type:3,value:"JALOUSIE"},ws.SHUTTER={type:3,value:"SHUTTER"},ws.USERDEFINED={type:3,value:"USERDEFINED"},ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcShadingDeviceTypeEnum=ws;class xs{}xs.MARKER={type:3,value:"MARKER"},xs.MIRROR={type:3,value:"MIRROR"},xs.PICTORAL={type:3,value:"PICTORAL"},xs.USERDEFINED={type:3,value:"USERDEFINED"},xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignTypeEnum=xs;class Bs{}Bs.AUDIO={type:3,value:"AUDIO"},Bs.MIXED={type:3,value:"MIXED"},Bs.VISUAL={type:3,value:"VISUAL"},Bs.USERDEFINED={type:3,value:"USERDEFINED"},Bs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSignalTypeEnum=Bs;class Fs{}Fs.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"},Fs.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"},Fs.P_LISTVALUE={type:3,value:"P_LISTVALUE"},Fs.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"},Fs.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"},Fs.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"},Fs.Q_AREA={type:3,value:"Q_AREA"},Fs.Q_COUNT={type:3,value:"Q_COUNT"},Fs.Q_LENGTH={type:3,value:"Q_LENGTH"},Fs.Q_NUMBER={type:3,value:"Q_NUMBER"},Fs.Q_TIME={type:3,value:"Q_TIME"},Fs.Q_VOLUME={type:3,value:"Q_VOLUME"},Fs.Q_WEIGHT={type:3,value:"Q_WEIGHT"},e.IfcSimplePropertyTemplateTypeEnum=Fs;class Ms{}Ms.APPROACH_SLAB={type:3,value:"APPROACH_SLAB"},Ms.BASESLAB={type:3,value:"BASESLAB"},Ms.FLOOR={type:3,value:"FLOOR"},Ms.LANDING={type:3,value:"LANDING"},Ms.PAVING={type:3,value:"PAVING"},Ms.ROOF={type:3,value:"ROOF"},Ms.SIDEWALK={type:3,value:"SIDEWALK"},Ms.TRACKSLAB={type:3,value:"TRACKSLAB"},Ms.WEARING={type:3,value:"WEARING"},Ms.USERDEFINED={type:3,value:"USERDEFINED"},Ms.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSlabTypeEnum=Ms;class Ls{}Ls.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"},Ls.SOLARPANEL={type:3,value:"SOLARPANEL"},Ls.USERDEFINED={type:3,value:"USERDEFINED"},Ls.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSolarDeviceTypeEnum=Ls;class Us{}Us.CONVECTOR={type:3,value:"CONVECTOR"},Us.RADIATOR={type:3,value:"RADIATOR"},Us.USERDEFINED={type:3,value:"USERDEFINED"},Us.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceHeaterTypeEnum=Us;class Hs{}Hs.BERTH={type:3,value:"BERTH"},Hs.EXTERNAL={type:3,value:"EXTERNAL"},Hs.GFA={type:3,value:"GFA"},Hs.INTERNAL={type:3,value:"INTERNAL"},Hs.PARKING={type:3,value:"PARKING"},Hs.SPACE={type:3,value:"SPACE"},Hs.USERDEFINED={type:3,value:"USERDEFINED"},Hs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpaceTypeEnum=Hs;class Gs{}Gs.CONSTRUCTION={type:3,value:"CONSTRUCTION"},Gs.FIRESAFETY={type:3,value:"FIRESAFETY"},Gs.INTERFERENCE={type:3,value:"INTERFERENCE"},Gs.LIGHTING={type:3,value:"LIGHTING"},Gs.OCCUPANCY={type:3,value:"OCCUPANCY"},Gs.RESERVATION={type:3,value:"RESERVATION"},Gs.SECURITY={type:3,value:"SECURITY"},Gs.THERMAL={type:3,value:"THERMAL"},Gs.TRANSPORT={type:3,value:"TRANSPORT"},Gs.VENTILATION={type:3,value:"VENTILATION"},Gs.USERDEFINED={type:3,value:"USERDEFINED"},Gs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSpatialZoneTypeEnum=Gs;class ks{}ks.BIRDCAGE={type:3,value:"BIRDCAGE"},ks.COWL={type:3,value:"COWL"},ks.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"},ks.USERDEFINED={type:3,value:"USERDEFINED"},ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStackTerminalTypeEnum=ks;class Vs{}Vs.CURVED={type:3,value:"CURVED"},Vs.FREEFORM={type:3,value:"FREEFORM"},Vs.SPIRAL={type:3,value:"SPIRAL"},Vs.STRAIGHT={type:3,value:"STRAIGHT"},Vs.WINDER={type:3,value:"WINDER"},Vs.USERDEFINED={type:3,value:"USERDEFINED"},Vs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairFlightTypeEnum=Vs;class js{}js.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"},js.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"},js.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"},js.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"},js.LADDER={type:3,value:"LADDER"},js.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"},js.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"},js.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"},js.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"},js.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"},js.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"},js.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"},js.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"},js.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"},js.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"},js.USERDEFINED={type:3,value:"USERDEFINED"},js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStairTypeEnum=js;class Qs{}Qs.LOCKED={type:3,value:"LOCKED"},Qs.READONLY={type:3,value:"READONLY"},Qs.READONLYLOCKED={type:3,value:"READONLYLOCKED"},Qs.READWRITE={type:3,value:"READWRITE"},Qs.READWRITELOCKED={type:3,value:"READWRITELOCKED"},e.IfcStateEnum=Qs;class Ws{}Ws.CONST={type:3,value:"CONST"},Ws.DISCRETE={type:3,value:"DISCRETE"},Ws.EQUIDISTANT={type:3,value:"EQUIDISTANT"},Ws.LINEAR={type:3,value:"LINEAR"},Ws.PARABOLA={type:3,value:"PARABOLA"},Ws.POLYGONAL={type:3,value:"POLYGONAL"},Ws.SINUS={type:3,value:"SINUS"},Ws.USERDEFINED={type:3,value:"USERDEFINED"},Ws.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveActivityTypeEnum=Ws;class zs{}zs.CABLE={type:3,value:"CABLE"},zs.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"},zs.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"},zs.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"},zs.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"},zs.USERDEFINED={type:3,value:"USERDEFINED"},zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralCurveMemberTypeEnum=zs;class Ks{}Ks.BILINEAR={type:3,value:"BILINEAR"},Ks.CONST={type:3,value:"CONST"},Ks.DISCRETE={type:3,value:"DISCRETE"},Ks.ISOCONTOUR={type:3,value:"ISOCONTOUR"},Ks.USERDEFINED={type:3,value:"USERDEFINED"},Ks.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceActivityTypeEnum=Ks;class Ys{}Ys.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"},Ys.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"},Ys.SHELL={type:3,value:"SHELL"},Ys.USERDEFINED={type:3,value:"USERDEFINED"},Ys.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcStructuralSurfaceMemberTypeEnum=Ys;class Xs{}Xs.PURCHASE={type:3,value:"PURCHASE"},Xs.WORK={type:3,value:"WORK"},Xs.USERDEFINED={type:3,value:"USERDEFINED"},Xs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSubContractResourceTypeEnum=Xs;class Zs{}Zs.DEFECT={type:3,value:"DEFECT"},Zs.HATCHMARKING={type:3,value:"HATCHMARKING"},Zs.LINEMARKING={type:3,value:"LINEMARKING"},Zs.MARK={type:3,value:"MARK"},Zs.NONSKIDSURFACING={type:3,value:"NONSKIDSURFACING"},Zs.PAVEMENTSURFACEMARKING={type:3,value:"PAVEMENTSURFACEMARKING"},Zs.RUMBLESTRIP={type:3,value:"RUMBLESTRIP"},Zs.SYMBOLMARKING={type:3,value:"SYMBOLMARKING"},Zs.TAG={type:3,value:"TAG"},Zs.TRANSVERSERUMBLESTRIP={type:3,value:"TRANSVERSERUMBLESTRIP"},Zs.TREATMENT={type:3,value:"TREATMENT"},Zs.USERDEFINED={type:3,value:"USERDEFINED"},Zs.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSurfaceFeatureTypeEnum=Zs;class qs{}qs.BOTH={type:3,value:"BOTH"},qs.NEGATIVE={type:3,value:"NEGATIVE"},qs.POSITIVE={type:3,value:"POSITIVE"},e.IfcSurfaceSide=qs;class Js{}Js.CONTACTOR={type:3,value:"CONTACTOR"},Js.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"},Js.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"},Js.KEYPAD={type:3,value:"KEYPAD"},Js.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"},Js.RELAY={type:3,value:"RELAY"},Js.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"},Js.STARTER={type:3,value:"STARTER"},Js.START_AND_STOP_EQUIPMENT={type:3,value:"START_AND_STOP_EQUIPMENT"},Js.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"},Js.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"},Js.USERDEFINED={type:3,value:"USERDEFINED"},Js.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSwitchingDeviceTypeEnum=Js;class $s{}$s.PANEL={type:3,value:"PANEL"},$s.SUBRACK={type:3,value:"SUBRACK"},$s.WORKSURFACE={type:3,value:"WORKSURFACE"},$s.USERDEFINED={type:3,value:"USERDEFINED"},$s.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcSystemFurnitureElementTypeEnum=$s;class ei{}ei.BASIN={type:3,value:"BASIN"},ei.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"},ei.EXPANSION={type:3,value:"EXPANSION"},ei.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"},ei.OILRETENTIONTRAY={type:3,value:"OILRETENTIONTRAY"},ei.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"},ei.STORAGE={type:3,value:"STORAGE"},ei.VESSEL={type:3,value:"VESSEL"},ei.USERDEFINED={type:3,value:"USERDEFINED"},ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTankTypeEnum=ei;class ti{}ti.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"},ti.WORKTIME={type:3,value:"WORKTIME"},ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskDurationEnum=ti;class si{}si.ADJUSTMENT={type:3,value:"ADJUSTMENT"},si.ATTENDANCE={type:3,value:"ATTENDANCE"},si.CALIBRATION={type:3,value:"CALIBRATION"},si.CONSTRUCTION={type:3,value:"CONSTRUCTION"},si.DEMOLITION={type:3,value:"DEMOLITION"},si.DISMANTLE={type:3,value:"DISMANTLE"},si.DISPOSAL={type:3,value:"DISPOSAL"},si.EMERGENCY={type:3,value:"EMERGENCY"},si.INSPECTION={type:3,value:"INSPECTION"},si.INSTALLATION={type:3,value:"INSTALLATION"},si.LOGISTIC={type:3,value:"LOGISTIC"},si.MAINTENANCE={type:3,value:"MAINTENANCE"},si.MOVE={type:3,value:"MOVE"},si.OPERATION={type:3,value:"OPERATION"},si.REMOVAL={type:3,value:"REMOVAL"},si.RENOVATION={type:3,value:"RENOVATION"},si.SAFETY={type:3,value:"SAFETY"},si.SHUTDOWN={type:3,value:"SHUTDOWN"},si.STARTUP={type:3,value:"STARTUP"},si.TESTING={type:3,value:"TESTING"},si.TROUBLESHOOTING={type:3,value:"TROUBLESHOOTING"},si.USERDEFINED={type:3,value:"USERDEFINED"},si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTaskTypeEnum=si;class ii{}ii.COUPLER={type:3,value:"COUPLER"},ii.FIXED_END={type:3,value:"FIXED_END"},ii.TENSIONING_END={type:3,value:"TENSIONING_END"},ii.USERDEFINED={type:3,value:"USERDEFINED"},ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonAnchorTypeEnum=ii;class ri{}ri.COUPLER={type:3,value:"COUPLER"},ri.DIABOLO={type:3,value:"DIABOLO"},ri.DUCT={type:3,value:"DUCT"},ri.GROUTING_DUCT={type:3,value:"GROUTING_DUCT"},ri.TRUMPET={type:3,value:"TRUMPET"},ri.USERDEFINED={type:3,value:"USERDEFINED"},ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonConduitTypeEnum=ri;class oi{}oi.BAR={type:3,value:"BAR"},oi.COATED={type:3,value:"COATED"},oi.STRAND={type:3,value:"STRAND"},oi.WIRE={type:3,value:"WIRE"},oi.USERDEFINED={type:3,value:"USERDEFINED"},oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTendonTypeEnum=oi;class ni{}ni.DOWN={type:3,value:"DOWN"},ni.LEFT={type:3,value:"LEFT"},ni.RIGHT={type:3,value:"RIGHT"},ni.UP={type:3,value:"UP"},e.IfcTextPath=ni;class ai{}ai.CONTINUOUS={type:3,value:"CONTINUOUS"},ai.DISCRETE={type:3,value:"DISCRETE"},ai.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"},ai.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"},ai.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"},ai.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"},ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTimeSeriesDataTypeEnum=ai;class li{}li.BLOCKINGDEVICE={type:3,value:"BLOCKINGDEVICE"},li.DERAILER={type:3,value:"DERAILER"},li.FROG={type:3,value:"FROG"},li.HALF_SET_OF_BLADES={type:3,value:"HALF_SET_OF_BLADES"},li.SLEEPER={type:3,value:"SLEEPER"},li.SPEEDREGULATOR={type:3,value:"SPEEDREGULATOR"},li.TRACKENDOFALIGNMENT={type:3,value:"TRACKENDOFALIGNMENT"},li.VEHICLESTOP={type:3,value:"VEHICLESTOP"},li.USERDEFINED={type:3,value:"USERDEFINED"},li.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTrackElementTypeEnum=li;class hi{}hi.CHOPPER={type:3,value:"CHOPPER"},hi.COMBINED={type:3,value:"COMBINED"},hi.CURRENT={type:3,value:"CURRENT"},hi.FREQUENCY={type:3,value:"FREQUENCY"},hi.INVERTER={type:3,value:"INVERTER"},hi.RECTIFIER={type:3,value:"RECTIFIER"},hi.VOLTAGE={type:3,value:"VOLTAGE"},hi.USERDEFINED={type:3,value:"USERDEFINED"},hi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransformerTypeEnum=hi;class ci{}ci.CONTINUOUS={type:3,value:"CONTINUOUS"},ci.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"},ci.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"},ci.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"},e.IfcTransitionCode=ci;class Ai{}Ai.CRANEWAY={type:3,value:"CRANEWAY"},Ai.ELEVATOR={type:3,value:"ELEVATOR"},Ai.ESCALATOR={type:3,value:"ESCALATOR"},Ai.HAULINGGEAR={type:3,value:"HAULINGGEAR"},Ai.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"},Ai.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"},Ai.USERDEFINED={type:3,value:"USERDEFINED"},Ai.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTransportElementTypeEnum=Ai;class ui{}ui.CARTESIAN={type:3,value:"CARTESIAN"},ui.PARAMETER={type:3,value:"PARAMETER"},ui.UNSPECIFIED={type:3,value:"UNSPECIFIED"},e.IfcTrimmingPreference=ui;class pi{}pi.FINNED={type:3,value:"FINNED"},pi.USERDEFINED={type:3,value:"USERDEFINED"},pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcTubeBundleTypeEnum=pi;class di{}di.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"},di.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"},di.AREAUNIT={type:3,value:"AREAUNIT"},di.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"},di.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"},di.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"},di.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"},di.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"},di.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"},di.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"},di.ENERGYUNIT={type:3,value:"ENERGYUNIT"},di.FORCEUNIT={type:3,value:"FORCEUNIT"},di.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"},di.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"},di.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"},di.LENGTHUNIT={type:3,value:"LENGTHUNIT"},di.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"},di.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"},di.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"},di.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"},di.MASSUNIT={type:3,value:"MASSUNIT"},di.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"},di.POWERUNIT={type:3,value:"POWERUNIT"},di.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"},di.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"},di.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"},di.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"},di.TIMEUNIT={type:3,value:"TIMEUNIT"},di.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"},di.USERDEFINED={type:3,value:"USERDEFINED"},e.IfcUnitEnum=di;class fi{}fi.ALARMPANEL={type:3,value:"ALARMPANEL"},fi.BASESTATIONCONTROLLER={type:3,value:"BASESTATIONCONTROLLER"},fi.COMBINED={type:3,value:"COMBINED"},fi.CONTROLPANEL={type:3,value:"CONTROLPANEL"},fi.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"},fi.HUMIDISTAT={type:3,value:"HUMIDISTAT"},fi.INDICATORPANEL={type:3,value:"INDICATORPANEL"},fi.MIMICPANEL={type:3,value:"MIMICPANEL"},fi.THERMOSTAT={type:3,value:"THERMOSTAT"},fi.WEATHERSTATION={type:3,value:"WEATHERSTATION"},fi.USERDEFINED={type:3,value:"USERDEFINED"},fi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryControlElementTypeEnum=fi;class Ei{}Ei.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"},Ei.AIRHANDLER={type:3,value:"AIRHANDLER"},Ei.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"},Ei.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"},Ei.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"},Ei.USERDEFINED={type:3,value:"USERDEFINED"},Ei.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcUnitaryEquipmentTypeEnum=Ei;class mi{}mi.AIRRELEASE={type:3,value:"AIRRELEASE"},mi.ANTIVACUUM={type:3,value:"ANTIVACUUM"},mi.CHANGEOVER={type:3,value:"CHANGEOVER"},mi.CHECK={type:3,value:"CHECK"},mi.COMMISSIONING={type:3,value:"COMMISSIONING"},mi.DIVERTING={type:3,value:"DIVERTING"},mi.DOUBLECHECK={type:3,value:"DOUBLECHECK"},mi.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"},mi.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"},mi.FAUCET={type:3,value:"FAUCET"},mi.FLUSHING={type:3,value:"FLUSHING"},mi.GASCOCK={type:3,value:"GASCOCK"},mi.GASTAP={type:3,value:"GASTAP"},mi.ISOLATING={type:3,value:"ISOLATING"},mi.MIXING={type:3,value:"MIXING"},mi.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"},mi.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"},mi.REGULATING={type:3,value:"REGULATING"},mi.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"},mi.STEAMTRAP={type:3,value:"STEAMTRAP"},mi.STOPCOCK={type:3,value:"STOPCOCK"},mi.USERDEFINED={type:3,value:"USERDEFINED"},mi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcValveTypeEnum=mi;class yi{}yi.CARGO={type:3,value:"CARGO"},yi.ROLLINGSTOCK={type:3,value:"ROLLINGSTOCK"},yi.VEHICLE={type:3,value:"VEHICLE"},yi.VEHICLEAIR={type:3,value:"VEHICLEAIR"},yi.VEHICLEMARINE={type:3,value:"VEHICLEMARINE"},yi.VEHICLETRACKED={type:3,value:"VEHICLETRACKED"},yi.VEHICLEWHEELED={type:3,value:"VEHICLEWHEELED"},yi.USERDEFINED={type:3,value:"USERDEFINED"},yi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVehicleTypeEnum=yi;class gi{}gi.AXIAL_YIELD={type:3,value:"AXIAL_YIELD"},gi.BENDING_YIELD={type:3,value:"BENDING_YIELD"},gi.FRICTION={type:3,value:"FRICTION"},gi.RUBBER={type:3,value:"RUBBER"},gi.SHEAR_YIELD={type:3,value:"SHEAR_YIELD"},gi.VISCOUS={type:3,value:"VISCOUS"},gi.USERDEFINED={type:3,value:"USERDEFINED"},gi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationDamperTypeEnum=gi;class Ii{}Ii.BASE={type:3,value:"BASE"},Ii.COMPRESSION={type:3,value:"COMPRESSION"},Ii.SPRING={type:3,value:"SPRING"},Ii.USERDEFINED={type:3,value:"USERDEFINED"},Ii.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVibrationIsolatorTypeEnum=Ii;class vi{}vi.BOUNDARY={type:3,value:"BOUNDARY"},vi.CLEARANCE={type:3,value:"CLEARANCE"},vi.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"},vi.USERDEFINED={type:3,value:"USERDEFINED"},vi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVirtualElementTypeEnum=vi;class Ti{}Ti.CHAMFER={type:3,value:"CHAMFER"},Ti.CUTOUT={type:3,value:"CUTOUT"},Ti.EDGE={type:3,value:"EDGE"},Ti.HOLE={type:3,value:"HOLE"},Ti.MITER={type:3,value:"MITER"},Ti.NOTCH={type:3,value:"NOTCH"},Ti.USERDEFINED={type:3,value:"USERDEFINED"},Ti.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcVoidingFeatureTypeEnum=Ti;class _i{}_i.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"},_i.MOVABLE={type:3,value:"MOVABLE"},_i.PARAPET={type:3,value:"PARAPET"},_i.PARTITIONING={type:3,value:"PARTITIONING"},_i.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"},_i.POLYGONAL={type:3,value:"POLYGONAL"},_i.RETAININGWALL={type:3,value:"RETAININGWALL"},_i.SHEAR={type:3,value:"SHEAR"},_i.SOLIDWALL={type:3,value:"SOLIDWALL"},_i.STANDARD={type:3,value:"STANDARD"},_i.WAVEWALL={type:3,value:"WAVEWALL"},_i.USERDEFINED={type:3,value:"USERDEFINED"},_i.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWallTypeEnum=_i;class Ri{}Ri.FLOORTRAP={type:3,value:"FLOORTRAP"},Ri.FLOORWASTE={type:3,value:"FLOORWASTE"},Ri.GULLYSUMP={type:3,value:"GULLYSUMP"},Ri.GULLYTRAP={type:3,value:"GULLYTRAP"},Ri.ROOFDRAIN={type:3,value:"ROOFDRAIN"},Ri.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"},Ri.WASTETRAP={type:3,value:"WASTETRAP"},Ri.USERDEFINED={type:3,value:"USERDEFINED"},Ri.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWasteTerminalTypeEnum=Ri;class Pi{}Pi.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"},Pi.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"},Pi.OTHEROPERATION={type:3,value:"OTHEROPERATION"},Pi.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"},Pi.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"},Pi.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"},Pi.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"},Pi.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"},Pi.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"},Pi.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"},Pi.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"},Pi.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"},Pi.TOPHUNG={type:3,value:"TOPHUNG"},Pi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelOperationEnum=Pi;class Di{}Di.BOTTOM={type:3,value:"BOTTOM"},Di.LEFT={type:3,value:"LEFT"},Di.MIDDLE={type:3,value:"MIDDLE"},Di.RIGHT={type:3,value:"RIGHT"},Di.TOP={type:3,value:"TOP"},Di.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowPanelPositionEnum=Di;class Ni{}Ni.ALUMINIUM={type:3,value:"ALUMINIUM"},Ni.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"},Ni.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"},Ni.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"},Ni.PLASTIC={type:3,value:"PLASTIC"},Ni.STEEL={type:3,value:"STEEL"},Ni.WOOD={type:3,value:"WOOD"},Ni.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleConstructionEnum=Ni;class Ci{}Ci.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},Ci.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},Ci.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},Ci.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},Ci.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},Ci.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},Ci.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},Ci.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},Ci.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},Ci.USERDEFINED={type:3,value:"USERDEFINED"},Ci.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowStyleOperationEnum=Ci;class Oi{}Oi.LIGHTDOME={type:3,value:"LIGHTDOME"},Oi.SKYLIGHT={type:3,value:"SKYLIGHT"},Oi.WINDOW={type:3,value:"WINDOW"},Oi.USERDEFINED={type:3,value:"USERDEFINED"},Oi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypeEnum=Oi;class bi{}bi.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"},bi.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"},bi.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"},bi.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"},bi.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"},bi.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"},bi.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"},bi.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"},bi.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"},bi.USERDEFINED={type:3,value:"USERDEFINED"},bi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWindowTypePartitioningEnum=bi;class Si{}Si.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"},Si.SECONDSHIFT={type:3,value:"SECONDSHIFT"},Si.THIRDSHIFT={type:3,value:"THIRDSHIFT"},Si.USERDEFINED={type:3,value:"USERDEFINED"},Si.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkCalendarTypeEnum=Si;class wi{}wi.ACTUAL={type:3,value:"ACTUAL"},wi.BASELINE={type:3,value:"BASELINE"},wi.PLANNED={type:3,value:"PLANNED"},wi.USERDEFINED={type:3,value:"USERDEFINED"},wi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkPlanTypeEnum=wi;class xi{}xi.ACTUAL={type:3,value:"ACTUAL"},xi.BASELINE={type:3,value:"BASELINE"},xi.PLANNED={type:3,value:"PLANNED"},xi.USERDEFINED={type:3,value:"USERDEFINED"},xi.NOTDEFINED={type:3,value:"NOTDEFINED"},e.IfcWorkScheduleTypeEnum=xi;e.IfcActorRole=class extends yI{constructor(e,t,s,i){super(e),this.Role=t,this.UserDefinedRole=s,this.Description=i,this.type=3630933823}};class Bi extends yI{constructor(e,t,s,i){super(e),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.type=618182010}}e.IfcAddress=Bi;class Fi extends yI{constructor(e,t,s){super(e),this.StartTag=t,this.EndTag=s,this.type=2879124712}}e.IfcAlignmentParameterSegment=Fi;e.IfcAlignmentVerticalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartHeight=o,this.StartGradient=n,this.EndGradient=a,this.RadiusOfCurvature=l,this.PredefinedType=h,this.type=3633395639}};e.IfcApplication=class extends yI{constructor(e,t,s,i,r){super(e),this.ApplicationDeveloper=t,this.Version=s,this.ApplicationFullName=i,this.ApplicationIdentifier=r,this.type=639542469}};class Mi extends yI{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=411424972}}e.IfcAppliedValue=Mi;e.IfcApproval=class extends yI{constructor(e,t,s,i,r,o,n,a,l,h){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.TimeOfApproval=r,this.Status=o,this.Level=n,this.Qualifier=a,this.RequestingApproval=l,this.GivingApproval=h,this.type=130549933}};class Li extends yI{constructor(e,t){super(e),this.Name=t,this.type=4037036970}}e.IfcBoundaryCondition=Li;e.IfcBoundaryEdgeCondition=class extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessByLengthX=s,this.TranslationalStiffnessByLengthY=i,this.TranslationalStiffnessByLengthZ=r,this.RotationalStiffnessByLengthX=o,this.RotationalStiffnessByLengthY=n,this.RotationalStiffnessByLengthZ=a,this.type=1560379544}};e.IfcBoundaryFaceCondition=class extends Li{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.TranslationalStiffnessByAreaX=s,this.TranslationalStiffnessByAreaY=i,this.TranslationalStiffnessByAreaZ=r,this.type=3367102660}};class Ui extends Li{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.type=1387855156}}e.IfcBoundaryNodeCondition=Ui;e.IfcBoundaryNodeConditionWarping=class extends Ui{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.TranslationalStiffnessX=s,this.TranslationalStiffnessY=i,this.TranslationalStiffnessZ=r,this.RotationalStiffnessX=o,this.RotationalStiffnessY=n,this.RotationalStiffnessZ=a,this.WarpingStiffness=l,this.type=2069777674}};class Hi extends yI{constructor(e){super(e),this.type=2859738748}}e.IfcConnectionGeometry=Hi;class Gi extends Hi{constructor(e,t,s){super(e),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.type=2614616156}}e.IfcConnectionPointGeometry=Gi;e.IfcConnectionSurfaceGeometry=class extends Hi{constructor(e,t,s){super(e),this.SurfaceOnRelatingElement=t,this.SurfaceOnRelatedElement=s,this.type=2732653382}};e.IfcConnectionVolumeGeometry=class extends Hi{constructor(e,t,s){super(e),this.VolumeOnRelatingElement=t,this.VolumeOnRelatedElement=s,this.type=775493141}};class ki extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.type=1959218052}}e.IfcConstraint=ki;class Vi extends yI{constructor(e,t,s){super(e),this.SourceCRS=t,this.TargetCRS=s,this.type=1785450214}}e.IfcCoordinateOperation=Vi;class ji extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.type=1466758467}}e.IfcCoordinateReferenceSystem=ji;e.IfcCostValue=class extends Mi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.Name=t,this.Description=s,this.AppliedValue=i,this.UnitBasis=r,this.ApplicableDate=o,this.FixedUntilDate=n,this.Category=a,this.Condition=l,this.ArithmeticOperator=h,this.Components=c,this.type=602808272}};e.IfcDerivedUnit=class extends yI{constructor(e,t,s,i,r){super(e),this.Elements=t,this.UnitType=s,this.UserDefinedType=i,this.Name=r,this.type=1765591967}};e.IfcDerivedUnitElement=class extends yI{constructor(e,t,s){super(e),this.Unit=t,this.Exponent=s,this.type=1045800335}};e.IfcDimensionalExponents=class extends yI{constructor(e,t,s,i,r,o,n,a){super(e),this.LengthExponent=t,this.MassExponent=s,this.TimeExponent=i,this.ElectricCurrentExponent=r,this.ThermodynamicTemperatureExponent=o,this.AmountOfSubstanceExponent=n,this.LuminousIntensityExponent=a,this.type=2949456006}};class Qi extends yI{constructor(e){super(e),this.type=4294318154}}e.IfcExternalInformation=Qi;class Wi extends yI{constructor(e,t,s,i){super(e),this.Location=t,this.Identification=s,this.Name=i,this.type=3200245327}}e.IfcExternalReference=Wi;e.IfcExternallyDefinedHatchStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=2242383968}};e.IfcExternallyDefinedSurfaceStyle=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=1040185647}};e.IfcExternallyDefinedTextFont=class extends Wi{constructor(e,t,s,i){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.type=3548104201}};e.IfcGridAxis=class extends yI{constructor(e,t,s,i){super(e),this.AxisTag=t,this.AxisCurve=s,this.SameSense=i,this.type=852622518}};e.IfcIrregularTimeSeriesValue=class extends yI{constructor(e,t,s){super(e),this.TimeStamp=t,this.ListValues=s,this.type=3020489413}};e.IfcLibraryInformation=class extends Qi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Version=s,this.Publisher=i,this.VersionDate=r,this.Location=o,this.Description=n,this.type=2655187982}};e.IfcLibraryReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.Language=o,this.ReferencedLibrary=n,this.type=3452421091}};e.IfcLightDistributionData=class extends yI{constructor(e,t,s,i){super(e),this.MainPlaneAngle=t,this.SecondaryPlaneAngle=s,this.LuminousIntensity=i,this.type=4162380809}};e.IfcLightIntensityDistribution=class extends yI{constructor(e,t,s){super(e),this.LightDistributionCurve=t,this.DistributionData=s,this.type=1566485204}};e.IfcMapConversion=class extends Vi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s),this.SourceCRS=t,this.TargetCRS=s,this.Eastings=i,this.Northings=r,this.OrthogonalHeight=o,this.XAxisAbscissa=n,this.XAxisOrdinate=a,this.Scale=l,this.ScaleY=h,this.ScaleZ=c,this.type=3057273783}};e.IfcMaterialClassificationRelationship=class extends yI{constructor(e,t,s){super(e),this.MaterialClassifications=t,this.ClassifiedMaterial=s,this.type=1847130766}};class zi extends yI{constructor(e){super(e),this.type=760658860}}e.IfcMaterialDefinition=zi;class Ki extends zi{constructor(e,t,s,i,r,o,n,a){super(e),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.type=248100487}}e.IfcMaterialLayer=Ki;e.IfcMaterialLayerSet=class extends zi{constructor(e,t,s,i){super(e),this.MaterialLayers=t,this.LayerSetName=s,this.Description=i,this.type=3303938423}};e.IfcMaterialLayerWithOffsets=class extends Ki{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.Material=t,this.LayerThickness=s,this.IsVentilated=i,this.Name=r,this.Description=o,this.Category=n,this.Priority=a,this.OffsetDirection=l,this.OffsetValues=h,this.type=1847252529}};e.IfcMaterialList=class extends yI{constructor(e,t){super(e),this.Materials=t,this.type=2199411900}};class Yi extends zi{constructor(e,t,s,i,r,o,n){super(e),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.type=2235152071}}e.IfcMaterialProfile=Yi;e.IfcMaterialProfileSet=class extends zi{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.MaterialProfiles=i,this.CompositeProfile=r,this.type=164193824}};e.IfcMaterialProfileWithOffsets=class extends Yi{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.Name=t,this.Description=s,this.Material=i,this.Profile=r,this.Priority=o,this.Category=n,this.OffsetValues=a,this.type=552965576}};class Xi extends yI{constructor(e){super(e),this.type=1507914824}}e.IfcMaterialUsageDefinition=Xi;e.IfcMeasureWithUnit=class extends yI{constructor(e,t,s){super(e),this.ValueComponent=t,this.UnitComponent=s,this.type=2597039031}};e.IfcMetric=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.Benchmark=l,this.ValueSource=h,this.DataValue=c,this.ReferencePath=A,this.type=3368373690}};e.IfcMonetaryUnit=class extends yI{constructor(e,t){super(e),this.Currency=t,this.type=2706619895}};class Zi extends yI{constructor(e,t,s){super(e),this.Dimensions=t,this.UnitType=s,this.type=1918398963}}e.IfcNamedUnit=Zi;class qi extends yI{constructor(e,t){super(e),this.PlacementRelTo=t,this.type=3701648758}}e.IfcObjectPlacement=qi;e.IfcObjective=class extends ki{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.Name=t,this.Description=s,this.ConstraintGrade=i,this.ConstraintSource=r,this.CreatingActor=o,this.CreationTime=n,this.UserDefinedGrade=a,this.BenchmarkValues=l,this.LogicalAggregator=h,this.ObjectiveQualifier=c,this.UserDefinedQualifier=A,this.type=2251480897}};e.IfcOrganization=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Roles=r,this.Addresses=o,this.type=4251960020}};e.IfcOwnerHistory=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.OwningUser=t,this.OwningApplication=s,this.State=i,this.ChangeAction=r,this.LastModifiedDate=o,this.LastModifyingUser=n,this.LastModifyingApplication=a,this.CreationDate=l,this.type=1207048766}};e.IfcPerson=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Identification=t,this.FamilyName=s,this.GivenName=i,this.MiddleNames=r,this.PrefixTitles=o,this.SuffixTitles=n,this.Roles=a,this.Addresses=l,this.type=2077209135}};e.IfcPersonAndOrganization=class extends yI{constructor(e,t,s,i){super(e),this.ThePerson=t,this.TheOrganization=s,this.Roles=i,this.type=101040310}};class Ji extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2483315170}}e.IfcPhysicalQuantity=Ji;class $i extends Ji{constructor(e,t,s,i){super(e,t,s),this.Name=t,this.Description=s,this.Unit=i,this.type=2226359599}}e.IfcPhysicalSimpleQuantity=$i;e.IfcPostalAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.InternalLocation=r,this.AddressLines=o,this.PostalBox=n,this.Town=a,this.Region=l,this.PostalCode=h,this.Country=c,this.type=3355820592}};class er extends yI{constructor(e){super(e),this.type=677532197}}e.IfcPresentationItem=er;class tr extends yI{constructor(e,t,s,i,r){super(e),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.type=2022622350}}e.IfcPresentationLayerAssignment=tr;e.IfcPresentationLayerWithStyle=class extends tr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r),this.Name=t,this.Description=s,this.AssignedItems=i,this.Identifier=r,this.LayerOn=o,this.LayerFrozen=n,this.LayerBlocked=a,this.LayerStyles=l,this.type=1304840413}};class sr extends yI{constructor(e,t){super(e),this.Name=t,this.type=3119450353}}e.IfcPresentationStyle=sr;class ir extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Representations=i,this.type=2095639259}}e.IfcProductRepresentation=ir;class rr extends yI{constructor(e,t,s){super(e),this.ProfileType=t,this.ProfileName=s,this.type=3958567839}}e.IfcProfileDef=rr;e.IfcProjectedCRS=class extends ji{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.Name=t,this.Description=s,this.GeodeticDatum=i,this.VerticalDatum=r,this.MapProjection=o,this.MapZone=n,this.MapUnit=a,this.type=3843373140}};class or extends yI{constructor(e){super(e),this.type=986844984}}e.IfcPropertyAbstraction=or;e.IfcPropertyEnumeration=class extends or{constructor(e,t,s,i){super(e),this.Name=t,this.EnumerationValues=s,this.Unit=i,this.type=3710013099}};e.IfcQuantityArea=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.AreaValue=r,this.Formula=o,this.type=2044713172}};e.IfcQuantityCount=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.CountValue=r,this.Formula=o,this.type=2093928680}};e.IfcQuantityLength=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.LengthValue=r,this.Formula=o,this.type=931644368}};e.IfcQuantityNumber=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.NumberValue=r,this.Formula=o,this.type=2691318326}};e.IfcQuantityTime=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.TimeValue=r,this.Formula=o,this.type=3252649465}};e.IfcQuantityVolume=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.VolumeValue=r,this.Formula=o,this.type=2405470396}};e.IfcQuantityWeight=class extends $i{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.Description=s,this.Unit=i,this.WeightValue=r,this.Formula=o,this.type=825690147}};e.IfcRecurrencePattern=class extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.RecurrenceType=t,this.DayComponent=s,this.WeekdayComponent=i,this.MonthComponent=r,this.Position=o,this.Interval=n,this.Occurrences=a,this.TimePeriods=l,this.type=3915482550}};e.IfcReference=class extends yI{constructor(e,t,s,i,r,o){super(e),this.TypeIdentifier=t,this.AttributeIdentifier=s,this.InstanceName=i,this.ListPositions=r,this.InnerReference=o,this.type=2433181523}};class nr extends yI{constructor(e,t,s,i,r){super(e),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1076942058}}e.IfcRepresentation=nr;class ar extends yI{constructor(e,t,s){super(e),this.ContextIdentifier=t,this.ContextType=s,this.type=3377609919}}e.IfcRepresentationContext=ar;class lr extends yI{constructor(e){super(e),this.type=3008791417}}e.IfcRepresentationItem=lr;e.IfcRepresentationMap=class extends yI{constructor(e,t,s){super(e),this.MappingOrigin=t,this.MappedRepresentation=s,this.type=1660063152}};class hr extends yI{constructor(e,t,s){super(e),this.Name=t,this.Description=s,this.type=2439245199}}e.IfcResourceLevelRelationship=hr;class cr extends yI{constructor(e,t,s,i,r){super(e),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2341007311}}e.IfcRoot=cr;e.IfcSIUnit=class extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Prefix=i,this.Name=r,this.type=448429030}};class Ar extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.type=1054537805}}e.IfcSchedulingTime=Ar;e.IfcShapeAspect=class extends yI{constructor(e,t,s,i,r,o){super(e),this.ShapeRepresentations=t,this.Name=s,this.Description=i,this.ProductDefinitional=r,this.PartOfProductDefinitionShape=o,this.type=867548509}};class ur extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3982875396}}e.IfcShapeModel=ur;e.IfcShapeRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=4240577450}};class pr extends yI{constructor(e,t){super(e),this.Name=t,this.type=2273995522}}e.IfcStructuralConnectionCondition=pr;class dr extends yI{constructor(e,t){super(e),this.Name=t,this.type=2162789131}}e.IfcStructuralLoad=dr;e.IfcStructuralLoadConfiguration=class extends dr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Values=s,this.Locations=i,this.type=3478079324}};class fr extends dr{constructor(e,t){super(e,t),this.Name=t,this.type=609421318}}e.IfcStructuralLoadOrResult=fr;class Er extends fr{constructor(e,t){super(e,t),this.Name=t,this.type=2525727697}}e.IfcStructuralLoadStatic=Er;e.IfcStructuralLoadTemperature=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.DeltaTConstant=s,this.DeltaTY=i,this.DeltaTZ=r,this.type=3408363356}};class mr extends nr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=2830218821}}e.IfcStyleModel=mr;e.IfcStyledItem=class extends lr{constructor(e,t,s,i){super(e),this.Item=t,this.Styles=s,this.Name=i,this.type=3958052878}};e.IfcStyledRepresentation=class extends mr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=3049322572}};e.IfcSurfaceReinforcementArea=class extends fr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SurfaceReinforcement1=s,this.SurfaceReinforcement2=i,this.ShearReinforcement=r,this.type=2934153892}};e.IfcSurfaceStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.Side=s,this.Styles=i,this.type=1300840506}};e.IfcSurfaceStyleLighting=class extends er{constructor(e,t,s,i,r){super(e),this.DiffuseTransmissionColour=t,this.DiffuseReflectionColour=s,this.TransmissionColour=i,this.ReflectanceColour=r,this.type=3303107099}};e.IfcSurfaceStyleRefraction=class extends er{constructor(e,t,s){super(e),this.RefractionIndex=t,this.DispersionFactor=s,this.type=1607154358}};class yr extends er{constructor(e,t,s){super(e),this.SurfaceColour=t,this.Transparency=s,this.type=846575682}}e.IfcSurfaceStyleShading=yr;e.IfcSurfaceStyleWithTextures=class extends er{constructor(e,t){super(e),this.Textures=t,this.type=1351298697}};class gr extends er{constructor(e,t,s,i,r,o){super(e),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.type=626085974}}e.IfcSurfaceTexture=gr;e.IfcTable=class extends yI{constructor(e,t,s,i){super(e),this.Name=t,this.Rows=s,this.Columns=i,this.type=985171141}};e.IfcTableColumn=class extends yI{constructor(e,t,s,i,r,o){super(e),this.Identifier=t,this.Name=s,this.Description=i,this.Unit=r,this.ReferencePath=o,this.type=2043862942}};e.IfcTableRow=class extends yI{constructor(e,t,s){super(e),this.RowCells=t,this.IsHeading=s,this.type=531007025}};class Ir extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.type=1549132990}}e.IfcTaskTime=Ir;e.IfcTaskTimeRecurring=class extends Ir{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I,v){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.DurationType=r,this.ScheduleDuration=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.EarlyStart=l,this.EarlyFinish=h,this.LateStart=c,this.LateFinish=A,this.FreeFloat=u,this.TotalFloat=p,this.IsCritical=d,this.StatusTime=f,this.ActualDuration=E,this.ActualStart=m,this.ActualFinish=y,this.RemainingTime=g,this.Completion=I,this.Recurrence=v,this.type=2771591690}};e.IfcTelecomAddress=class extends Bi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.Purpose=t,this.Description=s,this.UserDefinedPurpose=i,this.TelephoneNumbers=r,this.FacsimileNumbers=o,this.PagerNumber=n,this.ElectronicMailAddresses=a,this.WWWHomePageURL=l,this.MessagingIDs=h,this.type=912023232}};e.IfcTextStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.TextCharacterAppearance=s,this.TextStyle=i,this.TextFontStyle=r,this.ModelOrDraughting=o,this.type=1447204868}};e.IfcTextStyleForDefinedFont=class extends er{constructor(e,t,s){super(e),this.Colour=t,this.BackgroundColour=s,this.type=2636378356}};e.IfcTextStyleTextModel=class extends er{constructor(e,t,s,i,r,o,n,a){super(e),this.TextIndent=t,this.TextAlign=s,this.TextDecoration=i,this.LetterSpacing=r,this.WordSpacing=o,this.TextTransform=n,this.LineHeight=a,this.type=1640371178}};class vr extends er{constructor(e,t){super(e),this.Maps=t,this.type=280115917}}e.IfcTextureCoordinate=vr;e.IfcTextureCoordinateGenerator=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Mode=s,this.Parameter=i,this.type=1742049831}};class Tr extends yI{constructor(e,t,s){super(e),this.TexCoordIndex=t,this.TexCoordsOf=s,this.type=222769930}}e.IfcTextureCoordinateIndices=Tr;e.IfcTextureCoordinateIndicesWithVoids=class extends Tr{constructor(e,t,s,i){super(e,t,s),this.TexCoordIndex=t,this.TexCoordsOf=s,this.InnerTexCoordIndices=i,this.type=1010789467}};e.IfcTextureMap=class extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.Vertices=s,this.MappedTo=i,this.type=2552916305}};e.IfcTextureVertex=class extends er{constructor(e,t){super(e),this.Coordinates=t,this.type=1210645708}};e.IfcTextureVertexList=class extends er{constructor(e,t){super(e),this.TexCoordsList=t,this.type=3611470254}};e.IfcTimePeriod=class extends yI{constructor(e,t,s){super(e),this.StartTime=t,this.EndTime=s,this.type=1199560280}};class _r extends yI{constructor(e,t,s,i,r,o,n,a,l){super(e),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.type=3101149627}}e.IfcTimeSeries=_r;e.IfcTimeSeriesValue=class extends yI{constructor(e,t){super(e),this.ListValues=t,this.type=581633288}};class Rr extends lr{constructor(e){super(e),this.type=1377556343}}e.IfcTopologicalRepresentationItem=Rr;e.IfcTopologyRepresentation=class extends ur{constructor(e,t,s,i,r){super(e,t,s,i,r),this.ContextOfItems=t,this.RepresentationIdentifier=s,this.RepresentationType=i,this.Items=r,this.type=1735638870}};e.IfcUnitAssignment=class extends yI{constructor(e,t){super(e),this.Units=t,this.type=180925521}};class Pr extends Rr{constructor(e){super(e),this.type=2799835756}}e.IfcVertex=Pr;e.IfcVertexPoint=class extends Pr{constructor(e,t){super(e),this.VertexGeometry=t,this.type=1907098498}};e.IfcVirtualGridIntersection=class extends yI{constructor(e,t,s){super(e),this.IntersectingAxes=t,this.OffsetDistances=s,this.type=891718957}};e.IfcWorkTime=class extends Ar{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.RecurrencePattern=r,this.StartDate=o,this.FinishDate=n,this.type=1236880293}};e.IfcAlignmentCantSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartDistAlong=i,this.HorizontalLength=r,this.StartCantLeft=o,this.EndCantLeft=n,this.StartCantRight=a,this.EndCantRight=l,this.PredefinedType=h,this.type=3752311538}};e.IfcAlignmentHorizontalSegment=class extends Fi{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.StartTag=t,this.EndTag=s,this.StartPoint=i,this.StartDirection=r,this.StartRadiusOfCurvature=o,this.EndRadiusOfCurvature=n,this.SegmentLength=a,this.GravityCenterLineHeight=l,this.PredefinedType=h,this.type=536804194}};e.IfcApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingApproval=i,this.RelatedApprovals=r,this.type=3869604511}};class Dr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.type=3798115385}}e.IfcArbitraryClosedProfileDef=Dr;class Nr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.type=1310608509}}e.IfcArbitraryOpenProfileDef=Nr;e.IfcArbitraryProfileDefWithVoids=class extends Dr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.OuterCurve=i,this.InnerCurves=r,this.type=2705031697}};e.IfcBlobTexture=class extends gr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.RasterFormat=n,this.RasterCode=a,this.type=616511568}};e.IfcCenterLineProfileDef=class extends Nr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Curve=i,this.Thickness=r,this.type=3150382593}};e.IfcClassification=class extends Qi{constructor(e,t,s,i,r,o,n,a){super(e),this.Source=t,this.Edition=s,this.EditionDate=i,this.Name=r,this.Description=o,this.Specification=n,this.ReferenceTokens=a,this.type=747523909}};e.IfcClassificationReference=class extends Wi{constructor(e,t,s,i,r,o,n){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.ReferencedSource=r,this.Description=o,this.Sort=n,this.type=647927063}};e.IfcColourRgbList=class extends er{constructor(e,t){super(e),this.ColourList=t,this.type=3285139300}};class Cr extends er{constructor(e,t){super(e),this.Name=t,this.type=3264961684}}e.IfcColourSpecification=Cr;e.IfcCompositeProfileDef=class extends rr{constructor(e,t,s,i,r){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Profiles=i,this.Label=r,this.type=1485152156}};class Or extends Rr{constructor(e,t){super(e),this.CfsFaces=t,this.type=370225590}}e.IfcConnectedFaceSet=Or;e.IfcConnectionCurveGeometry=class extends Hi{constructor(e,t,s){super(e),this.CurveOnRelatingElement=t,this.CurveOnRelatedElement=s,this.type=1981873012}};e.IfcConnectionPointEccentricity=class extends Gi{constructor(e,t,s,i,r,o){super(e,t,s),this.PointOnRelatingElement=t,this.PointOnRelatedElement=s,this.EccentricityInX=i,this.EccentricityInY=r,this.EccentricityInZ=o,this.type=45288368}};e.IfcContextDependentUnit=class extends Zi{constructor(e,t,s,i){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.type=3050246964}};class br extends Zi{constructor(e,t,s,i,r){super(e,t,s),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.type=2889183280}}e.IfcConversionBasedUnit=br;e.IfcConversionBasedUnitWithOffset=class extends br{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Dimensions=t,this.UnitType=s,this.Name=i,this.ConversionFactor=r,this.ConversionOffset=o,this.type=2713554722}};e.IfcCurrencyRelationship=class extends hr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMonetaryUnit=i,this.RelatedMonetaryUnit=r,this.ExchangeRate=o,this.RateDateTime=n,this.RateSource=a,this.type=539742890}};e.IfcCurveStyle=class extends sr{constructor(e,t,s,i,r,o){super(e,t),this.Name=t,this.CurveFont=s,this.CurveWidth=i,this.CurveColour=r,this.ModelOrDraughting=o,this.type=3800577675}};e.IfcCurveStyleFont=class extends er{constructor(e,t,s){super(e),this.Name=t,this.PatternList=s,this.type=1105321065}};e.IfcCurveStyleFontAndScaling=class extends er{constructor(e,t,s,i){super(e),this.Name=t,this.CurveStyleFont=s,this.CurveFontScaling=i,this.type=2367409068}};e.IfcCurveStyleFontPattern=class extends er{constructor(e,t,s){super(e),this.VisibleSegmentLength=t,this.InvisibleSegmentLength=s,this.type=3510044353}};class Sr extends rr{constructor(e,t,s,i,r,o){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=3632507154}}e.IfcDerivedProfileDef=Sr;e.IfcDocumentInformation=class extends Qi{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e),this.Identification=t,this.Name=s,this.Description=i,this.Location=r,this.Purpose=o,this.IntendedUse=n,this.Scope=a,this.Revision=l,this.DocumentOwner=h,this.Editors=c,this.CreationTime=A,this.LastRevisionTime=u,this.ElectronicFormat=p,this.ValidFrom=d,this.ValidUntil=f,this.Confidentiality=E,this.Status=m,this.type=1154170062}};e.IfcDocumentInformationRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingDocument=i,this.RelatedDocuments=r,this.RelationshipType=o,this.type=770865208}};e.IfcDocumentReference=class extends Wi{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Location=t,this.Identification=s,this.Name=i,this.Description=r,this.ReferencedDocument=o,this.type=3732053477}};class wr extends Rr{constructor(e,t,s){super(e),this.EdgeStart=t,this.EdgeEnd=s,this.type=3900360178}}e.IfcEdge=wr;e.IfcEdgeCurve=class extends wr{constructor(e,t,s,i,r){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.EdgeGeometry=i,this.SameSense=r,this.type=476780140}};e.IfcEventTime=class extends Ar{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ActualDate=r,this.EarlyDate=o,this.LateDate=n,this.ScheduleDate=a,this.type=211053100}};class xr extends or{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Properties=i,this.type=297599258}}e.IfcExtendedProperties=xr;e.IfcExternalReferenceRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingReference=i,this.RelatedResourceObjects=r,this.type=1437805879}};class Br extends Rr{constructor(e,t){super(e),this.Bounds=t,this.type=2556980723}}e.IfcFace=Br;class Fr extends Rr{constructor(e,t,s){super(e),this.Bound=t,this.Orientation=s,this.type=1809719519}}e.IfcFaceBound=Fr;e.IfcFaceOuterBound=class extends Fr{constructor(e,t,s){super(e,t,s),this.Bound=t,this.Orientation=s,this.type=803316827}};class Mr extends Br{constructor(e,t,s,i){super(e,t),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3008276851}}e.IfcFaceSurface=Mr;e.IfcFailureConnectionCondition=class extends pr{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.TensionFailureX=s,this.TensionFailureY=i,this.TensionFailureZ=r,this.CompressionFailureX=o,this.CompressionFailureY=n,this.CompressionFailureZ=a,this.type=4219587988}};e.IfcFillAreaStyle=class extends sr{constructor(e,t,s,i){super(e,t),this.Name=t,this.FillStyles=s,this.ModelOrDraughting=i,this.type=738692330}};class Lr extends ar{constructor(e,t,s,i,r,o,n){super(e,t,s),this.ContextIdentifier=t,this.ContextType=s,this.CoordinateSpaceDimension=i,this.Precision=r,this.WorldCoordinateSystem=o,this.TrueNorth=n,this.type=3448662350}}e.IfcGeometricRepresentationContext=Lr;class Ur extends lr{constructor(e){super(e),this.type=2453401579}}e.IfcGeometricRepresentationItem=Ur;e.IfcGeometricRepresentationSubContext=class extends Lr{constructor(e,s,i,r,o,n,a,l){super(e,s,i,new t(0),null,r,null),this.ContextIdentifier=s,this.ContextType=i,this.WorldCoordinateSystem=r,this.ParentContext=o,this.TargetScale=n,this.TargetView=a,this.UserDefinedTargetView=l,this.type=4142052618}};class Hr extends Ur{constructor(e,t){super(e),this.Elements=t,this.type=3590301190}}e.IfcGeometricSet=Hr;e.IfcGridPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.PlacementLocation=s,this.PlacementRefDirection=i,this.type=178086475}};class Gr extends Ur{constructor(e,t,s){super(e),this.BaseSurface=t,this.AgreementFlag=s,this.type=812098782}}e.IfcHalfSpaceSolid=Gr;e.IfcImageTexture=class extends gr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.URLReference=n,this.type=3905492369}};e.IfcIndexedColourMap=class extends er{constructor(e,t,s,i,r){super(e),this.MappedTo=t,this.Opacity=s,this.Colours=i,this.ColourIndex=r,this.type=3570813810}};class kr extends vr{constructor(e,t,s,i){super(e,t),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.type=1437953363}}e.IfcIndexedTextureMap=kr;e.IfcIndexedTriangleTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndex=r,this.type=2133299955}};e.IfcIrregularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.Values=h,this.type=3741457305}};e.IfcLagTime=class extends Ar{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.LagValue=r,this.DurationType=o,this.type=1585845231}};class Vr extends Ur{constructor(e,t,s,i,r){super(e),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=1402838566}}e.IfcLightSource=Vr;e.IfcLightSourceAmbient=class extends Vr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.type=125510826}};e.IfcLightSourceDirectional=class extends Vr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Orientation=o,this.type=2604431987}};e.IfcLightSourceGoniometric=class extends Vr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.ColourAppearance=n,this.ColourTemperature=a,this.LuminousFlux=l,this.LightEmissionSource=h,this.LightDistributionDataSource=c,this.type=4266656042}};class jr extends Vr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.type=1520743889}}e.IfcLightSourcePositional=jr;e.IfcLightSourceSpot=class extends jr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.Name=t,this.LightColour=s,this.AmbientIntensity=i,this.Intensity=r,this.Position=o,this.Radius=n,this.ConstantAttenuation=a,this.DistanceAttenuation=l,this.QuadricAttenuation=h,this.Orientation=c,this.ConcentrationExponent=A,this.SpreadAngle=u,this.BeamWidthAngle=p,this.type=3422422726}};e.IfcLinearPlacement=class extends qi{constructor(e,t,s,i){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.CartesianPosition=i,this.type=388784114}};e.IfcLocalPlacement=class extends qi{constructor(e,t,s){super(e,t),this.PlacementRelTo=t,this.RelativePlacement=s,this.type=2624227202}};class Qr extends Rr{constructor(e){super(e),this.type=1008929658}}e.IfcLoop=Qr;e.IfcMappedItem=class extends lr{constructor(e,t,s){super(e),this.MappingSource=t,this.MappingTarget=s,this.type=2347385850}};e.IfcMaterial=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.Category=i,this.type=1838606355}};e.IfcMaterialConstituent=class extends zi{constructor(e,t,s,i,r,o){super(e),this.Name=t,this.Description=s,this.Material=i,this.Fraction=r,this.Category=o,this.type=3708119e3}};e.IfcMaterialConstituentSet=class extends zi{constructor(e,t,s,i){super(e),this.Name=t,this.Description=s,this.MaterialConstituents=i,this.type=2852063980}};e.IfcMaterialDefinitionRepresentation=class extends ir{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.RepresentedMaterial=r,this.type=2022407955}};e.IfcMaterialLayerSetUsage=class extends Xi{constructor(e,t,s,i,r,o){super(e),this.ForLayerSet=t,this.LayerSetDirection=s,this.DirectionSense=i,this.OffsetFromReferenceLine=r,this.ReferenceExtent=o,this.type=1303795690}};class Wr extends Xi{constructor(e,t,s,i){super(e),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.type=3079605661}}e.IfcMaterialProfileSetUsage=Wr;e.IfcMaterialProfileSetUsageTapering=class extends Wr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ForProfileSet=t,this.CardinalPoint=s,this.ReferenceExtent=i,this.ForProfileEndSet=r,this.CardinalEndPoint=o,this.type=3404854881}};e.IfcMaterialProperties=class extends xr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.Material=r,this.type=3265635763}};e.IfcMaterialRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.RelatingMaterial=i,this.RelatedMaterials=r,this.MaterialExpression=o,this.type=853536259}};e.IfcMirroredProfileDef=class extends Sr{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.ParentProfile=i,this.Operator=r,this.Label=o,this.type=2998442950}};class zr extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=219451334}}e.IfcObjectDefinition=zr;e.IfcOpenCrossProfileDef=class extends rr{constructor(e,t,s,i,r,o,n,a){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.HorizontalWidths=i,this.Widths=r,this.Slopes=o,this.Tags=n,this.OffsetPoint=a,this.type=182550632}};e.IfcOpenShell=class extends Or{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2665983363}};e.IfcOrganizationRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingOrganization=i,this.RelatedOrganizations=r,this.type=1411181986}};e.IfcOrientedEdge=class extends wr{constructor(e,t,s,i){super(e,t,new mI(0)),this.EdgeStart=t,this.EdgeElement=s,this.Orientation=i,this.type=1029017970}};class Kr extends rr{constructor(e,t,s,i){super(e,t,s),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.type=2529465313}}e.IfcParameterizedProfileDef=Kr;e.IfcPath=class extends Rr{constructor(e,t){super(e),this.EdgeList=t,this.type=2519244187}};e.IfcPhysicalComplexQuantity=class extends Ji{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Description=s,this.HasQuantities=i,this.Discrimination=r,this.Quality=o,this.Usage=n,this.type=3021840470}};e.IfcPixelTexture=class extends gr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o),this.RepeatS=t,this.RepeatT=s,this.Mode=i,this.TextureTransform=r,this.Parameter=o,this.Width=n,this.Height=a,this.ColourComponents=l,this.Pixel=h,this.type=597895409}};class Yr extends Ur{constructor(e,t){super(e),this.Location=t,this.type=2004835150}}e.IfcPlacement=Yr;class Xr extends Ur{constructor(e,t,s){super(e),this.SizeInX=t,this.SizeInY=s,this.type=1663979128}}e.IfcPlanarExtent=Xr;class Zr extends Ur{constructor(e){super(e),this.type=2067069095}}e.IfcPoint=Zr;e.IfcPointByDistanceExpression=class extends Zr{constructor(e,t,s,i,r,o){super(e),this.DistanceAlong=t,this.OffsetLateral=s,this.OffsetVertical=i,this.OffsetLongitudinal=r,this.BasisCurve=o,this.type=2165702409}};e.IfcPointOnCurve=class extends Zr{constructor(e,t,s){super(e),this.BasisCurve=t,this.PointParameter=s,this.type=4022376103}};e.IfcPointOnSurface=class extends Zr{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.PointParameterU=s,this.PointParameterV=i,this.type=1423911732}};e.IfcPolyLoop=class extends Qr{constructor(e,t){super(e),this.Polygon=t,this.type=2924175390}};e.IfcPolygonalBoundedHalfSpace=class extends Gr{constructor(e,t,s,i,r){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Position=i,this.PolygonalBoundary=r,this.type=2775532180}};class qr extends er{constructor(e,t){super(e),this.Name=t,this.type=3727388367}}e.IfcPreDefinedItem=qr;class Jr extends or{constructor(e){super(e),this.type=3778827333}}e.IfcPreDefinedProperties=Jr;class $r extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=1775413392}}e.IfcPreDefinedTextFont=$r;e.IfcProductDefinitionShape=class extends ir{constructor(e,t,s,i){super(e,t,s,i),this.Name=t,this.Description=s,this.Representations=i,this.type=673634403}};e.IfcProfileProperties=class extends xr{constructor(e,t,s,i,r){super(e,t,s,i),this.Name=t,this.Description=s,this.Properties=i,this.ProfileDefinition=r,this.type=2802850158}};class eo extends or{constructor(e,t,s){super(e),this.Name=t,this.Specification=s,this.type=2598011224}}e.IfcProperty=eo;class to extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1680319473}}e.IfcPropertyDefinition=to;e.IfcPropertyDependencyRelationship=class extends hr{constructor(e,t,s,i,r,o){super(e,t,s),this.Name=t,this.Description=s,this.DependingProperty=i,this.DependantProperty=r,this.Expression=o,this.type=148025276}};class so extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3357820518}}e.IfcPropertySetDefinition=so;class io extends to{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=1482703590}}e.IfcPropertyTemplateDefinition=io;class ro extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2090586900}}e.IfcQuantitySet=ro;class oo extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.type=3615266464}}e.IfcRectangleProfileDef=oo;e.IfcRegularTimeSeries=class extends _r{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.Name=t,this.Description=s,this.StartTime=i,this.EndTime=r,this.TimeSeriesDataType=o,this.DataOrigin=n,this.UserDefinedDataOrigin=a,this.Unit=l,this.TimeStep=h,this.Values=c,this.type=3413951693}};e.IfcReinforcementBarProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.TotalCrossSectionArea=t,this.SteelGrade=s,this.BarSurface=i,this.EffectiveDepth=r,this.NominalBarDiameter=o,this.BarCount=n,this.type=1580146022}};class no extends cr{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=478536968}}e.IfcRelationship=no;e.IfcResourceApprovalRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatedResourceObjects=i,this.RelatingApproval=r,this.type=2943643501}};e.IfcResourceConstraintRelationship=class extends hr{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Description=s,this.RelatingConstraint=i,this.RelatedResourceObjects=r,this.type=1608871552}};e.IfcResourceTime=class extends Ar{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i),this.Name=t,this.DataOrigin=s,this.UserDefinedDataOrigin=i,this.ScheduleWork=r,this.ScheduleUsage=o,this.ScheduleStart=n,this.ScheduleFinish=a,this.ScheduleContour=l,this.LevelingDelay=h,this.IsOverAllocated=c,this.StatusTime=A,this.ActualWork=u,this.ActualUsage=p,this.ActualStart=d,this.ActualFinish=f,this.RemainingWork=E,this.RemainingUsage=m,this.Completion=y,this.type=1042787934}};e.IfcRoundedRectangleProfileDef=class extends oo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.RoundingRadius=n,this.type=2778083089}};e.IfcSectionProperties=class extends Jr{constructor(e,t,s,i){super(e),this.SectionType=t,this.StartProfile=s,this.EndProfile=i,this.type=2042790032}};e.IfcSectionReinforcementProperties=class extends Jr{constructor(e,t,s,i,r,o,n){super(e),this.LongitudinalStartPosition=t,this.LongitudinalEndPosition=s,this.TransversePosition=i,this.ReinforcementRole=r,this.SectionDefinition=o,this.CrossSectionReinforcementDefinitions=n,this.type=4165799628}};e.IfcSectionedSpine=class extends Ur{constructor(e,t,s,i){super(e),this.SpineCurve=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1509187699}};class ao extends Ur{constructor(e,t){super(e),this.Transition=t,this.type=823603102}}e.IfcSegment=ao;e.IfcShellBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.SbsmBoundary=t,this.type=4124623270}};class lo extends eo{constructor(e,t,s){super(e,t,s),this.Name=t,this.Specification=s,this.type=3692461612}}e.IfcSimpleProperty=lo;e.IfcSlippageConnectionCondition=class extends pr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.SlippageX=s,this.SlippageY=i,this.SlippageZ=r,this.type=2609359061}};class ho extends Ur{constructor(e){super(e),this.type=723233188}}e.IfcSolidModel=ho;e.IfcStructuralLoadLinearForce=class extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.LinearForceX=s,this.LinearForceY=i,this.LinearForceZ=r,this.LinearMomentX=o,this.LinearMomentY=n,this.LinearMomentZ=a,this.type=1595516126}};e.IfcStructuralLoadPlanarForce=class extends Er{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.PlanarForceX=s,this.PlanarForceY=i,this.PlanarForceZ=r,this.type=2668620305}};class co extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.type=2473145415}}e.IfcStructuralLoadSingleDisplacement=co;e.IfcStructuralLoadSingleDisplacementDistortion=class extends co{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.DisplacementX=s,this.DisplacementY=i,this.DisplacementZ=r,this.RotationalDisplacementRX=o,this.RotationalDisplacementRY=n,this.RotationalDisplacementRZ=a,this.Distortion=l,this.type=1973038258}};class Ao extends Er{constructor(e,t,s,i,r,o,n,a){super(e,t),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.type=1597423693}}e.IfcStructuralLoadSingleForce=Ao;e.IfcStructuralLoadSingleForceWarping=class extends Ao{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.Name=t,this.ForceX=s,this.ForceY=i,this.ForceZ=r,this.MomentX=o,this.MomentY=n,this.MomentZ=a,this.WarpingMoment=l,this.type=1190533807}};e.IfcSubedge=class extends wr{constructor(e,t,s,i){super(e,t,s),this.EdgeStart=t,this.EdgeEnd=s,this.ParentEdge=i,this.type=2233826070}};class uo extends Ur{constructor(e){super(e),this.type=2513912981}}e.IfcSurface=uo;e.IfcSurfaceStyleRendering=class extends yr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s),this.SurfaceColour=t,this.Transparency=s,this.DiffuseColour=i,this.TransmissionColour=r,this.DiffuseTransmissionColour=o,this.ReflectionColour=n,this.SpecularColour=a,this.SpecularHighlight=l,this.ReflectanceMethod=h,this.type=1878645084}};class po extends ho{constructor(e,t,s){super(e),this.SweptArea=t,this.Position=s,this.type=2247615214}}e.IfcSweptAreaSolid=po;class fo extends ho{constructor(e,t,s,i,r,o){super(e),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.type=1260650574}}e.IfcSweptDiskSolid=fo;e.IfcSweptDiskSolidPolygonal=class extends fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Directrix=t,this.Radius=s,this.InnerRadius=i,this.StartParam=r,this.EndParam=o,this.FilletRadius=n,this.type=1096409881}};class Eo extends uo{constructor(e,t,s){super(e),this.SweptCurve=t,this.Position=s,this.type=230924584}}e.IfcSweptSurface=Eo;e.IfcTShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.WebEdgeRadius=c,this.WebSlope=A,this.FlangeSlope=u,this.type=3071757647}};class mo extends Ur{constructor(e){super(e),this.type=901063453}}e.IfcTessellatedItem=mo;class yo extends Ur{constructor(e,t,s,i){super(e),this.Literal=t,this.Placement=s,this.Path=i,this.type=4282788508}}e.IfcTextLiteral=yo;e.IfcTextLiteralWithExtent=class extends yo{constructor(e,t,s,i,r,o){super(e,t,s,i),this.Literal=t,this.Placement=s,this.Path=i,this.Extent=r,this.BoxAlignment=o,this.type=3124975700}};e.IfcTextStyleFontModel=class extends $r{constructor(e,t,s,i,r,o,n){super(e,t),this.Name=t,this.FontFamily=s,this.FontStyle=i,this.FontVariant=r,this.FontWeight=o,this.FontSize=n,this.type=1983826977}};e.IfcTrapeziumProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomXDim=r,this.TopXDim=o,this.YDim=n,this.TopXOffset=a,this.type=2715220739}};class go extends zr{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.type=1628702193}}e.IfcTypeObject=go;class Io extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.type=3736923433}}e.IfcTypeProcess=Io;class vo extends go{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.type=2347495698}}e.IfcTypeProduct=vo;class To extends go{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.type=3698973494}}e.IfcTypeResource=To;e.IfcUShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.FlangeSlope=c,this.type=427810014}};e.IfcVector=class extends Ur{constructor(e,t,s){super(e),this.Orientation=t,this.Magnitude=s,this.type=1417489154}};e.IfcVertexLoop=class extends Qr{constructor(e,t){super(e),this.LoopVertex=t,this.type=2759199220}};e.IfcZShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.FlangeWidth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.EdgeRadius=h,this.type=2543172580}};e.IfcAdvancedFace=class extends Mr{constructor(e,t,s,i){super(e,t,s,i),this.Bounds=t,this.FaceSurface=s,this.SameSense=i,this.type=3406155212}};e.IfcAnnotationFillArea=class extends Ur{constructor(e,t,s){super(e),this.OuterBoundary=t,this.InnerBoundaries=s,this.type=669184980}};e.IfcAsymmetricIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.BottomFlangeWidth=r,this.OverallDepth=o,this.WebThickness=n,this.BottomFlangeThickness=a,this.BottomFlangeFilletRadius=l,this.TopFlangeWidth=h,this.TopFlangeThickness=c,this.TopFlangeFilletRadius=A,this.BottomFlangeEdgeRadius=u,this.BottomFlangeSlope=p,this.TopFlangeEdgeRadius=d,this.TopFlangeSlope=f,this.type=3207858831}};e.IfcAxis1Placement=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.Axis=s,this.type=4261334040}};e.IfcAxis2Placement2D=class extends Yr{constructor(e,t,s){super(e,t),this.Location=t,this.RefDirection=s,this.type=3125803723}};e.IfcAxis2Placement3D=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=2740243338}};e.IfcAxis2PlacementLinear=class extends Yr{constructor(e,t,s,i){super(e,t),this.Location=t,this.Axis=s,this.RefDirection=i,this.type=3425423356}};class _o extends Ur{constructor(e,t,s,i){super(e),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=2736907675}}e.IfcBooleanResult=_o;class Ro extends uo{constructor(e){super(e),this.type=4182860854}}e.IfcBoundedSurface=Ro;e.IfcBoundingBox=class extends Ur{constructor(e,t,s,i,r){super(e),this.Corner=t,this.XDim=s,this.YDim=i,this.ZDim=r,this.type=2581212453}};e.IfcBoxedHalfSpace=class extends Gr{constructor(e,t,s,i){super(e,t,s),this.BaseSurface=t,this.AgreementFlag=s,this.Enclosure=i,this.type=2713105998}};e.IfcCShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.WallThickness=n,this.Girth=a,this.InternalFilletRadius=l,this.type=2898889636}};e.IfcCartesianPoint=class extends Zr{constructor(e,t){super(e),this.Coordinates=t,this.type=1123145078}};class Po extends Ur{constructor(e){super(e),this.type=574549367}}e.IfcCartesianPointList=Po;e.IfcCartesianPointList2D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=1675464909}};e.IfcCartesianPointList3D=class extends Po{constructor(e,t,s){super(e),this.CoordList=t,this.TagList=s,this.type=2059837836}};class Do extends Ur{constructor(e,t,s,i,r){super(e),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=59481748}}e.IfcCartesianTransformationOperator=Do;class No extends Do{constructor(e,t,s,i,r){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.type=3749851601}}e.IfcCartesianTransformationOperator2D=No;e.IfcCartesianTransformationOperator2DnonUniform=class extends No{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Scale2=o,this.type=3486308946}};class Co extends Do{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.type=3331915920}}e.IfcCartesianTransformationOperator3D=Co;e.IfcCartesianTransformationOperator3DnonUniform=class extends Co{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.Axis1=t,this.Axis2=s,this.LocalOrigin=i,this.Scale=r,this.Axis3=o,this.Scale2=n,this.Scale3=a,this.type=1416205885}};class Oo extends Kr{constructor(e,t,s,i,r){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.type=1383045692}}e.IfcCircleProfileDef=Oo;e.IfcClosedShell=class extends Or{constructor(e,t){super(e,t),this.CfsFaces=t,this.type=2205249479}};e.IfcColourRgb=class extends Cr{constructor(e,t,s,i,r){super(e,t),this.Name=t,this.Red=s,this.Green=i,this.Blue=r,this.type=776857604}};e.IfcComplexProperty=class extends eo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.HasProperties=r,this.type=2542286263}};class bo extends ao{constructor(e,t,s,i){super(e,t),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.type=2485617015}}e.IfcCompositeCurveSegment=bo;class So extends To{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.type=2574617495}}e.IfcConstructionResourceType=So;class wo extends zr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=3419103109}}e.IfcContext=wo;e.IfcCrewResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1815067380}};class xo extends Ur{constructor(e,t){super(e),this.Position=t,this.type=2506170314}}e.IfcCsgPrimitive3D=xo;e.IfcCsgSolid=class extends ho{constructor(e,t){super(e),this.TreeRootExpression=t,this.type=2147822146}};class Bo extends Ur{constructor(e){super(e),this.type=2601014836}}e.IfcCurve=Bo;e.IfcCurveBoundedPlane=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.OuterBoundary=s,this.InnerBoundaries=i,this.type=2827736869}};e.IfcCurveBoundedSurface=class extends Ro{constructor(e,t,s,i){super(e),this.BasisSurface=t,this.Boundaries=s,this.ImplicitOuter=i,this.type=2629017746}};e.IfcCurveSegment=class extends ao{constructor(e,t,s,i,r,o){super(e,t),this.Transition=t,this.Placement=s,this.SegmentStart=i,this.SegmentLength=r,this.ParentCurve=o,this.type=4212018352}};e.IfcDirection=class extends Ur{constructor(e,t){super(e),this.DirectionRatios=t,this.type=32440307}};class Fo extends po{constructor(e,t,s,i,r,o){super(e,t,s),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.type=593015953}}e.IfcDirectrixCurveSweptAreaSolid=Fo;e.IfcEdgeLoop=class extends Qr{constructor(e,t){super(e),this.EdgeList=t,this.type=1472233963}};e.IfcElementQuantity=class extends ro{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.MethodOfMeasurement=o,this.Quantities=n,this.type=1883228015}};class Mo extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=339256511}}e.IfcElementType=Mo;class Lo extends uo{constructor(e,t){super(e),this.Position=t,this.type=2777663545}}e.IfcElementarySurface=Lo;e.IfcEllipseProfileDef=class extends Kr{constructor(e,t,s,i,r,o){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.SemiAxis1=r,this.SemiAxis2=o,this.type=2835456948}};e.IfcEventType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.EventTriggerType=A,this.UserDefinedEventTriggerType=u,this.type=4024345920}};class Uo extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=477187591}}e.IfcExtrudedAreaSolid=Uo;e.IfcExtrudedAreaSolidTapered=class extends Uo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.EndSweptArea=o,this.type=2804161546}};e.IfcFaceBasedSurfaceModel=class extends Ur{constructor(e,t){super(e),this.FbsmFaces=t,this.type=2047409740}};e.IfcFillAreaStyleHatching=class extends Ur{constructor(e,t,s,i,r,o){super(e),this.HatchLineAppearance=t,this.StartOfNextHatchLine=s,this.PointOfReferenceHatchLine=i,this.PatternStart=r,this.HatchLineAngle=o,this.type=374418227}};e.IfcFillAreaStyleTiles=class extends Ur{constructor(e,t,s,i){super(e),this.TilingPattern=t,this.Tiles=s,this.TilingScale=i,this.type=315944413}};class Ho extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=2652556860}}e.IfcFixedReferenceSweptAreaSolid=Ho;class Go extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=4238390223}}e.IfcFurnishingElementType=Go;e.IfcFurnitureType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.AssemblyPlace=c,this.PredefinedType=A,this.type=1268542332}};e.IfcGeographicElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4095422895}};e.IfcGeometricCurveSet=class extends Hr{constructor(e,t){super(e,t),this.Elements=t,this.type=987898635}};e.IfcIShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.OverallWidth=r,this.OverallDepth=o,this.WebThickness=n,this.FlangeThickness=a,this.FilletRadius=l,this.FlangeEdgeRadius=h,this.FlangeSlope=c,this.type=1484403080}};class ko extends mo{constructor(e,t){super(e),this.CoordIndex=t,this.type=178912537}}e.IfcIndexedPolygonalFace=ko;e.IfcIndexedPolygonalFaceWithVoids=class extends ko{constructor(e,t,s){super(e,t),this.CoordIndex=t,this.InnerCoordIndices=s,this.type=2294589976}};e.IfcIndexedPolygonalTextureMap=class extends kr{constructor(e,t,s,i,r){super(e,t,s,i),this.Maps=t,this.MappedTo=s,this.TexCoords=i,this.TexCoordIndices=r,this.type=3465909080}};e.IfcLShapeProfileDef=class extends Kr{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Depth=r,this.Width=o,this.Thickness=n,this.FilletRadius=a,this.EdgeRadius=l,this.LegSlope=h,this.type=572779678}};e.IfcLaborResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=428585644}};e.IfcLine=class extends Bo{constructor(e,t,s){super(e),this.Pnt=t,this.Dir=s,this.type=1281925730}};class Vo extends ho{constructor(e,t){super(e),this.Outer=t,this.type=1425443689}}e.IfcManifoldSolidBrep=Vo;class jo extends zr{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=3888040117}}e.IfcObject=jo;class Qo extends Bo{constructor(e,t){super(e),this.BasisCurve=t,this.type=590820931}}e.IfcOffsetCurve=Qo;e.IfcOffsetCurve2D=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.type=3388369263}};e.IfcOffsetCurve3D=class extends Qo{constructor(e,t,s,i,r){super(e,t),this.BasisCurve=t,this.Distance=s,this.SelfIntersect=i,this.RefDirection=r,this.type=3505215534}};e.IfcOffsetCurveByDistances=class extends Qo{constructor(e,t,s,i){super(e,t),this.BasisCurve=t,this.OffsetValues=s,this.Tag=i,this.type=2485787929}};e.IfcPcurve=class extends Bo{constructor(e,t,s){super(e),this.BasisSurface=t,this.ReferenceCurve=s,this.type=1682466193}};e.IfcPlanarBox=class extends Xr{constructor(e,t,s,i){super(e,t,s),this.SizeInX=t,this.SizeInY=s,this.Placement=i,this.type=603570806}};e.IfcPlane=class extends Lo{constructor(e,t){super(e,t),this.Position=t,this.type=220341763}};e.IfcPolynomialCurve=class extends Bo{constructor(e,t,s,i,r){super(e),this.Position=t,this.CoefficientsX=s,this.CoefficientsY=i,this.CoefficientsZ=r,this.type=3381221214}};class Wo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=759155922}}e.IfcPreDefinedColour=Wo;class zo extends qr{constructor(e,t){super(e,t),this.Name=t,this.type=2559016684}}e.IfcPreDefinedCurveFont=zo;class Ko extends so{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3967405729}}e.IfcPreDefinedPropertySet=Ko;e.IfcProcedureType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.type=569719735}};class Yo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2945172077}}e.IfcProcess=Yo;class Xo extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=4208778838}}e.IfcProduct=Xo;e.IfcProject=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=103090709}};e.IfcProjectLibrary=class extends wo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.Phase=a,this.RepresentationContexts=l,this.UnitsInContext=h,this.type=653396225}};e.IfcPropertyBoundedValue=class extends lo{constructor(e,t,s,i,r,o,n){super(e,t,s),this.Name=t,this.Specification=s,this.UpperBoundValue=i,this.LowerBoundValue=r,this.Unit=o,this.SetPointValue=n,this.type=871118103}};e.IfcPropertyEnumeratedValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.EnumerationValues=i,this.EnumerationReference=r,this.type=4166981789}};e.IfcPropertyListValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.ListValues=i,this.Unit=r,this.type=2752243245}};e.IfcPropertyReferenceValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.UsageName=i,this.PropertyReference=r,this.type=941946838}};e.IfcPropertySet=class extends so{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.HasProperties=o,this.type=1451395588}};e.IfcPropertySetTemplate=class extends io{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.ApplicableEntity=n,this.HasPropertyTemplates=a,this.type=492091185}};e.IfcPropertySingleValue=class extends lo{constructor(e,t,s,i,r){super(e,t,s),this.Name=t,this.Specification=s,this.NominalValue=i,this.Unit=r,this.type=3650150729}};e.IfcPropertyTableValue=class extends lo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s),this.Name=t,this.Specification=s,this.DefiningValues=i,this.DefinedValues=r,this.Expression=o,this.DefiningUnit=n,this.DefinedUnit=a,this.CurveInterpolation=l,this.type=110355661}};class Zo extends io{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=3521284610}}e.IfcPropertyTemplate=Zo;e.IfcRectangleHollowProfileDef=class extends oo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.XDim=r,this.YDim=o,this.WallThickness=n,this.InnerFilletRadius=a,this.OuterFilletRadius=l,this.type=2770003689}};e.IfcRectangularPyramid=class extends xo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.Height=r,this.type=2798486643}};e.IfcRectangularTrimmedSurface=class extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.BasisSurface=t,this.U1=s,this.V1=i,this.U2=r,this.V2=o,this.Usense=n,this.Vsense=a,this.type=3454111270}};e.IfcReinforcementDefinitionProperties=class extends Ko{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.DefinitionType=o,this.ReinforcementSectionDefinitions=n,this.type=3765753017}};class qo extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.type=3939117080}}e.IfcRelAssigns=qo;e.IfcRelAssignsToActor=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingActor=a,this.ActingRole=l,this.type=1683148259}};e.IfcRelAssignsToControl=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingControl=a,this.type=2495723537}};class Jo extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.type=1307041759}}e.IfcRelAssignsToGroup=Jo;e.IfcRelAssignsToGroupByFactor=class extends Jo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingGroup=a,this.Factor=l,this.type=1027710054}};e.IfcRelAssignsToProcess=class extends qo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProcess=a,this.QuantityInProcess=l,this.type=4278684876}};e.IfcRelAssignsToProduct=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingProduct=a,this.type=2857406711}};e.IfcRelAssignsToResource=class extends qo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatedObjectsType=n,this.RelatingResource=a,this.type=205026976}};class $o extends no{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.type=1865459582}}e.IfcRelAssociates=$o;e.IfcRelAssociatesApproval=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingApproval=n,this.type=4095574036}};e.IfcRelAssociatesClassification=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingClassification=n,this.type=919958153}};e.IfcRelAssociatesConstraint=class extends $o{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.Intent=n,this.RelatingConstraint=a,this.type=2728634034}};e.IfcRelAssociatesDocument=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingDocument=n,this.type=982818633}};e.IfcRelAssociatesLibrary=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingLibrary=n,this.type=3840914261}};e.IfcRelAssociatesMaterial=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingMaterial=n,this.type=2655215786}};e.IfcRelAssociatesProfileDef=class extends $o{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingProfileDef=n,this.type=1033248425}};class en extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=826625072}}e.IfcRelConnects=en;class tn extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.type=1204542856}}e.IfcRelConnectsElements=tn;e.IfcRelConnectsPathElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RelatingPriorities=l,this.RelatedPriorities=h,this.RelatedConnectionType=c,this.RelatingConnectionType=A,this.type=3945020480}};e.IfcRelConnectsPortToElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedElement=n,this.type=4201705270}};e.IfcRelConnectsPorts=class extends en{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPort=o,this.RelatedPort=n,this.RealizingElement=a,this.type=3190031847}};e.IfcRelConnectsStructuralActivity=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedStructuralActivity=n,this.type=2127690289}};class sn extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.type=1638771189}}e.IfcRelConnectsStructuralMember=sn;e.IfcRelConnectsWithEccentricity=class extends sn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingStructuralMember=o,this.RelatedStructuralConnection=n,this.AppliedCondition=a,this.AdditionalConditions=l,this.SupportedLength=h,this.ConditionCoordinateSystem=c,this.ConnectionConstraint=A,this.type=504942748}};e.IfcRelConnectsWithRealizingElements=class extends tn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ConnectionGeometry=o,this.RelatingElement=n,this.RelatedElement=a,this.RealizingElements=l,this.ConnectionType=h,this.type=3678494232}};e.IfcRelContainedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=3242617779}};e.IfcRelCoversBldgElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedCoverings=n,this.type=886880790}};e.IfcRelCoversSpaces=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedCoverings=n,this.type=2802773753}};e.IfcRelDeclares=class extends no{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingContext=o,this.RelatedDefinitions=n,this.type=2565941209}};class rn extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=2551354335}}e.IfcRelDecomposes=rn;class on extends no{constructor(e,t,s,i,r){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.type=693640335}}e.IfcRelDefines=on;e.IfcRelDefinesByObject=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingObject=n,this.type=1462361463}};e.IfcRelDefinesByProperties=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingPropertyDefinition=n,this.type=4186316022}};e.IfcRelDefinesByTemplate=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedPropertySets=o,this.RelatingTemplate=n,this.type=307848117}};e.IfcRelDefinesByType=class extends on{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedObjects=o,this.RelatingType=n,this.type=781010003}};e.IfcRelFillsElement=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingOpeningElement=o,this.RelatedBuildingElement=n,this.type=3940055652}};e.IfcRelFlowControlElements=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedControlElements=o,this.RelatingFlowElement=n,this.type=279856033}};e.IfcRelInterferesElements=class extends en{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedElement=n,this.InterferenceGeometry=a,this.InterferenceSpace=l,this.InterferenceType=h,this.ImpliedOrder=c,this.type=427948657}};e.IfcRelNests=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=3268803585}};e.IfcRelPositions=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingPositioningElement=o,this.RelatedProducts=n,this.type=1441486842}};e.IfcRelProjectsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedFeatureElement=n,this.type=750771296}};e.IfcRelReferencedInSpatialStructure=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatedElements=o,this.RelatingStructure=n,this.type=1245217292}};e.IfcRelSequence=class extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingProcess=o,this.RelatedProcess=n,this.TimeLag=a,this.SequenceType=l,this.UserDefinedSequenceType=h,this.type=4122056220}};e.IfcRelServicesBuildings=class extends en{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSystem=o,this.RelatedBuildings=n,this.type=366585022}};class nn extends en{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.type=3451746338}}e.IfcRelSpaceBoundary=nn;class an extends nn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.type=3523091289}}e.IfcRelSpaceBoundary1stLevel=an;e.IfcRelSpaceBoundary2ndLevel=class extends an{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingSpace=o,this.RelatedBuildingElement=n,this.ConnectionGeometry=a,this.PhysicalOrVirtualBoundary=l,this.InternalOrExternalBoundary=h,this.ParentBoundary=c,this.CorrespondingBoundary=A,this.type=1521410863}};e.IfcRelVoidsElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingBuildingElement=o,this.RelatedOpeningElement=n,this.type=1401173127}};e.IfcReparametrisedCompositeCurveSegment=class extends bo{constructor(e,t,s,i,r){super(e,t,s,i),this.Transition=t,this.SameSense=s,this.ParentCurve=i,this.ParamLength=r,this.type=816062949}};class ln extends jo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.type=2914609552}}e.IfcResource=ln;class hn extends po{constructor(e,t,s,i,r){super(e,t,s),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.type=1856042241}}e.IfcRevolvedAreaSolid=hn;e.IfcRevolvedAreaSolidTapered=class extends hn{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.SweptArea=t,this.Position=s,this.Axis=i,this.Angle=r,this.EndSweptArea=o,this.type=3243963512}};e.IfcRightCircularCone=class extends xo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.BottomRadius=i,this.type=4158566097}};e.IfcRightCircularCylinder=class extends xo{constructor(e,t,s,i){super(e,t),this.Position=t,this.Height=s,this.Radius=i,this.type=3626867408}};class cn extends ho{constructor(e,t,s){super(e),this.Directrix=t,this.CrossSections=s,this.type=1862484736}}e.IfcSectionedSolid=cn;e.IfcSectionedSolidHorizontal=class extends cn{constructor(e,t,s,i){super(e,t,s),this.Directrix=t,this.CrossSections=s,this.CrossSectionPositions=i,this.type=1290935644}};e.IfcSectionedSurface=class extends uo{constructor(e,t,s,i){super(e),this.Directrix=t,this.CrossSectionPositions=s,this.CrossSections=i,this.type=1356537516}};e.IfcSimplePropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.TemplateType=o,this.PrimaryMeasureType=n,this.SecondaryMeasureType=a,this.Enumerators=l,this.PrimaryUnit=h,this.SecondaryUnit=c,this.Expression=A,this.AccessState=u,this.type=3663146110}};class An extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=1412071761}}e.IfcSpatialElement=An;class un extends vo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=710998568}}e.IfcSpatialElementType=un;class pn extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=2706606064}}e.IfcSpatialStructureElement=pn;class dn extends un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893378262}}e.IfcSpatialStructureElementType=dn;e.IfcSpatialZone=class extends An{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=463610769}};e.IfcSpatialZoneType=class extends un{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=2481509218}};e.IfcSphere=class extends xo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=451544542}};e.IfcSphericalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=4015995234}};class fn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2735484536}}e.IfcSpiral=fn;class En extends Xo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3544373492}}e.IfcStructuralActivity=En;class mn extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3136571912}}e.IfcStructuralItem=mn;class yn extends mn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=530289379}}e.IfcStructuralMember=yn;class gn extends En{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=3689010777}}e.IfcStructuralReaction=gn;class In extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=3979015343}}e.IfcStructuralSurfaceMember=In;e.IfcStructuralSurfaceMemberVarying=class extends In{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Thickness=h,this.type=2218152070}};e.IfcStructuralSurfaceReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=603775116}};e.IfcSubContractResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4095615324}};class vn extends Bo{constructor(e,t,s,i){super(e),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=699246055}}e.IfcSurfaceCurve=vn;e.IfcSurfaceCurveSweptAreaSolid=class extends Fo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.ReferenceSurface=n,this.type=2028607225}};e.IfcSurfaceOfLinearExtrusion=class extends Eo{constructor(e,t,s,i,r){super(e,t,s),this.SweptCurve=t,this.Position=s,this.ExtrudedDirection=i,this.Depth=r,this.type=2809605785}};e.IfcSurfaceOfRevolution=class extends Eo{constructor(e,t,s,i){super(e,t,s),this.SweptCurve=t,this.Position=s,this.AxisPosition=i,this.type=4124788165}};e.IfcSystemFurnitureElementType=class extends Go{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1580310250}};e.IfcTask=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Status=l,this.WorkMethod=h,this.IsMilestone=c,this.Priority=A,this.TaskTime=u,this.PredefinedType=p,this.type=3473067441}};e.IfcTaskType=class extends Io{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ProcessType=h,this.PredefinedType=c,this.WorkMethod=A,this.type=3206491090}};class Tn extends mo{constructor(e,t,s){super(e),this.Coordinates=t,this.Closed=s,this.type=2387106220}}e.IfcTessellatedFaceSet=Tn;e.IfcThirdOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o){super(e,t),this.Position=t,this.CubicTerm=s,this.QuadraticTerm=i,this.LinearTerm=r,this.ConstantTerm=o,this.type=782932809}};e.IfcToroidalSurface=class extends Lo{constructor(e,t,s,i){super(e,t),this.Position=t,this.MajorRadius=s,this.MinorRadius=i,this.type=1935646853}};class _n extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3665877780}}e.IfcTransportationDeviceType=_n;class Rn extends Tn{constructor(e,t,s,i,r,o){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.type=2916149573}}e.IfcTriangulatedFaceSet=Rn;e.IfcTriangulatedIrregularNetwork=class extends Rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.Coordinates=t,this.Closed=s,this.Normals=i,this.CoordIndex=r,this.PnIndex=o,this.Flags=n,this.type=1229763772}};e.IfcVehicleType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3651464721}};e.IfcWindowLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.TransomThickness=a,this.MullionThickness=l,this.FirstTransomOffset=h,this.SecondTransomOffset=c,this.FirstMullionOffset=A,this.SecondMullionOffset=u,this.ShapeAspectStyle=p,this.LiningOffset=d,this.LiningToPanelOffsetX=f,this.LiningToPanelOffsetY=E,this.type=336235671}};e.IfcWindowPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=512836454}};class Pn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.type=2296667514}}e.IfcActor=Pn;class Dn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=1635779807}}e.IfcAdvancedBrep=Dn;e.IfcAdvancedBrepWithVoids=class extends Dn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=2603310189}};e.IfcAnnotation=class extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=1674181508}};class Nn extends Ro{constructor(e,t,s,i,r,o,n,a){super(e),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.type=2887950389}}e.IfcBSplineSurface=Nn;class Cn extends Nn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.type=167062518}}e.IfcBSplineSurfaceWithKnots=Cn;e.IfcBlock=class extends xo{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.XLength=s,this.YLength=i,this.ZLength=r,this.type=1334484129}};e.IfcBooleanClippingResult=class extends _o{constructor(e,t,s,i){super(e,t,s,i),this.Operator=t,this.FirstOperand=s,this.SecondOperand=i,this.type=3649129432}};class On extends Bo{constructor(e){super(e),this.type=1260505505}}e.IfcBoundedCurve=On;e.IfcBuildingStorey=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.Elevation=c,this.type=3124254112}};class bn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1626504194}}e.IfcBuiltElementType=bn;e.IfcChimneyType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2197970202}};e.IfcCircleHollowProfileDef=class extends Oo{constructor(e,t,s,i,r,o){super(e,t,s,i,r),this.ProfileType=t,this.ProfileName=s,this.Position=i,this.Radius=r,this.WallThickness=o,this.type=2937912522}};e.IfcCivilElementType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3893394355}};e.IfcClothoid=class extends fn{constructor(e,t,s){super(e,t),this.Position=t,this.ClothoidConstant=s,this.type=3497074424}};e.IfcColumnType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=300633059}};e.IfcComplexPropertyTemplate=class extends Zo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.UsageName=o,this.TemplateType=n,this.HasPropertyTemplates=a,this.type=3875453745}};class Sn extends On{constructor(e,t,s){super(e),this.Segments=t,this.SelfIntersect=s,this.type=3732776249}}e.IfcCompositeCurve=Sn;class wn extends Sn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=15328376}}e.IfcCompositeCurveOnSurface=wn;class xn extends Bo{constructor(e,t){super(e),this.Position=t,this.type=2510884976}}e.IfcConic=xn;e.IfcConstructionEquipmentResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=2185764099}};e.IfcConstructionMaterialResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=4105962743}};e.IfcConstructionProductResourceType=class extends So{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.Identification=a,this.LongDescription=l,this.ResourceType=h,this.BaseCosts=c,this.BaseQuantity=A,this.PredefinedType=u,this.type=1525564444}};class Bn extends ln{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.type=2559216714}}e.IfcConstructionResource=Bn;class Fn extends jo{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.type=3293443760}}e.IfcControl=Fn;e.IfcCosineSpiral=class extends fn{constructor(e,t,s,i){super(e,t),this.Position=t,this.CosineTerm=s,this.ConstantTerm=i,this.type=2000195564}};e.IfcCostItem=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.CostValues=l,this.CostQuantities=h,this.type=3895139033}};e.IfcCostSchedule=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.SubmittedOn=h,this.UpdateDate=c,this.type=1419761937}};e.IfcCourseType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4189326743}};e.IfcCoveringType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1916426348}};e.IfcCrewResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3295246426}};e.IfcCurtainWallType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1457835157}};e.IfcCylindricalSurface=class extends Lo{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=1213902940}};class Mn extends bn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1306400036}}e.IfcDeepFoundationType=Mn;e.IfcDirectrixDerivedReferenceSweptAreaSolid=class extends Ho{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o,n),this.SweptArea=t,this.Position=s,this.Directrix=i,this.StartParam=r,this.EndParam=o,this.FixedReference=n,this.type=4234616927}};class Ln extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3256556792}}e.IfcDistributionElementType=Ln;class Un extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3849074793}}e.IfcDistributionFlowElementType=Un;e.IfcDoorLiningProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.LiningDepth=o,this.LiningThickness=n,this.ThresholdDepth=a,this.ThresholdThickness=l,this.TransomThickness=h,this.TransomOffset=c,this.LiningOffset=A,this.ThresholdOffset=u,this.CasingThickness=p,this.CasingDepth=d,this.ShapeAspectStyle=f,this.LiningToPanelOffsetX=E,this.LiningToPanelOffsetY=m,this.type=2963535650}};e.IfcDoorPanelProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.PanelDepth=o,this.PanelOperation=n,this.PanelWidth=a,this.PanelPosition=l,this.ShapeAspectStyle=h,this.type=1714330368}};e.IfcDoorType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.OperationType=A,this.ParameterTakesPrecedence=u,this.UserDefinedOperationType=p,this.type=2323601079}};e.IfcDraughtingPreDefinedColour=class extends Wo{constructor(e,t){super(e,t),this.Name=t,this.type=445594917}};e.IfcDraughtingPreDefinedCurveFont=class extends zo{constructor(e,t){super(e,t),this.Name=t,this.type=4006246654}};class Hn extends Xo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1758889154}}e.IfcElement=Hn;e.IfcElementAssembly=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.AssemblyPlace=h,this.PredefinedType=c,this.type=4123344466}};e.IfcElementAssemblyType=class extends Mo{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2397081782}};class Gn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1623761950}}e.IfcElementComponent=Gn;class kn extends Mo{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2590856083}}e.IfcElementComponentType=kn;e.IfcEllipse=class extends xn{constructor(e,t,s,i){super(e,t),this.Position=t,this.SemiAxis1=s,this.SemiAxis2=i,this.type=1704287377}};class Vn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2107101300}}e.IfcEnergyConversionDeviceType=Vn;e.IfcEngineType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=132023988}};e.IfcEvaporativeCoolerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3174744832}};e.IfcEvaporatorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3390157468}};e.IfcEvent=class extends Yo{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.EventTriggerType=h,this.UserDefinedEventTriggerType=c,this.EventOccurenceTime=A,this.type=4148101412}};class jn extends An{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.type=2853485674}}e.IfcExternalSpatialStructureElement=jn;class Qn extends Vo{constructor(e,t){super(e,t),this.Outer=t,this.type=807026263}}e.IfcFacetedBrep=Qn;e.IfcFacetedBrepWithVoids=class extends Qn{constructor(e,t,s){super(e,t),this.Outer=t,this.Voids=s,this.type=3737207727}};class Wn extends pn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.type=24185140}}e.IfcFacility=Wn;class zn extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.type=1310830890}}e.IfcFacilityPart=zn;e.IfcFacilityPartCommon=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=4228831410}};e.IfcFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=647756555}};e.IfcFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2489546625}};class Kn extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2827207264}}e.IfcFeatureElement=Kn;class Yn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2143335405}}e.IfcFeatureElementAddition=Yn;class Xn extends Kn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1287392070}}e.IfcFeatureElementSubtraction=Xn;class Zn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3907093117}}e.IfcFlowControllerType=Zn;class qn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3198132628}}e.IfcFlowFittingType=qn;e.IfcFlowMeterType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3815607619}};class Jn extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1482959167}}e.IfcFlowMovingDeviceType=Jn;class $n extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1834744321}}e.IfcFlowSegmentType=$n;class ea extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=1339347760}}e.IfcFlowStorageDeviceType=ea;class ta extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2297155007}}e.IfcFlowTerminalType=ta;class sa extends Un{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=3009222698}}e.IfcFlowTreatmentDeviceType=sa;e.IfcFootingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1893162501}};class ia extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=263784265}}e.IfcFurnishingElement=ia;e.IfcFurniture=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1509553395}};e.IfcGeographicElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3493046030}};class ra extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4230923436}}e.IfcGeotechnicalElement=ra;e.IfcGeotechnicalStratum=class extends ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1594536857}};e.IfcGradientCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=2898700619}};class oa extends jo{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2706460486}}e.IfcGroup=oa;e.IfcHeatExchangerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1251058090}};e.IfcHumidifierType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1806887404}};e.IfcImpactProtectionDevice=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2568555532}};e.IfcImpactProtectionDeviceType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3948183225}};e.IfcIndexedPolyCurve=class extends On{constructor(e,t,s,i){super(e),this.Points=t,this.Segments=s,this.SelfIntersect=i,this.type=2571569899}};e.IfcInterceptorType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3946677679}};e.IfcIntersectionCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=3113134337}};e.IfcInventory=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.Jurisdiction=a,this.ResponsiblePersons=l,this.LastUpdateDate=h,this.CurrentValue=c,this.OriginalValue=A,this.type=2391368822}};e.IfcJunctionBoxType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4288270099}};e.IfcKerbType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.Mountable=c,this.type=679976338}};e.IfcLaborResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3827777499}};e.IfcLampType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1051575348}};e.IfcLightFixtureType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1161773419}};class na extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=2176059722}}e.IfcLinearElement=na;e.IfcLiquidTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1770583370}};e.IfcMarineFacility=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=525669439}};e.IfcMarinePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=976884017}};e.IfcMechanicalFastener=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NominalDiameter=h,this.NominalLength=c,this.PredefinedType=A,this.type=377706215}};e.IfcMechanicalFastenerType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.NominalLength=u,this.type=2108223431}};e.IfcMedicalDeviceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1114901282}};e.IfcMemberType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3181161470}};e.IfcMobileTelecommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1950438474}};e.IfcMooringDeviceType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=710110818}};e.IfcMotorConnectionType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=977012517}};e.IfcNavigationElementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=506776471}};e.IfcOccupant=class extends Pn{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheActor=n,this.PredefinedType=a,this.type=4143007308}};e.IfcOpeningElement=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3588315303}};e.IfcOutletType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2837617999}};e.IfcPavementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=514975943}};e.IfcPerformanceHistory=class extends Fn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LifeCyclePhase=a,this.PredefinedType=l,this.type=2382730787}};e.IfcPermeableCoveringProperties=class extends Ko{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.OperationType=o,this.PanelPosition=n,this.FrameDepth=a,this.FrameThickness=l,this.ShapeAspectStyle=h,this.type=3566463478}};e.IfcPermit=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3327091369}};e.IfcPileType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1158309216}};e.IfcPipeFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=804291784}};e.IfcPipeSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4231323485}};e.IfcPlateType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4017108033}};e.IfcPolygonalFaceSet=class extends Tn{constructor(e,t,s,i,r){super(e,t,s),this.Coordinates=t,this.Closed=s,this.Faces=i,this.PnIndex=r,this.type=2839578677}};e.IfcPolyline=class extends On{constructor(e,t){super(e),this.Points=t,this.type=3724593414}};class aa extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=3740093272}}e.IfcPort=aa;class la extends Xo{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1946335990}}e.IfcPositioningElement=la;e.IfcProcedure=class extends Yo{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.PredefinedType=l,this.type=2744685151}};e.IfcProjectOrder=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=2904328755}};e.IfcProjectionElement=class extends Yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3651124850}};e.IfcProtectiveDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1842657554}};e.IfcPumpType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2250791053}};e.IfcRailType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1763565496}};e.IfcRailingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2893384427}};e.IfcRailway=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=3992365140}};e.IfcRailwayPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=1891881377}};e.IfcRampFlightType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2324767716}};e.IfcRampType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1469900589}};e.IfcRationalBSplineSurfaceWithKnots=class extends Cn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.UDegree=t,this.VDegree=s,this.ControlPointsList=i,this.SurfaceForm=r,this.UClosed=o,this.VClosed=n,this.SelfIntersect=a,this.UMultiplicities=l,this.VMultiplicities=h,this.UKnots=c,this.VKnots=A,this.KnotSpec=u,this.WeightsData=p,this.type=683857671}};e.IfcReferent=class extends la{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=4021432810}};class ha extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.type=3027567501}}e.IfcReinforcingElement=ha;class ca extends kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=964333572}}e.IfcReinforcingElementType=ca;e.IfcReinforcingMesh=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.MeshLength=c,this.MeshWidth=A,this.LongitudinalBarNominalDiameter=u,this.TransverseBarNominalDiameter=p,this.LongitudinalBarCrossSectionArea=d,this.TransverseBarCrossSectionArea=f,this.LongitudinalBarSpacing=E,this.TransverseBarSpacing=m,this.PredefinedType=y,this.type=2320036040}};e.IfcReinforcingMeshType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m,y,g,I){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.MeshLength=A,this.MeshWidth=u,this.LongitudinalBarNominalDiameter=p,this.TransverseBarNominalDiameter=d,this.LongitudinalBarCrossSectionArea=f,this.TransverseBarCrossSectionArea=E,this.LongitudinalBarSpacing=m,this.TransverseBarSpacing=y,this.BendingShapeCode=g,this.BendingParameters=I,this.type=2310774935}};e.IfcRelAdheresToElement=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingElement=o,this.RelatedSurfaceFeatures=n,this.type=3818125796}};e.IfcRelAggregates=class extends rn{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.RelatingObject=o,this.RelatedObjects=n,this.type=160246688}};e.IfcRoad=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=146592293}};e.IfcRoadPart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=550521510}};e.IfcRoofType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2781568857}};e.IfcSanitaryTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1768891740}};e.IfcSeamCurve=class extends vn{constructor(e,t,s,i){super(e,t,s,i),this.Curve3D=t,this.AssociatedGeometry=s,this.MasterRepresentation=i,this.type=2157484638}};e.IfcSecondOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.QuadraticTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=3649235739}};e.IfcSegmentedReferenceCurve=class extends Sn{constructor(e,t,s,i,r){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.BaseCurve=i,this.EndPoint=r,this.type=544395925}};e.IfcSeventhOrderPolynomialSpiral=class extends fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t),this.Position=t,this.SepticTerm=s,this.SexticTerm=i,this.QuinticTerm=r,this.QuarticTerm=o,this.CubicTerm=n,this.QuadraticTerm=a,this.LinearTerm=l,this.ConstantTerm=h,this.type=1027922057}};e.IfcShadingDeviceType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4074543187}};e.IfcSign=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=33720170}};e.IfcSignType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3599934289}};e.IfcSignalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1894708472}};e.IfcSineSpiral=class extends fn{constructor(e,t,s,i,r){super(e,t),this.Position=t,this.SineTerm=s,this.LinearTerm=i,this.ConstantTerm=r,this.type=42703149}};e.IfcSite=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.RefLatitude=c,this.RefLongitude=A,this.RefElevation=u,this.LandTitleNumber=p,this.SiteAddress=d,this.type=4097777520}};e.IfcSlabType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2533589738}};e.IfcSolarDeviceType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1072016465}};e.IfcSpace=class extends pn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.ElevationWithFlooring=A,this.type=3856911033}};e.IfcSpaceHeaterType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1305183839}};e.IfcSpaceType=class extends dn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.LongName=A,this.type=3812236995}};e.IfcStackTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3112655638}};e.IfcStairFlightType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1039846685}};e.IfcStairType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=338393293}};class Aa extends En{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=682877961}}e.IfcStructuralAction=Aa;class ua extends mn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1179482911}}e.IfcStructuralConnection=ua;class pa extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1004757350}}e.IfcStructuralCurveAction=pa;e.IfcStructuralCurveConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.AxisDirection=h,this.type=4243806635}};class da extends yn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=214636428}}e.IfcStructuralCurveMember=da;e.IfcStructuralCurveMemberVarying=class extends da{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.Axis=h,this.type=2445595289}};e.IfcStructuralCurveReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.PredefinedType=c,this.type=2757150158}};e.IfcStructuralLinearAction=class extends pa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1807405624}};class fa extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.type=1252848954}}e.IfcStructuralLoadGroup=fa;e.IfcStructuralPointAction=class extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.type=2082059205}};e.IfcStructuralPointConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.ConditionCoordinateSystem=h,this.type=734778138}};e.IfcStructuralPointReaction=class extends gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.type=1235345126}};e.IfcStructuralResultGroup=class extends oa{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.TheoryType=n,this.ResultForLoadGroup=a,this.IsLinear=l,this.type=2986769608}};class Ea extends Aa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=3657597509}}e.IfcStructuralSurfaceAction=Ea;e.IfcStructuralSurfaceConnection=class extends ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedCondition=l,this.type=1975003073}};e.IfcSubContractResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=148013059}};e.IfcSurfaceFeature=class extends Kn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3101698114}};e.IfcSwitchingDeviceType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2315554128}};class ma extends oa{constructor(e,t,s,i,r,o){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.type=2254336722}}e.IfcSystem=ma;e.IfcSystemFurnitureElement=class extends ia{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=413509423}};e.IfcTankType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=5716631}};e.IfcTendon=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E,m){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.TensionForce=p,this.PreStress=d,this.FrictionCoefficient=f,this.AnchorageSlip=E,this.MinCurvatureRadius=m,this.type=3824725483}};e.IfcTendonAnchor=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=2347447852}};e.IfcTendonAnchorType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3081323446}};e.IfcTendonConduit=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.PredefinedType=c,this.type=3663046924}};e.IfcTendonConduitType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2281632017}};e.IfcTendonType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.SheathDiameter=p,this.type=2415094496}};e.IfcTrackElementType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=618700268}};e.IfcTransformerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1692211062}};e.IfcTransportElementType=class extends _n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2097647324}};class ya extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1953115116}}e.IfcTransportationDevice=ya;e.IfcTrimmedCurve=class extends On{constructor(e,t,s,i,r,o){super(e),this.BasisCurve=t,this.Trim1=s,this.Trim2=i,this.SenseAgreement=r,this.MasterRepresentation=o,this.type=3593883385}};e.IfcTubeBundleType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1600972822}};e.IfcUnitaryEquipmentType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1911125066}};e.IfcValveType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=728799441}};e.IfcVehicle=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=840318589}};e.IfcVibrationDamper=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1530820697}};e.IfcVibrationDamperType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3956297820}};e.IfcVibrationIsolator=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391383451}};e.IfcVibrationIsolatorType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3313531582}};e.IfcVirtualElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2769231204}};e.IfcVoidingFeature=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=926996030}};e.IfcWallType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1898987631}};e.IfcWasteTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1133259667}};e.IfcWindowType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.PartitioningType=A,this.ParameterTakesPrecedence=u,this.UserDefinedPartitioningType=p,this.type=4009809668}};e.IfcWorkCalendar=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.WorkingTimes=a,this.ExceptionTimes=l,this.PredefinedType=h,this.type=4088093105}};class ga extends Fn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.type=1028945134}}e.IfcWorkControl=ga;e.IfcWorkPlan=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=4218914973}};e.IfcWorkSchedule=class extends ga{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h,c,A,u,p),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.CreationDate=a,this.Creators=l,this.Purpose=h,this.Duration=c,this.TotalFloat=A,this.StartTime=u,this.FinishTime=p,this.PredefinedType=d,this.type=3342526732}};e.IfcZone=class extends ma{constructor(e,t,s,i,r,o,n){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.type=1033361043}};e.IfcActionRequest=class extends Fn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.PredefinedType=a,this.Status=l,this.LongDescription=h,this.type=3821786052}};e.IfcAirTerminalBoxType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1411407467}};e.IfcAirTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3352864051}};e.IfcAirToAirHeatRecoveryType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1871374353}};e.IfcAlignmentCant=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.RailHeadDistance=l,this.type=4266260250}};e.IfcAlignmentHorizontal=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1545765605}};e.IfcAlignmentSegment=class extends na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.DesignParameters=l,this.type=317615605}};e.IfcAlignmentVertical=class extends na{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1662888072}};e.IfcAsset=class extends oa{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.OriginalValue=a,this.CurrentValue=l,this.TotalReplacementCost=h,this.Owner=c,this.User=A,this.ResponsiblePerson=u,this.IncorporationDate=p,this.DepreciatedValue=d,this.type=3460190687}};e.IfcAudioVisualApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1532957894}};class Ia extends On{constructor(e,t,s,i,r,o){super(e),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.type=1967976161}}e.IfcBSplineCurve=Ia;class va extends Ia{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.type=2461110595}}e.IfcBSplineCurveWithKnots=va;e.IfcBeamType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=819618141}};e.IfcBearingType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3649138523}};e.IfcBoilerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=231477066}};class Ta extends wn{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=1136057603}}e.IfcBoundaryCurve=Ta;e.IfcBridge=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.PredefinedType=c,this.type=644574406}};e.IfcBridgePart=class extends zn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.UsageType=c,this.PredefinedType=A,this.type=963979645}};e.IfcBuilding=class extends Wn{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.CompositionType=h,this.ElevationOfRefHeight=c,this.ElevationOfTerrain=A,this.BuildingAddress=u,this.type=4031249490}};e.IfcBuildingElementPart=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2979338954}};e.IfcBuildingElementPartType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=39481116}};e.IfcBuildingElementProxyType=class extends bn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1909888760}};e.IfcBuildingSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=1177604601}};class _a extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1876633798}}e.IfcBuiltElement=_a;e.IfcBuiltSystem=class extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.LongName=a,this.type=3862327254}};e.IfcBurnerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2188180465}};e.IfcCableCarrierFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=395041908}};e.IfcCableCarrierSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3293546465}};e.IfcCableFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2674252688}};e.IfcCableSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1285652485}};e.IfcCaissonFoundationType=class extends Mn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3203706013}};e.IfcChillerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2951183804}};e.IfcChimney=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3296154744}};e.IfcCircle=class extends xn{constructor(e,t,s){super(e,t),this.Position=t,this.Radius=s,this.type=2611217952}};e.IfcCivilElement=class extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1677625105}};e.IfcCoilType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2301859152}};e.IfcColumn=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=843113511}};e.IfcCommunicationsApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=400855858}};e.IfcCompressorType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3850581409}};e.IfcCondenserType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2816379211}};e.IfcConstructionEquipmentResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=3898045240}};e.IfcConstructionMaterialResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=1060000209}};e.IfcConstructionProductResource=class extends Bn{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.Identification=n,this.LongDescription=a,this.Usage=l,this.BaseCosts=h,this.BaseQuantity=c,this.PredefinedType=A,this.type=488727124}};e.IfcConveyorSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2940368186}};e.IfcCooledBeamType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=335055490}};e.IfcCoolingTowerType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2954562838}};e.IfcCourse=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1502416096}};e.IfcCovering=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1973544240}};e.IfcCurtainWall=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3495092785}};e.IfcDamperType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3961806047}};class Ra extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3426335179}}e.IfcDeepFoundation=Ra;e.IfcDiscreteAccessory=class extends Gn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1335981549}};e.IfcDiscreteAccessoryType=class extends kn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2635815018}};e.IfcDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=479945903}};e.IfcDistributionChamberElementType=class extends Un{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1599208980}};class Pa extends Ln{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.type=2063403501}}e.IfcDistributionControlElementType=Pa;class Da extends Hn{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1945004755}}e.IfcDistributionElement=Da;class Na extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3040386961}}e.IfcDistributionFlowElement=Na;e.IfcDistributionPort=class extends aa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.FlowDirection=l,this.PredefinedType=h,this.SystemType=c,this.type=3041715199}};class Ca extends ma{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=3205830791}}e.IfcDistributionSystem=Ca;e.IfcDoor=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.OperationType=u,this.UserDefinedOperationType=p,this.type=395920057}};e.IfcDuctFittingType=class extends qn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=869906466}};e.IfcDuctSegmentType=class extends $n{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3760055223}};e.IfcDuctSilencerType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2030761528}};e.IfcEarthworksCut=class extends Xn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3071239417}};class Oa extends _a{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1077100507}}e.IfcEarthworksElement=Oa;e.IfcEarthworksFill=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3376911765}};e.IfcElectricApplianceType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=663422040}};e.IfcElectricDistributionBoardType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2417008758}};e.IfcElectricFlowStorageDeviceType=class extends ea{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3277789161}};e.IfcElectricFlowTreatmentDeviceType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2142170206}};e.IfcElectricGeneratorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1534661035}};e.IfcElectricMotorType=class extends Vn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1217240411}};e.IfcElectricTimeControlType=class extends Zn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=712377611}};class ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1658829314}}e.IfcEnergyConversionDevice=ba;e.IfcEngine=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2814081492}};e.IfcEvaporativeCooler=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3747195512}};e.IfcEvaporator=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=484807127}};e.IfcExternalSpatialElement=class extends jn{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.LongName=l,this.PredefinedType=h,this.type=1209101575}};e.IfcFanType=class extends Jn{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=346874300}};e.IfcFilterType=class extends sa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1810631287}};e.IfcFireSuppressionTerminalType=class extends ta{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4222183408}};class Sa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2058353004}}e.IfcFlowController=Sa;class wa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=4278956645}}e.IfcFlowFitting=wa;e.IfcFlowInstrumentType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=4037862832}};e.IfcFlowMeter=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2188021234}};class xa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3132237377}}e.IfcFlowMovingDevice=xa;class Ba extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=987401354}}e.IfcFlowSegment=Ba;class Fa extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=707683696}}e.IfcFlowStorageDevice=Fa;class Ma extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2223149337}}e.IfcFlowTerminal=Ma;class La extends Na{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3508470533}}e.IfcFlowTreatmentDevice=La;e.IfcFooting=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=900683007}};class Ua extends ra{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2713699986}}e.IfcGeotechnicalAssembly=Ua;e.IfcGrid=class extends la{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.UAxes=l,this.VAxes=h,this.WAxes=c,this.PredefinedType=A,this.type=3009204131}};e.IfcHeatExchanger=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3319311131}};e.IfcHumidifier=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2068733104}};e.IfcInterceptor=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4175244083}};e.IfcJunctionBox=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2176052936}};e.IfcKerb=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.Mountable=h,this.type=2696325953}};e.IfcLamp=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=76236018}};e.IfcLightFixture=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=629592764}};class Ha extends la{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.type=1154579445}}e.IfcLinearPositioningElement=Ha;e.IfcLiquidTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1638804497}};e.IfcMedicalDevice=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1437502449}};e.IfcMember=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1073191201}};e.IfcMobileTelecommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2078563270}};e.IfcMooringDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=234836483}};e.IfcMotorConnection=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2474470126}};e.IfcNavigationElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2182337498}};e.IfcOuterBoundaryCurve=class extends Ta{constructor(e,t,s){super(e,t,s),this.Segments=t,this.SelfIntersect=s,this.type=144952367}};e.IfcOutlet=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3694346114}};e.IfcPavement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1383356374}};e.IfcPile=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.ConstructionType=c,this.type=1687234759}};e.IfcPipeFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=310824031}};e.IfcPipeSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3612865200}};e.IfcPlate=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3171933400}};e.IfcProtectiveDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=738039164}};e.IfcProtectiveDeviceTrippingUnitType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=655969474}};e.IfcPump=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=90941305}};e.IfcRail=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3290496277}};e.IfcRailing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2262370178}};e.IfcRamp=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3024970846}};e.IfcRampFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3283111854}};e.IfcRationalBSplineCurveWithKnots=class extends va{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.Degree=t,this.ControlPointsList=s,this.CurveForm=i,this.ClosedCurve=r,this.SelfIntersect=o,this.KnotMultiplicities=n,this.Knots=a,this.KnotSpec=l,this.WeightsData=h,this.type=1232101972}};e.IfcReinforcedSoil=class extends Oa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3798194928}};e.IfcReinforcingBar=class extends ha{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.SteelGrade=h,this.NominalDiameter=c,this.CrossSectionArea=A,this.BarLength=u,this.PredefinedType=p,this.BarSurface=d,this.type=979691226}};e.IfcReinforcingBarType=class extends ca{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p,d,f,E){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.NominalDiameter=A,this.CrossSectionArea=u,this.BarLength=p,this.BarSurface=d,this.BendingShapeCode=f,this.BendingParameters=E,this.type=2572171363}};e.IfcRoof=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2016517767}};e.IfcSanitaryTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3053780830}};e.IfcSensorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=1783015770}};e.IfcShadingDevice=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1329646415}};e.IfcSignal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=991950508}};e.IfcSlab=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1529196076}};e.IfcSolarDevice=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3420628829}};e.IfcSpaceHeater=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1999602285}};e.IfcStackTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1404847402}};e.IfcStair=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=331165859}};e.IfcStairFlight=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.NumberOfRisers=h,this.NumberOfTreads=c,this.RiserHeight=A,this.TreadLength=u,this.PredefinedType=p,this.type=4252922144}};e.IfcStructuralAnalysisModel=class extends ma{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.OrientationOf2DPlane=a,this.LoadedBy=l,this.HasResults=h,this.SharedPlacement=c,this.type=2515109513}};e.IfcStructuralLoadCase=class extends fa{constructor(e,t,s,i,r,o,n,a,l,h,c,A){super(e,t,s,i,r,o,n,a,l,h,c),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.PredefinedType=n,this.ActionType=a,this.ActionSource=l,this.Coefficient=h,this.Purpose=c,this.SelfWeightCoefficients=A,this.type=385403989}};e.IfcStructuralPlanarAction=class extends Ea{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u){super(e,t,s,i,r,o,n,a,l,h,c,A,u),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.AppliedLoad=l,this.GlobalOrLocal=h,this.DestabilizingLoad=c,this.ProjectedOrTrue=A,this.PredefinedType=u,this.type=1621171031}};e.IfcSwitchingDevice=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1162798199}};e.IfcTank=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=812556717}};e.IfcTrackElement=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3425753595}};e.IfcTransformer=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3825984169}};e.IfcTransportElement=class extends ya{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1620046519}};e.IfcTubeBundle=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3026737570}};e.IfcUnitaryControlElementType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3179687236}};e.IfcUnitaryEquipment=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4292641817}};e.IfcValve=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4207607924}};class Ga extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2391406946}}e.IfcWall=Ga;e.IfcWallStandardCase=class extends Ga{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3512223829}};e.IfcWasteTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4237592921}};e.IfcWindow=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h,c,A,u,p){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.OverallHeight=h,this.OverallWidth=c,this.PredefinedType=A,this.PartitioningType=u,this.UserDefinedPartitioningType=p,this.type=3304561284}};e.IfcActuatorType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=2874132201}};e.IfcAirTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1634111441}};e.IfcAirTerminalBox=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=177149247}};e.IfcAirToAirHeatRecovery=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2056796094}};e.IfcAlarmType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=3001207471}};e.IfcAlignment=class extends Ha{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.PredefinedType=l,this.type=325726236}};e.IfcAudioVisualAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=277319702}};e.IfcBeam=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=753842376}};e.IfcBearing=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4196446775}};e.IfcBoiler=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=32344328}};e.IfcBorehole=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=3314249567}};e.IfcBuildingElementProxy=class extends _a{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1095909175}};e.IfcBurner=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2938176219}};e.IfcCableCarrierFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=635142910}};e.IfcCableCarrierSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3758799889}};e.IfcCableFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1051757585}};e.IfcCableSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4217484030}};e.IfcCaissonFoundation=class extends Ra{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3999819293}};e.IfcChiller=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3902619387}};e.IfcCoil=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=639361253}};e.IfcCommunicationsAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3221913625}};e.IfcCompressor=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3571504051}};e.IfcCondenser=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2272882330}};e.IfcControllerType=class extends Pa{constructor(e,t,s,i,r,o,n,a,l,h,c){super(e,t,s,i,r,o,n,a,l,h),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ApplicableOccurrence=o,this.HasPropertySets=n,this.RepresentationMaps=a,this.Tag=l,this.ElementType=h,this.PredefinedType=c,this.type=578613899}};e.IfcConveyorSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3460952963}};e.IfcCooledBeam=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4136498852}};e.IfcCoolingTower=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3640358203}};e.IfcDamper=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4074379575}};e.IfcDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3693000487}};e.IfcDistributionChamberElement=class extends Na{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1052013943}};e.IfcDistributionCircuit=class extends Ca{constructor(e,t,s,i,r,o,n,a){super(e,t,s,i,r,o,n,a),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.LongName=n,this.PredefinedType=a,this.type=562808652}};class ka extends Da{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1062813311}}e.IfcDistributionControlElement=ka;e.IfcDuctFitting=class extends wa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=342316401}};e.IfcDuctSegment=class extends Ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3518393246}};e.IfcDuctSilencer=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1360408905}};e.IfcElectricAppliance=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1904799276}};e.IfcElectricDistributionBoard=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=862014818}};e.IfcElectricFlowStorageDevice=class extends Fa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3310460725}};e.IfcElectricFlowTreatmentDevice=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=24726584}};e.IfcElectricGenerator=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=264262732}};e.IfcElectricMotor=class extends ba{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=402227799}};e.IfcElectricTimeControl=class extends Sa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1003880860}};e.IfcFan=class extends xa{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3415622556}};e.IfcFilter=class extends La{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=819412036}};e.IfcFireSuppressionTerminal=class extends Ma{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=1426591983}};e.IfcFlowInstrument=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=182646315}};e.IfcGeomodel=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=2680139844}};e.IfcGeoslice=class extends Ua{constructor(e,t,s,i,r,o,n,a,l){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.type=1971632696}};e.IfcProtectiveDeviceTrippingUnit=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=2295281155}};e.IfcSensor=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4086658281}};e.IfcUnitaryControlElement=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=630975310}};e.IfcActuator=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=4288193352}};e.IfcAlarm=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=3087945054}};e.IfcController=class extends ka{constructor(e,t,s,i,r,o,n,a,l,h){super(e,t,s,i,r,o,n,a,l),this.GlobalId=t,this.OwnerHistory=s,this.Name=i,this.Description=r,this.ObjectType=o,this.ObjectPlacement=n,this.Representation=a,this.Tag=l,this.PredefinedType=h,this.type=25142252}}}(AI||(AI={})),(pI=uI||(uI={}))[pI.LOG_LEVEL_DEBUG=0]="LOG_LEVEL_DEBUG",pI[pI.LOG_LEVEL_INFO=1]="LOG_LEVEL_INFO",pI[pI.LOG_LEVEL_WARN=2]="LOG_LEVEL_WARN",pI[pI.LOG_LEVEL_ERROR=3]="LOG_LEVEL_ERROR",pI[pI.LOG_LEVEL_OFF=4]="LOG_LEVEL_OFF","undefined"!=typeof self&&self.crossOriginIsolated)try{fI()}catch(e){EI()}else EI();p.vec2(),p.vec3(),p.vec3(),p.vec3();class gI{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class II{constructor(e,t,s,i){this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:s,this.viewer=e?e.viewer:i,this._children=[],e&&e._children.push(this),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const i=this._eventSubs[e];let r;if(i)for(const s in i)i.hasOwnProperty(s)&&(r=i[s],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(e,t,s){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new gI),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let i=this._eventSubs[e];i||(i={},this._eventSubs[e]=i);const r=this._subIdMap.addItem();i[r]={callback:t,scope:s||this},this._subIdEvents[r]=e;const o=this._events[e];return void 0!==o&&t.call(s||this,o),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._subIdMap.removeItem(e)}}once(e,t,s){const i=this,r=this.on(e,(function(e){i.off(r),t.call(s||this,e)}),s)}log(e){e="[LOG] "+e,window.console.log(e)}warn(e){e="[WARN] "+e,window.console.warn(e)}error(e){e="[ERROR] "+e,window.console.error(e)}_mutexActivation(e){const t=e.length;for(let s=0;s
Default text
',s.appendChild(this._modal),this._modalVisible=!1,this._modal.style.display="hidden"}show(e){this._modalVisible=!0,this._modal.querySelector(".xeokit-busy-modal-message").innerText=e,this._modal.style.display="block"}hide(){this._modalVisible=!1,this._modal.style.display="none"}destroy(){super.destroy(),this._modal&&(this._modal.parentNode.removeChild(this._modal),this._modal=null)}}const TI=p.vec3();class _I extends II{constructor(e,t={}){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.camera;this._modelMementos={},i.eye=[.577,.577,.577],i.look=[0,0,0],i.up=[-1,1,-1],this.bimViewer._modelsExplorer.on("modelLoaded",(e=>{this._saveModelMemento(e)})),this.bimViewer._modelsExplorer.on("modelUnloaded",(e=>{this._destroyModelMemento(e)})),this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.reset(),e.preventDefault()}))}_saveModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;const s=new Ar;s.saveObjects(this.viewer.scene,t,{visible:!0,edges:!0,xrayed:!0,highlighted:!0,selected:!0,clippable:!0,pickable:!0,colorize:!1,opacity:!1}),this._modelMementos[e]=s}_restoreModelMemento(e){const t=this.viewer.metaScene.metaModels[e];if(!t)return;this._modelMementos[e].restoreObjects(this.viewer.scene,t)}_destroyModelMemento(e){delete this._modelMementos[e]}reset(){const e=this.viewer.scene.modelIds;for(var t=0,s=e.length;t{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),s.addEventListener("click",(e=>{this.getEnabled()&&this.fit(),e.preventDefault()}))}fit(){const e=this.viewer.scene,t=e.getAABB(e.visibleObjectIds);this.viewer.cameraFlight.flyTo({aabb:t}),this.viewer.cameraControl.pivotPos=p.getAABB3Center(t,RI)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class DI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement,i=this.viewer.cameraControl,r=t.cameraControlNavModeMediator;i.navMode="orbit",i.followPointer=!0,this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?s.classList.add("active"):s.classList.remove("active")})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e?(i.followPointer=!0,i.pivoting=!1):i.pivoting=!0})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class NI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(s.classList.remove("active"),this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class CI extends II{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.selected=!e.entity.selected)}))):(s.classList.remove("active"),void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),s.addEventListener("click",(e=>{if(this.getEnabled()){this.bimViewer._sectionTool.hideControl();const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}))}}class OI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.scene.on("modelLoaded",(e=>{if(!this._active){const e=this.viewer.metaScene.getObjectIDsByType("IfcSpace");this.viewer.scene.setObjectsCulled(e,!0)}})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e){this._active!==e&&(this._active=e,e?(this._buttonElement.classList.add("active"),this._enterShowSpacesMode(),this.fire("active",this._active)):(this._buttonElement.classList.remove("active"),this._exitShowSpacesMode(),this.fire("active",this._active)))}_enterShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!1)}_exitShowSpacesMode(){const e=this.viewer,t=e.scene,s=e.metaScene.getObjectIDsByType("IfcSpace");t.setObjectsCulled(s,!0)}}class bI extends II{constructor(e,t){super(e)}}const SI=p.AABB3(),wI=p.vec3();class xI extends n{constructor(e={}){if(!e.sectionPlanesPlugin)throw"Missing config: sectionPlanesPlugin";super(y.apply({},e)),this._sectionPlanesPlugin=e.sectionPlanesPlugin,this._viewer=this._sectionPlanesPlugin.viewer,this._onSceneSectionPlaneCreated=this._viewer.scene.on("sectionPlaneCreated",(()=>{this._buildMenu()})),this._onSceneSectionPlaneDestroyed=this._viewer.scene.on("sectionPlaneDestroyed",(()=>{this._buildMenu()})),this._buildMenu()}_buildMenu(){const e=this._sectionPlanesPlugin,t=Object.values(e.sectionPlanes),s=[];for(let i=0,r=t.length;i`${e.viewer.localeService.translate("sectionToolContextMenu.slice")||"Slice"} #`+(i+1),doHoverEnter(t){e.hideControl(),e.showControl(r.id)},doHoverLeave(t){e.hideControl()},items:[[{getTitle:e=>r.active?e.viewer.localeService.translate("sectionToolContextMenu.deactivate")||"Disable":e.viewer.localeService.translate("sectionToolContextMenu.activate")||"Enable",doAction:e=>{r.active=!r.active}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.edit")||"Edit",getEnabled:()=>r.active,doAction:t=>{e.hideControl(),e.showControl(r.id);const s=r.pos;SI.set(this._viewer.scene.aabb),p.getAABB3Center(SI,wI),SI[0]+=s[0]-wI[0],SI[1]+=s[1]-wI[1],SI[2]+=s[2]-wI[2],SI[3]+=s[0]-wI[0],SI[4]+=s[1]-wI[1],SI[5]+=s[2]-wI[2],this._viewer.cameraFlight.flyTo({aabb:SI,fitFOV:65})}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flip")||"Flip",getEnabled:()=>r.active,doAction:e=>{r.flipDir()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.delete")||"Delete",doAction:e=>{r.destroy()}}]]})}this.items=[[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.flipSlices")||"Flip Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.flipSections()}}],[{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.disableAllSlices")||"Disable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.disableSections()}},{getTitle:e=>e.viewer.localeService.translate("sectionToolContextMenu.enableAllSlices")||"Enable all Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.enableSections()}}],s]}destroy(){super.destroy();const e=this._viewer.scene;e.off(this._onSceneSectionPlaneCreated),e.off(this._onSceneSectionPlaneDestroyed)}}class BI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";if(!t.menuButtonElement)throw"Missing config: menuButtonElement";this._buttonElement=t.buttonElement,this._counterElement=t.counterElement,this._menuButtonElement=t.menuButtonElement,this._menuButtonArrowElement=t.menuButtonArrowElement,this._sectionPlanesPlugin=new dg(this.viewer,{}),this._sectionToolContextMenu=new xI({sectionPlanesPlugin:this._sectionPlanesPlugin,hideOnMouseDown:!1,hideOnAction:!1}),this._sectionPlanesPlugin.setOverviewVisible(!1),this.on("enabled",(e=>{e?(this._buttonElement.classList.remove("disabled"),this._counterElement&&this._counterElement.classList.remove("disabled"),this._menuButtonElement.classList.remove("disabled"),this._menuButtonArrowElement.classList.remove("disabled")):(this._buttonElement.classList.add("disabled"),this._counterElement&&this._counterElement.classList.add("disabled"),this._menuButtonElement.classList.add("disabled"),this._menuButtonArrowElement.classList.add("disabled"))})),this.on("active",(e=>{e?(this._buttonElement.classList.add("active"),this._counterElement&&this._counterElement.classList.add("active"),this._menuButtonElement.classList.add("active"),this._menuButtonArrowElement.classList.add("active")):(this._buttonElement.classList.remove("active"),this._counterElement&&this._counterElement.classList.remove("active"),this._menuButtonElement.classList.remove("active"),this._menuButtonArrowElement.classList.remove("active"))})),this.on("active",(e=>{e||this._sectionPlanesPlugin.hideControl()})),this._buttonElement.addEventListener("click",(e=>{if(!this.getEnabled())return;if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)return;const t=this.getActive();this.setActive(!t),e.preventDefault()})),document.addEventListener("mousedown",(e=>{if(!e.target.classList.contains("xeokit-context-menu-item"))if(e.target===this._menuButtonElement||e.target.parentNode===this._menuButtonElement)if(e.preventDefault(),this._sectionToolContextMenu.shown)this._sectionToolContextMenu.hide();else{this._sectionToolContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,sectionTool:this};const e=this._menuButtonElement.getBoundingClientRect();this._sectionToolContextMenu.show(e.left,e.bottom+5)}else this._sectionToolContextMenu.hide()})),this._sectionToolContextMenu.on("shown",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-down"),this._menuButtonArrowElement.classList.add("xeokit-arrow-up")})),this._sectionToolContextMenu.on("hidden",(()=>{this._menuButtonArrowElement.classList.remove("xeokit-arrow-up"),this._menuButtonArrowElement.classList.add("xeokit-arrow-down")})),this.bimViewer.on("reset",(()=>{this.clear(),this.setActive(!1)})),this.viewer.scene.on("sectionPlaneCreated",(()=>{this._updateSectionPlanesCount()})),this.viewer.scene.on("sectionPlaneDestroyed",(()=>{this._updateSectionPlanesCount()})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive()||!this.getEnabled())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:p.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id)}})),this._updateSectionPlanesCount()}_updateSectionPlanesCount(){this._counterElement&&(this._counterElement.innerText=""+this.getNumSections())}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear(),this._updateSectionPlanesCount()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}enableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!0}}disableSections(){const e=this.viewer.scene.sectionPlanes;for(let t in e){e[t].active=!1}}hideControl(){this._sectionPlanesPlugin.hideControl()}destroy(){this._sectionPlanesPlugin.destroy(),this._sectionToolContextMenu.destroy(),super.destroy()}}class FI extends II{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw"Missing config: navCubeCanvasElement";const s=t.navCubeCanvasElement;this._navCube=new ng(this.viewer,{canvasElement:s,fitVisible:!0,color:"#CFCFCF"}),this._navCube.setVisible(this._active),this.on("active",(e=>{this._navCube.setVisible(e)}))}destroy(){this._navCube.destroy(),super.destroy()}}class MI extends n{constructor(e={}){const t=[[{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadModel")||"Load",getEnabled:e=>!e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.loadModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadModel")||"Unload",getEnabled:e=>e.bimViewer.isModelLoaded(e.modelId),doAction:e=>{e.bimViewer.unloadModel(e.modelId)}}]];!!e.enableEditModels&&t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.editModel")||"Edit",getEnabled:e=>!0,doAction:e=>{e.bimViewer.editModel(e.modelId)}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.deleteModel")||"Delete",getEnabled:e=>!0,doAction:e=>{e.bimViewer.deleteModel(e.modelId)}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.loadAllModels")||"Load All",getEnabled:e=>{const t=e.bimViewer,s=t.getModelIds();return t.getLoadedModelIds().length{e.bimViewer.loadAllModels()}},{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.unloadAllModels")||"Unload All",getEnabled:e=>e.bimViewer.getLoadedModelIds().length>0,doAction:e=>{e.bimViewer.unloadAllModels()}}]),t.push([{getTitle:e=>e.viewer.localeService.translate("modelsContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]),super({hideOnAction:e.hideOnAction,context:e.context,items:t})}}const LI=p.vec3();class UI{constructor(e){this._server=e}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,s){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,s)}getMetaModel(e,t,s){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,s)}getXKT(e,t,s){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,s)}}class HI extends II{constructor(e,t){if(super(e,t),!t.modelsTabElement)throw"Missing config: modelsTabElement";if(!t.unloadModelsButtonElement)throw"Missing config: unloadModelsButtonElement";if(!t.modelsElement)throw"Missing config: modelsElement";if(this._enableAddModels=!!t.enableEditModels,this._modelsTabElement=t.modelsTabElement,this._loadModelsButtonElement=t.loadModelsButtonElement,this._unloadModelsButtonElement=t.unloadModelsButtonElement,this._addModelButtonElement=t.addModelButtonElement,this._modelsElement=t.modelsElement,this._modelsTabButtonElement=this._modelsTabElement.querySelector(".xeokit-tab-btn"),!this._modelsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._dataSource=new UI(this.server),this._xktLoader=new oI(this.viewer,{dataSource:this._dataSource}),this._modelsContextMenu=new MI({enableEditModels:t.enableEditModels,hideOnAction:!0}),this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0,this._projectId=null}setObjectColors(e){this._xktLoader.objectDefaults=e}loadProject(e,t,s){this.server.getProject(e,(s=>{this.unloadProject(),this._projectId=e,this._modelsInfo={},this._numModels=0,this._parseProject(s,t),this._numModelsLoaded0&&this._unloadModelsButtonElement.classList.remove("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.remove("disabled")}),(e=>{this.error(e),s&&s(e)}))}_parseProject(e,t){this._buildModelsMenu(e),this._parseViewerConfigs(e),this._parseViewerContent(e,(()=>{this._parseViewerState(e,(()=>{t()}))}))}_buildModelsMenu(e){var t="";const s=e.models||[];this._modelsInfo={},this._numModels=s.length;for(let e=0,i=s.length;e",t+=""+i.name+"",t+=""}this._modelsElement.innerHTML=t;for(let e=0,t=s.length;e{r.checked?this.loadModel(i):this.unloadModel(t.id)})),o.addEventListener("click",(()=>{!!this.viewer.scene.models[i]?this.unloadModel(t.id):this.loadModel(i)})),o.oncontextmenu=e=>{this._modelsContextMenu.context={bimViewer:this.bimViewer,viewer:this.viewer,modelId:i},this._modelsContextMenu.show(e.pageX,e.pageY),e.preventDefault()}}}_parseViewerConfigs(e){const t=e.viewerConfigs;t&&this.bimViewer.setConfigs(t)}_parseViewerContent(e,t){const s=e.viewerContent;s?this._parseModelsLoaded(s,(()=>{t()})):t()}_parseModelsLoaded(e,t){const s=e.modelsLoaded;s&&0!==s.length?this._loadNextModel(s.slice(0),t):t()}_loadNextModel(e,t){if(0===e.length)return void t();const s=e.pop();this.loadModel(s,(()=>{this._loadNextModel(e,t)}),(()=>{this._loadNextModel(e,t)}))}_parseViewerState(e,t){const s=e.viewerState;s?this.bimViewer.setViewerState(s,t):t()}unloadProject(){if(!this._projectId)return;const e=this.viewer.scene.models;for(var t in e)if(e.hasOwnProperty(t)){e[t].destroy()}this._modelsElement.innerHTML="",this._numModelsLoaded=0,this._loadModelsButtonElement.classList.add("disabled"),this._unloadModelsButtonElement.classList.add("disabled"),this._enableAddModels&&this._addModelButtonElement.classList.add("disabled");const s=this._projectId;this._projectId=null,this.fire("projectUnloaded",{projectId:s})}getLoadedProjectId(){return this._projectId}getModelIds(){return Object.keys(this._modelsInfo)}loadModel(e,t,s){if(!this._projectId){const e="No project currently loaded";return this.error(e),void(s&&s(e))}const i=this._modelsInfo[e];if(!i){const e="Model not in currently loaded project";return this.error(e),void(s&&s(e))}this.bimViewer._busyModal.show(`${this.viewer.localeService.translate("busyModal.loading")||"Loading"} ${i.name}`);this.bimViewer.getConfig("externalMetadata")&&!i.manifest?this.server.getMetadata(this._projectId,e,(r=>{this._loadGeometry(e,i,r,t,s)}),(e=>{this.bimViewer._busyModal.hide(),this.error(e),s&&s(e)})):this._loadGeometry(e,i,null,t,s)}_loadGeometry(e,t,s,i,r){const o=()=>{document.getElementById(""+e).checked=!0,this._numModelsLoaded++,this._unloadModelsButtonElement.classList.remove("disabled"),this._numModelsLoaded{this.bimViewer._busyModal.hide(),this.error(e),r&&r(e)};if(t.manifest){this._dataSource.setProjectId(this._projectId),this._dataSource.setModelId(e);const s=this._xktLoader.load({id:e,manifestSrc:t.manifest,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});s.on("loaded",o),s.on("error",n)}else this.server.getGeometry(this._projectId,e,(i=>{const r=this._xktLoader.load({id:e,metaModelData:s,xkt:i,excludeUnclassifiedObjects:!0,origin:t.origin||t.position,scale:t.scale,rotation:t.rotation,matrix:t.matrix,edges:!1!==t.edges,saoEnabled:t.saoEnabled,pbrEnabled:t.pbrEnabled,backfaces:t.backfaces,globalizeObjectIds:t.globalizeObjectIds,reuseGeometries:!1!==t.reuseGeometries});r.on("loaded",o),r.on("error",n)}),n)}_jumpToInitialCamera(){const e=this.viewer,t=e.scene,s=t.getAABB(t.visibleObjectIds),i=p.getAABB3Diag(s),r=p.getAABB3Center(s,LI),o=t.camera;o.perspective.fov;const n=Math.abs(i/Math.tan(45*p.DEGTORAD)),a=p.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=p.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=r,e.cameraControl.planView=!1,e.cameraFlight.jumpTo({look:r,eye:[r[0]-n*a[0],r[1]-n*a[1],r[2]-n*a[2]],up:l,orthoScale:1.1*i})}unloadModel(e){const t=this.viewer.scene.models[e];if(!t)return void this.error("Model not loaded: "+e);t.destroy();document.getElementById(""+e).checked=!1,document.getElementById("span-"+e),this._numModelsLoaded--,this._numModelsLoaded>0?this._unloadModelsButtonElement.classList.remove("disabled"):this._unloadModelsButtonElement.classList.add("disabled"),this._numModelsLoadede.viewer.localeService.translate("treeViewContextMenu.inspectProperties")||"Inspect Properties",getShown:e=>!!e.viewer.metaScene.metaObjects[e.treeViewNode.objectId],doAction:e=>{const t=e.treeViewNode.objectId;e.bimViewer.showObjectProperties(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFit")||"View Fit",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)})),s.setObjectsVisible(i,!0),s.setObjectsHighlighted(i,!0);const r=s.getAABB(i);t.cameraFlight.flyTo({aabb:r,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=p.getAABB3Center(r)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.viewFitAll")||"View Fit All",doAction:function(e){const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.isolate")||"Isolate",doAction:function(e){const t=e.viewer,s=t.scene,i=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&i.push(e.objectId)}));const r=s.getAABB(i);t.cameraControl.pivotPos=p.getAABB3Center(r,GI),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsVisible(s.visibleObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(i,!0),t.cameraFlight.flyTo({aabb:r},(()=>{}))}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hide")||"Hide",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideOthers")||"Hide Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.visibleObjectIds,!1),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.hideAll")||"Hide All",getEnabled:function(e){return e.viewer.scene.visibleObjectIds.length>0},doAction:function(e){e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.show")||"Show",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.visible=!0,s.xrayed&&(s.pickable=!0),s.xrayed=!1,s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showOthers")||"Shows Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.visible=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.showAll")||"Show All",getEnabled:function(e){const t=e.viewer.scene;return t.numVisibleObjects0},doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xray")||"X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1,s.xrayed=!0,s.visible=!0,s.pickable=e.bimViewer.getConfig("xrayPickable"))}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoXray")||"Undo X-Ray",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayOthers")||"X-Ray Others",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{if(e.objectId){const s=t.objects[e.objectId];s&&(s.xrayed=!1,s.pickable=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayAll")||"X-Ray All",doAction:function(e){const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),t.setObjectsSelected(t.selectedObjectIds,!1),t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.xrayNone")||"X-Ray None",getEnabled:function(e){return e.viewer.scene.numXRayedObjects>0},doAction:function(e){const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.select")||"Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!0,s.visible=!0)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.undoSelect")||"Undo Select",doAction:function(e){e.treeViewPlugin.withNodeTree(e.treeViewNode,(t=>{if(t.objectId){const s=e.viewer.scene.objects[t.objectId];s&&(s.selected=!1)}}))}},{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.selectNone")||"Select None",getEnabled:function(e){return e.viewer.scene.numSelectedObjects>0},doAction:function(e){e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("treeViewContextMenu.clearSlices")||"Clear Slices",getEnabled:function(e){return e.bimViewer.getNumSections()>0},doAction:function(e){e.bimViewer.clearSections()}}]]}}class VI extends II{constructor(e,t={}){if(super(e),!t.objectsTabElement)throw"Missing config: objectsTabElement";if(!t.showAllObjectsButtonElement)throw"Missing config: showAllObjectsButtonElement";if(!t.hideAllObjectsButtonElement)throw"Missing config: hideAllObjectsButtonElement";if(!t.objectsElement)throw"Missing config: objectsElement";if(this._objectsTabElement=t.objectsTabElement,this._showAllObjectsButtonElement=t.showAllObjectsButtonElement,this._hideAllObjectsButtonElement=t.hideAllObjectsButtonElement,this._objectsTabButtonElement=this._objectsTabElement.querySelector(".xeokit-tab-btn"),!this._objectsTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";const s=t.objectsElement;this._treeView=new Eg(this.viewer,{containerElement:s,hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new kI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._objectsTabButtonElement.classList.remove("disabled"),this._showAllObjectsButtonElement.classList.remove("disabled"),this._hideAllObjectsButtonElement.classList.remove("disabled")):(this._objectsTabButtonElement.classList.add("disabled"),this._showAllObjectsButtonElement.classList.add("disabled"),this._hideAllObjectsButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}class jI extends II{constructor(e,t={}){if(super(e),!t.classesTabElement)throw"Missing config: classesTabElement";if(!t.showAllClassesButtonElement)throw"Missing config: showAllClassesButtonElement";if(!t.hideAllClassesButtonElement)throw"Missing config: hideAllClassesButtonElement";if(!t.classesElement)throw"Missing config: classesElement";if(this._classesTabElement=t.classesTabElement,this._showAllClassesButtonElement=t.showAllClassesButtonElement,this._hideAllClassesButtonElement=t.hideAllClassesButtonElement,this._classesTabButtonElement=this._classesTabElement.querySelector(".xeokit-tab-btn"),!this._classesTabButtonElement)throw"Missing DOM element: xeokit-tab-btn";const s=t.classesElement;this._treeView=new Eg(this.viewer,{containerElement:s,hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0}),this._treeViewContextMenu=new kI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{if(this.viewer.metaScene.metaModels[e]){const t=this.bimViewer._modelsExplorer.getModelInfo(e);if(!t)return;this._treeView.addModel(e,{rootName:t.name})}})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse()}))}setEnabled(e){e?(this._classesTabButtonElement.classList.remove("disabled"),this._showAllClassesButtonElement.classList.remove("disabled"),this._hideAllClassesButtonElement.classList.remove("disabled")):(this._classesTabButtonElement.classList.add("disabled"),this._showAllClassesButtonElement.classList.add("disabled"),this._hideAllClassesButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const QI=p.vec3();class WI extends II{constructor(e,t={}){if(super(e),!t.storeysTabElement)throw"Missing config: storeysTabElement";if(!t.showAllStoreysButtonElement)throw"Missing config: showAllStoreysButtonElement";if(!t.hideAllStoreysButtonElement)throw"Missing config: hideAllStoreysButtonElement";if(!t.storeysElement)throw"Missing config: storeysElement";if(this._storeysTabElement=t.storeysTabElement,this._showAllStoreysButtonElement=t.showAllStoreysButtonElement,this._hideAllStoreysButtonElement=t.hideAllStoreysButtonElement,this._storeysTabButtonElement=this._storeysTabElement.querySelector(".xeokit-tab-btn"),!this._storeysTabButtonElement)throw"Missing DOM element: .xeokit-tab-btn";const s=t.storeysElement;this._treeView=new Eg(this.viewer,{containerElement:s,autoAddModels:!1,hierarchy:"storeys",autoExpandDepth:1}),this._treeViewContextMenu=new kI(this.bimViewer,{hideOnAction:!0}),this._treeView.on("contextmenu",(e=>{this._treeViewContextMenu.context={bimViewer:this.bimViewer,viewer:e.viewer,treeViewPlugin:e.treeViewPlugin,treeViewNode:e.treeViewNode,pruneEmptyNodes:!0},this._treeViewContextMenu.show(e.event.pageX,e.event.pageY)})),this._treeView.on("nodeTitleClicked",(e=>{const t=this.viewer.scene,s=[];e.treeViewPlugin.withNodeTree(e.treeViewNode,(e=>{e.objectId&&s.push(e.objectId)}));e.treeViewNode.checked?(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!1),t.setObjectsPickable(s,!0)):(t.setObjectsXRayed(s,!1),t.setObjectsVisible(s,!0),t.setObjectsPickable(s,!0))})),this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{const t=this.bimViewer._modelsExplorer.getModelInfo(e);t&&this._treeView.addModel(e,{rootName:t.name})})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)})),this.bimViewer.on("reset",(()=>{this._treeView.collapse(),this._treeView.expandToDepth(1)}))}setEnabled(e){e?(this._storeysTabButtonElement.classList.remove("disabled"),this._showAllStoreysButtonElement.classList.remove("disabled"),this._hideAllStoreysButtonElement.classList.remove("disabled")):(this._storeysTabButtonElement.classList.add("disabled"),this._showAllStoreysButtonElement.classList.add("disabled"),this._hideAllStoreysButtonElement.classList.add("disabled"))}expandTreeViewToDepth(e){this._treeView.expandToDepth(e)}showNodeInTreeView(e){this._treeView.collapse(),this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];if(!s)return void this.error("selectStorey() - object is not found: '"+e+"'");if("IfcBuildingStorey"!==s.type)return void this.error("selectStorey() - object is not found: '"+e+"'");const i=s.getObjectIDsInSubtree();this._selectObjects(i,t)}_selectObjects(e,t){const s=this.viewer.scene,i=s.getAABB(e);this.viewer.cameraControl.pivotPos=p.getAABB3Center(i,QI),t?(s.setObjectsXRayed(s.objectIds,!0),s.setObjectsVisible(s.objectIds,!0),s.setObjectsPickable(s.objectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsXRayed(e,!1),s.setObjectsVisible(e,!0),s.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:i},(()=>{setTimeout((function(){s.setObjectsVisible(s.xrayedObjectIds,!1),s.setObjectsXRayed(s.xrayedObjectIds,!1)}),500),t()}))):(s.setObjectsVisible(s.objectIds,!1),s.setObjectsPickable(s.xrayedObjectIds,!0),s.setObjectsXRayed(s.xrayedObjectIds,!1),s.setObjectsSelected(s.selectedObjectIds,!1),s.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:i}))}destroy(){super.destroy(),this._treeView.destroy(),this._treeViewContextMenu.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded)}}const zI=p.vec3();class KI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._saveOrthoActive=null,this._buttonElement=t.buttonElement,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&(this.bimViewer._sectionTool.hideControl(),this.setActive(!this.getActive(),(()=>{}))),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!0,(()=>{}))}))}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer._orthoMode.getActive()}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterThreeDMode((()=>{this.fire("active",this._active),t()})):(this._enterThreeDMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitThreeDMode((()=>{this.fire("active",this._active),t()})):(this._exitThreeDMode(),this.fire("active",this._active)))):t&&t()}_enterThreeDMode(e){const t=this.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds),r=p.getAABB3Diag(i),o=p.getAABB3Center(i,zI),n=Math.abs(r/Math.tan(32.5)),a=s.camera,l=a.yUp?[-1,-1,-1]:[1,1,1],h=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=o,this.bimViewer._navCubeMode.setActive(!0),this.bimViewer._firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer._sectionTool.setEnabled(!0),this.bimViewer._orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:o,eye:[o[0]-n*l[0],o[1]-n*l[1],o[2]-n*l[2]],up:h,orthoScale:1.3*r,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e){const t=this.viewer,s=t.scene,i=s.camera,r=s.getAABB(s.visibleObjectIds),o=p.getAABB3Center(r),n=p.getAABB3Diag(r),a=Math.abs(n/Math.tan(45*p.DEGTORAD)),l=1.3*n,h=zI;h[0]=o[0]+i.worldUp[0]*a,h[1]=o[1]+i.worldUp[1]*a,h[2]=o[2]+i.worldUp[2]*a;const c=p.mulVec3Scalar(i.worldForward,-1,[]);this.bimViewer._sectionTool.setActive(!1),this.bimViewer._firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer._orthoMode.getActive(),this.bimViewer._orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer._navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:h,look:o,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer._navCubeMode.setActive(!1))}}class YI extends n{constructor(e,t={}){super(t),this._bimViewer=e,this._buildMenu()}_buildMenu(){const e=[],t=[];this._bimViewer._enablePropertiesInspector&&e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.inspectProperties")||"Inspect Properties",doAction:e=>{const t=e.entity.id;e.bimViewer.showObjectProperties(t)}}),e.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showInTree")||"Show in Explorer",doAction:e=>{const t=e.entity.id;e.showObjectInExplorers(t)}}),t.push({getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFit")||"View Fit",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity;t.cameraFlight.flyTo({aabb:i.aabb,duration:.5},(()=>{setTimeout((function(){s.setObjectsHighlighted(s.highlightedObjectIds,!1)}),500)})),t.cameraControl.pivotPos=p.getAABB3Center(i.aabb)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}),this.items=[e,t,[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hide")||"Hide",getEnabled:e=>e.entity.visible,doAction:e=>{e.entity.visible=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideOthers")||"Hide Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.visibleObjectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.visible=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsPickable(t.xrayedObjectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xray")||"X-Ray",getEnabled:e=>!e.entity.xrayed,doAction:e=>{const t=e.entity;t.xrayed=!0,t.pickable=e.bimViewer.getConfig("xrayPickable")}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayOthers")||"X-Ray Others",doAction:e=>{const t=e.viewer,s=t.scene,i=e.entity,r=t.metaScene.metaObjects[i.id];r&&(s.setObjectsVisible(s.objectIds,!0),s.setObjectsXRayed(s.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||s.setObjectsPickable(s.objectIds,!1),r.withMetaObjectsInSubtree((e=>{const t=s.objects[e.id];t&&(t.xrayed=!1,t.pickable=!0)})))}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1),t.setObjectsXRayed(t.objectIds,!0)}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.xrayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene,s=t.xrayedObjectIds;t.setObjectsPickable(s,!0),t.setObjectsXRayed(s,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.select")||"Select",getEnabled:e=>!e.entity.selected,doAction:e=>{e.entity.selected=!0}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.undoSelect")||"Undo Select",getEnabled:e=>e.entity.selected,doAction:e=>{e.entity.selected=!1}},{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("objectContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]}}class XI extends n{constructor(e={}){super({hideOnAction:e.hideOnAction,context:e.context,items:[[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitAll")||"View Fit All",doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.visibleObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.viewFitSelection")||"View Fit Selected",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{const t=e.viewer,s=t.scene,i=s.getAABB(s.selectedObjectIds);t.cameraFlight.flyTo({aabb:i,duration:.5}),t.cameraControl.pivotPos=p.getAABB3Center(i)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.hideAll")||"Hide All",getEnabled:e=>e.viewer.scene.numVisibleObjects>0,doAction:e=>{e.viewer.scene.setObjectsVisible(e.viewer.scene.visibleObjectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.showAll")||"Show All",getEnabled:e=>{const t=e.viewer.scene;return t.numVisibleObjects0},doAction:e=>{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.xrayedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayAll")||"X-Ray All",getEnabled:e=>{const t=e.viewer.scene;return t.numXRayedObjects{const t=e.viewer.scene;t.setObjectsVisible(t.objectIds,!0),t.setObjectsXRayed(t.objectIds,!0),e.bimViewer.getConfig("xrayPickable")||t.setObjectsPickable(t.objectIds,!1)}},{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.xRayNone")||"X-Ray None",getEnabled:e=>e.viewer.scene.numXRayedObjects>0,doAction:e=>{const t=e.viewer.scene.xrayedObjectIds;e.viewer.scene.setObjectsPickable(t,!0),e.viewer.scene.setObjectsXRayed(t,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.selectNone")||"Select None",getEnabled:e=>e.viewer.scene.numSelectedObjects>0,doAction:e=>{e.viewer.scene.setObjectsSelected(e.viewer.scene.selectedObjectIds,!1)}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.resetView")||"Reset View",doAction:e=>{e.bimViewer.resetView()}}],[{getTitle:e=>e.viewer.localeService.translate("canvasContextMenu.clearSlices")||"Clear Slices",getEnabled:e=>e.bimViewer.getNumSections()>0,doAction:e=>{e.bimViewer.clearSections()}}]]})}}class ZI extends II{constructor(e,t){if(super(e,t),!t.buttonElement)throw"Missing config: buttonElement";this._buttonElement=t.buttonElement,this.on("enabled",(e=>{e?this._buttonElement.classList.remove("disabled"):this._buttonElement.classList.add("disabled")})),this._buttonElement.addEventListener("click",(e=>{this.getEnabled()&&this.setActive(!this.getActive(),(()=>{})),e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)})),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e,this._active?this._buttonElement.classList.add("active"):this._buttonElement.classList.remove("active")})),this._active=!1,this._buttonElement.classList.remove("active")}setActive(e,t){this._active!==e?(this._active=e,e?(this._buttonElement.classList.add("active"),t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active))):(this._buttonElement.classList.remove("active"),t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active)))):t&&t()}_enterOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class qI extends II{constructor(e,t={}){if(super(e),!t.propertiesTabElement)throw"Missing config: propertiesTabElement";if(!t.propertiesElement)throw"Missing config: propertiesElement";if(this._metaObject=null,this._propertiesTabElement=t.propertiesTabElement,this._propertiesElement=t.propertiesElement,this._propertiesTabButtonElement=this._propertiesTabElement.querySelector(".xeokit-tab-btn"),!this._propertiesTabButtonElement)throw"Missing DOM element: ,xeokit-tab-btn";this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{if(this._metaObject){const t=this._metaObject.metaModels;for(let s=0,i=t.length;s{this.clear()})),document.addEventListener("click",this._clickListener=e=>{e.target.matches(".xeokit-accordion .xeokit-accordion-button")&&(e.target.parentElement.classList.contains("active")?e.target.parentElement.classList.remove("active"):e.target.parentElement.classList.add("active"))}),this.clear()}showObjectPropertySets(e){const t=this.viewer.metaScene.metaObjects[e];if(!t)return;const s=t.propertySets;s&&s.length>0?this._setPropertySets(t,s):this._setPropertySets(t),this._metaObject=t}clear(){const e=[],t=this.viewer.localeService.translate("propertiesInspector.noObjectSelectedWarning")||"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.";e.push('
'),e.push(`

${t}

`),e.push("
");const s=e.join("");this._propertiesElement.innerHTML=s}_setPropertySets(e,t){const s=[];if(s.push('
'),e){s.push(''),s.push(``),e.type&&s.push(``),s.push(``),s.push(``);const i=e.attributes;if(i)for(let e in i)s.push(``);if(s.push("
Name:${e.name}
Class:${e.type}
UUID:${e.originalSystemId}
Viewer ID:${e.id}
${JI(e)}:${i[e]}
"),t&&0!==t.length){s.push("
"),s.push('
');for(let e=0,i=t.length;e0){s.push(`
\n

${i.name}

\n
\n `);for(let e=0,t=r.length;e`)}s.push("
${t.name||t.label}:${t.value}
\n
\n
")}}s.push("
")}else{const e=this.viewer.localeService.translate("propertiesInspector.noPropSetWarning")||"No properties sets found for this object";s.push(`

${e}

`),s.push("")}}else s.push('

No object selected

');this._propertiesElement.innerHTML=s.join("")}setEnabled(e){e?this._propertiesTabButtonElement.classList.remove("disabled"):this._propertiesTabButtonElement.classList.add("disabled")}destroy(){super.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),document.removeEventListener("click",this._clickListener)}}function JI(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e}const $I=new Float32Array(3);class ev{constructor(e){if(!e)throw"Parameter expected: cfg";if(!e.viewer)throw"Parameter expected: cfg.viewer";this.viewer=e.viewer,this._maxTreeDepth=e.maxTreeDepth||15,this._root=null,this._needsRebuild=!0,this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const i=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&p.containsAABB3(e.left.aabb,i))return void this._insertEntity(e.left,t,s+1);if(e.right&&p.containsAABB3(e.right.aabb,i))return void this._insertEntity(e.right,t,s+1);const r=e.aabb;$I[0]=r[3]-r[0],$I[1]=r[4]-r[1],$I[2]=r[5]-r[2];let o=0;if($I[1]>$I[o]&&(o=1),$I[2]>$I[o]&&(o=2),!e.left){const n=r.slice();if(n[o+3]=(r[o]+r[o+3])/2,e.left={aabb:n},p.containsAABB3(n,i))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const n=r.slice();if(n[o]=(r[o]+r[o+3])/2,e.right={aabb:n},p.containsAABB3(n,i))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class tv extends II{constructor(e,t){if(super(e),!t.buttonElement)throw"Missing config: buttonElement";this._objectsKdTree3=t.objectsKdTree3,this._marquee=p.AABB2(),this._marqueeFrustum=new lr,this._marqueeFrustumProjMat=p.mat4(),this._marqueeDir=!1;const s=t.buttonElement;this.on("enabled",(e=>{e?s.classList.remove("disabled"):s.classList.add("disabled")})),this.on("active",(e=>{e?(s.classList.add("active"),this._objectsKdTree3.root):s.classList.remove("active")})),s.addEventListener("click",(e=>{if(this.getEnabled()){const e=this.getActive();this.setActive(!e)}e.preventDefault()})),this.bimViewer.on("reset",(()=>{this.setActive(!1)}));const i=this.viewer.scene,r=i.canvas.canvas;this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement);const o=this._marqueeElement.style;let n,a,l,h,c,A,u,d;o.position="absolute",o["z-index"]="40000005",o.width="8px",o.height="8px",o.visibility="hidden",o.top="0px",o.left="0px",o["box-shadow"]="0 2px 5px 0 #182A3D;",o.opacity=1,o["pointer-events"]="none";let f=!1,E=!1;r.addEventListener("mousedown",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;const t=this.bimViewer.viewer.scene.input;t.keyDown[t.KEY_CTRL]||i.setObjectsSelected(i.selectedObjectIds,!1),n=e.pageX,a=e.pageY,o.visibility="visible",o.left=`${n}px`,o.top=`${a}px`,o.width="0px",o.height="0px",o.display="block",c=e.offsetX,A=e.offsetY,f=!0,this.viewer.cameraControl.pointerEnabled=!1})),r.addEventListener("mouseup",(e=>{if(!this.getActive()||!this.getEnabled())return;if(!f&&!E)return;if(0!==e.button)return;l=e.pageX,h=e.pageY;const t=Math.abs(l-n),s=Math.abs(h-a);o.width=`${t}px`,o.height=`${s}px`,o.visibility="hidden",f=!1,this.viewer.cameraControl.pointerEnabled=!0,E&&(E=!1),(t>3||s>3)&&this._marqueePick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&this.getEnabled()&&0===e.button&&f&&(o.visibility="hidden",f=!1,E=!0,this.viewer.cameraControl.pointerEnabled=!0)}),!0),r.addEventListener("mousemove",(e=>{if(!this.getActive()||!this.getEnabled())return;if(0!==e.button)return;if(!f)return;const t=e.pageX,s=e.pageY,i=t-n,r=s-a;o.width=`${Math.abs(i)}px`,o.height=`${Math.abs(r)}px`,o.left=`${Math.min(n,t)}px`,o.top=`${Math.min(a,s)}px`,u=e.offsetX,d=e.offsetY;const l=c{if(i===lr.INTERSECT&&(i=hr(this._marqueeFrustum,s.aabb)),i!==lr.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,i=t.length;s{e.preventDefault()},o.oncontextmenu=e=>{e.preventDefault()},n.oncontextmenu=e=>{e.preventDefault()};const l=new km({localeService:t.localeService,canvasElement:s,keyboardEventsElement:t.keyboardEventsElement,transparent:!1,backgroundColor:[1,1,1],backgroundColorFromAmbientLight:!1,saoEnabled:!0,pbrEnabled:!1,colorTextureEnabled:!0});super(null,t,e,l),this._configs={},this._enableAddModels=!!t.enableEditModels,this._enablePropertiesInspector=!!t.inspectorElement,this.viewer=l,this._objectsKdTree3=new ev({viewer:l}),this._customizeViewer(),this._initCanvasContextMenus(),i.innerHTML=function(e){return'
\n
\n Models\n
\n
\n \n '+(e.enableEditModels?'':"")+'
\n
\n
\n
\n
\n Objects\n
\n
\n \n \n
\n
\n
\n
\n
\n Classes\n
\n
\n \n \n
\n
\n
\n
\n
\n Storeys\n
\n
\n \n \n
\n
\n
\n
\n
'}(t),o.innerHTML='
\n \x3c!-- Reset button --\x3e\n
\n \n
\n
\n \x3c!-- 3D Mode button --\x3e\n \n \x3c!-- Perspective/Ortho Mode button --\x3e\n \n \x3c!-- Fit button --\x3e\n \n \x3c!-- First Person mode button --\x3e\n \n \x3c!-- Show/hide IFCSpaces --\x3e\n \n
\n \x3c!-- Tools button group --\x3e\n
\n \x3c!-- Hide tool button --\x3e\n \n \x3c!-- Select tool button --\x3e\n \n \x3c!-- Marquee select tool button --\x3e\n \n \x3c!-- section tool button --\x3e\n \n
\n
',this._enablePropertiesInspector&&(r.innerHTML='
\n
\n Properties\n
\n
\n
\n
\n
'),this._explorerElement=i,this._inspectorElement=r,sv(i),this._enablePropertiesInspector&&sv(r),this._modelsExplorer=new HI(this,{modelsTabElement:i.querySelector(".xeokit-modelsTab"),loadModelsButtonElement:i.querySelector(".xeokit-loadAllModels"),unloadModelsButtonElement:i.querySelector(".xeokit-unloadAllModels"),addModelButtonElement:i.querySelector(".xeokit-addModel"),modelsElement:i.querySelector(".xeokit-models"),enableEditModels:this._enableAddModels}),this._objectsExplorer=new VI(this,{objectsTabElement:i.querySelector(".xeokit-objectsTab"),showAllObjectsButtonElement:i.querySelector(".xeokit-showAllObjects"),hideAllObjectsButtonElement:i.querySelector(".xeokit-hideAllObjects"),objectsElement:i.querySelector(".xeokit-objects")}),this._classesExplorer=new jI(this,{classesTabElement:i.querySelector(".xeokit-classesTab"),showAllClassesButtonElement:i.querySelector(".xeokit-showAllClasses"),hideAllClassesButtonElement:i.querySelector(".xeokit-hideAllClasses"),classesElement:i.querySelector(".xeokit-classes")}),this._storeysExplorer=new WI(this,{storeysTabElement:i.querySelector(".xeokit-storeysTab"),showAllStoreysButtonElement:i.querySelector(".xeokit-showAllStoreys"),hideAllStoreysButtonElement:i.querySelector(".xeokit-hideAllStoreys"),storeysElement:i.querySelector(".xeokit-storeys")}),this._enablePropertiesInspector&&(this._propertiesInspector=new qI(this,{propertiesTabElement:r.querySelector(".xeokit-propertiesTab"),propertiesElement:r.querySelector(".xeokit-properties")})),this._resetAction=new _I(this,{buttonElement:o.querySelector(".xeokit-reset"),active:!1}),this._fitAction=new PI(this,{buttonElement:o.querySelector(".xeokit-fit"),active:!1});const h=new function(e){let t=!1;this.setThreeDModeActive=s=>{s?(e._firstPersonMode.setActive(!1),e._marqueeSelectionTool.setEnabled(!0),e.viewer.cameraControl.navMode="orbit"):(e._marqueeSelectionTool.setEnabled(!1),e._marqueeSelectionTool.setActive(!1),e._firstPersonMode.setActive(!1),e.viewer.cameraControl.navMode="planView"),t=s},this.setFirstPersonModeActive=s=>{e.viewer.cameraControl.navMode=s?"firstPerson":t?"orbit":"planView"}}(this);this._threeDMode=new KI(this,{buttonElement:o.querySelector(".xeokit-threeD"),cameraControlNavModeMediator:h,active:!1}),this._orthoMode=new ZI(this,{buttonElement:o.querySelector(".xeokit-ortho"),active:!1}),this._firstPersonMode=new DI(this,{buttonElement:o.querySelector(".xeokit-firstPerson"),cameraControlNavModeMediator:h,active:!1}),this._hideTool=new NI(this,{buttonElement:o.querySelector(".xeokit-hide"),active:!1}),this._selectionTool=new CI(this,{buttonElement:o.querySelector(".xeokit-select"),active:!1}),this._marqueeSelectionTool=new tv(this,{buttonElement:o.querySelector(".xeokit-marquee"),active:!1,objectsKdTree3:this._objectsKdTree3}),this._showSpacesMode=new OI(this,{buttonElement:o.querySelector(".xeokit-showSpaces"),active:!1}),this._queryTool=new bI(this,{active:!1}),this._sectionTool=new BI(this,{buttonElement:o.querySelector(".xeokit-section"),counterElement:o.querySelector(".xeokit-section-counter"),menuButtonElement:o.querySelector(".xeokit-section-menu-button"),menuButtonArrowElement:o.querySelector(".xeokit-section-menu-button-arrow"),active:!1}),this._navCubeMode=new FI(this,{navCubeCanvasElement:n,active:!0}),this._busyModal=new vI(this,{busyModalBackdropElement:a}),this._threeDMode.setActive(!0),this._firstPersonMode.setActive(!1),this._navCubeMode.setActive(!0),this._modelsExplorer.on("modelLoaded",(e=>{this._modelsExplorer.getNumModelsLoaded()>0&&this.setControlsEnabled(!0),this.fire("modelLoaded",e)})),this._modelsExplorer.on("modelUnloaded",(e=>{0===this._modelsExplorer.getNumModelsLoaded()&&(this.setControlsEnabled(!1),this.openTab("models")),this.fire("modelUnloaded",e)})),this._resetAction.on("reset",(()=>{this.fire("reset",!0)})),this._mutexActivation([this._hideTool,this._selectionTool,this._marqueeSelectionTool,this._sectionTool]),i.querySelector(".xeokit-showAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllObjects").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllClasses").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-showAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!0),this.setAllObjectsXRayed(!1),e.preventDefault()})),i.querySelector(".xeokit-hideAllStoreys").addEventListener("click",(e=>{this.setAllObjectsVisible(!1),e.preventDefault()})),i.querySelector(".xeokit-loadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this.loadAllModels(),e.preventDefault()})),i.querySelector(".xeokit-unloadAllModels").addEventListener("click",(e=>{this.setControlsEnabled(!1),this._modelsExplorer.unloadAllModels(),e.preventDefault()})),this._enableAddModels&&i.querySelector(".xeokit-addModel").addEventListener("click",(e=>{this.fire("addModel",{}),e.preventDefault()})),this._bcfViewpointsPlugin=new Vi(this.viewer,{}),this._fastNavPlugin=new Ki(l,{hideEdges:!0,hideSAO:!0,hidePBR:!1,hideColorTexture:!1,hideTransparentObjects:!1,scaleCanvasResolution:!1,scaleCanvasResolutionFactor:.6}),this.viewer.scene.on("rendered",(()=>{const e=this._fastNavPlugin;e.hideEdges=5").firstChild;document.body.appendChild(t),this.viewer.cameraControl.pivotElement=t,e.camera.perspective.near=.01,e.camera.perspective.far=3e3,e.camera.ortho.near=.01,e.camera.ortho.far=2e3;const s=e.sao;s.enabled=!0,s.numSamples=50,s.kernelRadius=200}_initCanvasContextMenus(){this._canvasContextMenu=new XI(this,{hideOnAction:!0}),this._objectContextMenu=new YI(this,{hideOnAction:!0}),this.viewer.cameraControl.on("rightClick",(e=>{e.event;const t=this.viewer.scene.pick({canvasPos:e.canvasPos});t&&t.entity.isObject?(this._canvasContextMenu.hide(),this._objectContextMenu.context={viewer:this.viewer,bimViewer:this,showObjectInExplorers:e=>{const t=this.getOpenTab();"objects"!==t&&"classes"!==t&&"storeys"!==t&&this.openTab("objects"),this.showObjectInExplorers(e)},entity:t.entity},this._objectContextMenu.show(e.pagePos[0],e.pagePos[1])):(this._objectContextMenu.hide(),this._canvasContextMenu.context={viewer:this.viewer,bimViewer:this},this._canvasContextMenu.show(e.pagePos[0],e.pagePos[1]))}))}_initConfigs(){this.setConfigs({cameraNear:"0.05",cameraFar:"3000.0",smartPivot:"true",saoEnabled:"true",pbrEnabled:"false",saoBias:"0.5",saoIntensity:"0.15",saoNumSamples:"40",saoKernelRadius:"100",edgesEnabled:!0,xrayContext:!0,xrayPickable:!1,selectedGlowThrough:!0,highlightGlowThrough:!0,backgroundColor:[1,1,1],externalMetadata:!1,dtxEnabled:!1})}setConfigs(e){for(let t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setConfig(t,s)}}setConfig(e,t){function s(e){return!0===e||"true"===e}try{switch(e){case"backgroundColor":const i=t;this.setBackgroundColor(i),this._configs[e]=i;break;case"cameraNear":const r=parseFloat(t);this.viewer.scene.camera.perspective.near=r,this.viewer.scene.camera.ortho.near=r,this._configs[e]=r;break;case"cameraFar":const o=parseFloat(t);this.viewer.scene.camera.perspective.far=o,this._configs[e]=o;break;case"smartPivot":this.viewer.cameraControl.smartPivot=this._configs[e]=s(t);break;case"saoEnabled":this._fastNavPlugin.saoEnabled=this._configs[e]=s(t);break;case"saoBias":this.viewer.scene.sao.bias=parseFloat(t);break;case"saoIntensity":this.viewer.scene.sao.intensity=parseFloat(t);break;case"saoKernelRadius":this.viewer.scene.sao.kernelRadius=this._configs[e]=parseFloat(t);break;case"saoNumSamples":this.viewer.scene.sao.numSamples=this._configs[e]=parseFloat(t);break;case"saoBlur":this.viewer.scene.sao.blur=this._configs[e]=s(t);break;case"edgesEnabled":this._fastNavPlugin.edgesEnabled=this._configs[e]=s(t);break;case"pbrEnabled":this._fastNavPlugin.pbrEnabled=this._configs[e]=s(t);break;case"viewFitFOV":this.viewer.cameraFlight.fitFOV=this._configs[e]=parseFloat(t);break;case"viewFitDuration":this.viewer.cameraFlight.duration=this._configs[e]=parseFloat(t);break;case"perspectiveFOV":this.viewer.camera.perspective.fov=this._configs[e]=parseFloat(t);break;case"excludeUnclassifiedObjects":case"xrayPickable":case"externalMetadata":this._configs[e]=s(t);break;case"xrayContext":this._configs[e]=t;break;case"selectedGlowThrough":const n=this._configs[e]=s(t),a=this.viewer.scene.selectedMaterial;a.glowThrough=n,a.fillAlpha=n?.5:1,a.edgeAlpha=n?.5:1;break;case"highlightGlowThrough":const l=this._configs[e]=s(t),h=this.viewer.scene.highlightMaterial;h.glowThrough=l,h.fillAlpha=l?.5:1,h.edgeAlpha=l?.5:1;break;case"showSpaces":this._configs[e]=s(t),this._showSpacesMode.setActive(t);break;case"dtxEnabled":this._configs[e]=s(t),this.viewer.scene.dtxEnabled=t;break;case"objectColors":this._configs[e]=t,this._modelsExplorer.setObjectColors(t);break;default:this.warn("setConfig() - unsupported configuration: '"+e+"'")}}catch(t){this.error("setConfig() - failed to configure '"+e+"': "+t)}}getConfig(e){return this._configs[e]}getProjectsInfo(e,t){e?this.server.getProjects(e,(e=>{this.error("getProjectsInfo() - "+e),t&&t(e)})):this.error("getProjectsInfo() - Argument expected: 'done'")}getProjectInfo(e,t,s){e?t?this.server.getProject(e,t,(e=>{this.error("getProjectInfo() - "+e),s&&s(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getProjectInfo() - Argument expected: projectId")}getObjectInfo(e,t,s,i,r){e?t?s?i?this.server.getObjectInfo(e,t,s,i,(e=>{r&&r(e)})):this.error("getProjectInfo() - Argument expected: 'done'"):this.error("getObjectInfo() - Argument expected: objectId"):this.error("getObjectInfo() - Argument expected: modelId"):this.error("getObjectInfo() - Argument expected: projectId")}loadProject(e,t,s){e?this._modelsExplorer.loadProject(e,(()=>{t&&t()}),(e=>{this.error("loadProject() - "+e),s&&s(e)})):this.error("loadProject() - Argument expected: objectId")}unloadProject(){this._modelsExplorer.unloadProject(),this.openTab("models"),this.setControlsEnabled(!1)}getLoadedProjectId(){return this._modelsExplorer.getLoadedProjectId()}getModelIds(){return this._modelsExplorer.getModelIds()}loadModel(e,t,s){e?this._modelsExplorer.loadModel(e,(()=>{t&&t()}),(e=>{this.error("loadModel() - "+e),s&&s(e)})):this.error("loadModel() - Argument expected: modelId")}loadAllModels(e=function(){}){const t=this._modelsExplorer.getModelIds(),s=(e,i)=>{if(e>=t.length)i();else{const r=t[e];this._modelsExplorer.isModelLoaded(r)?s(e+1,i):this._modelsExplorer.loadModel(r,(()=>{s(e+1,i)}),(t=>{this.error("loadAllModels() - "+t),s(e+1,i)}))}};s(0,e)}getLoadedModelIds(){return this._modelsExplorer._getLoadedModelIds()}isModelLoaded(e){if(e)return this._modelsExplorer.isModelLoaded(e);this.error("unloadModel() - Argument expected: modelId")}unloadModel(e){e?this._modelsExplorer.unloadModel(e):this.error("unloadModel() - Argument expected: modelId")}unloadAllModels(){this._modelsExplorer.unloadAllModels()}editModel(e){this.fire("editModel",{modelId:e})}deleteModel(e){this.fire("deleteModel",{modelId:e})}addModel(){this.fire("addModel",{})}setBackgroundColor(e){this.viewer.scene.canvas.backgroundColor=e}setObjectColorSource(e){console.log("BIMViewer.setObjectColorSource() is now deprecated and no longer functional. By default, BIMViewer.getObjectColorSource() will now always return the (formerly) default value of `model`.")}getObjectColorSource(){return"model"}setViewerState(e,t=(()=>{})){e.tabOpen&&this.openTab(e.tabOpen),e.expandObjectsTree&&this._objectsExplorer.expandTreeViewToDepth(e.expandObjectsTree),e.expandClassesTree&&this._classesExplorer.expandTreeViewToDepth(e.expandClassesTree),e.expandStoreysTree&&this._storeysExplorer.expandTreeViewToDepth(e.expandStoreysTree),e.setCamera&&this.setCamera(e.setCamera),this._parseSelectedStorey(e,(()=>{this._parseThreeDMode(e,(()=>{t()}))}))}_parseSelectedStorey(e,t){e.selectedStorey?(this.selectStorey(e.selectedStorey),t()):t()}_parseThreeDMode(e,t){const s=!1!==e.threeDActive;this.set3DEnabled(s,t)}showObjectInExplorers(e){e?(this._objectsExplorer.showNodeInTreeView(e),this._classesExplorer.showNodeInTreeView(e),this._storeysExplorer.showNodeInTreeView(e),this.fire("openExplorer",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}unShowObjectInExplorers(){this._objectsExplorer.unShowNodeInTreeView(),this._classesExplorer.unShowNodeInTreeView(),this._storeysExplorer.unShowNodeInTreeView()}showObjectProperties(e){e?(this._enablePropertiesInspector&&this._propertiesInspector.showObjectPropertySets(e),this.fire("openInspector",{})):this.error("showObjectInExplorers() - Argument expected: objectId")}setObjectsVisible(e,t){this._withObjectsInSubtree(e,(e=>{e.visible=t}))}setAllObjectsVisible(e){e?this.viewer.scene.setObjectsVisible(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsVisible(this.viewer.scene.visibleObjectIds,!1)}setObjectsXRayed(e,t){this._withObjectsInSubtree(e,(e=>{e.xrayed=t}))}setAllObjectsXRayed(e){e?this.viewer.scene.setObjectsXRayed(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsXRayed(this.viewer.scene.xrayedObjectIds,!1)}setObjectsSelected(e,t){this._withObjectsInSubtree(e,(e=>{e.selected=t}))}setAllObjectsSelected(e){e?this.viewer.scene.setObjectsSelected(this.viewer.scene.objectIds,!0):this.viewer.scene.setObjectsSelected(this.viewer.scene.selectedObjectIds,!1)}_withObjectsInSubtree(e,t){if(e)for(let s=0,i=e.length;s{const s=this.viewer.scene.objects[e.id];s&&t(s)}))}else this.error("Argument expected: objectIds")}flyToObject(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectId");const s=this.viewer,i=s.scene,r=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{i.objects[e.id]&&r.push(e.id)})),0===r.length)return this.error("Object not found in viewer: '"+e+"'"),void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const o=i.getAABB(r);s.cameraFlight.flyTo({aabb:o},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=p.getAABB3Center(o)}viewFitObjects(e,t){if(!e)return void this.error("flyToObject() - Argument expected: objectIds");const s=this.viewer,i=s.scene,r=[];for(var o=0,n=e.length;o{i.objects[e.id]&&r.push(e.id)}))}if(0===r.length)return void(t&&t());i.setObjectsVisible(r,!0),i.setObjectsHighlighted(r,!0);const a=i.getAABB(r);s.cameraFlight.flyTo({aabb:a},(()=>{t&&t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})),s.cameraControl.pivotPos=p.getAABB3Center(a)}viewFitAll(e){const t=this.viewer,s=t.scene.getAABB();t.cameraFlight.flyTo({aabb:s},(()=>{e&&e()})),t.cameraControl.pivotPos=p.getAABB3Center(s)}jumpToObject(e){if(!e)return void this.error("jumpToObject() - Argument expected: objectId");const t=this.viewer,s=t.scene,i=[];if(this.viewer.metaScene.withMetaObjectsInSubtree(e,(e=>{s.objects[e.id]&&i.push(e.id)})),0===i.length)return void this.error("Object not found in viewer: '"+e+"'");s.setObjectsVisible(i,!0);const r=s.getAABB(i);t.cameraFlight.jumpTo({aabb:r}),t.cameraControl.pivotPos=p.getAABB3Center(r)}setCamera(e){const t=this.viewer.scene.camera;e.eye&&(t.eye=e.eye),e.look&&(t.look=e.look),e.up&&(t.up=e.up)}viewFitModels(e,t){if(!e)return void this.error("viewFitModels() - Argument expected: modelIds");const s=this.viewer,i=s.scene,r=p.AABB3();p.collapseAABB3(r);for(var o=0,n=e.length;o{t(),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)})):(s.cameraFlight.jumpTo({aabb:r}),setTimeout((function(){i.setObjectsHighlighted(i.highlightedObjectIds,!1)}),500)),s.cameraControl.pivotPos=p.getAABB3Center(r)}openTab(e){if(!e)return void this.error("openTab() - Argument expected: tabId");let t;switch(e){case"models":t="xeokit-modelsTab";break;case"objects":t="xeokit-objectsTab";break;case"classes":t="xeokit-classesTab";break;case"storeys":t="xeokit-storeysTab";break;case"properties":t="xeokit-propertiesTab";break;default:return void this.error("openTab() - tab not recognized: '"+e+"'")}this._openTab(this._explorerElement,t)}_openTab(e,t){const s="active";let i=e.querySelectorAll(".xeokit-tab"),r=e.querySelector("."+t);for(let e=0;e-1}const t="active";return e(this._explorerElement.querySelector(".xeokit-modelsTab"),t)?"models":e(this._explorerElement.querySelector(".xeokit-objectsTab"),t)?"objects":e(this._explorerElement.querySelector(".xeokit-classesTab"),t)?"classes":e(this._explorerElement.querySelector(".xeokit-storeysTab"),t)?"storeys":e(this._inspectorElement.querySelector(".xeokit-propertiesTab"),t)?"properties":"none"}set3DEnabled(e,t){this._threeDMode.setActive(e,t)}get3DEnabled(){return this._threeDMode.getActive()}setSpacesShown(e){this._showSpacesMode.setActive(e)}getSpacesShown(){return this._showSpacesMode.getActive()}setOrthoEnabled(e,t){this._orthoMode.setActive(e,t)}getOrthoEnabled(){return this._orthoMode.getActive()}selectStorey(e,t){const s=this.viewer.metaScene.metaObjects[e];s?"IfcBuildingStorey"===s.type?this._storeysExplorer.selectStorey(e,t):this.error("selectStorey() - Object is not an IfcBuildingStorey: '"+e+"'"):this.error("selectStorey() - Object is not found: '"+e+"'")}saveBCFViewpoint(e){return this._bcfViewpointsPlugin.getViewpoint(e)}loadBCFViewpoint(e,t){e?(this._orthoMode.setActive("ortho"===this.viewer.camera.projection),this._bcfViewpointsPlugin.setViewpoint(e,t)):this.error("loadBCFViewpoint() - Argument expected: bcfViewpoint")}resetView(){this._resetAction.reset()}setControlsEnabled(e){this._objectsExplorer.setEnabled(e),this._classesExplorer.setEnabled(e),this._storeysExplorer.setEnabled(e),this._resetAction.setEnabled(e),this._fitAction.setEnabled(e),this._threeDMode.setEnabled(e),this._orthoMode.setEnabled(e),this._firstPersonMode.setEnabled(e),this._queryTool.setEnabled(e),this._hideTool.setEnabled(e),this._selectionTool.setEnabled(e),this._marqueeSelectionTool.setEnabled(e),this._showSpacesMode.setEnabled(e),this._sectionTool.setEnabled(e),this._enablePropertiesInspector&&this._propertiesInspector.setEnabled(e)}setKeyboardEnabled(e){this.viewer.scene.input.keyboardEnabled=e}getKeyboardEnabled(){return this.viewer.scene.input.keyboardEnabled}clearSections(){this._sectionTool.clear()}disableSections(){this._sectionTool.disableSections()}enableSections(){this._sectionTool.enableSections()}flipSections(){this._sectionTool.flipSections()}hideSectionEditControl(){this._sectionTool.hideControl()}getNumSections(){return this._sectionTool.getNumSections()}destroy(){this.viewer.destroy(),this._bcfViewpointsPlugin.destroy(),this._canvasContextMenu.destroy(),this._objectContextMenu.destroy()}},e.LocaleService=Yi,e.Server=class{constructor(e={}){this._dataDir=e.dataDir||""}getProjects(e,t){const s=this._dataDir+"/projects/index.json";y.loadJSON(s,e,t)}getProject(e,t,s){const i=this._dataDir+"/projects/"+e+"/index.json";y.loadJSON(i,t,s)}getMetadata(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/metadata.json";y.loadJSON(r,s,i)}getGeometry(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/geometry.xkt";y.loadArraybuffer(r,s,i)}getObjectInfo(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/props/"+s+".json";y.loadJSON(o,i,r)}getIssues(e,t,s,i){const r=this._dataDir+"/projects/"+e+"/models/"+t+"/issues.json";y.loadJSON(r,s,i)}getSplitModelManifest(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadJSON(o,i,r)}getSplitModelMetadata(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadJSON(o,i,r)}getSplitModelGeometry(e,t,s,i,r){const o=this._dataDir+"/projects/"+e+"/models/"+t+"/"+s;y.loadArraybuffer(o,i,r)}},Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/dist/xeokit-bim-viewer.umd.js b/dist/xeokit-bim-viewer.umd.js index 409f6c09..cf6d98fc 100644 --- a/dist/xeokit-bim-viewer.umd.js +++ b/dist/xeokit-bim-viewer.umd.js @@ -8209,7 +8209,7 @@ } } - const tempVec3a$F = math.vec3(); + const tempVec3a$E = math.vec3(); /** * Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix @@ -8289,7 +8289,7 @@ */ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) { - const center = math.getPositionsCenter(worldPositions, tempVec3a$F); + const center = math.getPositionsCenter(worldPositions, tempVec3a$E); const rtcCenterX = Math.round(center[0] / cellSize) * cellSize; const rtcCenterY = Math.round(center[1] / cellSize) * cellSize; @@ -8325,7 +8325,7 @@ */ function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) { const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist; - const dirNormalized = math.normalizeVec3(dir, tempVec3a$F); + const dirNormalized = math.normalizeVec3(dir, tempVec3a$E); math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos); return rtcPlanePos; } @@ -9156,52 +9156,6 @@ } } - /** - * @private - * @type {{WEBGL: boolean, SUPPORTED_EXTENSIONS: {}}} - */ - const WEBGL_INFO = { - WEBGL: false, - SUPPORTED_EXTENSIONS: {} - }; - - const canvas = document.createElement("canvas"); - - if (canvas) { - - const gl = canvas.getContext("webgl", {antialias: true}) || canvas.getContext("experimental-webgl", {antialias: true}); - - WEBGL_INFO.WEBGL = !!gl; - - if (WEBGL_INFO.WEBGL) { - WEBGL_INFO.ANTIALIAS = gl.getContextAttributes().antialias; - if (gl.getShaderPrecisionFormat) { - if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "highp"; - } else if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; - } else { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "lowp"; - } - } else { - WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; - } - WEBGL_INFO.DEPTH_BUFFER_BITS = gl.getParameter(gl.DEPTH_BITS); - WEBGL_INFO.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE); - WEBGL_INFO.MAX_CUBE_MAP_SIZE = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE); - WEBGL_INFO.MAX_RENDERBUFFER_SIZE = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE); - WEBGL_INFO.MAX_TEXTURE_UNITS = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); - WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); - WEBGL_INFO.MAX_VERTEX_ATTRIBS = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); - WEBGL_INFO.MAX_VERTEX_UNIFORM_VECTORS = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); - WEBGL_INFO.MAX_FRAGMENT_UNIFORM_VECTORS = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); - WEBGL_INFO.MAX_VARYING_VECTORS = gl.getParameter(gl.MAX_VARYING_VECTORS); - gl.getSupportedExtensions().forEach(function (ext) { - WEBGL_INFO.SUPPORTED_EXTENSIONS[ext] = true; - }); - } - } - const WEBGL_CONTEXT_NAMES = [ "webgl2", "experimental-webgl", @@ -9991,6 +9945,52 @@ } } + /** + * @private + * @type {{WEBGL: boolean, SUPPORTED_EXTENSIONS: {}}} + */ + const WEBGL_INFO = { + WEBGL: false, + SUPPORTED_EXTENSIONS: {} + }; + + const canvas = document.createElement("canvas"); + + if (canvas) { + + const gl = canvas.getContext("webgl", {antialias: true}) || canvas.getContext("experimental-webgl", {antialias: true}); + + WEBGL_INFO.WEBGL = !!gl; + + if (WEBGL_INFO.WEBGL) { + WEBGL_INFO.ANTIALIAS = gl.getContextAttributes().antialias; + if (gl.getShaderPrecisionFormat) { + if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "highp"; + } else if (gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; + } else { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "lowp"; + } + } else { + WEBGL_INFO.FS_MAX_FLOAT_PRECISION = "mediump"; + } + WEBGL_INFO.DEPTH_BUFFER_BITS = gl.getParameter(gl.DEPTH_BITS); + WEBGL_INFO.MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE); + WEBGL_INFO.MAX_CUBE_MAP_SIZE = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE); + WEBGL_INFO.MAX_RENDERBUFFER_SIZE = gl.getParameter(gl.MAX_RENDERBUFFER_SIZE); + WEBGL_INFO.MAX_TEXTURE_UNITS = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); + WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); + WEBGL_INFO.MAX_VERTEX_ATTRIBS = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); + WEBGL_INFO.MAX_VERTEX_UNIFORM_VECTORS = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); + WEBGL_INFO.MAX_FRAGMENT_UNIFORM_VECTORS = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); + WEBGL_INFO.MAX_VARYING_VECTORS = gl.getParameter(gl.MAX_VARYING_VECTORS); + gl.getSupportedExtensions().forEach(function (ext) { + WEBGL_INFO.SUPPORTED_EXTENSIONS[ext] = true; + }); + } + } + /** * @desc Pick result returned by {@link Scene#pick}. * @@ -10042,16 +10042,16 @@ this.touchInput = false; /** - * True when snapped to the nearest vertex position. + * True when snapped to nearest edge. * @type {boolean} */ - this.snappedToVertex = false; + this.snappedToEdge = false; /** - * True when snapped to the nearest edge. + * True when snapped to nearest vertex. * @type {boolean} */ - this.snappedToEdge = false; + this.snappedToVertex = false; this._canvasPos = new Int16Array([0, 0]); this._origin = new Float64Array([0, 0, 0]); @@ -10324,8 +10324,8 @@ this._gotWorldNormal = false; this._gotUV = false; this.touchInput = false; - this.snappedToVertex = false; this.snappedToEdge = false; + this.snappedToVertex = false; } } @@ -10499,7 +10499,7 @@ gl.attachShader(this.handle, this._fragmentShader.handle); gl.linkProgram(this.handle); this.linked = gl.getProgramParameter(this.handle, gl.LINK_STATUS); - // HACK: Disable validation temporarily: https://github.com/xeolabs/xeokit/issues/5 + // HACK: Disable validation temporarily // Perhaps we should defer validation until render-time, when the program has values set for all inputs? this.validated = true; if (!this.linked || !this.validated) { @@ -10924,7 +10924,7 @@ const POINT_SIZE = 20; const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces - const tempVec3a$D = math.vec3(); + const tempVec3a$C = math.vec3(); /** * Manages occlusion testing. Private member of a Renderer. @@ -11261,7 +11261,7 @@ gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; - gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D)); + gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C)); gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } } @@ -12195,7 +12195,7 @@ read(pickX, pickY, glFormat = null, glType = null, arrayType = Uint8Array, arrayMultiplier = 4) { const x = pickX; - const y = (this.buffer.height || this.gl.drawingBufferHeight) - pickY; + const y = this.buffer.height ? (this.buffer.height - pickY - 1) : (this.gl.drawingBufferHeight - pickY); const pix = new arrayType(arrayMultiplier); const gl = this.gl; gl.readPixels(x, y, 1, 1, glFormat || gl.RGBA, glType || gl.UNSIGNED_BYTE, pix, 0); @@ -13302,10 +13302,10 @@ * Picks an Entity. * @private */ - this.pick = (function () { + this.pick = (function () { const tempVec3a = math.vec3(); - const tempMat4a = math.mat4(); + math.mat4(); const tempMat4b = math.mat4(); const randomVec3 = math.vec3(); @@ -13347,13 +13347,11 @@ // Picking with arbitrary World-space ray // Align camera along ray and fire ray through center of canvas - - const pickFrustumMatrix = math.frustumMat4(-1, 1, -1, 1, 0.01, scene.camera.project.far, tempMat4a); - + if (params.matrix) { pickViewMatrix = params.matrix; - pickProjMatrix = pickFrustumMatrix; + pickProjMatrix = scene.camera.projMatrix; } else { @@ -13370,7 +13368,7 @@ math.cross3Vec3(worldRayDir, randomVec3, up); pickViewMatrix = math.lookAtMat4v(worldRayOrigin, look, up, tempMat4b); - pickProjMatrix = pickFrustumMatrix; + pickProjMatrix = scene.camera.projMatrix; pickResult.origin = worldRayOrigin; pickResult.direction = worldRayDir; @@ -13392,7 +13390,7 @@ } } - const pickBuffer = renderBufferManager.getRenderBuffer("pick"); + const pickBuffer = renderBufferManager.getRenderBuffer("pick", { size: [1, 1] }); pickBuffer.bind(); @@ -13454,10 +13452,13 @@ frameCtx.pickViewMatrix = pickViewMatrix; frameCtx.pickProjMatrix = pickProjMatrix; frameCtx.pickInvisible = !!params.pickInvisible; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); - - gl.clearColor(0, 0, 0, 0); + gl.viewport(0, 0, 1, 1); + gl.depthMask(true); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); @@ -13490,8 +13491,7 @@ } } } - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); let pickID = pix[0] + (pix[1] * 256) + (pix[2] * 256 * 256) + (pix[3] * 256 * 256 * 256); if (pickID < 0) { @@ -13516,8 +13516,12 @@ frameCtx.pickViewMatrix = pickViewMatrix; // Can be null frameCtx.pickProjMatrix = pickProjMatrix; // Can be null // frameCtx.pickInvisible = !!params.pickInvisible; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.viewport(0, 0, 1, 1); gl.clearColor(0, 0, 0, 0); gl.enable(gl.DEPTH_TEST); @@ -13527,8 +13531,7 @@ pickable.drawPickTriangles(frameCtx); - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); let primIndex = pix[0] + (pix[1] * 256) + (pix[2] * 256 * 256) + (pix[3] * 256 * 256 * 256); @@ -13560,10 +13563,15 @@ frameCtx.pickZFar = nearAndFar[1]; frameCtx.pickElementsCount = pickable.pickElementsCount; frameCtx.pickElementsOffset = pickable.pickElementsOffset; - - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; + + gl.viewport(0, 0, 1, 1); gl.clearColor(0, 0, 0, 0); + gl.depthMask(true); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); @@ -13571,8 +13579,7 @@ pickable.drawPickDepths(frameCtx); // Draw color-encoded fragment screen-space depths - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickBuffer.read(0, 0); const screenZ = unpackDepth(pix); // Get screen-space Z at the given canvas coords @@ -13621,7 +13628,7 @@ })(); function snapInitDepthBuf(frameCtx) { - frameCtx.snapPickLayerParams = {}; + frameCtx.snapPickLayerParams = []; frameCtx.snapPickLayerNumber = 0; for (let type in drawableTypeInfo) { const drawableInfo = drawableTypeInfo[type]; @@ -13639,8 +13646,8 @@ } function snapPickDrawSnapDepths(frameCtx) { - frameCtx.snapPickLayerParams = {}; - frameCtx.snapPickLayerNumber = 0; + frameCtx.snapPickLayerParams = frameCtx.snapPickLayerParams || []; + frameCtx.snapPickLayerNumber = frameCtx.snapPickLayerParams.length; for (let type in drawableTypeInfo) { const drawableInfo = drawableTypeInfo[type]; const drawableList = drawableInfo.drawableList; @@ -13666,12 +13673,17 @@ /** * @param {[number, number]} canvasPos - * @param {number} snapRadiusInPixels - * @param {"vertex"|"edge"} snapMode + * @param {number} [snapRadiusInPixels=30] + * @param {boolean} [snapToVertex=true] + * @param {boolean} [snapToEdge=true] * - * @returns {{worldPos:number[],snappedWorldPos:null|number[],snappedCanvasPos:null|number[]}} + * @returns {{worldPos:number[],snappedWorldPos:null|number[],snappedCanvasPos:null|number[], snapType:null|"vertex"|"edge"}} */ - this.snapPick = function (canvasPos, snapRadiusInPixels = 50, snapMode = "vertex") { + this.snapPick = function (canvasPos, snapRadiusInPixels = 30, snapToVertex = true, snapToEdge = true) { + + if (!snapToVertex && !snapToEdge) { + return this.pick({canvasPos, pickSurface: true}); + } frameCtx.reset(); frameCtx.backfaces = true; @@ -13697,8 +13709,6 @@ gl.drawingBufferHeight / (2 * snapRadiusInPixels), ]; - frameCtx.snapMode = snapMode; - // Bind and clear the snap render target vertexPickBuffer.bind(gl.RGBA32I); @@ -13735,7 +13745,26 @@ const layerParamsSurface = snapInitDepthBuf(frameCtx); // b) snap-pick - const layerParamsSnap = snapPickDrawSnapDepths(frameCtx); + const layerParamsSnap = []; + frameCtx.snapPickLayerParams = layerParamsSnap; + + gl.depthMask(false); + + if (snapToVertex && snapToEdge) { + frameCtx.snapMode = "edge"; + snapPickDrawSnapDepths(frameCtx); + + frameCtx.snapMode = "vertex"; + frameCtx.snapPickLayerNumber++; + + snapPickDrawSnapDepths(frameCtx); + } else { + frameCtx.snapMode = snapToVertex ? "vertex" : "edge"; + + snapPickDrawSnapDepths(frameCtx); + } + + gl.depthMask(true); // Read and decode the snapped coordinates @@ -13753,7 +13782,7 @@ const pickResultMiddleXY = snapPickResultArray.slice(middleIndex, middleIndex + 4); if (pickResultMiddleXY[3] !== 0) { - const pickedLayerParmasSurface = layerParamsSurface[Math.abs(pickResultMiddleXY[3])]; + const pickedLayerParmasSurface = layerParamsSurface[Math.abs(pickResultMiddleXY[3]) % layerParamsSurface.length]; const origin = pickedLayerParmasSurface.origin; const scale = pickedLayerParmasSurface.coordinateScale; worldPos = [ @@ -13771,7 +13800,6 @@ if (snapPickResultArray[i + 3] > 0) { const pixelNumber = Math.floor(i / 4); const w = vertexPickBuffer.size[0]; - vertexPickBuffer.size[1]; const x = pixelNumber % w - Math.floor(w / 2); const y = Math.floor(pixelNumber / w) - Math.floor(w / 2); const dist = (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))); @@ -13779,6 +13807,7 @@ x, y, dist, + isVertex: snapToVertex && snapToEdge ? snapPickResultArray[i + 3] > layerParamsSnap.length / 2 : snapToVertex, result: [ snapPickResultArray[i + 0], snapPickResultArray[i + 1], @@ -13790,12 +13819,19 @@ } let snappedWorldPos = null; + let snapType = null; if (snapPickResult.length > 0) { + // vertex snap first, then edge snap snapPickResult.sort((a, b) => { - return a.dist - b.dist + if (a.isVertex !== b.isVertex) { + return a.isVertex ? -1 : 1; + } else { + return a.dist - b.dist; + } }); + snapType = snapPickResult[0].isVertex ? "vertex" : "edge"; snapPickResult = snapPickResult[0].result; const pickedLayerParmas = layerParamsSnap[snapPickResult[3]]; @@ -13821,6 +13857,9 @@ } return { + snapType, + snappedToVertex: snapType === "vertex", + snappedToEdge: snapType === "edge", worldPos, snappedWorldPos, snappedCanvasPos @@ -13841,21 +13880,34 @@ frameCtx.pickOrigin = pickResult.origin; frameCtx.pickViewMatrix = pickViewMatrix; frameCtx.pickProjMatrix = pickProjMatrix; + frameCtx.pickClipPos = [ + getClipPosX(canvasPos[0], gl.drawingBufferWidth), + getClipPosY(canvasPos[1], gl.drawingBufferHeight), + ]; - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); + const pickNormalBuffer = renderBufferManager.getRenderBuffer("pick-normal", { size: [3, 3] }); + + pickNormalBuffer.bind(gl.RGBA32I); + + gl.viewport(0, 0, pickNormalBuffer.size[0], pickNormalBuffer.size[1]); - gl.clearColor(0, 0, 0, 0); gl.enable(gl.DEPTH_TEST); gl.disable(gl.CULL_FACE); gl.disable(gl.BLEND); - gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + gl.clear(gl.DEPTH_BUFFER_BIT); + gl.clearBufferiv(gl.COLOR, 0, new Int32Array([0, 0, 0, 0])); pickable.drawPickNormals(frameCtx); // Draw color-encoded fragment World-space normals - const resolutionScale = scene.canvas.resolutionScale; - const pix = pickBuffer.read(Math.round(canvasPos[0] * resolutionScale), Math.round(canvasPos[1] * resolutionScale)); + const pix = pickNormalBuffer.read(1, 1, gl.RGBA_INTEGER, gl.INT, Int32Array, 4); + + pickNormalBuffer.unbind(); - const worldNormal = [(pix[0] / 256.0) - 0.5, (pix[1] / 256.0) - 0.5, (pix[2] / 256.0) - 0.5]; + const worldNormal = [ + pix[0] / math.MAX_INT, + pix[1] / math.MAX_INT, + pix[2] / math.MAX_INT, + ]; math.normalizeVec3(worldNormal); @@ -16645,10 +16697,10 @@ } const tempVec3$7 = math.vec3(); - const tempVec3b$q = math.vec3(); - const tempVec3c$m = math.vec3(); - const tempVec3d$g = math.vec3(); - const tempVec3e$8 = math.vec3(); + const tempVec3b$r = math.vec3(); + const tempVec3c$n = math.vec3(); + const tempVec3d$h = math.vec3(); + const tempVec3e$4 = math.vec3(); const tempVec3f$2 = math.vec3(); const tempVec4a$d = math.vec4(); const tempVec4b$c = math.vec4(); @@ -16958,9 +17010,9 @@ orbitYaw(angleInc) { let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$7); math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat); - lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q); - this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector - this.up = math.transformPoint3(tempMat, this._up, tempVec3d$g); // Rotate 'up' vector + lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$r); + this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$n); // Set eye position as 'look' plus 'eye' vector + this.up = math.transformPoint3(tempMat, this._up, tempVec3d$h); // Rotate 'up' vector } /** @@ -16976,10 +17028,10 @@ } } let eye2 = math.subVec3(this._eye, this._look, tempVec3$7); - const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m)); + const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$r), math.normalizeVec3(this._up, tempVec3c$n)); math.rotationMat4v(angleInc * 0.0174532925, left, tempMat); - eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$g); - this.up = math.transformPoint3(tempMat, this._up, tempVec3e$8); + eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$h); + this.up = math.transformPoint3(tempMat, this._up, tempVec3e$4); this.eye = math.addVec3(eye2, this._look, tempVec3f$2); } @@ -16991,10 +17043,10 @@ yaw(angleInc) { let look2 = math.subVec3(this._look, this._eye, tempVec3$7); math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat); - look2 = math.transformPoint3(tempMat, look2, tempVec3b$q); - this.look = math.addVec3(look2, this._eye, tempVec3c$m); + look2 = math.transformPoint3(tempMat, look2, tempVec3b$r); + this.look = math.addVec3(look2, this._eye, tempVec3c$n); if (this._gimbalLock) { - this.up = math.transformPoint3(tempMat, this._up, tempVec3d$g); + this.up = math.transformPoint3(tempMat, this._up, tempVec3d$h); } } @@ -17011,11 +17063,11 @@ } } let look2 = math.subVec3(this._look, this._eye, tempVec3$7); - const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m)); + const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$r), math.normalizeVec3(this._up, tempVec3c$n)); math.rotationMat4v(angleInc * 0.0174532925, left, tempMat); this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2); - look2 = math.transformPoint3(tempMat, look2, tempVec3d$g); - this.look = math.addVec3(look2, this._eye, tempVec3e$8); + look2 = math.transformPoint3(tempMat, look2, tempVec3d$h); + this.look = math.addVec3(look2, this._eye, tempVec3e$4); } /** @@ -17028,25 +17080,25 @@ const vec = [0, 0, 0]; let v; if (pan[0] !== 0) { - const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$q)); + const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$r)); v = math.mulVec3Scalar(left, pan[0]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } if (pan[1] !== 0) { - v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]); + v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$n), pan[1]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } if (pan[2] !== 0) { - v = math.mulVec3Scalar(math.normalizeVec3(eye2, tempVec3d$g), pan[2]); + v = math.mulVec3Scalar(math.normalizeVec3(eye2, tempVec3d$h), pan[2]); vec[0] += v[0]; vec[1] += v[1]; vec[2] += v[2]; } - this.eye = math.addVec3(this._eye, vec, tempVec3e$8); + this.eye = math.addVec3(this._eye, vec, tempVec3e$4); this.look = math.addVec3(this._look, vec, tempVec3f$2); } @@ -17057,13 +17109,13 @@ */ zoom(delta) { const vec = math.subVec3(this._eye, this._look, tempVec3$7); - const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$q)); + const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$r)); const newLenLook = Math.abs(lenLook + delta); if (newLenLook < 0.5) { return; } - const dir = math.normalizeVec3(vec, tempVec3c$m); - this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$g); + const dir = math.normalizeVec3(vec, tempVec3c$n); + this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$h); } /** @@ -22726,116 +22778,6 @@ } } - const tempVec3a$C = math.vec3(); - const tempVec3b$p = math.vec3(); - const tempMat4a$g = math.mat4(); - - /** - * @private - */ - class FrustumPlane { - - constructor() { - this.normal = math.vec3(); - this.offset = 0; - this.testVertex = math.vec3(); - } - - set(nx, ny, nz, offset) { - const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz); - this.normal[0] = nx * s; - this.normal[1] = ny * s; - this.normal[2] = nz * s; - this.offset = offset * s; - this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0; - this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0; - this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0; - } - } - - /** - * @private - */ - class Frustum { - constructor() { - this.planes = [ - new FrustumPlane(), new FrustumPlane(), new FrustumPlane(), - new FrustumPlane(), new FrustumPlane(), new FrustumPlane() - ]; - } - } - - Frustum.INSIDE = 0; - Frustum.INTERSECT = 1; - Frustum.OUTSIDE = 2; - - /** @private */ - function setFrustum(frustum, viewMat, projMat) { - - const m = math.mulMat4(projMat, viewMat, tempMat4a$g); - - const m0 = m[0]; - const m1 = m[1]; - const m2 = m[2]; - const m3 = m[3]; - const m4 = m[4]; - const m5 = m[5]; - const m6 = m[6]; - const m7 = m[7]; - const m8 = m[8]; - const m9 = m[9]; - const m10 = m[10]; - const m11 = m[11]; - const m12 = m[12]; - const m13 = m[13]; - const m14 = m[14]; - const m15 = m[15]; - - frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12); - frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12); - frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13); - frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13); - frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14); - frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14); - } - - /** @private */ - function frustumIntersectsAABB3(frustum, aabb) { - - let ret = Frustum.INSIDE; - - const min = tempVec3a$C; - const max = tempVec3b$p; - - min[0] = aabb[0]; - min[1] = aabb[1]; - min[2] = aabb[2]; - max[0] = aabb[3]; - max[1] = aabb[4]; - max[2] = aabb[5]; - - const bminmax = [min, max]; - - for (let i = 0; i < 6; ++i) { - const plane = frustum.planes[i]; - if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) + - (plane.normal[1] * bminmax[plane.testVertex[1]][1]) + - (plane.normal[2] * bminmax[plane.testVertex[2]][2]) + - (plane.offset)) < 0.0) { - return Frustum.OUTSIDE; - } - - if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) + - (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) + - (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) + - (plane.offset)) < 0.0) { - ret = Frustum.INTERSECT; - } - } - - return ret; - } - /** * Data structure containing pre-initialized `LOD` data. * @@ -22844,6 +22786,18 @@ * @private */ + + const neverCullTypes = { + "IfcWall": true, + "IfcSlab": true, + "IfcFloor": true, + "IfcRoof": true, + "IfcSpace": true, + "IfcBeam": true, + "IfcStair": true, + "IfcPlate":true + }; + class LODState { /** @@ -22925,19 +22879,24 @@ if (entityList.length === 0) { return; } + const metaScene = sceneModel.scene.viewer.metaScene; const entitiesInLOD = {}; const primCountInLOD = {}; + const maxSize = 20; + const minComplexity = 25; for (let i = 0, len = entityList.length; i < len; i++) { const entity = entityList[i]; - entity.numPrimitives; - math.getAABB3Diag(entity.aabb); - // // const isCullable = ((minComplexity <= entityComplexity) && (entitySize <= maxSize)); - // const isCullable = ( (entitySize <= maxSize)); - // - // if (!isCullable) { - // continue; - // } + const metaObject = metaScene.metaObjects[entity.id]; + if (metaObject && neverCullTypes[metaObject.type]) { + continue; + } + const entityComplexity = entity.numPrimitives; + const entitySize = math.getAABB3Diag(entity.aabb); + const isCullable = ((minComplexity <= entityComplexity) && (entitySize <= maxSize)); + if (!isCullable) { + continue; + } let lodLevel = 0, len; for (lodLevel = 0, len = this.primLODLevels.length; lodLevel < len; lodLevel++) { if (entity.numPrimitives >= this.primLODLevels [lodLevel]) { @@ -22982,7 +22941,6 @@ } const entitiesInLOD = lodState.entitiesInLOD [lodState.primLODLevels[lodState.lodLevelIndex]] || []; for (let i = 0, len = entitiesInLOD.length; i < len; i++) { - entitiesInLOD[i].culledLOD = true; } lodState.lodLevelIndex++; @@ -23018,12 +22976,12 @@ let lodState = this.lodState; let retVal = false; if (currentFPS < lodState.targetFps) { - if (++lodState.consecutiveFramesWithoutTargetFps > 0) { + if (++lodState.consecutiveFramesWithoutTargetFps > 5) { lodState.consecutiveFramesWithoutTargetFps = 0; retVal = this._increaseLODLevelIndex(); } } else if (currentFPS > (lodState.targetFps + 4)) { - if (++lodState.consecutiveFramesWithTargetFps > 1) { + if (++lodState.consecutiveFramesWithTargetFps > 5) { lodState.consecutiveFramesWithTargetFps = 0; retVal = this._decreaseLODLevelIndex(); } @@ -23171,6 +23129,32 @@ return this._targetFPS; } + /** + * Sets the {@link MetaObject} types that are never culled. + * + * Default value is ````[]````. + * + * @type {string[]} + */ + set neverCullTypes(value) { + if (value === undefined || value === null) { + value = []; + } + this._neverCullTypes = value; + // this.glRedraw(); + } + + /** + * Gets the {@link MetaObject} types that are never culled. + * + * Default value is ````[]````. + * + * @type {string[]} + */ + get neverCullTypes() { + return this._neverCullTypes; + } + /** * Called within SceneModel constructors * @private @@ -27249,13 +27233,15 @@ * @param {Object} params Picking parameters. * @param {Number[]} [params.canvasPos] Canvas-space coordinates. When ray-picking, this will override the **origin** and ** direction** parameters and will cause the ray to be fired through the canvas at this position, directly along the negative View-space Z-axis. * @param {Number} [params.snapRadius=30] The snap radius, in canvas pixels - * @param {"vertex"|"edge"} [params.snapMode="vertex"] Whether to snap to vertex or edge. + * @param {boolean} [params.snapToVertex=true] Whether to snap to vertex. + * @param {boolean} [params.snapToEdge=true] Whether to snap to edge. */ snapPick(params) { return this._renderer.snapPick( params.canvasPos, params.snapRadius || 30, - params.snapMode || "vertex" + params.snapToVertex, + params.snapToEdge, ); } @@ -31509,6 +31495,16 @@ src.push(" mat[2][2] =1.0;"); src.push("}"); } + + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(" clipPos.xy -= pickClipPos;"); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("void main(void) {"); src.push("vec4 localPosition = vec4(position, 1.0); "); if (quantizedGeometry) { @@ -31535,7 +31531,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); return src; } @@ -31738,6 +31734,8 @@ const r = pickID & 0xFF; gl.uniform4f(this._uPickColor, r / 255, g / 255, b / 255, a / 255); + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + if (geometryState.indicesBuf) { gl.drawElements(geometryState.primitive, geometryState.indicesBuf.numItems, geometryState.indicesBuf.itemType, 0); frameCtx.drawElements++; @@ -31771,6 +31769,7 @@ this._aPosition = program.getAttribute("position"); this._uClippable = program.getLocation("clippable"); this._uPickColor = program.getLocation("pickColor"); + this._uPickClipPos = program.getLocation("pickClipPos"); this._uOffset = program.getLocation("offset"); if (scene.logarithmicDepthBufferEnabled ) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); @@ -31808,8 +31807,6 @@ const scene = mesh.scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; const quantizedGeometry = !!mesh._geometry._state.compressGeometry; - mesh._state.billboard; - mesh._state.stationary; const src = []; src.push('#version 300 es'); src.push("// Surface picking vertex shader"); @@ -31831,6 +31828,16 @@ src.push("}"); src.push("out float isPerspective;"); } + + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(" clipPos.xy -= pickClipPos;"); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("out vec4 vColor;"); if (quantizedGeometry) { src.push("uniform mat4 positionsDecodeMatrix;"); @@ -31852,7 +31859,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); return src; } @@ -32045,6 +32052,9 @@ } else { this._aPosition.bindArrayBuffer(positionsBuf); } + + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + pickColorsBuf.bind(); gl.enableVertexAttribArray(this._aColor.location); gl.vertexAttribPointer(this._aColor.location, pickColorsBuf.itemSize, pickColorsBuf.itemType, true, 0, 0); // Normalize @@ -32076,6 +32086,7 @@ } this._aPosition = program.getAttribute("position"); this._aColor = program.getAttribute("color"); + this._uPickClipPos = program.getLocation("pickClipPos"); this._uClippable = program.getLocation("clippable"); this._uOffset = program.getLocation("offset"); if (scene.logarithmicDepthBufferEnabled ) { @@ -40509,8 +40520,8 @@ const tempVec3$5 = math.vec3(); const tempVec3a$v = math.vec3(); - const tempVec3b$o = math.vec3(); - const tempVec3c$l = math.vec3(); + const tempVec3b$q = math.vec3(); + const tempVec3c$m = math.vec3(); /** * {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects. @@ -41135,7 +41146,7 @@ scene.clearSectionPlanes(); - if (bcfViewpoint.clipping_planes) { + if (bcfViewpoint.clipping_planes && bcfViewpoint.clipping_planes.length > 0) { bcfViewpoint.clipping_planes.forEach(function (e) { let pos = xyzObjectToArray(e.location, tempVec3$5); let dir = xyzObjectToArray(e.direction, tempVec3$5); @@ -41155,7 +41166,7 @@ scene.clearLines(); - if (bcfViewpoint.lines) { + if (bcfViewpoint.lines && bcfViewpoint.lines.length > 0) { const positions = []; const indices = []; let i = 0; @@ -41185,13 +41196,13 @@ scene.clearBitmaps(); - if (bcfViewpoint.bitmaps) { + if (bcfViewpoint.bitmaps && bcfViewpoint.bitmaps.length > 0) { bcfViewpoint.bitmaps.forEach(function (e) { const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png" const bitmap_data = e.bitmap_data; // base64 let location = xyzObjectToArray(e.location, tempVec3a$v); - let normal = xyzObjectToArray(e.normal, tempVec3b$o); - let up = xyzObjectToArray(e.up, tempVec3c$l); + let normal = xyzObjectToArray(e.normal, tempVec3b$q); + let up = xyzObjectToArray(e.up, tempVec3c$m); let height = e.height || 1; if (!bitmap_type) { return; @@ -41454,6 +41465,428 @@ math.vec3(); + /** + * {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching + * the Viewer to faster, lower-quality rendering modes whenever we interact. + * + * [](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin) + * + * FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas + * resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those + * rendering features and the original canvas scale, after a configured delay. + * + * Depending on how we configure FastNavPlugin, we essentially switch to a smooth-rendering low-quality view while + * interacting, then return to the normal higher-quality view after we stop, following an optional delay. + * + * Down-scaling the canvas resolution gives particularly good results. For example, scaling by ````0.5```` means that + * we're rendering a quarter of the pixels while interacting, which can make the Viewer noticeably smoother with big models. + * + * The screen capture above shows FastNavPlugin in action. In this example, whenever we move the Camera or resize the Canvas, + * FastNavPlugin switches off enhanced edges and ambient shadows (SAO), and down-scales the canvas, making it slightly + * blurry. When ````0.5```` seconds passes with no interaction, the plugin shows edges and SAO again, and restores the + * original canvas scale. + * + * # Usage + * + * In the example below, we'll create a {@link Viewer}, add a {@link FastNavPlugin}, then use an {@link XKTLoaderPlugin} to load a model. + * + * Whenever we interact with the Viewer, our FastNavPlugin will: + * + * * hide edges, + * * hide ambient shadows (SAO), + * * hide physically-based materials (switching to non-PBR), + * * hide transparent objects, and + * * scale the canvas resolution by 0.5, causing the GPU to render 75% less pixels. + *
+ * + * We'll also configure a 0.5 second delay before we transition back to high-quality each time we stop ineracting, so that we're + * not continually flipping between low and high quality as we interact. Since we're only rendering ambient shadows when not interacting, we'll also treat ourselves + * to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect. + * + * * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin)] + * + * ````javascript + * import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js"; + * + * // Create a Viewer with PBR and SAO enabled + * + * const viewer = new Viewer({ + * canvasId: "myCanvas", + * transparent: true, + * pbr: true, // Enable physically-based rendering for Viewer + * sao: true // Enable ambient shadows for Viewer + * }); + * + * viewer.scene.camera.eye = [-66.26, 105.84, -281.92]; + * viewer.scene.camera.look = [42.45, 49.62, -43.59]; + * viewer.scene.camera.up = [0.05, 0.95, 0.15]; + * + * // Higher-quality SAO settings + * + * viewer.scene.sao.enabled = true; + * viewer.scene.sao.numSamples = 60; + * viewer.scene.sao.kernelRadius = 170; + * + * // Install a FastNavPlugin + * + * new FastNavPlugin(viewer, { + * hideEdges: true, // Don't show edges while we interact (default is true) + * hideSAO: true, // Don't show ambient shadows while we interact (default is true) + * hideColorTexture: true, // No color textures while we interact (default is true) + * hidePBR: true, // No physically-based rendering while we interact (default is true) + * hideTransparentObjects: true, // Hide transparent objects while we interact (default is false) + * scaleCanvasResolution: true, // Scale canvas resolution while we interact (default is false) + * scaleCanvasResolutionFactor: 0.5, // Factor by which we scale canvas resolution when we interact (default is 0.6) + * delayBeforeRestore: true, // When we stop interacting, delay before restoring normal render (default is true) + * delayBeforeRestoreSeconds: 0.5 // The delay duration, in seconds (default is 0.5) + * }); + * + * // Load a BIM model from XKT + * + * const xktLoader = new XKTLoaderPlugin(viewer); + * + * const model = xktLoader.load({ + * id: "myModel", + * src: "./models/xkt/HolterTower.xkt", + * sao: true, // Enable ambient shadows for this model + * pbr: true // Enable physically-based rendering for this model + * }); + * ```` + * + * @class FastNavPlugin + */ + class FastNavPlugin extends Plugin { + + /** + * @constructor + * @param {Viewer} viewer The Viewer. + * @param {Object} cfg FastNavPlugin configuration. + * @param {String} [cfg.id="FastNav"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. + * @param {Boolean} [cfg.hideColorTexture=true] Whether to temporarily hide color textures whenever we interact with the Viewer. + * @param {Boolean} [cfg.hidePBR=true] Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideSAO=true] Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideEdges=true] Whether to temporarily hide edges whenever we interact with the Viewer. + * @param {Boolean} [cfg.hideTransparentObjects=false] Whether to temporarily hide transparent objects whenever we interact with the Viewer. + * @param {Number} [cfg.scaleCanvasResolution=false] Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. + * @param {Number} [cfg.scaleCanvasResolutionFactor=0.6] The factor by which we downscale the canvas resolution whenever we interact with the Viewer. + * @param {Boolean} [cfg.delayBeforeRestore=true] Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. + * @param {Number} [cfg.delayBeforeRestoreSeconds=0.5] Delay in seconds before restoring normal rendering after we stop interacting with the Viewer. + */ + constructor(viewer, cfg = {}) { + + super("FastNav", viewer); + + this._hideColorTexture = cfg.hideColorTexture !== false; + this._hidePBR = cfg.hidePBR !== false; + this._hideSAO = cfg.hideSAO !== false; + this._hideEdges = cfg.hideEdges !== false; + this._hideTransparentObjects = !!cfg.hideTransparentObjects; + this._scaleCanvasResolution = !!cfg.scaleCanvasResolution; + this._scaleCanvasResolutionFactor = cfg.scaleCanvasResolutionFactor || 0.6; + this._delayBeforeRestore = (cfg.delayBeforeRestore !== false); + this._delayBeforeRestoreSeconds = cfg.delayBeforeRestoreSeconds || 0.5; + + let timer = this._delayBeforeRestoreSeconds * 1000; + let fastMode = false; + + const switchToLowQuality = () => { + timer = (this._delayBeforeRestoreSeconds * 1000); + if (!fastMode) { + viewer.scene._renderer.setColorTextureEnabled(!this._hideColorTexture); + viewer.scene._renderer.setPBREnabled(!this._hidePBR); + viewer.scene._renderer.setSAOEnabled(!this._hideSAO); + viewer.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects); + viewer.scene._renderer.setEdgesEnabled(!this._hideEdges); + if (this._scaleCanvasResolution) { + viewer.scene.canvas.resolutionScale = this._scaleCanvasResolutionFactor; + } else { + viewer.scene.canvas.resolutionScale = 1; + } + fastMode = true; + } + }; + + const switchToHighQuality = () => { + viewer.scene.canvas.resolutionScale = 1; + viewer.scene._renderer.setEdgesEnabled(true); + viewer.scene._renderer.setColorTextureEnabled(true); + viewer.scene._renderer.setPBREnabled(true); + viewer.scene._renderer.setSAOEnabled(true); + viewer.scene._renderer.setTransparentEnabled(true); + fastMode = false; + }; + + this._onCanvasBoundary = viewer.scene.canvas.on("boundary", switchToLowQuality); + this._onCameraMatrix = viewer.scene.camera.on("matrix", switchToLowQuality); + + this._onSceneTick = viewer.scene.on("tick", (tickEvent) => { + if (!fastMode) { + return; + } + timer -= tickEvent.deltaTime; + if ((!this._delayBeforeRestore) || timer <= 0) { + switchToHighQuality(); + } + }); + + let down = false; + + this._onSceneMouseDown = viewer.scene.input.on("mousedown", () => { + down = true; + }); + + this._onSceneMouseUp = viewer.scene.input.on("mouseup", () => { + down = false; + }); + + this._onSceneMouseMove = viewer.scene.input.on("mousemove", () => { + if (!down) { + return; + } + switchToLowQuality(); + }); + } + + /** + * Gets whether to temporarily hide color textures whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding color textures. + */ + get hideColorTexture() { + return this._hideColorTexture; + } + + /** + * Sets whether to temporarily hide color textures whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideColorTexture ````true```` to hide color textures. + */ + set hideColorTexture(hideColorTexture) { + this._hideColorTexture = hideColorTexture; + } + + /** + * Gets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding PBR. + */ + get hidePBR() { + return this._hidePBR; + } + + /** + * Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hidePBR ````true```` to hide PBR. + */ + set hidePBR(hidePBR) { + this._hidePBR = hidePBR; + } + + /** + * Gets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding SAO. + */ + get hideSAO() { + return this._hideSAO; + } + + /** + * Sets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideSAO ````true```` to hide SAO. + */ + set hideSAO(hideSAO) { + this._hideSAO = hideSAO; + } + + /** + * Gets whether to temporarily hide edges whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @return {Boolean} ````true```` if hiding edges. + */ + get hideEdges() { + return this._hideEdges; + } + + /** + * Sets whether to temporarily hide edges whenever we interact with the Viewer. + * + * Default is ````true````. + * + * @param {Boolean} hideEdges ````true```` to hide edges. + */ + set hideEdges(hideEdges) { + this._hideEdges = hideEdges; + } + + /** + * Gets whether to temporarily hide transparent objects whenever we interact with the Viewer. + * + * Does not hide X-rayed, selected, highlighted objects. + * + * Default is ````false````. + * + * @return {Boolean} ````true```` if hiding transparent objects. + */ + get hideTransparentObjects() { + return this._hideTransparentObjects + } + + /** + * Sets whether to temporarily hide transparent objects whenever we interact with the Viewer. + * + * Does not hide X-rayed, selected, highlighted objects. + * + * Default is ````false````. + * + * @param {Boolean} hideTransparentObjects ````true```` to hide transparent objects. + */ + set hideTransparentObjects(hideTransparentObjects) { + this._hideTransparentObjects = (hideTransparentObjects !== false); + } + + /** + * Gets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. + * + * Default is ````false````. + * + * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. + * + * @return {Boolean} ````true```` if scaling the canvas resolution. + */ + get scaleCanvasResolution() { + return this._scaleCanvasResolution; + } + + /** + * Sets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. + * + * Default is ````false````. + * + * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. + * + * @param {Boolean} scaleCanvasResolution ````true```` to scale the canvas resolution. + */ + set scaleCanvasResolution(scaleCanvasResolution) { + this._scaleCanvasResolution = scaleCanvasResolution; + } + + /** + * Gets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. + * + * Default is ````0.6````. + * + * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. + * + * @return {Number} Factor by which we scale the canvas resolution. + */ + get scaleCanvasResolutionFactor() { + return this._scaleCanvasResolutionFactor; + } + + /** + * Sets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. + * + * Accepted range is ````[0.0 .. 1.0]````. + * + * Default is ````0.6````. + * + * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. + * + * @param {Number} scaleCanvasResolutionFactor Factor by which we scale the canvas resolution. + */ + set scaleCanvasResolutionFactor(scaleCanvasResolutionFactor) { + this._scaleCanvasResolutionFactor = scaleCanvasResolutionFactor || 0.6; + } + + /** + * Gets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. + * + * Default is ````true````. + * + * @return {Boolean} Whether to have a delay. + */ + get delayBeforeRestore() { + return this._delayBeforeRestore; + } + + /** + * Sets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. + * + * Default is ````true````. + * + * @param {Boolean} delayBeforeRestore Whether to have a delay. + */ + set delayBeforeRestore(delayBeforeRestore) { + this._delayBeforeRestore = delayBeforeRestore; + } + + /** + * Gets the delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. + * + * Default is ````0.5```` seconds. + * + * @return {Number} Delay in seconds. + */ + get delayBeforeRestoreSeconds() { + return this._delayBeforeRestoreSeconds; + } + + /** + * Sets the delay before restoring normal rendering after we stop interacting with the Viewer. + * + * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. + * + * Default is ````0.5```` seconds. + * + * @param {Number} delayBeforeRestoreSeconds Delay in seconds. + */ + set delayBeforeRestoreSeconds(delayBeforeRestoreSeconds) { + this._delayBeforeRestoreSeconds = delayBeforeRestoreSeconds !== null && delayBeforeRestoreSeconds !== undefined ? delayBeforeRestoreSeconds : 0.5; + } + + /** + * @private + */ + send(name, value) { + } + + /** + * Destroys this plugin. + */ + destroy() { + this.viewer.scene.camera.off(this._onCameraMatrix); + this.viewer.scene.canvas.off(this._onCanvasBoundary); + this.viewer.scene.input.off(this._onSceneMouseDown); + this.viewer.scene.input.off(this._onSceneMouseUp); + this.viewer.scene.input.off(this._onSceneMouseMove); + this.viewer.scene.off(this._onSceneTick); + super.destroy(); + } + } + /** * @desc Localization service for a {@link Viewer}. * @@ -42917,6 +43350,116 @@ math.vec3([0, -1, 0]); math.vec4([0, 0, 0, 1]); + const tempVec3a$t = math.vec3(); + const tempVec3b$o = math.vec3(); + const tempMat4a$h = math.mat4(); + + /** + * @private + */ + class FrustumPlane { + + constructor() { + this.normal = math.vec3(); + this.offset = 0; + this.testVertex = math.vec3(); + } + + set(nx, ny, nz, offset) { + const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz); + this.normal[0] = nx * s; + this.normal[1] = ny * s; + this.normal[2] = nz * s; + this.offset = offset * s; + this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0; + this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0; + this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0; + } + } + + /** + * @private + */ + class Frustum { + constructor() { + this.planes = [ + new FrustumPlane(), new FrustumPlane(), new FrustumPlane(), + new FrustumPlane(), new FrustumPlane(), new FrustumPlane() + ]; + } + } + + Frustum.INSIDE = 0; + Frustum.INTERSECT = 1; + Frustum.OUTSIDE = 2; + + /** @private */ + function setFrustum(frustum, viewMat, projMat) { + + const m = math.mulMat4(projMat, viewMat, tempMat4a$h); + + const m0 = m[0]; + const m1 = m[1]; + const m2 = m[2]; + const m3 = m[3]; + const m4 = m[4]; + const m5 = m[5]; + const m6 = m[6]; + const m7 = m[7]; + const m8 = m[8]; + const m9 = m[9]; + const m10 = m[10]; + const m11 = m[11]; + const m12 = m[12]; + const m13 = m[13]; + const m14 = m[14]; + const m15 = m[15]; + + frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12); + frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12); + frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13); + frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13); + frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14); + frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14); + } + + /** @private */ + function frustumIntersectsAABB3(frustum, aabb) { + + let ret = Frustum.INSIDE; + + const min = tempVec3a$t; + const max = tempVec3b$o; + + min[0] = aabb[0]; + min[1] = aabb[1]; + min[2] = aabb[2]; + max[0] = aabb[3]; + max[1] = aabb[4]; + max[2] = aabb[5]; + + const bminmax = [min, max]; + + for (let i = 0; i < 6; ++i) { + const plane = frustum.planes[i]; + if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) + + (plane.normal[1] * bminmax[plane.testVertex[1]][1]) + + (plane.normal[2] * bminmax[plane.testVertex[2]][2]) + + (plane.offset)) < 0.0) { + return Frustum.OUTSIDE; + } + + if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) + + (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) + + (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) + + (plane.offset)) < 0.0) { + ret = Frustum.INTERSECT; + } + } + + return ret; + } + const color$3 = math.vec3(); /** @@ -43437,10 +43980,9 @@ const edgesDefaultColor = new Float32Array([0, 0, 0, 1]); const tempVec4 = math.vec4(); - const tempVec3a$t = math.vec3(); - math.vec3(); - const tempVec3c$k = math.vec3(); - const tempMat4a$f = math.mat4(); + const tempVec3a$s = math.vec3(); + const tempVec3c$l = math.vec3(); + const tempMat4a$g = math.mat4(); class VBOSceneModelRenderer { constructor(scene, withSAO = false, {instancing = false, edges = false} = {}) { @@ -43511,6 +44053,23 @@ return src; } + _addRemapClipPosLines(src, viewportSize = 1) { + src.push("uniform vec2 drawingBufferSize;"); + src.push("uniform vec2 pickClipPos;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + if (viewportSize === 1) { + src.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"); + } else { + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${viewportSize}));`); + } + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + return src; + } + getValid() { return this._hash === this._getHash(); } @@ -43534,7 +44093,7 @@ const sectionPlane = sectionPlanes[sectionPlaneIndex]; const origin = layer._state.origin; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -43644,6 +44203,8 @@ this._aPickColor = program.getAttribute("pickColor"); this._uPickZNear = program.getLocation("pickZNear"); this._uPickZFar = program.getLocation("pickZFar"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uColorMap = "uColorMap"; this._uMetallicRoughMap = "uMetallicRoughMap"; @@ -43684,7 +44245,6 @@ const program = this._program; const lightsState = scene._lightsState; const lights = lightsState.lights; - const project = scene.camera.project; program.bind(); @@ -43694,6 +44254,10 @@ gl.uniform4fv(this._uLightAmbient, lightsState.getAmbientColorAndIntensity()); } + if (this._uGammaFactor) { + gl.uniform1f(this._uGammaFactor, scene.gammaFactor); + } + for (let i = 0, len = lights.length; i < len; i++) { const light = lights[i]; @@ -43711,43 +44275,6 @@ gl.uniform3fv(this._uLightDir[i], light.dir); } } - - if (this._withSAO) { - const sao = scene.sao; - const saoEnabled = sao.possible; - if (saoEnabled) { - const viewportWidth = gl.drawingBufferWidth; - const viewportHeight = gl.drawingBufferHeight; - tempVec4[0] = viewportWidth; - tempVec4[1] = viewportHeight; - tempVec4[2] = sao.blendCutoff; - tempVec4[3] = sao.blendFactor; - gl.uniform4fv(this._uSAOParams, tempVec4); - this._program.bindTexture(this._uOcclusionTexture, frameCtx.occlusionTexture, 0); - } - } - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(project.far + 1.0) / Math.LN2); - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } - - if (this._uGammaFactor) { - gl.uniform1f(this._uGammaFactor, scene.gammaFactor); - } - - if (this._uPickInvisible) { - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - } - - - if (this._uShadowViewMatrix) { - gl.uniformMatrix4fv(this._uShadowViewMatrix, false, frameCtx.shadowViewMatrix); - } - - if (this._uShadowProjMatrix) { - gl.uniformMatrix4fv(this._uShadowProjMatrix, false, frameCtx.shadowProjMatrix); - } } _makeVAO(state) { @@ -43779,14 +44306,14 @@ } - this._aPosition.bindArrayBuffer(this._instancing ? state.positionsBuf : state.positionsBuf); + this._aPosition.bindArrayBuffer(state.positionsBuf); if (this._aUV) { - this._aUV.bindArrayBuffer(this._instancing ? state.uvBuf : state.uvBuf); + this._aUV.bindArrayBuffer(state.uvBuf); } if (this._aNormal) { - this._aNormal.bindArrayBuffer(this._instancing ? state.normalsBuf : state.normalsBuf); + this._aNormal.bindArrayBuffer(state.normalsBuf); } if (this._aMetallicRoughness) { @@ -43797,7 +44324,7 @@ } if (this._aColor) { - this._aColor.bindArrayBuffer(state.colorsBuf ? state.colorsBuf : state.colorsBuf); + this._aColor.bindArrayBuffer(state.colorsBuf); if (this._instancing && state.colorsBuf) { gl.vertexAttribDivisor(this._aColor.location, 1); } @@ -43885,9 +44412,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$t; + const rtcOrigin = tempVec3a$s; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$l); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -43899,7 +44426,7 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - this._matricesUniformBlockBufferData.set(createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$f), offset += mat4Size); + this._matricesUniformBlockBufferData.set(createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$g), offset += mat4Size); } else { this._matricesUniformBlockBufferData.set(viewMatrix, offset += mat4Size); } @@ -43944,12 +44471,16 @@ gl.uniform1f(this._uPickZFar, frameCtx.pickZFar); } - if (this._uPositionsDecodeMatrix) { - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + if (this._uPickClipPos) { + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + } + + if (this._uDrawingBufferSize) { + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); } if (this._uUVDecodeMatrix) { - gl.uniformMatrix3fv(this._uUVDecodeMatrix, false, this._instancing ? state.uvDecodeMatrix : state.uvDecodeMatrix); + gl.uniformMatrix3fv(this._uUVDecodeMatrix, false, state.uvDecodeMatrix); } if (this._uIntensityRange && pointsMaterial.filterIntensity) { @@ -44110,7 +44641,7 @@ class VBOSceneModelTriangleInstancingRenderer extends VBOSceneModelRenderer { - constructor(scene, withSAO, {edges = false} = {}) { + constructor(scene, withSAO, { edges = false} = {}) { super(scene, withSAO, {instancing: true, edges}); } @@ -45123,6 +45654,8 @@ src.push("out float vFlags;"); } + this._addRemapClipPosLines(src); + src.push("out vec4 vPickColor;"); src.push("void main(void) {"); @@ -45150,7 +45683,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45249,6 +45782,9 @@ src.push("out vec4 vWorldPosition;"); src.push("out float vFlags;"); } + + this._addRemapClipPosLines(src); + src.push("out vec4 vViewPosition;"); src.push("void main(void) {"); @@ -45274,7 +45810,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45372,6 +45908,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -45416,7 +45954,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -45452,7 +45990,7 @@ } } src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -45469,7 +46007,7 @@ if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); } - src.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(vWorldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -46519,6 +47057,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -46552,7 +47092,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -46587,7 +47127,7 @@ src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -46607,7 +47147,7 @@ src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -46850,6 +47390,7 @@ src.push("vec4 colorTexel = color * sRGBToLinear(texture(uColorMap, vUV));"); } else { src.push("vec4 colorTexel = color * texture(uColorMap, vUV);"); + } src.push("float opacity = color.a;"); @@ -46969,6 +47510,23 @@ } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesBatchingSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesBatchingPickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesBatchingPickDepthRenderer(this._scene); + } + } + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesBatchingColorRenderer(this._scene, false); @@ -47175,8 +47733,10 @@ batchingRenderers = new TrianglesBatchingRenderers(scene); cachdRenderers$1[sceneId] = batchingRenderers; batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); scene.on("compile", () => { batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachdRenderers$1[sceneId]; @@ -47362,32 +47922,16 @@ ]; } - const tempVec3a$s = math.vec3(); - const tempVec3b$m = math.vec3(); - const tempVec3c$j = math.vec3(); - const tempVec3d$f = math.vec3(); - const tempVec3e$7 = math.vec3(); - const tempMat4a$e = math.mat4(); + const tempVec3a$r = math.vec3(); + const tempVec3b$n = math.vec3(); + const tempVec3c$k = math.vec3(); + const tempVec3d$g = math.vec3(); + const tempMat4a$f = math.mat4(); /** * @private */ - class SnapBatchingDepthBufInitRenderer { - - constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); - } - + class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer { drawLayer(frameCtx, batchingLayer, renderPass) { if (!this._program) { @@ -47412,7 +47956,13 @@ const aabb = batchingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$s; + if (this._vaoCache.has(batchingLayer)) { + gl.bindVertexArray(this._vaoCache.get(batchingLayer)); + } else { + this._vaoCache.set(batchingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$r; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -47425,9 +47975,9 @@ let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$m; + const rtcOrigin = tempVec3b$n; if (origin) { - const rotatedOrigin = tempVec3c$j; + const rotatedOrigin = tempVec3c$k; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -47440,8 +47990,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$e); - rtcCameraEye = tempVec3d$f; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$f); + rtcCameraEye = tempVec3d$g; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -47463,80 +48013,43 @@ gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniform1i(this._uSolid, batchingLayer.solid); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix? gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = batchingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$7); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } + + this.setSectionPlanesStateUniforms(batchingLayer); //============================================================= // TODO: Use drawElements count and offset to draw only one entity //============================================================= - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, batchingLayer._state.positionsDecodeMatrix); - this._aPosition.bindArrayBuffer(state.positionsBuf); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - } - if (this._aFlags) { - this._aFlags.bindArrayBuffer(state.flagsBuf); - } + state.indicesBuf.bind(); gl.drawElements(gl.TRIANGLES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0); state.indicesBuf.unbind(); } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uSolid = program.getLocation("solid"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -47551,13 +48064,6 @@ this._program.bind(); } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; @@ -47584,11 +48090,9 @@ } src.push("in float flags;"); src.push("uniform bool pickInvisible;"); - src.push("uniform bool solid;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -47708,28 +48212,16 @@ } } - const tempVec3a$r = math.vec3(); - const tempVec3b$l = math.vec3(); - const tempVec3c$i = math.vec3(); - const tempVec3d$e = math.vec3(); - const tempVec3e$6 = math.vec3(); - const tempMat4a$d = math.mat4(); + const tempVec3a$q = math.vec3(); + const tempVec3b$m = math.vec3(); + const tempVec3c$j = math.vec3(); + const tempVec3d$f = math.vec3(); + const tempMat4a$e = math.mat4(); /** * @private */ - class SnapBatchingDepthRenderer { - - constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - + class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{ _getHash() { return this._scene._sectionPlanesState.getHash() + (this._scene.pointsMaterial.hash); } @@ -47758,7 +48250,13 @@ const aabb = batchingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$r; + if (this._vaoCache.has(batchingLayer)) { + gl.bindVertexArray(this._vaoCache.get(batchingLayer)); + } else { + this._vaoCache.set(batchingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$q; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -47771,9 +48269,9 @@ let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$l; + const rtcOrigin = tempVec3b$m; if (origin) { - const rotatedOrigin = tempVec3c$i; + const rotatedOrigin = tempVec3c$j; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -47786,8 +48284,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$d); - rtcCameraEye = tempVec3d$e; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$e); + rtcCameraEye = tempVec3d$f; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -47809,47 +48307,34 @@ gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix? gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = batchingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$6); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } + + this.setSectionPlanesStateUniforms(batchingLayer); + //============================================================= // TODO: Use drawElements count and offset to draw only one entity //============================================================= - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, batchingLayer._state.positionsDecodeMatrix); - this._aPosition.bindArrayBuffer(state.positionsBuf); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - } - if (this._aFlags) { - this._aFlags.bindArrayBuffer(state.flagsBuf); - } + if (frameCtx.snapMode === "edge") { state.edgeIndicesBuf.bind(); gl.drawElements(gl.LINES, state.edgeIndicesBuf.numItems, state.edgeIndicesBuf.itemType, 0); @@ -47860,39 +48345,10 @@ } _allocate() { - - const scene = this._scene; - const gl = scene.canvas.gl; - - this._program = new Program(gl, this._buildShader()); - - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -47908,13 +48364,6 @@ this._program.bind(); } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; @@ -47942,10 +48391,9 @@ } src.push("in float flags;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -48087,6 +48535,20 @@ } } + eagerCreateRenders() { + + // Pre-initialize renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new SnapBatchingDepthBufInitRenderer(this._scene, false); + } + if (!this._snapDepthRenderer) { + this._snapDepthRenderer = new SnapBatchingDepthRenderer(this._scene); + } + } + get snapDepthBufInitRenderer() { if (!this._snapDepthBufInitRenderer) { this._snapDepthBufInitRenderer = new SnapBatchingDepthBufInitRenderer(this._scene, false); @@ -48123,8 +48585,10 @@ batchingRenderers = new SnapBatchingRenderers(scene); cachedRenderers$6[sceneId] = batchingRenderers; batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); scene.on("compile", () => { batchingRenderers._compile(); + batchingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$6[sceneId]; @@ -48141,11 +48605,11 @@ math.vec4([0, 0, 0, 1]); math.OBB3(); - const tempVec3a$q = math.vec3(); - const tempVec3b$k = math.vec3(); - const tempVec3c$h = math.vec3(); - const tempVec3d$d = math.vec3(); - const tempVec3e$5 = math.vec3(); + const tempVec3a$p = math.vec3(); + const tempVec3b$l = math.vec3(); + const tempVec3c$i = math.vec3(); + const tempVec3d$e = math.vec3(); + const tempVec3e$3 = math.vec3(); const tempVec3f$1 = math.vec3(); const tempVec3g$1 = math.vec3(); @@ -49324,10 +49788,10 @@ const origin = state.origin; const offset = portion.offset; - const rtcRayOrigin = tempVec3a$q; - const rtcRayDir = tempVec3b$k; + const rtcRayOrigin = tempVec3a$p; + const rtcRayDir = tempVec3b$l; - rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC + rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$i) : worldRayOrigin); // World -> RTC rtcRayDir.set(worldRayDir); if (offset) { @@ -49336,8 +49800,8 @@ math.transformRay(this.model.worldNormalMatrix, rtcRayOrigin, rtcRayDir, rtcRayOrigin, rtcRayDir); // RTC -> local - const a = tempVec3d$d; - const b = tempVec3e$5; + const a = tempVec3d$e; + const b = tempVec3e$3; const c = tempVec3f$1; let gotIntersect = false; @@ -50360,6 +50824,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50404,7 +50870,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50494,6 +50960,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50536,7 +51004,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50639,6 +51107,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -50687,7 +51157,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -50727,7 +51197,7 @@ } } src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -50744,7 +51214,7 @@ if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); } - src.push(" outColor = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(vWorldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -51805,6 +52275,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src, 3); + if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); @@ -51843,7 +52315,7 @@ src.push("vFlags = flags;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push("}"); src.push("}"); return src; @@ -51879,8 +52351,7 @@ src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outColor;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { src.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"); @@ -51900,7 +52371,7 @@ src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outColor = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -52269,6 +52740,23 @@ } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesInstancingSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesInstancingPickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesInstancingPickDepthRenderer(this._scene); + } + } + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesInstancingColorRenderer(this._scene, false); @@ -52475,8 +52963,10 @@ instancingRenderers = new TrianglesInstancingRenderers(scene); cachedRenderers$5[sceneId] = instancingRenderers; instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); scene.on("compile", () => { instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$5[sceneId]; @@ -52486,30 +52976,19 @@ return instancingRenderers; } - const tempVec3a$p = math.vec3(); - const tempVec3b$j = math.vec3(); - const tempVec3c$g = math.vec3(); - const tempVec3d$c = math.vec3(); - const tempVec3e$4 = math.vec3(); - const tempMat4a$c = math.mat4(); + const tempVec3a$o = math.vec3(); + const tempVec3b$k = math.vec3(); + const tempVec3c$h = math.vec3(); + const tempVec3d$d = math.vec3(); + const tempMat4a$d = math.mat4(); /** * @private */ - class SnapInstancingDepthBufInitRenderer { + class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer { constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); + super(scene, false, { instancing: true }); } drawLayer(frameCtx, instancingLayer, renderPass) { @@ -52536,7 +53015,13 @@ const aabb = instancingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$p; + if (this._vaoCache.has(instancingLayer)) { + gl.bindVertexArray(this._vaoCache.get(instancingLayer)); + } else { + this._vaoCache.set(instancingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$o; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -52548,9 +53033,9 @@ let rtcViewMatrix; let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$j; + const rtcOrigin = tempVec3b$k; if (origin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$h); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -52562,8 +53047,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$c); - rtcCameraEye = tempVec3d$c; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$d); + rtcCameraEye = tempVec3d$d; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -52585,40 +53070,30 @@ gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = instancingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$4); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + this.setSectionPlanesStateUniforms(instancingLayer); this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf); this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf); @@ -52628,16 +53103,11 @@ gl.vertexAttribDivisor(this._aModelMatrixCol1.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol2.location, 1); - this._aPosition.bindArrayBuffer(state.positionsBuf); if (this._aFlags) { this._aFlags.bindArrayBuffer(state.flagsBuf); gl.vertexAttribDivisor(this._aFlags.location, 1); } - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - gl.vertexAttribDivisor(this._aOffset.location, 1); - } state.indicesBuf.bind(); gl.drawElementsInstanced(gl.TRIANGLES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0, state.numInstances); @@ -52656,34 +53126,10 @@ } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - this._aModelMatrixCol0 = program.getAttribute("modelMatrixCol0"); - this._aModelMatrixCol1 = program.getAttribute("modelMatrixCol1"); - this._aModelMatrixCol2 = program.getAttribute("modelMatrixCol2"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -52699,13 +53145,6 @@ } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const sectionPlanesState = scene._sectionPlanesState; @@ -52736,10 +53175,9 @@ src.push("in vec4 modelMatrixCol1;"); src.push("in vec4 modelMatrixCol2;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -52860,30 +53298,19 @@ } } - const tempVec3a$o = math.vec3(); - const tempVec3b$i = math.vec3(); - const tempVec3c$f = math.vec3(); - const tempVec3d$b = math.vec3(); - const tempVec3e$3 = math.vec3(); - const tempMat4a$b = math.mat4(); + const tempVec3a$n = math.vec3(); + const tempVec3b$j = math.vec3(); + const tempVec3c$g = math.vec3(); + const tempVec3d$c = math.vec3(); + const tempMat4a$c = math.mat4(); /** * @private */ - class SnapInstancingDepthRenderer { + class SnapInstancingDepthRenderer extends VBOSceneModelRenderer { constructor(scene) { - this._scene = scene; - this._hash = this._getHash(); - this._allocate(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); + super(scene, false, { instancing: true }); } drawLayer(frameCtx, instancingLayer, renderPass) { @@ -52910,7 +53337,13 @@ const aabb = instancingLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$o; + if (this._vaoCache.has(instancingLayer)) { + gl.bindVertexArray(this._vaoCache.get(instancingLayer)); + } else { + this._vaoCache.set(instancingLayer, this._makeVAO(state)); + } + + const coordinateScaler = tempVec3a$n; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -52923,9 +53356,9 @@ let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3b$i; + const rtcOrigin = tempVec3b$j; if (origin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -52937,8 +53370,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b); - rtcCameraEye = tempVec3d$b; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$c); + rtcCameraEye = tempVec3d$c; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -52960,51 +53393,41 @@ gl.uniform3fv(this._uCoordinateScaler, coordinateScaler); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + + let offset = 0; + const mat4Size = 4 * 4; + + this._matricesUniformBlockBufferData.set(rotationMatrixConjugate, 0); + this._matricesUniformBlockBufferData.set(rtcViewMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(camera.projMatrix, offset += mat4Size); + this._matricesUniformBlockBufferData.set(state.positionsDecodeMatrix, offset += mat4Size); + + gl.bindBuffer(gl.UNIFORM_BUFFER, this._matricesUniformBlockBuffer); + gl.bufferData(gl.UNIFORM_BUFFER, this._matricesUniformBlockBufferData, gl.DYNAMIC_DRAW); + + gl.bindBufferBase( + gl.UNIFORM_BUFFER, + this._matricesUniformBlockBufferBindingPoint, + this._matricesUniformBlockBuffer); + { const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = instancingLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3e$3); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - gl.uniformMatrix4fv(this._uPositionsDecodeMatrix, false, state.positionsDecodeMatrix); + this.setSectionPlanesStateUniforms(instancingLayer); + + this._aModelMatrixCol0.bindArrayBuffer(state.modelMatrixCol0Buf); this._aModelMatrixCol1.bindArrayBuffer(state.modelMatrixCol1Buf); this._aModelMatrixCol2.bindArrayBuffer(state.modelMatrixCol2Buf); gl.vertexAttribDivisor(this._aModelMatrixCol0.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol1.location, 1); gl.vertexAttribDivisor(this._aModelMatrixCol2.location, 1); - this._aPosition.bindArrayBuffer(state.positionsBuf); + this._aFlags.bindArrayBuffer(state.flagsBuf); gl.vertexAttribDivisor(this._aFlags.location, 1); - if (this._aOffset) { - this._aOffset.bindArrayBuffer(state.offsetsBuf); - gl.vertexAttribDivisor(this._aOffset.location, 1); - } + if (frameCtx.snapMode === "edge") { state.edgeIndicesBuf.bind(); gl.drawElementsInstanced(gl.LINES, state.edgeIndicesBuf.numItems, state.edgeIndicesBuf.itemType, 0, state.numInstances); @@ -53023,34 +53446,10 @@ } _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } + super._allocate(); + const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._aPosition = program.getAttribute("position"); - this._aOffset = program.getAttribute("offset"); - this._aFlags = program.getAttribute("flags"); - this._aModelMatrixCol0 = program.getAttribute("modelMatrixCol0"); - this._aModelMatrixCol1 = program.getAttribute("modelMatrixCol1"); - this._aModelMatrixCol2 = program.getAttribute("modelMatrixCol2"); + { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -53066,13 +53465,6 @@ } - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - _buildVertexShader() { const scene = this._scene; const sectionPlanesState = scene._sectionPlanesState; @@ -53103,10 +53495,9 @@ src.push("in vec4 modelMatrixCol1;"); src.push("in vec4 modelMatrixCol2;"); src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - src.push("uniform mat4 positionsDecodeMatrix;"); + + this._addMatricesUniformBlockLines(src); + src.push("uniform vec3 uCameraEyeRtc;"); src.push("uniform vec2 snapVectorA;"); src.push("uniform vec2 snapInvVectorAB;"); @@ -53247,6 +53638,20 @@ } } + eagerCreateRenders() { + + // Pre-initialize renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new SnapInstancingDepthBufInitRenderer(this._scene, false); + } + if (!this._snapDepthRenderer) { + this._snapDepthRenderer = new SnapInstancingDepthRenderer(this._scene); + } + } + get snapDepthBufInitRenderer() { if (!this._snapDepthBufInitRenderer) { this._snapDepthBufInitRenderer = new SnapInstancingDepthBufInitRenderer(this._scene, false); @@ -53283,8 +53688,10 @@ instancingRenderers = new SnapInstancingRenderers(scene); cachedRenderers$4[sceneId] = instancingRenderers; instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); scene.on("compile", () => { instancingRenderers._compile(); + instancingRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachedRenderers$4[sceneId]; @@ -53301,10 +53708,10 @@ math.vec4([0, 0, 0, 1]); const tempVec3fa$2 = new Float32Array(3); - const tempVec3a$n = math.vec3(); - const tempVec3b$h = math.vec3(); - const tempVec3c$e = math.vec3(); - const tempVec3d$a = math.vec3(); + const tempVec3a$m = math.vec3(); + const tempVec3b$i = math.vec3(); + const tempVec3c$f = math.vec3(); + const tempVec3d$b = math.vec3(); const tempVec3e$2 = math.vec3(); const tempVec3f = math.vec3(); const tempVec3g = math.vec3(); @@ -54318,10 +54725,10 @@ const origin = state.origin; const offset = portion.offset; - const rtcRayOrigin = tempVec3a$n; - const rtcRayDir = tempVec3b$h; + const rtcRayOrigin = tempVec3a$m; + const rtcRayDir = tempVec3b$i; - rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC + rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$f) : worldRayOrigin); // World -> RTC rtcRayDir.set(worldRayDir); if (offset) { @@ -54332,7 +54739,7 @@ math.transformRay(portion.inverseMatrix, rtcRayOrigin, rtcRayDir, rtcRayOrigin, rtcRayDir); - const a = tempVec3d$a; + const a = tempVec3d$b; const b = tempVec3e$2; const c = tempVec3f; @@ -56827,6 +57234,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -56868,7 +57277,7 @@ if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -56967,6 +57376,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -57005,7 +57416,7 @@ if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -57353,8 +57764,8 @@ } } - const tempVec3a$m = math.vec4(); - const tempVec3b$g = math.vec4(); + const tempVec3a$l = math.vec4(); + const tempVec3b$h = math.vec4(); const tempVec4a$8 = math.vec4([0, 0, 0, 1]); const tempVec4b$7 = math.vec4([0, 0, 0, 1]); math.vec4([0, 0, 0, 1]); @@ -57503,8 +57914,8 @@ const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed); - const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$m); - const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$g); + const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$l); + const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$h); worldAABB[0] = min[0]; worldAABB[1] = min[1]; @@ -58450,6 +58861,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -58491,6 +58904,7 @@ src.push(" vFlags = flags;"); } src.push("vec4 clipPos = projMatrix * viewPosition;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } @@ -58601,6 +59015,8 @@ this._addMatricesUniformBlockLines(src); + this._addRemapClipPosLines(src); + src.push("uniform float pointSize;"); if (pointsMaterial.perspectivePoints) { src.push("uniform float nearPlaneHeight;"); @@ -58640,10 +59056,11 @@ } src.push(" vViewPosition = viewPosition;"); src.push("vec4 clipPos = projMatrix * viewPosition;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); if (pointsMaterial.perspectivePoints) { src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"); src.push("gl_PointSize = max(gl_PointSize, " + Math.floor(pointsMaterial.minPerspectivePointSize) + ".0);"); @@ -59340,6 +59757,7 @@ numInstances: 0, origin: cfg.origin ? math.vec3(cfg.origin) : null, geometry: cfg.geometry, + positionsDecodeMatrix: cfg.geometry.positionsDecodeMatrix, // So we can null the geometry for GC colorsBuf: null, flagsBuf: null, offsetsBuf: null, @@ -59478,34 +59896,46 @@ } const gl = this.model.scene.canvas.gl; const flagsLength = this._pickColors.length / 4; + const state = this._state; + const geometry = state.geometry; if (flagsLength > 0) { // Because we only build flags arrays here, // get their length from the colors array let notNormalized = false; - this._state.flagsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(flagsLength), flagsLength, 1, gl.DYNAMIC_DRAW, notNormalized); + state.flagsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(flagsLength), flagsLength, 1, gl.DYNAMIC_DRAW, notNormalized); } if (this.model.scene.entityOffsetsEnabled) { if (this._offsets.length > 0) { const notNormalized = false; - this._state.offsetsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._offsets), this._offsets.length, 3, gl.DYNAMIC_DRAW, notNormalized); + state.offsetsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._offsets), this._offsets.length, 3, gl.DYNAMIC_DRAW, notNormalized); this._offsets = []; // Release memory } } + if (geometry.positionsCompressed && geometry.positionsCompressed.length > 0) { + const normalized = false; + state.positionsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, geometry.positionsCompressed, geometry.positionsCompressed.length, 3, gl.STATIC_DRAW, normalized); + state.positionsDecodeMatrix = math.mat4(geometry.positionsDecodeMatrix); + } + if (geometry.colorsCompressed && geometry.colorsCompressed.length > 0) { + const colorsCompressed = new Uint8Array(geometry.colorsCompressed); + const notNormalized = false; + state.colorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, colorsCompressed, colorsCompressed.length, 4, gl.STATIC_DRAW, notNormalized); + } if (this._modelMatrixCol0.length > 0) { const normalized = false; - this._state.modelMatrixCol0Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol0), this._modelMatrixCol0.length, 4, gl.STATIC_DRAW, normalized); - this._state.modelMatrixCol1Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol1), this._modelMatrixCol1.length, 4, gl.STATIC_DRAW, normalized); - this._state.modelMatrixCol2Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol2), this._modelMatrixCol2.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol0Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol0), this._modelMatrixCol0.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol1Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol1), this._modelMatrixCol1.length, 4, gl.STATIC_DRAW, normalized); + state.modelMatrixCol2Buf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Float32Array(this._modelMatrixCol2), this._modelMatrixCol2.length, 4, gl.STATIC_DRAW, normalized); this._modelMatrixCol0 = []; this._modelMatrixCol1 = []; this._modelMatrixCol2 = []; } if (this._pickColors.length > 0) { const normalized = false; - this._state.pickColorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Uint8Array(this._pickColors), this._pickColors.length, 4, gl.STATIC_DRAW, normalized); + state.pickColorsBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, new Uint8Array(this._pickColors), this._pickColors.length, 4, gl.STATIC_DRAW, normalized); this._pickColors = []; // Release memory } - this._state.geometry = null; + state.geometry = null; this._finalized = true; } @@ -61467,14 +61897,14 @@ } } - const tempVec3a$l = math.vec3(); - const tempVec3b$f = math.vec3(); - const tempVec3c$d = math.vec3(); - const tempVec3d$9 = math.vec3(); + const tempVec3a$k = math.vec3(); + const tempVec3b$g = math.vec3(); + const tempVec3c$e = math.vec3(); + const tempVec3d$a = math.vec3(); const tempVec4a$6 = math.vec4(); - const tempMat4a$a = math.mat4(); + const tempMat4a$b = math.mat4(); /** * @private @@ -61535,9 +61965,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$l; + const rtcOrigin = tempVec3a$k; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$f); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$g); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -61549,8 +61979,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$a); - rtcCameraEye = tempVec3c$d; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$b); + rtcCameraEye = tempVec3c$e; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -61583,7 +62013,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$9); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$a); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -61875,9 +62305,6 @@ src.push(" return;"); // Cull vertex src.push("} else {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -61922,7 +62349,7 @@ // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); // src.push("vColor = vec4(vec3(1, -1, 0)*dot(normalize(position.xyz - uCameraEyeRtcInQuantizedSpace), normal), 1);") src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); @@ -61937,7 +62364,7 @@ src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -62099,11 +62526,11 @@ const defaultColor$1 = new Float32Array([1, 1, 1]); - const tempVec3a$k = math.vec3(); - const tempVec3b$e = math.vec3(); - const tempVec3c$c = math.vec3(); - const tempVec3d$8 = math.vec3(); - const tempMat4a$9 = math.mat4(); + const tempVec3a$j = math.vec3(); + const tempVec3b$f = math.vec3(); + const tempVec3c$d = math.vec3(); + const tempVec3d$9 = math.vec3(); + const tempMat4a$a = math.mat4(); /** * @private @@ -62162,9 +62589,9 @@ let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$k; + const rtcOrigin = tempVec3a$j; if (origin) { - const rotatedOrigin = tempVec3b$e; + const rotatedOrigin = tempVec3b$f; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -62177,8 +62604,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$9); - rtcCameraEye = tempVec3c$c; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$a); + rtcCameraEye = tempVec3c$d; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -62231,7 +62658,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$8); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$9); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -62564,11 +62991,11 @@ const defaultColor = new Float32Array([0, 0, 0, 1]); - const tempVec3a$j = math.vec3(); - const tempVec3b$d = math.vec3(); + const tempVec3a$i = math.vec3(); + const tempVec3b$e = math.vec3(); math.vec3(); - const tempVec3d$7 = math.vec3(); - const tempMat4a$8 = math.mat4(); + const tempVec3d$8 = math.vec3(); + const tempMat4a$9 = math.mat4(); /** * @private @@ -62627,9 +63054,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$j; + const rtcOrigin = tempVec3a$i; if (gotOrigin) { - const rotatedOrigin = tempVec3b$d; + const rotatedOrigin = tempVec3b$e; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -62642,7 +63069,7 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8); + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$9); } else { rtcViewMatrix = viewMatrix; } @@ -62687,7 +63114,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$7); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$8); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -62869,8 +63296,6 @@ src.push(" return;"); // Cull vertex src.push("} else {"); - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -62896,7 +63321,7 @@ // get position src.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -62988,10 +63413,10 @@ } } - const tempVec3a$i = math.vec3(); - const tempVec3b$c = math.vec3(); - const tempVec3c$b = math.vec3(); - const tempMat4a$7 = math.mat4(); + const tempVec3a$h = math.vec3(); + const tempVec3b$d = math.vec3(); + const tempVec3c$c = math.vec3(); + const tempMat4a$8 = math.mat4(); /** * @private @@ -63049,9 +63474,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$i; + const rtcOrigin = tempVec3a$h; if (gotOrigin) { - const rotatedOrigin = tempVec3b$c; + const rotatedOrigin = tempVec3b$d; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -63064,7 +63489,7 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$7); + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8); } else { rtcViewMatrix = viewMatrix; } @@ -63087,7 +63512,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$b); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$c); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -63259,9 +63684,6 @@ src.push("void main(void) {"); - // model matrices - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // constants src.push("int edgeIndex = gl_VertexID / 2;"); @@ -63317,7 +63739,7 @@ src.push(" return;"); src.push("};"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push(" vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -63409,10 +63831,10 @@ } } - const tempVec3a$h = math.vec3(); - const tempVec3b$b = math.vec3(); - const tempVec3c$a = math.vec3(); - const tempMat4a$6 = math.mat4(); + const tempVec3a$g = math.vec3(); + const tempVec3b$c = math.vec3(); + const tempVec3c$b = math.vec3(); + const tempMat4a$7 = math.mat4(); /** * @private @@ -63427,7 +63849,7 @@ getValid() { return this._hash === this._getHash(); - }; + } _getHash() { return this._scene._sectionPlanesState.getHash(); @@ -63465,9 +63887,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$h; + const rtcOrigin = tempVec3a$g; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$b); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$c); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -63479,8 +63901,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$6); - rtcCameraEye = tempVec3c$a; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$7); + rtcCameraEye = tempVec3c$b; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -63488,6 +63910,8 @@ rtcViewMatrix = camera.viewMatrix; rtcCameraEye = camera.eye; } + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); @@ -63510,7 +63934,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -63561,6 +63985,8 @@ const program = this._program; this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); @@ -63572,10 +63998,6 @@ dir: program.getLocation("sectionPlaneDir" + i) }); } - if (this._withSAO) { - this._uOcclusionTexture = "uOcclusionTexture"; - this._uSAOParams = program.getLocation("uSAOParams"); - } if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } @@ -63591,12 +64013,9 @@ } _bindProgram(frameCtx) { - const scene = this._scene; const gl = scene.canvas.gl; - this._program.bind(); - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); } @@ -63658,6 +64077,16 @@ src.push("out float isPerspective;"); } + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); @@ -63671,10 +64100,6 @@ src.push("void main(void) {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - - // constants src.push("int polygonIndex = gl_VertexID / 3;"); // get packed object-id @@ -63741,7 +64166,7 @@ // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); src.push("}"); @@ -63753,7 +64178,7 @@ src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -63772,7 +64197,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -63842,11 +64267,11 @@ } } - const tempVec3a$g = math.vec3(); - const tempVec3b$a = math.vec3(); - const tempVec3c$9 = math.vec3(); - const tempVec3d$6 = math.vec3(); - const tempMat4a$5 = math.mat4(); + const tempVec3a$f = math.vec3(); + const tempVec3b$b = math.vec3(); + const tempVec3c$a = math.vec3(); + const tempVec3d$7 = math.vec3(); + const tempMat4a$6 = math.mat4(); /** * @private @@ -63861,7 +64286,7 @@ getValid() { return this._hash === this._getHash(); - }; + } _getHash() { return this._scene._sectionPlanesState.getHash(); @@ -63901,9 +64326,9 @@ let rtcCameraEye; if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$g; + const rtcOrigin = tempVec3a$f; if (origin) { - const rotatedOrigin = tempVec3b$a; + const rotatedOrigin = tempVec3b$b; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -63916,8 +64341,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$5); - rtcCameraEye = tempVec3c$9; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$6); + rtcCameraEye = tempVec3c$a; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -63935,6 +64360,8 @@ gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); gl.uniform1f(this._uPickZNear, frameCtx.pickZNear); gl.uniform1f(this._uPickZFar, frameCtx.pickZFar); gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); @@ -63958,7 +64385,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$6); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$7); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -64009,6 +64436,8 @@ const program = this._program; this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); this._uWorldMatrix = program.getLocation("worldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); @@ -64098,6 +64527,16 @@ src.push("out float isPerspective;"); } + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); @@ -64204,7 +64643,7 @@ src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); + src.push("gl_Position = remapClipPos(clipPos);"); src.push(" }"); src.push("}"); return src; @@ -64289,12 +64728,12 @@ } } - const tempVec3a$f = math.vec3(); - const tempVec3b$9 = math.vec3(); - const tempVec3c$8 = math.vec3(); - const tempVec3d$5 = math.vec3(); + const tempVec3a$e = math.vec3(); + const tempVec3b$a = math.vec3(); + const tempVec3c$9 = math.vec3(); + const tempVec3d$6 = math.vec3(); const tempVec3e$1 = math.vec3(); - const tempMat4a$4 = math.mat4(); + const tempMat4a$5 = math.mat4(); /** * @private @@ -64340,7 +64779,7 @@ const aabb = dataTextureLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$f; + const coordinateScaler = tempVec3a$e; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -64364,9 +64803,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3b$9; + const rtcOrigin = tempVec3b$a; if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$8); + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$9); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -64378,8 +64817,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$4); - rtcCameraEye = tempVec3d$5; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$5); + rtcCameraEye = tempVec3d$6; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -64596,8 +65035,6 @@ src.push("{"); - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); src.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"); @@ -64614,7 +65051,7 @@ src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); // get position src.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); @@ -64708,12 +65145,12 @@ } } - const tempVec3a$e = math.vec3(); - const tempVec3b$8 = math.vec3(); - const tempVec3c$7 = math.vec3(); - const tempVec3d$4 = math.vec3(); + const tempVec3a$d = math.vec3(); + const tempVec3b$9 = math.vec3(); + const tempVec3c$8 = math.vec3(); + const tempVec3d$5 = math.vec3(); const tempVec3e = math.vec3(); - const tempMat4a$3 = math.mat4(); + const tempMat4a$4 = math.mat4(); /** * @private */ @@ -64755,7 +65192,7 @@ const aabb = dataTextureLayer.aabb; const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const coordinateScaler = tempVec3a$e; + const coordinateScaler = tempVec3a$d; coordinateScaler[0] = math.safeInv(aabb[3] - aabb[0]) * math.MAX_INT; coordinateScaler[1] = math.safeInv(aabb[4] - aabb[1]) * math.MAX_INT; coordinateScaler[2] = math.safeInv(aabb[5] - aabb[2]) * math.MAX_INT; @@ -64776,9 +65213,9 @@ const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3b$8; + const rtcOrigin = tempVec3b$9; if (gotOrigin) { - const rotatedOrigin = tempVec3c$7; + const rotatedOrigin = tempVec3c$8; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -64791,8 +65228,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$3); - rtcCameraEye = tempVec3d$4; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$4); + rtcCameraEye = tempVec3d$5; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -65007,8 +65444,6 @@ src.push("{"); - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get color src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); @@ -65050,7 +65485,7 @@ // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push(" if (isPerspectiveMatrix(projMatrix)) {"); - src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push(" position = positions[2 - (gl_VertexID % 3)];"); src.push(" viewNormal = -viewNormal;"); @@ -65063,7 +65498,7 @@ src.push(" }"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); src.push("relativeToOriginPosition = worldPosition.xyz;"); @@ -65154,12 +65589,16 @@ } } - const tempVec3a$d = math.vec3(); + const tempVec3a$c = math.vec3(); + const tempVec3b$8 = math.vec3(); + const tempVec3c$7 = math.vec3(); + const tempVec3d$4 = math.vec3(); + const tempMat4a$3 = math.mat4(); /** * @private */ - class TrianglesDataTexturePickNormalsRenderer { + class TrianglesDataTextureOcclusionRenderer { constructor(scene) { this._scene = scene; @@ -65184,9 +65623,14 @@ const state = dataTextureLayer._state; const textureState = state.textureState; const origin = dataTextureLayer._state.origin; + const {position, rotationMatrix, rotationMatrixConjugate} = model; + const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; if (!this._program) { this._allocate(dataTextureLayer); + if (this.errors) { + return; + } } if (frameCtx.lastProgramId !== this._program.id) { @@ -65199,39 +65643,45 @@ this._uTexturePerObjectIdPositionsDecodeMatrix, this._uTexturePerVertexIdCoordinates, this._uTexturePerObjectIdColorsAndFlags, - this._uTextureCameraMatrices, this._uTextureModelMatrices, this._uTexturePerObjectIdOffsets ); - let cameraEye = camera.eye; + let rtcViewMatrix; + let rtcCameraEye; - if (frameCtx.pickViewMatrix) { - textureState.bindPickCameraTexture( - this._program, - this._uTextureCameraMatrices - ); - cameraEye = frameCtx.pickOrigin || cameraEye; + if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { + const rtcOrigin = tempVec3a$c; + if (origin) { + const rotatedOrigin = tempVec3b$8; + math.transformPoint3(rotationMatrix, origin, rotatedOrigin); + rtcOrigin[0] = rotatedOrigin[0]; + rtcOrigin[1] = rotatedOrigin[1]; + rtcOrigin[2] = rotatedOrigin[2]; + } else { + rtcOrigin[0] = 0; + rtcOrigin[1] = 0; + rtcOrigin[2] = 0; + } + rtcOrigin[0] += position[0]; + rtcOrigin[1] += position[1]; + rtcOrigin[2] += position[2]; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$3); + rtcCameraEye = tempVec3c$7; + rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; + rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; + rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; + } else { + rtcViewMatrix = viewMatrix; + rtcCameraEye = camera.eye; } - const originCameraEye = [ - cameraEye[0] - origin[0], - cameraEye[1] - origin[1], - cameraEye[2] - origin[2], - ]; - - gl.uniform3fv(this._uCameraEyeRtc, originCameraEye); - + gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); + gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniform3fv(this._uCameraEyeRtc, originCameraEye); - - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far should be from projection matrix? - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { @@ -65246,7 +65696,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$4); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -65264,10 +65714,8 @@ this._uTexturePerPolygonIdIndices, 8 // 8 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); } - if (state.numIndices16Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -65275,10 +65723,8 @@ this._uTexturePerPolygonIdIndices, 16 // 16 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); } - if (state.numIndices32Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -65286,32 +65732,26 @@ this._uTexturePerPolygonIdIndices, 32 // 32 bits indices ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); } - frameCtx.drawElements++; } _allocate() { - const scene = this._scene; const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { this.errors = this._program.errors; return; } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); - + this._uWorldMatrix = program.getLocation("sceneModelWorldMatrix"); + this._uViewMatrix = program.getLocation("viewMatrix"); + this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { this._uSectionPlanes.push({ active: program.getLocation("sectionPlaneActive" + i), @@ -65319,11 +65759,11 @@ dir: program.getLocation("sectionPlaneDir" + i) }); } - + this._uPickZNear = program.getLocation("pickZNear"); + this._uPickZFar = program.getLocation("pickZFar"); if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; @@ -65337,6 +65777,11 @@ } _bindProgram() { + + const scene = this._scene; + scene.canvas.gl; + scene.camera.project; + this._program.bind(); } @@ -65352,7 +65797,7 @@ const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push("#version 300 es"); - src.push("// Triangles dataTexture pick normals vertex shader"); + src.push("// TrianglesDataTextureColorRenderer vertex shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); @@ -65374,45 +65819,29 @@ src.push("in vec3 offset;"); } - src.push("uniform bool pickInvisible;"); + src.push("uniform mat4 sceneModelWorldMatrix;"); + src.push("uniform mat4 viewMatrix;"); + src.push("uniform mat4 projMatrix;"); + src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); - src.push("uniform highp sampler2D uTextureCameraMatrices;"); src.push("uniform highp sampler2D uTextureModelMatrices;"); src.push("uniform vec3 uCameraEyeRtc;"); src.push("vec3 positions[3];"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("uniform float logDepthBufFC;"); - src.push("out float vFragDepth;"); - src.push("out float isPerspective;"); - } - src.push("bool isPerspectiveMatrix(mat4 m) {"); src.push(" return (m[2][3] == - 1.0);"); src.push("}"); - if (clipping) { src.push("out vec4 vWorldPosition;"); - src.push("flat out uint vFlags2;"); + src.push("out vec4 vFlags2;"); } - - src.push("out vec3 vWorldNormal;"); - src.push("void main(void) {"); - // camera matrices - src.push("mat4 viewMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 0), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 0), 0));"); - src.push("mat4 projMatrix = mat4 (texelFetch (uTextureCameraMatrices, ivec2(0, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(1, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(2, 2), 0), texelFetch (uTextureCameraMatrices, ivec2(3, 2), 0));"); - - // model matrices - src.push("mat4 worldMatrix = mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // constants src.push("int polygonIndex = gl_VertexID / 3;"); @@ -65427,13 +65856,14 @@ src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - // flags.w = NOT_RENDERED | PICK - // renderPass = PICK + // flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT + // renderPass = COLOR_OPAQUE + // Only opaque objects can be occluders - src.push(`if (int(flags.w) != renderPass) {`); - src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex - src.push(" return;"); // Cull vertex - src.push("} else {"); + src.push(`if (int(flags.x) != renderPass) {`); + src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex + + src.push(" } else {"); // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -65460,58 +65890,51 @@ src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); - // get normal - src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); + // get color + src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); + src.push(`if (color.a == 0u) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); + src.push("};"); + src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); src.push("vec3 position;"); src.push("position = positions[gl_VertexID % 3];"); // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); - src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); - src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); - src.push("position = positions[2 - (gl_VertexID % 3)];"); - src.push("normal = -normal;"); - src.push("}"); - src.push("} else {"); - src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); - src.push("if (viewNormal.z < 0.0) {"); - src.push("position = positions[2 - (gl_VertexID % 3)];"); - src.push("normal = -normal;"); - src.push("}"); - src.push("}"); + src.push(" if (isPerspectiveMatrix(projMatrix)) {"); + src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix; * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); + src.push(" position = positions[2 - (gl_VertexID % 3)];"); + src.push(" }"); + src.push(" } else {"); + src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + src.push(" if (viewNormal.z < 0.0) {"); + src.push(" position = positions[2 - (gl_VertexID % 3)];"); + src.push(" }"); + src.push(" }"); src.push("}"); - src.push("normal = -normal;"); - - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix; * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); - src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); - src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - - src.push("vWorldNormal = normal.xyz;"); - - src.push("vec4 clipPos = projMatrix * viewPosition;"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("vFragDepth = 1.0 + clipPos.w;"); - src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); - } if (clipping) { src.push(" vWorldPosition = worldPosition;"); - src.push(" vFlags2 = flags2.w;"); + src.push(" vFlags2 = flags2;"); + } + src.push("vec4 clipPos = projMatrix * viewPosition;"); + if (clipping) { + src.push("vWorldPosition = worldPosition;"); + src.push("vFlags2 = flags2.r;"); } src.push("gl_Position = clipPos;"); + src.push(" }"); src.push("}"); - - src.push("}"); - return src; } @@ -65521,7 +65944,7 @@ const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push('#version 300 es'); - src.push("// Triangles dataTexture pick normals fragment shader"); + src.push("// TrianglesDataTextureColorRenderer fragment shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); src.push("precision highp int;"); @@ -65529,29 +65952,22 @@ src.push("precision mediump float;"); src.push("precision mediump int;"); src.push("#endif"); - - if (scene.logarithmicDepthBufferEnabled) { - src.push("in float isPerspective;"); - src.push("uniform float logDepthBufFC;"); - src.push("in float vFragDepth;"); - } if (clipping) { src.push("in vec4 vWorldPosition;"); - src.push("flat in uint vFlags2;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + src.push("in vec4 vFlags2;"); + for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { src.push("uniform bool sectionPlaneActive" + i + ";"); src.push("uniform vec3 sectionPlanePos" + i + ";"); src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("in vec3 vWorldNormal;"); - src.push("out vec4 outNormal;"); + src.push("out vec4 outColor;"); src.push("void main(void) {"); if (clipping) { - src.push(" bool clippable = vFlags2 > 0u;"); + src.push(" bool clippable = (float(vFlags2.x) > 0.0);"); src.push(" if (clippable) {"); src.push(" float dist = 0.0;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { src.push(" if (sectionPlaneActive" + i + ") {"); src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); src.push(" }"); @@ -65559,12 +65975,7 @@ src.push(" if (dist > 0.0) { discard; }"); src.push(" }"); } - - if (scene.logarithmicDepthBufferEnabled) { - // src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); - src.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"); - } - src.push(" outNormal = vec4((vWorldNormal * 0.5) + 0.5, 1.0);"); + src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue src.push("}"); return src; } @@ -65581,7 +65992,7 @@ } } - const tempVec3a$c = math.vec3(); + const tempVec3a$b = math.vec3(); const tempVec3b$7 = math.vec3(); const tempVec3c$6 = math.vec3(); const tempVec3d$3 = math.vec3(); @@ -65590,12 +66001,12 @@ /** * @private */ - class TrianglesDataTextureOcclusionRenderer { + class TrianglesDataTextureDepthRenderer { constructor(scene) { this._scene = scene; - this._hash = this._getHash(); this._allocate(); + this._hash = this._getHash(); } getValid() { @@ -65608,18 +66019,17 @@ drawLayer(frameCtx, dataTextureLayer, renderPass) { - const model = dataTextureLayer.model; - const scene = model.scene; + const scene = this._scene; const camera = scene.camera; + const model = dataTextureLayer.model; const gl = scene.canvas.gl; const state = dataTextureLayer._state; const textureState = state.textureState; const origin = dataTextureLayer._state.origin; const {position, rotationMatrix, rotationMatrixConjugate} = model; - const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; if (!this._program) { - this._allocate(dataTextureLayer); + this._allocate(); if (this.errors) { return; } @@ -65627,7 +66037,7 @@ if (frameCtx.lastProgramId !== this._program.id) { frameCtx.lastProgramId = this._program.id; - this._bindProgram(); + this._bindProgram(frameCtx, state); } textureState.bindCommonTextures( @@ -65642,11 +66052,12 @@ let rtcViewMatrix; let rtcCameraEye; - if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) { - const rtcOrigin = tempVec3a$c; - if (origin) { - const rotatedOrigin = tempVec3b$7; - math.transformPoint3(rotationMatrix, origin, rotatedOrigin); + const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); + const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); + if (gotOrigin || gotPosition) { + const rtcOrigin = tempVec3a$b; + if (gotOrigin) { + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$7); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; rtcOrigin[2] = rotatedOrigin[2]; @@ -65658,22 +66069,26 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$2); + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$2); rtcCameraEye = tempVec3c$6; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; } else { - rtcViewMatrix = viewMatrix; + rtcViewMatrix = camera.viewMatrix; rtcCameraEye = camera.eye; } + gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); gl.uniform1i(this._uRenderPass, renderPass); - gl.uniformMatrix4fv(this._uWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); + if (scene.logarithmicDepthBufferEnabled) { + const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); + gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); + } const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { @@ -65699,415 +66114,6 @@ } } - if (state.numIndices8Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 8 // 8 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); - } - if (state.numIndices16Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 16 // 16 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); - } - if (state.numIndices32Bits > 0) { - textureState.bindTriangleIndicesTextures( - this._program, - this._uTexturePerPolygonIdPortionIds, - this._uTexturePerPolygonIdIndices, - 32 // 32 bits indices - ); - gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); - } - frameCtx.drawElements++; - } - - _allocate() { - const scene = this._scene; - const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { - this.errors = this._program.errors; - return; - } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); - this._uPickInvisible = program.getLocation("pickInvisible"); - this._uWorldMatrix = program.getLocation("sceneModelWorldMatrix"); - this._uViewMatrix = program.getLocation("viewMatrix"); - this._uProjMatrix = program.getLocation("projMatrix"); - this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { - this._uSectionPlanes.push({ - active: program.getLocation("sectionPlaneActive" + i), - pos: program.getLocation("sectionPlanePos" + i), - dir: program.getLocation("sectionPlaneDir" + i) - }); - } - this._uPickZNear = program.getLocation("pickZNear"); - this._uPickZFar = program.getLocation("pickZFar"); - if (scene.logarithmicDepthBufferEnabled) { - this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); - } - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; - this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; - this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; - this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; - this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; - this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; - this._uTextureCameraMatrices = "uTextureCameraMatrices"; - this._uTextureModelMatrices = "uTextureModelMatrices"; - this._uTexturePerObjectIdOffsets = "uTexturePerObjectIdOffsets"; - this._uCameraEyeRtc = program.getLocation("uCameraEyeRtc"); - } - - _bindProgram() { - - const scene = this._scene; - scene.canvas.gl; - scene.camera.project; - - this._program.bind(); - } - - _buildShader() { - return { - vertex: this._buildVertexShader(), - fragment: this._buildFragmentShader() - }; - } - - _buildVertexShader() { - const scene = this._scene; - const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; - const src = []; - src.push("#version 300 es"); - src.push("// TrianglesDataTextureColorRenderer vertex shader"); - - src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); - src.push("precision highp float;"); - src.push("precision highp int;"); - src.push("precision highp usampler2D;"); - src.push("precision highp isampler2D;"); - src.push("precision highp sampler2D;"); - src.push("#else"); - src.push("precision mediump float;"); - src.push("precision mediump int;"); - src.push("precision mediump usampler2D;"); - src.push("precision mediump isampler2D;"); - src.push("precision mediump sampler2D;"); - src.push("#endif"); - - src.push("uniform int renderPass;"); - - if (scene.entityOffsetsEnabled) { - src.push("in vec3 offset;"); - } - - src.push("uniform mat4 sceneModelWorldMatrix;"); - src.push("uniform mat4 viewMatrix;"); - src.push("uniform mat4 projMatrix;"); - - src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); - src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); - src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); - src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); - src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); - src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); - src.push("uniform highp sampler2D uTextureModelMatrices;"); - src.push("uniform vec3 uCameraEyeRtc;"); - - src.push("vec3 positions[3];"); - src.push("bool isPerspectiveMatrix(mat4 m) {"); - src.push(" return (m[2][3] == - 1.0);"); - src.push("}"); - if (clipping) { - src.push("out vec4 vWorldPosition;"); - src.push("out vec4 vFlags2;"); - } - src.push("void main(void) {"); - - // constants - src.push("int polygonIndex = gl_VertexID / 3;"); - - // get packed object-id - src.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"); - src.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"); - - src.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"); - src.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"); - - // get flags & flags2 - src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); - src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - - // flags.x = NOT_RENDERED | COLOR_OPAQUE | COLOR_TRANSPARENT - // renderPass = COLOR_OPAQUE - // Only opaque objects can be occluders - - src.push(`if (int(flags.x) != renderPass) {`); - src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex - - src.push(" } else {"); - // model matrices - src.push ("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - - // get vertex base - src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); - - src.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"); - - src.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"); - - src.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"); - src.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"); - - src.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"); - src.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"); - - src.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"); - src.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"); - - src.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"); - - src.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"); - - // get position - src.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); - src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); - src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); - - // get color - src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); - - src.push(`if (color.a == 0u) {`); - src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex - src.push(" return;"); - src.push("};"); - - src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); - src.push("vec3 position;"); - src.push("position = positions[gl_VertexID % 3];"); - - // when the geometry is not solid, if needed, flip the triangle winding - src.push("if (solid != 1u) {"); - src.push(" if (isPerspectiveMatrix(projMatrix)) {"); - src.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); - src.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); - src.push(" position = positions[2 - (gl_VertexID % 3)];"); - src.push(" }"); - src.push(" } else {"); - src.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); - src.push(" if (viewNormal.z < 0.0) {"); - src.push(" position = positions[2 - (gl_VertexID % 3)];"); - src.push(" }"); - src.push(" }"); - src.push("}"); - - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); - - // get XYZ offset - src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); - src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); - src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - if (clipping) { - src.push(" vWorldPosition = worldPosition;"); - src.push(" vFlags2 = flags2;"); - } - src.push("vec4 clipPos = projMatrix * viewPosition;"); - if (clipping) { - src.push("vWorldPosition = worldPosition;"); - src.push("vFlags2 = flags2.r;"); - } - src.push("gl_Position = clipPos;"); - src.push(" }"); - src.push("}"); - return src; - } - - _buildFragmentShader() { - const scene = this._scene; - const sectionPlanesState = scene._sectionPlanesState; - const clipping = sectionPlanesState.sectionPlanes.length > 0; - const src = []; - src.push('#version 300 es'); - src.push("// TrianglesDataTextureColorRenderer fragment shader"); - src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); - src.push("precision highp float;"); - src.push("precision highp int;"); - src.push("#else"); - src.push("precision mediump float;"); - src.push("precision mediump int;"); - src.push("#endif"); - if (clipping) { - src.push("in vec4 vWorldPosition;"); - src.push("in vec4 vFlags2;"); - for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push("uniform bool sectionPlaneActive" + i + ";"); - src.push("uniform vec3 sectionPlanePos" + i + ";"); - src.push("uniform vec3 sectionPlaneDir" + i + ";"); - } - } - src.push("out vec4 outColor;"); - src.push("void main(void) {"); - if (clipping) { - src.push(" bool clippable = (float(vFlags2.x) > 0.0);"); - src.push(" if (clippable) {"); - src.push(" float dist = 0.0;"); - for (let i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push(" if (sectionPlaneActive" + i + ") {"); - src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); - src.push(" }"); - } - src.push(" if (dist > 0.0) { discard; }"); - src.push(" }"); - } - src.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "); // Occluders are blue - src.push("}"); - return src; - } - - webglContextRestored() { - this._program = null; - } - - destroy() { - if (this._program) { - this._program.destroy(); - } - this._program = null; - } - } - - const tempVec3a$b = math.vec3(); - const tempVec3b$6 = math.vec3(); - const tempVec3c$5 = math.vec3(); - const tempVec3d$2 = math.vec3(); - const tempMat4a$1 = math.mat4(); - - /** - * @private - */ - class TrianglesDataTextureDepthRenderer { - - constructor(scene) { - this._scene = scene; - this._allocate(); - this._hash = this._getHash(); - } - - getValid() { - return this._hash === this._getHash(); - }; - - _getHash() { - return this._scene._sectionPlanesState.getHash(); - } - - drawLayer(frameCtx, dataTextureLayer, renderPass) { - - const scene = this._scene; - const camera = scene.camera; - const model = dataTextureLayer.model; - const gl = scene.canvas.gl; - const state = dataTextureLayer._state; - const textureState = state.textureState; - const origin = dataTextureLayer._state.origin; - const {position, rotationMatrix, rotationMatrixConjugate} = model; - - if (!this._program) { - this._allocate(); - if (this.errors) { - return; - } - } - - if (frameCtx.lastProgramId !== this._program.id) { - frameCtx.lastProgramId = this._program.id; - this._bindProgram(frameCtx, state); - } - - textureState.bindCommonTextures( - this._program, - this._uTexturePerObjectIdPositionsDecodeMatrix, - this._uTexturePerVertexIdCoordinates, - this._uTexturePerObjectIdColorsAndFlags, - this._uTextureModelMatrices, - this._uTexturePerObjectIdOffsets - ); - - let rtcViewMatrix; - let rtcCameraEye; - - const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); - const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); - if (gotOrigin || gotPosition) { - const rtcOrigin = tempVec3a$b; - if (gotOrigin) { - const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$6); - rtcOrigin[0] = rotatedOrigin[0]; - rtcOrigin[1] = rotatedOrigin[1]; - rtcOrigin[2] = rotatedOrigin[2]; - } else { - rtcOrigin[0] = 0; - rtcOrigin[1] = 0; - rtcOrigin[2] = 0; - } - rtcOrigin[0] += position[0]; - rtcOrigin[1] += position[1]; - rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$1); - rtcCameraEye = tempVec3c$5; - rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; - rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; - rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; - } else { - rtcViewMatrix = camera.viewMatrix; - rtcCameraEye = camera.eye; - } - - gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); - gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); - gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); - gl.uniform1i(this._uRenderPass, renderPass); - - if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); - gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); - } - - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; - if (numSectionPlanes > 0) { - const sectionPlanes = scene._sectionPlanesState.sectionPlanes; - const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes; - const renderFlags = model.renderFlags; - for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { - const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - if (sectionPlaneUniforms) { - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$2); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); - } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); - } - } - } - } - if (state.numIndices8Bits > 0) { textureState.bindTriangleIndicesTextures( this._program, @@ -66161,7 +66167,6 @@ this._uRenderPass = program.getLocation("renderPass"); this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; @@ -66298,9 +66303,6 @@ src.push(" return;"); // Cull vertex src.push("} else {"); - // model matrices - src.push("mat4 worldMatrix = sceneModelWorldMatrix * mat4 (texelFetch (uTextureModelMatrices, ivec2(0, 0), 0), texelFetch (uTextureModelMatrices, ivec2(1, 0), 0), texelFetch (uTextureModelMatrices, ivec2(2, 0), 0), texelFetch (uTextureModelMatrices, ivec2(3, 0), 0));"); - // get vertex base src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); @@ -66345,7 +66347,7 @@ // when the geometry is not solid, if needed, flip the triangle winding src.push("if (solid != 1u) {"); src.push("if (isPerspectiveMatrix(projMatrix)) {"); - src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(worldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); src.push("position = positions[2 - (gl_VertexID % 3)];"); src.push("viewNormal = -viewNormal;"); @@ -66358,7 +66360,7 @@ src.push("}"); src.push("}"); - src.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); // get XYZ offset src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); @@ -66457,10 +66459,10 @@ } const tempVec3a$a = math.vec3(); - const tempVec3b$5 = math.vec3(); - const tempVec3c$4 = math.vec3(); - const tempVec3d$1 = math.vec3(); - const tempMat4a = math.mat4(); + const tempVec3b$6 = math.vec3(); + const tempVec3c$5 = math.vec3(); + const tempVec3d$2 = math.vec3(); + const tempMat4a$1 = math.mat4(); /** * @private @@ -66512,7 +66514,7 @@ if (gotOrigin || gotPosition) { const rtcOrigin = tempVec3a$a; if (gotOrigin) { - const rotatedOrigin = tempVec3b$5; + const rotatedOrigin = tempVec3b$6; math.transformPoint3(rotationMatrix, origin, rotatedOrigin); rtcOrigin[0] = rotatedOrigin[0]; rtcOrigin[1] = rotatedOrigin[1]; @@ -66525,8 +66527,8 @@ rtcOrigin[0] += position[0]; rtcOrigin[1] += position[1]; rtcOrigin[2] += position[2]; - rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a); - rtcCameraEye = tempVec3c$4; + rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$1); + rtcCameraEye = tempVec3c$5; rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; @@ -66557,7 +66559,7 @@ if (active) { const sectionPlane = sectionPlanes[sectionPlaneIndex]; if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$1); + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$2); gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); } else { gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); @@ -66794,14 +66796,22 @@ } const tempVec3a$9 = math.vec3(); + const tempVec3b$5 = math.vec3(); + const tempVec3c$4 = math.vec3(); + const tempVec3d$1 = math.vec3(); + + math.vec4(); + + const tempMat4a = math.mat4(); /** * @private */ class TrianglesDataTexturePickNormalsFlatRenderer { - constructor(scene) { + constructor(scene, withSAO) { this._scene = scene; + this._withSAO = withSAO; this._hash = this._getHash(); this._allocate(); } @@ -66811,90 +66821,82 @@ }; _getHash() { - return this._scene._sectionPlanesState.getHash(); + const scene = this._scene; + return [scene._lightsState.getHash(), scene._sectionPlanesState.getHash(), (this._withSAO ? "sao" : "nosao")].join(";"); } drawLayer(frameCtx, dataTextureLayer, renderPass) { - const model = dataTextureLayer.model; - const scene = model.scene; + + const scene = this._scene; const camera = scene.camera; + const model = dataTextureLayer.model; const gl = scene.canvas.gl; const state = dataTextureLayer._state; + const textureState = state.textureState; const origin = dataTextureLayer._state.origin; + const {position, rotationMatrix, rotationMatrixConjugate} = model; if (!this._program) { - this._allocate(dataTextureLayer); + this._allocate(); + if (this.errors) { + return; + } } if (frameCtx.lastProgramId !== this._program.id) { frameCtx.lastProgramId = this._program.id; - this._bindProgram(); + this._bindProgram(frameCtx, state); } - this._program.bindTexture( - this._uTexturePerObjectIdPositionsDecodeMatrix, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerObjectIdPositionsDecodeMatrix); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 1 - ); - - this._program.bindTexture( - this._uTexturePerVertexIdCoordinates, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerVertexIdCoordinates); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 2 - ); - - this._program.bindTexture( + textureState.bindCommonTextures( + this._program, + this._uTexturePerObjectIdPositionsDecodeMatrix, + this._uTexturePerVertexIdCoordinates, this._uTexturePerObjectIdColorsAndFlags, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerObjectIdColorsAndFlags); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 3 - ); - - gl.uniform1i(this._uRenderPass, renderPass); - gl.uniform1i(this._uPickInvisible, frameCtx.pickInvisible); - - gl.uniformMatrix4fv(this._uWorldMatrix, false, model.worldMatrix); - - const pickViewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix; - const viewMatrix = origin ? createRTCViewMat(pickViewMatrix, origin) : pickViewMatrix; + this._uTextureModelMatrices, + this._uTexturePerObjectIdOffsets + ); - gl.uniformMatrix4fv(this._uViewMatrix, false, viewMatrix); - gl.uniformMatrix4fv(this._uProjMatrix, false, frameCtx.pickProjMatrix); + let rtcViewMatrix; + let rtcCameraEye; + const gotOrigin = (origin[0] !== 0 || origin[1] !== 0 || origin[2] !== 0); + const gotPosition = (position[0] !== 0 || position[1] !== 0 || position[2] !== 0); + if (gotOrigin || gotPosition) { + const rtcOrigin = tempVec3a$9; + if (gotOrigin) { + const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3b$5); + rtcOrigin[0] = rotatedOrigin[0]; + rtcOrigin[1] = rotatedOrigin[1]; + rtcOrigin[2] = rotatedOrigin[2]; + } else { + rtcOrigin[0] = 0; + rtcOrigin[1] = 0; + rtcOrigin[2] = 0; + } + rtcOrigin[0] += position[0]; + rtcOrigin[1] += position[1]; + rtcOrigin[2] += position[2]; + rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a); + rtcCameraEye = tempVec3c$4; + rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0]; + rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1]; + rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2]; + } else { + rtcViewMatrix = camera.viewMatrix; // TODO: make pickMatrix + rtcCameraEye = camera.eye; + } + gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos); + gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight); + gl.uniformMatrix4fv(this._uSceneModelWorldMatrix, false, rotationMatrixConjugate); + gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix); + gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); // TODO: pickProjMatrix + gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye); + gl.uniform1i(this._uRenderPass, renderPass); if (scene.logarithmicDepthBufferEnabled) { - const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far should be from projection matrix? + const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); } - const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length; if (numSectionPlanes > 0) { const sectionPlanes = scene._sectionPlanesState.sectionPlanes; @@ -66902,159 +66904,73 @@ const renderFlags = model.renderFlags; for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) { const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex]; - const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; - gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); - if (active) { - const sectionPlane = sectionPlanes[sectionPlaneIndex]; - if (origin) { - const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9); - gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); - } else { - gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); + if (sectionPlaneUniforms) { + const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex]; + gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0); + if (active) { + const sectionPlane = sectionPlanes[sectionPlaneIndex]; + if (origin) { + const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3d$1); + gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos); + } else { + gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos); + } + gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } - gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir); } } } - //============================================================= - // TODO: Use drawElements count and offset to draw only one entity - //============================================================= - if (state.numIndices8Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds8Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices8Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 8 // 8 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices8Bits); } if (state.numIndices16Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds16Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices16Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 16 // 16 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices16Bits); } if (state.numIndices32Bits > 0) { - this._program.bindTexture( - this._uTexturePerPolygonIdPortionIds, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdPortionIds32Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 4 - ); - - this._program.bindTexture( - this._uTexturePerPolygonIdIndices, - { - bind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, state.texturePerPolygonIdIndices32Bits); - return true; - }, - unbind: function (unit) { - gl.activeTexture(gl["TEXTURE" + unit]); - gl.bindTexture(gl.TEXTURE_2D, null); - } - }, - 5 - ); - + textureState.bindTriangleIndicesTextures( + this._program, + this._uTexturePerPolygonIdPortionIds, + this._uTexturePerPolygonIdIndices, + 32 // 32 bits indices + ); gl.drawArrays(gl.TRIANGLES, 0, state.numIndices32Bits); } - frameCtx.drawElements++; } _allocate() { - const scene = this._scene; const gl = scene.canvas.gl; - this._program = new Program(gl, this._buildShader()); - if (this._program.errors) { this.errors = this._program.errors; return; } - const program = this._program; - this._uRenderPass = program.getLocation("renderPass"); this._uPickInvisible = program.getLocation("pickInvisible"); - this._uPositionsDecodeMatrix = program.getLocation("positionsDecodeMatrix"); - this._uWorldMatrix = program.getLocation("worldMatrix"); + this._uPickClipPos = program.getLocation("pickClipPos"); + this._uDrawingBufferSize = program.getLocation("drawingBufferSize"); + this._uSceneModelWorldMatrix = program.getLocation("sceneModelWorldMatrix"); this._uViewMatrix = program.getLocation("viewMatrix"); this._uProjMatrix = program.getLocation("projMatrix"); this._uSectionPlanes = []; - for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) { this._uSectionPlanes.push({ active: program.getLocation("sectionPlaneActive" + i), @@ -67062,24 +66978,30 @@ dir: program.getLocation("sectionPlaneDir" + i) }); } - - this._aPackedVertexId = program.getAttribute("packedVertexId"); - - if (scene.logarithmicDepthBufferEnabled) { this._uLogDepthBufFC = program.getLocation("logDepthBufFC"); } - - this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; - this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; - this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; - this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; - this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; - this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; + this._uTexturePerObjectIdPositionsDecodeMatrix = "uTexturePerObjectIdPositionsDecodeMatrix"; + this._uTexturePerObjectIdColorsAndFlags = "uTexturePerObjectIdColorsAndFlags"; + this._uTexturePerVertexIdCoordinates = "uTexturePerVertexIdCoordinates"; + this._uTexturePerPolygonIdNormals = "uTexturePerPolygonIdNormals"; + this._uTexturePerPolygonIdIndices = "uTexturePerPolygonIdIndices"; + this._uTexturePerPolygonIdPortionIds = "uTexturePerPolygonIdPortionIds"; + this._uTextureModelMatrices = "uTextureModelMatrices"; + this._uTexturePerObjectIdOffsets = "uTexturePerObjectIdOffsets"; + this._uCameraEyeRtc = program.getLocation("uCameraEyeRtc"); } - _bindProgram() { - this._program.bind(); + _bindProgram(frameCtx) { + const scene = this._scene; + const gl = scene.canvas.gl; + const program = this._program; + const project = scene.camera.project; + program.bind(); + if (scene.logarithmicDepthBufferEnabled) { + const logDepthBufFC = 2.0 / (Math.log(project.far + 1.0) / Math.LN2); + gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC); + } } _buildShader() { @@ -67091,10 +67013,12 @@ _buildVertexShader() { const scene = this._scene; - const clipping = scene._sectionPlanesState.sectionPlanes.length > 0; + const sectionPlanesState = scene._sectionPlanesState; + scene._lightsState; + const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; src.push("#version 300 es"); - src.push("// Triangles dataTexture pick flat normals vertex shader"); + src.push("// trianglesDatatextureNormalsRenderer vertex shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); @@ -67112,112 +67036,147 @@ src.push("uniform int renderPass;"); - src.push("in uvec3 packedVertexId;"); - if (scene.entityOffsetsEnabled) { src.push("in vec3 offset;"); } - src.push("uniform bool pickInvisible;"); - src.push("uniform mat4 worldMatrix;"); + src.push("uniform mat4 sceneModelWorldMatrix;"); src.push("uniform mat4 viewMatrix;"); src.push("uniform mat4 projMatrix;"); - // src.push("uniform sampler2D uOcclusionTexture;"); - src.push("uniform sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); - src.push("uniform usampler2D uTexturePerObjectIdColorsAndFlags;"); - src.push("uniform usampler2D uTexturePerVertexIdCoordinates;"); - src.push("uniform usampler2D uTexturePerPolygonIdIndices;"); - src.push("uniform isampler2D uTexturePerPolygonIdNormals;"); - src.push("uniform usampler2D uTexturePerPolygonIdPortionIds;"); + + src.push("uniform highp sampler2D uTexturePerObjectIdPositionsDecodeMatrix;"); + src.push("uniform lowp usampler2D uTexturePerObjectIdColorsAndFlags;"); + src.push("uniform highp sampler2D uTexturePerObjectIdOffsets;"); + src.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"); + src.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"); + src.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"); + src.push("uniform highp sampler2D uTextureModelMatrices;"); + src.push("uniform vec3 uCameraEyeRtc;"); + + src.push("vec3 positions[3];"); if (scene.logarithmicDepthBufferEnabled) { src.push("uniform float logDepthBufFC;"); src.push("out float vFragDepth;"); - src.push("bool isPerspectiveMatrix(mat4 m) {"); - src.push(" return (m[2][3] == - 1.0);"); - src.push("}"); src.push("out float isPerspective;"); } + + src.push("uniform vec2 pickClipPos;"); + src.push("uniform vec2 drawingBufferSize;"); + + src.push("vec4 remapClipPos(vec4 clipPos) {"); + src.push(" clipPos.xy /= clipPos.w;"); + src.push(` clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;`); + src.push(" clipPos.xy *= clipPos.w;"); + src.push(" return clipPos;"); + src.push("}"); + + src.push("bool isPerspectiveMatrix(mat4 m) {"); + src.push(" return (m[2][3] == - 1.0);"); + src.push("}"); + src.push("out vec4 vWorldPosition;"); + if (clipping) { - src.push("out int vFlags2;"); + src.push("flat out uint vFlags2;"); } + src.push("void main(void) {"); // constants - // src.push("int objectIndex = int(packedVertexId.g) & 4095;"); src.push("int polygonIndex = gl_VertexID / 3;"); - src.push("int h_normal_index = polygonIndex & 4095;"); - src.push("int v_normal_index = polygonIndex >> 12;"); - // get packed object-id - src.push("int h_packed_object_id_index = ((polygonIndex >> 3) / 2) & 4095;"); - src.push("int v_packed_object_id_index = ((polygonIndex >> 3) / 2) >> 12;"); - - src.push("ivec3 packedObjectId = ivec3(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).rgb);"); + src.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"); + src.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"); - src.push("int objectIndex;"); - src.push("if (((polygonIndex >> 3) % 2) == 0) {"); - src.push(" objectIndex = (packedObjectId.r << 4) + (packedObjectId.g >> 4);"); - src.push("} else {"); - src.push(" objectIndex = ((packedObjectId.g & 15) << 8) + packedObjectId.b;"); - src.push("}"); + src.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"); src.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"); - // get vertex base - src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); + // get flags & flags2 + src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); + src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); // pickFlag = NOT_RENDERED | PICK - src.push("int h_index = polygonIndex & 4095;"); - src.push("int v_index = polygonIndex >> 12;"); + // renderPass = PICK + src.push(`if (int(flags.w) != renderPass) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); // Cull vertex + src.push("} else {"); + // get vertex base + src.push("ivec4 packedVertexBase = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"); + src.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"); + src.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"); + src.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"); + src.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"); src.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"); src.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"); - src.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"); src.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"); - src.push("mat4 positionsDecodeMatrix = mat4 (texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectIdPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"); - - // get flags & flags2 - src.push("uvec4 flags = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"); - src.push("uvec4 flags2 = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"); - + src.push("uint solid = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"); // get position - src.push("vec3 position1 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); - src.push("vec3 position2 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); - src.push("vec3 position3 = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); + src.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"); + src.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"); + src.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"); + + // get color + src.push("uvec4 color = texelFetch (uTexturePerObjectIdColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"); + + src.push(`if (color.a == 0u) {`); + src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex + src.push(" return;"); + src.push("};"); // get normal - src.push("vec3 normal = normalize(cross(position3 - position1, position2 - position1));"); - src.push("int vertexNumber = gl_VertexID % 3;"); + src.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"); + src.push("vec3 position;"); - src.push("if (vertexNumber == 0) position = position1;"); - src.push("else if (vertexNumber == 1) position = position2;"); - src.push("else position = position3;"); + src.push("position = positions[gl_VertexID % 3];"); + + src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + + // when the geometry is not solid, if needed, flip the triangle winding + src.push("if (solid != 1u) {"); + src.push("if (isPerspectiveMatrix(projMatrix)) {"); + src.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelWorldMatrix * positionsDecodeMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"); + // src.push("vColor = vec4(vec3(1, -1, 0)*dot(normalize(position.xyz - uCameraEyeRtcInQuantizedSpace), normal), 1);") + src.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"); + src.push("position = positions[2 - (gl_VertexID % 3)];"); + src.push("viewNormal = -viewNormal;"); + src.push("}"); + src.push("} else {"); + src.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*positionsDecodeMatrix)) * vec4(normal,1)).xyz);"); + src.push("if (viewNormal.z < 0.0) {"); + src.push("position = positions[2 - (gl_VertexID % 3)];"); + src.push("}"); + src.push("}"); + src.push("}"); + + src.push("vec4 worldPosition = sceneModelWorldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); + + // get XYZ offset + src.push("vec4 offset = vec4(texelFetch (uTexturePerObjectIdOffsets, objectIndexCoords, 0).rgb, 0.0);"); + + src.push("worldPosition.xyz = worldPosition.xyz + offset.xyz;"); + + src.push("vec4 viewPosition = viewMatrix * worldPosition; "); - // flags.w = NOT_RENDERED | PICK - // renderPass = PICK - src.push(`if (int(flags.w) != renderPass) {`); - src.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"); // Cull vertex - src.push(" } else {"); - src.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "); - if (scene.entityOffsetsEnabled) { - src.push(" worldPosition.xyz = worldPosition.xyz + offset;"); - } - src.push(" vec4 viewPosition = viewMatrix * worldPosition; "); - src.push(" vWorldPosition = worldPosition;"); - if (clipping) { - src.push(" vFlags2 = flags2.r;"); - } src.push("vec4 clipPos = projMatrix * viewPosition;"); + if (scene.logarithmicDepthBufferEnabled) { src.push("vFragDepth = 1.0 + clipPos.w;"); src.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"); } - src.push("gl_Position = clipPos;"); - src.push(" }"); + + src.push("vWorldPosition = worldPosition;"); + + if (clipping) { + src.push("vFlags2 = flags2.r;"); + } + src.push("gl_Position = remapClipPos(clipPos);"); + src.push("}"); src.push("}"); return src; } @@ -67227,12 +67186,8 @@ const sectionPlanesState = scene._sectionPlanesState; const clipping = sectionPlanesState.sectionPlanes.length > 0; const src = []; - src.push ('#version 300 es'); - src.push("// Triangles dataTexture pick flat normals fragment shader"); - src.push("#extension GL_OES_standard_derivatives : enable"); - if (scene.logarithmicDepthBufferEnabled) { - src.push("#extension GL_EXT_frag_depth : enable"); - } + src.push('#version 300 es'); + src.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"); src.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"); src.push("precision highp float;"); src.push("precision highp int;"); @@ -67247,26 +67202,28 @@ } src.push("in vec4 vWorldPosition;"); if (clipping) { - src.push("in int vFlags2;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { + src.push("flat in uint vFlags2;"); + for (let i = 0, len = sectionPlanesState.sectionPlanes.length; i < len; i++) { src.push("uniform bool sectionPlaneActive" + i + ";"); src.push("uniform vec3 sectionPlanePos" + i + ";"); src.push("uniform vec3 sectionPlaneDir" + i + ";"); } } - src.push("out vec4 outNormal;"); + src.push("out highp ivec4 outNormal;"); src.push("void main(void) {"); if (clipping) { - src.push(" bool clippable = vFlags2 > 0;"); + src.push(" bool clippable = vFlags2 > 0u;"); src.push(" if (clippable) {"); - src.push(" float dist = 0.0;"); - for (var i = 0; i < sectionPlanesState.sectionPlanes.length; i++) { - src.push(" if (sectionPlaneActive" + i + ") {"); - src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); - src.push(" }"); + src.push(" float dist = 0.0;"); + for (let i = 0, len = sectionPlanesState.sectionPlanes.length; i < len; i++) { + src.push("if (sectionPlaneActive" + i + ") {"); + src.push(" dist += clamp(dot(-sectionPlaneDir" + i + ".xyz, vWorldPosition.xyz - sectionPlanePos" + i + ".xyz), 0.0, 1000.0);"); + src.push("}"); } - src.push(" if (dist > 0.0) { discard; }"); + src.push(" if (dist > 0.0) { "); + src.push(" discard;"); src.push(" }"); + src.push("}"); } if (scene.logarithmicDepthBufferEnabled) { src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"); @@ -67274,7 +67231,7 @@ src.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"); src.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"); src.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"); - src.push(" outNormal = vec4((worldNormal * 0.5) + 0.5, 1.0);"); + src.push(` outNormal = ivec4(worldNormal * float(${math.MAX_INT}), 1.0);`); src.push("}"); return src; } @@ -67371,6 +67328,33 @@ } } + eagerCreateRenders() { + + // Pre-initialize certain renderers that would otherwise be lazy-initialised + // on user interaction, such as picking or emphasis, so that there is no delay + // when user first begins interacting with the viewer. + + if (!this._silhouetteRenderer) { // Used for highlighting and selection + this._silhouetteRenderer = new TrianglesDataTextureSilhouetteRenderer(this._scene); + } + if (!this._pickMeshRenderer) { + this._pickMeshRenderer = new TrianglesDataTexturePickMeshRenderer(this._scene); + } + if (!this._pickDepthRenderer) { + this._pickDepthRenderer = new TrianglesDataTexturePickDepthRenderer(this._scene); + } + if (!this._pickNormalsRenderer) { + this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene); + } + if (!this._vertexDepthRenderer) { + this._vertexDepthRenderer = new TrianglesDataTextureSnapDepthRenderer(this._scene); + } + if (!this._snapDepthBufInitRenderer) { + this._snapDepthBufInitRenderer = new TrianglesDataTextureSnapDepthBufInitRenderer(this._scene); + } + } + + get colorRenderer() { if (!this._colorRenderer) { this._colorRenderer = new TrianglesDataTextureColorRenderer(this._scene, false); @@ -67386,9 +67370,9 @@ } get colorQualityRendererWithSAO() { - if (!this._colorQualityRendererWithSAO) { - this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true); - } + // if (!this._colorQualityRendererWithSAO) { + // this._colorQualityRendererWithSAO = new TrianglesDataTextureColorQualityRenderer(this._scene, true); + // } return this._colorQualityRendererWithSAO; } @@ -67436,7 +67420,7 @@ get pickNormalsRenderer() { if (!this._pickNormalsRenderer) { - this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsRenderer(this._scene); + this._pickNormalsRenderer = new TrianglesDataTexturePickNormalsFlatRenderer(this._scene); } return this._pickNormalsRenderer; } @@ -67543,8 +67527,10 @@ dataTextureRenderers = new TrianglesDataTextureRenderers(scene); cachdRenderers[sceneId] = dataTextureRenderers; dataTextureRenderers._compile(); + dataTextureRenderers.eagerCreateRenders(); scene.on("compile", () => { dataTextureRenderers._compile(); + dataTextureRenderers.eagerCreateRenders(); }); scene.on("destroyed", () => { delete cachdRenderers[sceneId]; @@ -67794,32 +67780,13 @@ 3 // webgl texture unit ); - this.textureModelMatrices.bindTexture( - glProgram, - modelMatricesShaderName, - 4 // webgl texture unit - ); - this.texturePerObjectIdOffsets.bindTexture( glProgram, objectOffsetsShaderName, - 5 // webgl texture unit + 4 // webgl texture unit ); } - /** - * - * @param {Program} glProgram - * @param {string} cameraMatricesShaderName - */ - bindPickCameraTexture(glProgram, cameraMatricesShaderName) { - // this.texturePickCameraMatrices.bindTexture( - // glProgram, - // cameraMatricesShaderName, - // 4 // webgl texture unit - // ); - } - /** * * @param {Program} glProgram @@ -67836,13 +67803,13 @@ this.indicesPortionIdsPerBitnessTextures[textureBitness].bindTexture( glProgram, portionIdsShaderName, - 6 // webgl texture unit + 5 // webgl texture unit ); this.indicesPerBitnessTextures[textureBitness].bindTexture( glProgram, polygonIndicesShaderName, - 7 // webgl texture unit + 6 // webgl texture unit ); } @@ -67862,13 +67829,13 @@ this.edgeIndicesPortionIdsPerBitnessTextures[textureBitness].bindTexture( glProgram, edgePortionIdsShaderName, - 6 // webgl texture unit + 5 // webgl texture unit ); this.edgeIndicesPerBitnessTextures[textureBitness].bindTexture( glProgram, edgeIndicesShaderName, - 7 // webgl texture unit + 6 // webgl texture unit ); } } @@ -67978,188 +67945,6 @@ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); } - /** - * Generate and return a `camera data texture`. - * - * The texture will automatically update its contents before each render when the camera matrix is dirty, - * and to do so will use the following events: - * - * - `scene.rendering` event will be used to know that the camera texture should be updated - * - `camera.matrix` event will be used to know that the camera matices changed - * - * @param {WebGL2RenderingContext} gl - * @param {Camera} camera - * @param {Scene} scene - * @param {null|number[3]} origin - * @returns {BindableDataTexture} - */ - generateCameraDataTexture(gl, camera, scene, origin) { - const textureWidth = 4; - const textureHeight = 3; // space for 3 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - const cameraTexture = new BindableDataTexture(gl, texture, textureWidth, textureHeight); - let cameraDirty = true; - cameraTexture.updateViewMatrix = (viewMatrix, projMatrix) => { - gl.bindTexture(gl.TEXTURE_2D, cameraTexture._texture); - // Camera's "view matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 0, // 1st matrix: camera view matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array((origin) ? createRTCViewMat(viewMatrix, origin) : viewMatrix) - ); - - // Camera's "view normal matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 1, // 2nd matrix: camera view normal matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(camera.viewNormalMatrix) - ); - - // Camera's "project matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 2, // 3rd matrix: camera project matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(projMatrix) - ); - }; - const onCameraMatrix = () => { - if (!cameraDirty) { - return; - } - cameraDirty = false; - cameraTexture.updateViewMatrix(camera.viewMatrix, camera.project.matrix); - }; - camera.on("matrix", () => cameraDirty = true); - scene.on("rendering", onCameraMatrix); - onCameraMatrix(); - return cameraTexture; - } - - /** - * Generate and return a texture containing camera view and projection - * matrices for picking, relative to the given RTC coordinate system origin. - * - * @param {WebGL2RenderingContext} gl - * @param {Camera} camera - * @param {null|number[3]} origin - * @returns {BindableDataTexture} - */ - generatePickCameraDataTexture(gl, camera, origin) { - const textureWidth = 4; - const textureHeight = 3; // space for 3 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - const cameraTexture = new BindableDataTexture(gl, texture, textureWidth, textureHeight); - cameraTexture.updateViewMatrix = (viewMatrix, projMatrix) => { - gl.bindTexture(gl.TEXTURE_2D, cameraTexture._texture); - // Camera's "view matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 0, // 1st matrix: pick camera view matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array((origin) ? createRTCViewMat(viewMatrix, origin) : viewMatrix) - ); - - // Camera's "view normal matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 1, // 2nd matrix: pick camera view normal matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(camera.viewNormalMatrix) - ); - - // Camera's "project matrix" - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, - 2, // 3rd matrix: pick camera project matrix - 4, - 1, - gl.RGBA, - gl.FLOAT, - new Float32Array(projMatrix) - ); - }; - return cameraTexture; - } - - /** - * Generate and return a `model data texture`. - * - * @param {WebGL2RenderingContext} gl - * @param {DataTextureSceneModel} model - * - * @returns {BindableDataTexture} - */ - generateModelTexture(gl, model) { - const textureWidth = 4; - const textureHeight = 2; // space for 2 matrices - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texStorage2D(gl.TEXTURE_2D, 1, gl.RGBA32F, textureWidth, textureHeight); - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, // x-offset - 0, // y-offset (model world matrix) - 4, // data width (4x4 values) - 1, // data height (1 matrix) - gl.RGBA, - gl.FLOAT, - new Float32Array(model.worldMatrix) - ); - gl.texSubImage2D( - gl.TEXTURE_2D, - 0, - 0, // x-offset - 1, // y-offset (model normal matrix) - 4, // data width (4x4 values) - 1, // data height (1 matrix) - gl.RGBA, - gl.FLOAT, - new Float32Array(model.worldNormalMatrix) - ); - this.disableBindedTextureFiltering(gl); - gl.bindTexture(gl.TEXTURE_2D, null); - return new BindableDataTexture(gl, texture, textureWidth, textureHeight); - } - /** * This will generate an RGBA texture for: * - colors @@ -69134,34 +68919,6 @@ buffer.edgeIndices32Bits); } - // if (buffer.metallicRoughness.length > 0) { - // const metallicRoughness = new Uint8Array(buffer.metallicRoughness); - // let normalized = false; - // state.metallicRoughnessBuf = new ArrayBuf(gl, gl.ARRAY_BUFFER, metallicRoughness, buffer.metallicRoughness.length, 2, gl.STATIC_DRAW, normalized); - // } - - // Model matrices texture - if (!this.model._modelMatricesTexture) { - this.model._modelMatricesTexture = this._dataTextureGenerator.generateModelTexture(gl, this.model); - } - - textureState.textureModelMatrices = this.model._modelMatricesTexture; - - // Camera textures - - textureState.cameraTexture = this._dataTextureGenerator.generateCameraDataTexture( - this.model.scene.canvas.gl, - this.model.scene.camera, - this.model.scene, - this._state.origin.slice()); - - textureState.textureCameraMatrices = textureState.cameraTexture; - - textureState.texturePickCameraMatrices = this._dataTextureGenerator.generatePickCameraDataTexture( - this.model.scene.canvas.gl, - this.model.scene.camera, - this._state.origin.slice()); - textureState.finalize(); // Free up memory @@ -69543,14 +69300,12 @@ // object flags textureState.texturePerObjectIdColorsAndFlags._textureData.set(tempUint8Array4, subPortionId * 32 + 8); if (this._deferredSetFlagsActive || deferred) { - console.info("_subPortionSetFlags set flags defer"); this._deferredSetFlagsDirty = true; return; } if (++this._numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE) { this._beginDeferredFlags(); // Subsequent flags updates now deferred } - console.info("_subPortionSetFlags set flags write through"); gl.bindTexture(gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture); gl.texSubImage2D( gl.TEXTURE_2D, @@ -69597,7 +69352,6 @@ if (++this._numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE) { this._beginDeferredFlags(); // Subsequent flags updates now deferred } - console.info("_subPortionSetFlags2 set flags write through"); gl.bindTexture(gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture); gl.texSubImage2D( gl.TEXTURE_2D, @@ -69836,10 +69590,10 @@ //---- PICKING ---------------------------------------------------------------------------------------------------- setPickMatrices(pickViewMatrix, pickProjMatrix) { - if (this._numVisibleLayerPortions === 0) { - return; - } - this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(pickViewMatrix, pickProjMatrix); + // if (this._numVisibleLayerPortions === 0) { + // return; + // } + // this._dataTextureState.texturePickCameraMatrices.updateViewMatrix(pickViewMatrix, pickProjMatrix); } drawPickMesh(renderFlags, frameCtx) { @@ -72514,6 +72268,10 @@ return null; } + if (cfg.normals) { // HACK + cfg.normals = null; + } + const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")); cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin; @@ -72786,7 +72544,8 @@ countIndices += cfg.positions ? cfg.positions.length : cfg.positionsCompressed.length; break; case VBO_INSTANCED: - countIndices += cfg.positions ? cfg.positions.length : cfg.positionsCompressed.length; + const geometry = cfg.geometry; + countIndices += geometry.positions ? geometry.positions.length : geometry.positionsCompressed.length; break; } return Math.round(countIndices); @@ -74263,7 +74022,8 @@ const snapPickResult = this._scene.snapPick({ canvasPos: this.pickCursorPos, snapRadius: this._configs.snapRadius, - snapMode: this._configs.snapMode, + snapToVertex: this._configs.snapToVertex, + snapToEdge: this._configs.snapToEdge, }); if (snapPickResult && snapPickResult.snappedWorldPos) { this.snapPickResult = snapPickResult; @@ -74354,20 +74114,19 @@ if (this.hoveredSnappedOrSurfaceOff) { this._cameraControl.fire("hoverSnapOrSurfaceOff", { - canvasPos: this.pickCursorPos + canvasPos: this.pickCursorPos, + cursorPos : this.pickCursorPos }, true); } if (this.snappedOrPicked) { if (this.snapPickResult) { const pickResult = new PickResult(); + pickResult.snappedToVertex = this.snapPickResult.snappedToVertex; + pickResult.snappedToEdge = this.snapPickResult.snappedToEdge; pickResult.worldPos = this.snapPickResult.snappedWorldPos; + pickResult.cursorPos = this.pickCursorPos; pickResult.canvasPos = this.snapPickResult.snappedCanvasPos; - if (this._configs.snapMode === "vertex") { - pickResult.snappedToVertex = true; - } else { - pickResult.snappedToEdge = true; - } this._cameraControl.fire("hoverSnapOrSurface", pickResult, true); this.snapPickResult = null; } else { @@ -74430,7 +74189,7 @@ const canvasPos = math.vec2(); - const getCanvasPosFromEvent$4 = function (event, canvasPos) { + const getCanvasPosFromEvent$3 = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -74679,7 +74438,7 @@ } switch (e.which) { case 3: // Right button - getCanvasPosFromEvent$4(e, canvasPos); + getCanvasPosFromEvent$3(e, canvasPos); const x = canvasPos[0]; const y = canvasPos[1]; if (Math.abs(x - lastXDown) < 3 && Math.abs(y - lastYDown) < 3) { @@ -75750,14 +75509,14 @@ }); document.addEventListener("mousemove", this._mouseMoveHandler = (e) => { - getCanvasPosFromEvent$3(e, canvas, states.pointerCanvasPos); + getCanvasPosFromEvent$2(e, canvas, states.pointerCanvasPos); }); canvas.addEventListener("mousedown", this._mouseDownHandler = (e) => { if (!(configs.active && configs.pointerEnabled)) { return; } - getCanvasPosFromEvent$3(e, canvas, states.pointerCanvasPos); + getCanvasPosFromEvent$2(e, canvas, states.pointerCanvasPos); states.mouseover = true; }); @@ -75783,7 +75542,7 @@ } } - function getCanvasPosFromEvent$3(event, canvas, canvasPos) { + function getCanvasPosFromEvent$2(event, canvas, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -75796,7 +75555,7 @@ return canvasPos; } - const getCanvasPosFromEvent$2 = function (event, canvasPos) { + const getCanvasPosFromEvent$1 = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -75858,7 +75617,7 @@ if (touches.length === 1 && changedTouches.length === 1) { - getCanvasPosFromEvent$2(touches[0], tapStartCanvasPos); + getCanvasPosFromEvent$1(touches[0], tapStartCanvasPos); if (configs.followPointer) { @@ -75898,7 +75657,7 @@ } for (let i = 0, len = touches.length; i < len; ++i) { - getCanvasPosFromEvent$2(touches[i], lastCanvasTouchPosList[i]); + getCanvasPosFromEvent$1(touches[i], lastCanvasTouchPosList[i]); } numTouches = touches.length; @@ -75942,7 +75701,7 @@ if (numTouches === 1) { - getCanvasPosFromEvent$2(touches[0], tapCanvasPos0); + getCanvasPosFromEvent$1(touches[0], tapCanvasPos0); //----------------------------------------------------------------------------------------------- // Drag rotation @@ -75979,8 +75738,20 @@ } } else { - updates.rotateDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation - updates.rotateDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // if (!absorbTinyFirstDrag) { + updates.rotateDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation + updates.rotateDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // } else { + // firstDragDeltaY -= (xPanDelta / canvasWidth) * (configs.dragRotationRate * 1.0); // Full horizontal rotation + // firstDragDeltaX += (yPanDelta / canvasHeight) * (configs.dragRotationRate * 1.5); // Half vertical rotation + // if (Math.abs(firstDragDeltaX) > 5 || Math.abs(firstDragDeltaY) > 5) { + // updates.rotateDeltaX += firstDragDeltaX; + // updates.rotateDeltaY += firstDragDeltaY; + // firstDragDeltaX = 0; + // firstDragDeltaY = 0; + // absorbTinyFirstDrag = false; + // } + // } } } else if (numTouches === 2) { @@ -75988,8 +75759,8 @@ const touch0 = touches[0]; const touch1 = touches[1]; - getCanvasPosFromEvent$2(touch0, tapCanvasPos0); - getCanvasPosFromEvent$2(touch1, tapCanvasPos1); + getCanvasPosFromEvent$1(touch0, tapCanvasPos0); + getCanvasPosFromEvent$1(touch1, tapCanvasPos1); const lastMiddleTouch = math.geometricMeanVec2(lastCanvasTouchPosList[0], lastCanvasTouchPosList[1]); const currentMiddleTouch = math.geometricMeanVec2(tapCanvasPos0, tapCanvasPos1); @@ -76037,7 +75808,7 @@ } for (let i = 0; i < numTouches; ++i) { - getCanvasPosFromEvent$2(touches[i], lastCanvasTouchPosList[i]); + getCanvasPosFromEvent$1(touches[i], lastCanvasTouchPosList[i]); } }); } @@ -76058,7 +75829,7 @@ const DBL_TAP_INTERVAL = 325; const TAP_DISTANCE_THRESHOLD = 4; - const getCanvasPosFromEvent$1 = function (event, canvasPos) { + const getCanvasPosFromEvent = function (event, canvasPos) { if (!event) { event = window.event; canvasPos[0] = event.x; @@ -76137,7 +75908,7 @@ if (touches.length === 1 && changedTouches.length === 1) { tapStartTime = touchStartTime; - getCanvasPosFromEvent$1(touches[0], tapStartPos); + getCanvasPosFromEvent(touches[0], tapStartPos); const rightClickClientX = tapStartPos[0]; const rightClickClientY = tapStartPos[1]; @@ -76164,7 +75935,7 @@ } for (let i = 0, len = touches.length; i < len; ++i) { - getCanvasPosFromEvent$1(touches[i], activeTouches[i]); + getCanvasPosFromEvent(touches[i], activeTouches[i]); } activeTouches.length = touches.length; @@ -76199,7 +75970,7 @@ // Double-tap - getCanvasPosFromEvent$1(changedTouches[0], pickController.pickCursorPos); + getCanvasPosFromEvent(changedTouches[0], pickController.pickCursorPos); pickController.schedulePickEntity = true; pickController.schedulePickSurface = pickedSurfaceSubs; @@ -76231,7 +76002,7 @@ // Single-tap - getCanvasPosFromEvent$1(changedTouches[0], pickController.pickCursorPos); + getCanvasPosFromEvent(changedTouches[0], pickController.pickCursorPos); pickController.schedulePickEntity = true; pickController.schedulePickSurface = pickedSurfaceSubs; @@ -76286,6 +76057,8 @@ } const DEFAULT_SNAP_PICK_RADIUS = 30; + const DEFAULT_SNAP_VERTEX = true; + const DEFAULT_SNAP_EDGE = true; /** * @desc Controls the {@link Camera} with user input, and fires events when the user interacts with pickable {@link Entity}s. @@ -76913,7 +76686,8 @@ smartPivot: false, doubleClickTimeFrame: 250, - snapMode: "vertex", + snapToVertex: DEFAULT_SNAP_VERTEX, + snapToEdge: DEFAULT_SNAP_EDGE, snapRadius: DEFAULT_SNAP_PICK_RADIUS, // Rotation @@ -77150,7 +76924,10 @@ * @param {Boolean} value Set ````true```` to activate this ````CameraControl````. */ set active(value) { - this._configs.active = value !== false; + value = value !== false; + this._configs.active = value; + this._handlers[1]._active = value; + this._handlers[5]._active = value; } /** @@ -77167,32 +76944,39 @@ } /** - * Sets the current snap mode for "hoverSnapOrSurface" events, to specify whether the pointer - * snaps to the nearest vertex or the nearest edge. + * Sets whether the pointer snap to vertex. * - * Accepted values are: + * @param {boolean} snapToVertex + */ + set snapToVertex(snapToVertex) { + this._configs.snapToVertex = !!snapToVertex; + } + + /** + * Gets whether the pointer snap to vertex. * - * * "vertex" - (default) snap to the nearest vertex, or - * * "edge" - snap to the nearest edge. + * @returns {boolean} + */ + get snapToVertex() { + return this._configs.snapToVertex; + } + + /** + * Sets whether the pointer snap to edge. * - * @param {String} snapMode The snap mode: "vertex" or "edge". + * @param {boolean} snapToEdge */ - set snapMode(snapMode) { - snapMode = snapMode || "vertex"; - if (snapMode !== "vertex" && snapMode !== "edge") { - this.error("Unsupported value for snapMode: " + snapMode + " - supported values are 'vertex' and 'edge' - defaulting to 'vertex'"); - snapMode = "vertex"; - } - this._configs.snapMode = snapMode; + set snapToEdge(snapToEdge) { + this._configs.snapToEdge = !!snapToEdge; } /** - * Gets the current snap mode. + * Gets whether the pointer snap to edge. * - * @returns {String} The snap mode: "vertex" or "edge". + * @returns {boolean} */ - get snapMode() { - return this._configs.snapMode; + get snapToEdge() { + return this._configs.snapToEdge; } /** @@ -87407,428 +87191,6 @@ } } - /** - * {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching - * the Viewer to faster, lower-quality rendering modes whenever we interact. - * - * [](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin) - * - * FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas - * resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those - * rendering features and the original canvas scale, after a configured delay. - * - * Depending on how we configure FastNavPlugin, we essentially switch to a smooth-rendering low-quality view while - * interacting, then return to the normal higher-quality view after we stop, following an optional delay. - * - * Down-scaling the canvas resolution gives particularly good results. For example, scaling by ````0.5```` means that - * we're rendering a quarter of the pixels while interacting, which can make the Viewer noticeably smoother with big models. - * - * The screen capture above shows FastNavPlugin in action. In this example, whenever we move the Camera or resize the Canvas, - * FastNavPlugin switches off enhanced edges and ambient shadows (SAO), and down-scales the canvas, making it slightly - * blurry. When ````0.5```` seconds passes with no interaction, the plugin shows edges and SAO again, and restores the - * original canvas scale. - * - * # Usage - * - * In the example below, we'll create a {@link Viewer}, add a {@link FastNavPlugin}, then use an {@link XKTLoaderPlugin} to load a model. - * - * Whenever we interact with the Viewer, our FastNavPlugin will: - * - * * hide edges, - * * hide ambient shadows (SAO), - * * hide physically-based materials (switching to non-PBR), - * * hide transparent objects, and - * * scale the canvas resolution by 0.5, causing the GPU to render 75% less pixels. - *
- * - * We'll also configure a 0.5 second delay before we transition back to high-quality each time we stop ineracting, so that we're - * not continually flipping between low and high quality as we interact. Since we're only rendering ambient shadows when not interacting, we'll also treat ourselves - * to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect. - * - * * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#performance_FastNavPlugin)] - * - * ````javascript - * import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js"; - * - * // Create a Viewer with PBR and SAO enabled - * - * const viewer = new Viewer({ - * canvasId: "myCanvas", - * transparent: true, - * pbr: true, // Enable physically-based rendering for Viewer - * sao: true // Enable ambient shadows for Viewer - * }); - * - * viewer.scene.camera.eye = [-66.26, 105.84, -281.92]; - * viewer.scene.camera.look = [42.45, 49.62, -43.59]; - * viewer.scene.camera.up = [0.05, 0.95, 0.15]; - * - * // Higher-quality SAO settings - * - * viewer.scene.sao.enabled = true; - * viewer.scene.sao.numSamples = 60; - * viewer.scene.sao.kernelRadius = 170; - * - * // Install a FastNavPlugin - * - * new FastNavPlugin(viewer, { - * hideEdges: true, // Don't show edges while we interact (default is true) - * hideSAO: true, // Don't show ambient shadows while we interact (default is true) - * hideColorTexture: true, // No color textures while we interact (default is true) - * hidePBR: true, // No physically-based rendering while we interact (default is true) - * hideTransparentObjects: true, // Hide transparent objects while we interact (default is false) - * scaleCanvasResolution: true, // Scale canvas resolution while we interact (default is false) - * scaleCanvasResolutionFactor: 0.5, // Factor by which we scale canvas resolution when we interact (default is 0.6) - * delayBeforeRestore: true, // When we stop interacting, delay before restoring normal render (default is true) - * delayBeforeRestoreSeconds: 0.5 // The delay duration, in seconds (default is 0.5) - * }); - * - * // Load a BIM model from XKT - * - * const xktLoader = new XKTLoaderPlugin(viewer); - * - * const model = xktLoader.load({ - * id: "myModel", - * src: "./models/xkt/HolterTower.xkt", - * sao: true, // Enable ambient shadows for this model - * pbr: true // Enable physically-based rendering for this model - * }); - * ```` - * - * @class FastNavPlugin - */ - class FastNavPlugin extends Plugin { - - /** - * @constructor - * @param {Viewer} viewer The Viewer. - * @param {Object} cfg FastNavPlugin configuration. - * @param {String} [cfg.id="FastNav"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}. - * @param {Boolean} [cfg.hideColorTexture=true] Whether to temporarily hide color textures whenever we interact with the Viewer. - * @param {Boolean} [cfg.hidePBR=true] Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideSAO=true] Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideEdges=true] Whether to temporarily hide edges whenever we interact with the Viewer. - * @param {Boolean} [cfg.hideTransparentObjects=false] Whether to temporarily hide transparent objects whenever we interact with the Viewer. - * @param {Number} [cfg.scaleCanvasResolution=false] Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. - * @param {Number} [cfg.scaleCanvasResolutionFactor=0.6] The factor by which we downscale the canvas resolution whenever we interact with the Viewer. - * @param {Boolean} [cfg.delayBeforeRestore=true] Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. - * @param {Number} [cfg.delayBeforeRestoreSeconds=0.5] Delay in seconds before restoring normal rendering after we stop interacting with the Viewer. - */ - constructor(viewer, cfg = {}) { - - super("FastNav", viewer); - - this._hideColorTexture = cfg.hideColorTexture !== false; - this._hidePBR = cfg.hidePBR !== false; - this._hideSAO = cfg.hideSAO !== false; - this._hideEdges = cfg.hideEdges !== false; - this._hideTransparentObjects = !!cfg.hideTransparentObjects; - this._scaleCanvasResolution = !!cfg.scaleCanvasResolution; - this._scaleCanvasResolutionFactor = cfg.scaleCanvasResolutionFactor || 0.6; - this._delayBeforeRestore = (cfg.delayBeforeRestore !== false); - this._delayBeforeRestoreSeconds = cfg.delayBeforeRestoreSeconds || 0.5; - - let timer = this._delayBeforeRestoreSeconds * 1000; - let fastMode = false; - - const switchToLowQuality = () => { - timer = (this._delayBeforeRestoreSeconds * 1000); - if (!fastMode) { - viewer.scene._renderer.setColorTextureEnabled(!this._hideColorTexture); - viewer.scene._renderer.setPBREnabled(!this._hidePBR); - viewer.scene._renderer.setSAOEnabled(!this._hideSAO); - viewer.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects); - viewer.scene._renderer.setEdgesEnabled(!this._hideEdges); - if (this._scaleCanvasResolution) { - viewer.scene.canvas.resolutionScale = this._scaleCanvasResolutionFactor; - } else { - viewer.scene.canvas.resolutionScale = 1; - } - fastMode = true; - } - }; - - const switchToHighQuality = () => { - viewer.scene.canvas.resolutionScale = 1; - viewer.scene._renderer.setEdgesEnabled(true); - viewer.scene._renderer.setColorTextureEnabled(true); - viewer.scene._renderer.setPBREnabled(true); - viewer.scene._renderer.setSAOEnabled(true); - viewer.scene._renderer.setTransparentEnabled(true); - fastMode = false; - }; - - this._onCanvasBoundary = viewer.scene.canvas.on("boundary", switchToLowQuality); - this._onCameraMatrix = viewer.scene.camera.on("matrix", switchToLowQuality); - - this._onSceneTick = viewer.scene.on("tick", (tickEvent) => { - if (!fastMode) { - return; - } - timer -= tickEvent.deltaTime; - if ((!this._delayBeforeRestore) || timer <= 0) { - switchToHighQuality(); - } - }); - - let down = false; - - this._onSceneMouseDown = viewer.scene.input.on("mousedown", () => { - down = true; - }); - - this._onSceneMouseUp = viewer.scene.input.on("mouseup", () => { - down = false; - }); - - this._onSceneMouseMove = viewer.scene.input.on("mousemove", () => { - if (!down) { - return; - } - switchToLowQuality(); - }); - } - - /** - * Gets whether to temporarily hide color textures whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding color textures. - */ - get hideColorTexture() { - return this._hideColorTexture; - } - - /** - * Sets whether to temporarily hide color textures whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideColorTexture ````true```` to hide color textures. - */ - set hideColorTexture(hideColorTexture) { - this._hideColorTexture = hideColorTexture; - } - - /** - * Gets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding PBR. - */ - get hidePBR() { - return this._hidePBR; - } - - /** - * Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hidePBR ````true```` to hide PBR. - */ - set hidePBR(hidePBR) { - this._hidePBR = hidePBR; - } - - /** - * Gets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding SAO. - */ - get hideSAO() { - return this._hideSAO; - } - - /** - * Sets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideSAO ````true```` to hide SAO. - */ - set hideSAO(hideSAO) { - this._hideSAO = hideSAO; - } - - /** - * Gets whether to temporarily hide edges whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @return {Boolean} ````true```` if hiding edges. - */ - get hideEdges() { - return this._hideEdges; - } - - /** - * Sets whether to temporarily hide edges whenever we interact with the Viewer. - * - * Default is ````true````. - * - * @param {Boolean} hideEdges ````true```` to hide edges. - */ - set hideEdges(hideEdges) { - this._hideEdges = hideEdges; - } - - /** - * Gets whether to temporarily hide transparent objects whenever we interact with the Viewer. - * - * Does not hide X-rayed, selected, highlighted objects. - * - * Default is ````false````. - * - * @return {Boolean} ````true```` if hiding transparent objects. - */ - get hideTransparentObjects() { - return this._hideTransparentObjects - } - - /** - * Sets whether to temporarily hide transparent objects whenever we interact with the Viewer. - * - * Does not hide X-rayed, selected, highlighted objects. - * - * Default is ````false````. - * - * @param {Boolean} hideTransparentObjects ````true```` to hide transparent objects. - */ - set hideTransparentObjects(hideTransparentObjects) { - this._hideTransparentObjects = (hideTransparentObjects !== false); - } - - /** - * Gets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. - * - * Default is ````false````. - * - * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. - * - * @return {Boolean} ````true```` if scaling the canvas resolution. - */ - get scaleCanvasResolution() { - return this._scaleCanvasResolution; - } - - /** - * Sets whether to temporarily scale the canvas resolution whenever we interact with the Viewer. - * - * Default is ````false````. - * - * The scaling factor is configured via {@link FastNavPlugin#scaleCanvasResolutionFactor}. - * - * @param {Boolean} scaleCanvasResolution ````true```` to scale the canvas resolution. - */ - set scaleCanvasResolution(scaleCanvasResolution) { - this._scaleCanvasResolution = scaleCanvasResolution; - } - - /** - * Gets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. - * - * Default is ````0.6````. - * - * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. - * - * @return {Number} Factor by which we scale the canvas resolution. - */ - get scaleCanvasResolutionFactor() { - return this._scaleCanvasResolutionFactor; - } - - /** - * Sets the factor by which we temporarily scale the canvas resolution when we interact with the viewer. - * - * Accepted range is ````[0.0 .. 1.0]````. - * - * Default is ````0.6````. - * - * Enable canvas resolution scaling by setting {@link FastNavPlugin#scaleCanvasResolution} ````true````. - * - * @param {Number} scaleCanvasResolutionFactor Factor by which we scale the canvas resolution. - */ - set scaleCanvasResolutionFactor(scaleCanvasResolutionFactor) { - this._scaleCanvasResolutionFactor = scaleCanvasResolutionFactor || 0.6; - } - - /** - * Gets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. - * - * Default is ````true````. - * - * @return {Boolean} Whether to have a delay. - */ - get delayBeforeRestore() { - return this._delayBeforeRestore; - } - - /** - * Sets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay duration is configured via {@link FastNavPlugin#delayBeforeRestoreSeconds}. - * - * Default is ````true````. - * - * @param {Boolean} delayBeforeRestore Whether to have a delay. - */ - set delayBeforeRestore(delayBeforeRestore) { - this._delayBeforeRestore = delayBeforeRestore; - } - - /** - * Gets the delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. - * - * Default is ````0.5```` seconds. - * - * @return {Number} Delay in seconds. - */ - get delayBeforeRestoreSeconds() { - return this._delayBeforeRestoreSeconds; - } - - /** - * Sets the delay before restoring normal rendering after we stop interacting with the Viewer. - * - * The delay is enabled when {@link FastNavPlugin#delayBeforeRestore} is ````true````. - * - * Default is ````0.5```` seconds. - * - * @param {Number} delayBeforeRestoreSeconds Delay in seconds. - */ - set delayBeforeRestoreSeconds(delayBeforeRestoreSeconds) { - this._delayBeforeRestoreSeconds = delayBeforeRestoreSeconds !== null && delayBeforeRestoreSeconds !== undefined ? delayBeforeRestoreSeconds : 0.5; - } - - /** - * @private - */ - send(name, value) { - } - - /** - * Destroys this plugin. - */ - destroy() { - this.viewer.scene.camera.off(this._onCameraMatrix); - this.viewer.scene.canvas.off(this._onCanvasBoundary); - this.viewer.scene.input.off(this._onSceneMouseDown); - this.viewer.scene.input.off(this._onSceneMouseUp); - this.viewer.scene.input.off(this._onSceneMouseMove); - this.viewer.scene.off(this._onSceneTick); - super.destroy(); - } - } - const isBrowser$4 = Boolean(typeof process !== 'object' || String(process) !== '[object process]' || process.browser); const matches$1 = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version); matches$1 && parseFloat(matches$1[1]) || 0;