cbim-render-webgl-sdk
Version:
渲染SDK-WebGL版本
2 lines • 688 kB
JavaScript
/*! For license information please see index.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("VIEWER",[],t):"object"==typeof exports?exports.VIEWER=t():e.VIEWER=t()}(self,(function(){return function(){var e={60:function(e,t,n){(t=n(314)(!1)).push([e.id,".cbim-render-sdk.content-menu{border-radius:4px;overflow:hidden;background-color:#fff;box-shadow:0px 10px 24px 0px rgba(157,170,194,0.2)}.cbim-render-sdk.content-menu li{height:36px;font-size:14px;line-height:36px;background:#fff;color:#2A334A;padding:0 16px;cursor:pointer}.cbim-render-sdk.content-menu li.disabled{color:#ddd;pointer-events:none}.cbim-render-sdk-board .measure-result-label-final{position:absolute;z-index:1}.cbim-render-sdk-board .measure-result-label-final label{display:inline-flex;align-items:center;background:#F65D30;white-space:nowrap;border-radius:4px;color:#fff;font-size:16px;line-height:24px;padding:0 12px}.cbim-render-sdk-board .measure-result-label-final.current{z-index:2}.cbim-render-sdk-board .measure-result-label-normal{height:24px;z-index:1}.cbim-render-sdk-board .measure-result-label-normal label{display:inline-flex;align-items:center;background:#f6f9fc;border:1px solid #e1e6f1;border-radius:4px;font-size:16px;height:24px;line-height:22px;padding:0 8px;white-space:nowrap}.cbim-render-sdk-board .measure-result-label-normal>*{display:block;margin-top:-4px}.cbim-render-sdk-board .measure-result-label-normal.current{z-index:2}.cbim-render-sdk-board:not(.mobile) .measure-result-label-final .measure-delete,.cbim-render-sdk-board:not(.mobile) .measure-result-label-normal .measure-delete{position:absolute;padding-left:8px;margin-right:-6px;left:100%;top:50%;transform:translateY(-50%);width:20px;height:20px;box-sizing:content-box;cursor:pointer;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAnFBMVEUAAAD/IiL0MDD1Ly//Njb4LS31MDD2MTH1MDD1Ly/1MDD2KSn0Ly/1Ly/2Ly/1MDD1MDD3MTH3MDD1MDD1MDD0MDD2MDD1MDD1Ly/0MDD1MDD1MDD1Ly/zMDD2MDD1MDD2Ly/1Ly/0MDD1Ly/1MDD1MDD1MDD0Ly/1MDD1MDD0Ly/2Kyv1MDD0MDD1MDD0MDD1MDDzMDD4MDD0MDBTy06JAAAAM3RSTlMACLriBCKAGvrntgzyTC3KwykV/PXscGliOa2miIRdVzYy79OimHlA3b1FEp6PdNmwsEW+URz4AAAB0klEQVQ4y7WU2XLiMBAAjQ34wAfY3IQ7QCDHHv3//7ayJDwryslDqtIvGo0bRjMyeD9NOH8r4nF0OC6n+Rda5lcIx1mnXVsUPBBvWrTuEzWT1TRb7G6z04veJuWjN7iiGGbdJrNbRUAwevCKOpm5yXxYl8idun5d5rX1OEHoCXViJVWFWX0eebAAErVt4Qycm10BgdR1SSC9F8+AzPT0JDP+MP2GKbzblA9D4w3x72afeGQD0oH5TAVZ05My7WMKHZURbHU0h4nppONr03pBz9P8gWcdvMGqXsW0nowouPc89RxzLZ5iD+hDxvaIYoqnWwT0PY5h4Tmm9oRICXbdecIaxVXmqb/pUq8HuEm2j8YXswvs6+AIc8cLro7ZA8o6WMLJ8Xoyz5otHHQwhV+OJ/PUnCDRQW7OoPiwnjHt4+6kmfPxfkejWHvWjJobrsLmjqKRMQvlWTPZmvUFlvdcLO+7IGOVMW+Adbt3q8y55H1n1ubtU4hL2ZeB+Q098ld50eX/zGgC/A5drbOugI2bzGMg7b9KpjtX/RJZTwiHKMbLed5RUm97mqCIpa58w3mMYZxieS7b/27flSFUy533GYPNKjDWIZlKa5/I+eKyL71v8w8UdE5caeuXCQAAAABJRU5ErkJggg==) right center/20px no-repeat;display:none}.cbim-render-sdk-board:not(.mobile) .measure-result-label-final.hover,.cbim-render-sdk-board:not(.mobile) .measure-result-label-normal.hover{z-index:2}.cbim-render-sdk-board:not(.mobile) .measure-result-label-final.hover .measure-delete,.cbim-render-sdk-board:not(.mobile) .measure-result-label-normal.hover .measure-delete{display:block}.cbim-render-sdk-board:not(.mobile) .measure-result-label-final.h-reverse .measure-delete,.cbim-render-sdk-board:not(.mobile) .measure-result-label-normal.h-reverse .measure-delete{padding-left:0;padding-right:8px;left:-28px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAnFBMVEUAAAD/IiL0MDD1Ly//Njb4LS31MDD2MTH1MDD1Ly/1MDD2KSn0Ly/1Ly/2Ly/1MDD1MDD3MTH3MDD1MDD1MDD0MDD2MDD1MDD1Ly/0MDD1MDD1MDD1Ly/zMDD2MDD1MDD2Ly/1Ly/0MDD1Ly/1MDD1MDD1MDD0Ly/1MDD1MDD0Ly/2Kyv1MDD0MDD1MDD0MDD1MDDzMDD4MDD0MDBTy06JAAAAM3RSTlMACLriBCKAGvrntgzyTC3KwykV/PXscGliOa2miIRdVzYy79OimHlA3b1FEp6PdNmwsEW+URz4AAAB0klEQVQ4y7WU2XLiMBAAjQ34wAfY3IQ7QCDHHv3//7ayJDwryslDqtIvGo0bRjMyeD9NOH8r4nF0OC6n+Rda5lcIx1mnXVsUPBBvWrTuEzWT1TRb7G6z04veJuWjN7iiGGbdJrNbRUAwevCKOpm5yXxYl8idun5d5rX1OEHoCXViJVWFWX0eebAAErVt4Qycm10BgdR1SSC9F8+AzPT0JDP+MP2GKbzblA9D4w3x72afeGQD0oH5TAVZ05My7WMKHZURbHU0h4nppONr03pBz9P8gWcdvMGqXsW0nowouPc89RxzLZ5iD+hDxvaIYoqnWwT0PY5h4Tmm9oRICXbdecIaxVXmqb/pUq8HuEm2j8YXswvs6+AIc8cLro7ZA8o6WMLJ8Xoyz5otHHQwhV+OJ/PUnCDRQW7OoPiwnjHt4+6kmfPxfkejWHvWjJobrsLmjqKRMQvlWTPZmvUFlvdcLO+7IGOVMW+Adbt3q8y55H1n1ubtU4hL2ZeB+Q098ld50eX/zGgC/A5drbOugI2bzGMg7b9KpjtX/RJZTwiHKMbLed5RUm97mqCIpa58w3mMYZxieS7b/27flSFUy533GYPNKjDWIZlKa5/I+eKyL71v8w8UdE5caeuXCQAAAABJRU5ErkJggg==) left center/20px no-repeat}.cbim-render-sdk-board.mobile .measure-delete{display:none;position:relative;margin-left:16px}.cbim-render-sdk-board.mobile .measure-delete::before{position:absolute;width:1px;height:10px;background-color:rgba(255,255,255,0.4);content:\" \";left:-8px;top:5px}.cbim-render-sdk-board.mobile .measure-delete.show{display:inline-flex;align-items:center;margin-right:-6px}.cbim-render-sdk-board.mobile .h-reverse>label{display:flex;flex-direction:row-reverse}.cbim-render-sdk-board.mobile .h-reverse>label .measure-delete{margin-left:0;margin-right:16px}.cbim-render-sdk-board.mobile .h-reverse>label .measure-delete::before{left:auto;right:-8px;top:5px}.cbim-render-sdk-board.mobile .h-reverse>label .measure-delete.show{margin-left:-6px}.cbim-render-sdk-board.mobile .measure-result-label-normal .measure-delete svg path{fill:#F65D30}.content-menu.cbim-render-sdk .right-arrow{position:relative}.content-menu.cbim-render-sdk .right-arrow::after{content:\"\";height:6px;width:6px;border-width:1px 1px 0 0;border-color:rgba(114,119,124,0.8);border-style:solid;transform:matrix(0.71, 0.71, -0.71, 0.71, 0, 0);position:absolute;top:50%;right:16px;margin-top:-4px}.content-menu.cbim-render-sdk .right-arrow:hover::after{border-color:#F65D30}.content-menu.cbim-render-sdk .check-style{position:relative;padding-right:36px}.content-menu.cbim-render-sdk .check-style::after{content:\"\";width:5px;height:10px;border-color:#F65D30;border-style:solid;border-width:0 2px 2px 0;transform:rotate(45deg);position:absolute;top:50%;right:18px;margin-top:-9px}.cbim-render-axis-tool{position:absolute;pointer-events:none;overflow:hidden}.cbim-render-axis-tool span{background:#f65d30;border-radius:4px;display:inline-flex;flex-direction:row;justify-content:center;align-items:center;padding:3px 12px;color:#fff;font-family:PingFang SC;font-size:14px;font-weight:400;line-height:22px;user-select:none}.cbim-render-web-2d-container{position:absolute;left:0px;top:0px;height:0px !important;overflow:visible !important}.cbim-webgl-view-cube{position:absolute;z-index:10;top:10px;right:10px;overflow:hidden}.cbim-render-web-drawable-2d-layer,.cbim-render-web-drawable-3d-layer{position:absolute;left:0px;top:0px;width:0 !important;height:0 !important;overflow:visible !important}.cbim-render-web-drawable-2d-layer .visible,.cbim-render-web-drawable-3d-layer .visible{opacity:1}.cbim-render-web-drawable-2d-layer .hidden,.cbim-render-web-drawable-3d-layer .hidden{opacity:0.2}.cbim-picked-point-icon{position:relative;width:20px;height:20px;pointer-events:none}.cbim-picked-point-icon .center{position:absolute;width:8px;height:8px;top:50%;left:50%;transform:translate(-50%, -50%);background:#f65d30;border:1px solid #FFF;border-radius:50%;z-index:1}.cbim-picked-point-icon .picked_face{position:relative;display:none;width:100%;height:20px;border:none}.cbim-picked-point-icon .picked_face .picked_face_svg{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.cbim-picked-point-icon.conner{border:1px solid #FFF}.cbim-picked-point-icon.center{border:1px solid #FFF}.cbim-picked-point-icon.center:after,.cbim-picked-point-icon.center:before{content:'';position:absolute;background-color:#fff}.cbim-picked-point-icon.center:after{top:2px;left:8px;width:2px;height:14px}.cbim-picked-point-icon.center:before{top:8px;left:2px;width:14px;height:2px}.cbim-picked-point-icon.middle{position:relative;margin-top:-4px;border-bottom:1px solid #FFF}.cbim-picked-point-icon.middle:after,.cbim-picked-point-icon.middle:before{content:'';position:absolute;top:0;left:0;width:20px;height:20px}.cbim-picked-point-icon.middle:after{border-left:1px solid #FFF;transform:rotate(30deg);transform-origin:0 100%}.cbim-picked-point-icon.middle:before{border-right:1px solid #FFF;transform:rotate(-30deg);transform-origin:100% 100%}.cbim-picked-point-icon.middle>.center{margin-top:4px}.cbim-picked-point-icon.face{border:none}.cbim-picked-point-icon.face .picked_face{display:block}.cbim-picked-point-icon.hidden{display:none}.cbim-rotate-center-icon{width:20px;height:20px;border:1px solid #FFF;border-radius:50%;pointer-events:none}.cbim-rotate-center-icon .center{position:absolute;width:10px;height:10px;top:50%;left:50%;transform:translate(-50%, -50%);background:#F65D30;border:1px solid #FFF;border-radius:50%}.cbim-rotate-center-icon:before{content:'';position:absolute;height:1px;width:4px;left:100%;top:50%;background-color:#fff;transform:translateY(-50%);box-shadow:-23px 0 #FFF}.cbim-rotate-center-icon:after{content:'';position:absolute;width:1px;height:4px;top:100%;left:50%;background-color:#fff;transform:translateX(-50%);box-shadow:0 -23px #FFF}.cbim-rotate-center-icon.hidden{display:none}.cbim-render-room-label{border:1px solid #FFF;background-color:rgba(0,150,136,0.5);padding:2px;color:#FFF;border-radius:4px}.cbim-render-clip-handler{pointer-events:none;height:56px;width:20px}.cbim-render-clip-handler__span-input{pointer-events:all;position:absolute;height:30px;left:50%;bottom:108%;transform:translateX(-50%)}.cbim-render-clip-handler__span-input>span{display:block;border-radius:4px;padding:8px 12px;background-color:#ff5000;color:#FFF}.cbim-render-clip-handler__span-input>.input{display:none}.cbim-render-clip-handler__span-input>.input>input{border-radius:4px;height:30px;width:100px;font-size:14px;padding-right:30px;text-indent:4px;border:none;box-shadow:0 0px 8px 0 #9DAAC2}.cbim-render-clip-handler__span-input>.input:after{content:'m';position:absolute;font-size:14px;color:#9DAAC2;left:78px;top:46%;transform:translateY(-50%)}.cbim-render-clip-handler__wrap{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;top:0;left:0;transform-origin:50% 50%}.cbim-render-clip-handler__wrap>div{pointer-events:all}.cbim-render-clip-handler__top,.cbim-render-clip-handler__bottom{width:20px;height:16px;background-color:#FFF}.cbim-render-clip-handler__top:after,.cbim-render-clip-handler__bottom:after{content:'';display:block;width:100%;height:100%;background-color:#F65D30}.cbim-render-clip-handler__top{padding:3px 3px 2px 3px}.cbim-render-clip-handler__top,.cbim-render-clip-handler__top:after{clip-path:polygon(50% 0, 0 100%, 100% 100%)}.cbim-render-clip-handler__bottom{padding:2px 3px 3px 3px}.cbim-render-clip-handler__bottom,.cbim-render-clip-handler__bottom:after{clip-path:polygon(50% 100%, 0 0, 100% 0)}.cbim-render-clip-handler__middle{width:6px;height:24px;background-color:#f65d30;border-left:2px solid #FFF;border-right:2px solid #FFF}.cbim-measure-label{padding:2px 4px;background-color:rgba(246,93,48,0.4);color:#FFF;border-radius:4px}.cbim-measure-point{width:var(--cbim_render_web_sdk_measure_point_size, 8px);height:var(--cbim_render_web_sdk_measure_point_size, 8px);background-color:var(--cbim_render_web_sdk_measure_default_color, #9DAAC2);border-radius:50%}.cbim-measure-point.active{background-color:var(--cbim_render_web_sdk_measure_active_color, #F65D30)}.cbim-measure__opts{position:absolute;left:4px;bottom:4px;display:flex;flex-direction:row}.cbim-measure__opts>a{position:relative;cursor:pointer;height:28px;width:28px;border-radius:14px;background-color:#fff}.cbim-measure__opts>a+a{margin-left:8px}.cbim-measure__opts>a:hover{background-color:var(--cbim_render_web_sdk_measure_active_color, #f65d30)}.cbim-measure__opts>a:hover:before,.cbim-measure__opts>a:hover:after{border-color:#FFF !important}.cbim-measure__opts-confirm:before{content:'';position:absolute;width:14px;height:6px;top:8px;left:6px;border-left:1px solid #0fd281;border-bottom:1px solid #0fd281;transform:rotate(-45deg)}.cbim-measure__opts-revoke:before{content:'';position:absolute;width:5px;height:5px;top:7px;left:7px;border-left:1px solid #6D7B98;border-bottom:1px solid #6D7B98;transform:rotate(45deg)}.cbim-measure__opts-revoke:after{content:'';position:absolute;width:14px;height:10px;top:9px;left:8px;border-top:1px solid #6D7B98;border-right:1px solid #6D7B98;border-bottom:1px solid #6D7B98;border-radius:0px 6px 6px 0}.cbim-measure-result.active{z-index:1000 !important}.cbim-measure-result.active>.cbim-measure-result__content>div{background-color:var(--cbim_render_web_sdk_measure_active_color, #f65d30)}.cbim-measure-result.active>.cbim-measure-result__content ul{display:block}.cbim-measure-result.active:not(.temp)>.cbim-measure-result__content a{display:block}.cbim-measure-result__content{position:absolute;right:0;top:0;background:#FFFFFF}.cbim-measure-result__content>div{padding:5px 4px;font-size:14px;background-color:var(--cbim_render_web_sdk_measure_default_color, #9DAAC2);color:#ffffff}.cbim-measure-result__content span{margin-left:4px}.cbim-measure-result__content a{display:none;cursor:pointer;height:24px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAIRJREFUOE/lk1EOgCAMQ8vJ1Jt5M/VmUuNIwU1NiF+SkBDo3qAbCZ0jdcbjDjAC4LQxe8kUoAEDgC0D1jNIQdzi/nEWAYpAsmoCF0AtRZY1sqfStB4s+eqTXFufYGvVXEzUQ5qmADPxT4CoCo8eaAN5EJaxdGVbxrZ9PUDVZJ9+plcfdQcS4yYRxXnMQAAAAABJRU5ErkJggg==) no-repeat center;background-size:16px 16px}.cbim-measure-result__content a:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAJpJREFUOE9jZKAQMFKonwGnAd9jDBz+MTE4wCzgXnShAZtlcAOQNTD+Z7D/z8hwkOkfwwGQJmSDQHyQOOeSC2A5rAYgK4DZimwBVgNACkGKYCbjCht0NShh8C3WYD/X4guO6IYha0JWg+IFEAdZ8mucQQNyGMACcSQZgCsWCIYBcgLCZggoUSGnSpRoRE++2AxAT2S0y0zE5lIAtbKMEb+o8dAAAAAASUVORK5CYII=)}.cbim-measure-result__content>ul{display:none}.cbim-measure-result__content>ul li{font-size:12px}.cbim-measure-result__content>ul li label,.cbim-measure-result__content>ul li div{height:18px;line-height:18px}.cbim-measure-result__content>ul li label{width:18px;text-align:center;color:#FFF}.cbim-measure-result__content>ul li div{padding:0 4px}.cbim-measure-result__content>ul li:first-child label{background-color:#F43030}.cbim-measure-result__content>ul li:first-child div{color:#F43030;background-color:#FFF2F0}.cbim-measure-result__content>ul li:nth-child(2) label{background-color:#00BE71}.cbim-measure-result__content>ul li:nth-child(2) div{color:#00BE71;background-color:#E6FFF1}.cbim-measure-result__content>ul li:nth-child(3) label{background-color:#0084FF}.cbim-measure-result__content>ul li:nth-child(3) div{color:#0084FF;background-color:#E6F7FF}\n",""]),e.exports=t},314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,o=e[1]||"",a=e[3];if(!a)return o;if(t&&"function"==typeof btoa){var s=(n=a,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),c=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},119:function(e,t,n){var r=n(72),i=n(60);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);r(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},72:function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function a(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],c=t.base?s[0]+t.base:s[0],u=n[c]||0,l="".concat(c," ").concat(u);n[c]=u+1;var h=a(l),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==h?(o[h].references++,o[h].updater(f)):o.push({identifier:l,updater:m(f,t),references:1}),r.push(l)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var u,l=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=l(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function f(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d=null,p=0;function m(e,t){var n,r,i;if(t.singleton){var o=p++;n=d||(d=c(t)),r=h.bind(null,n,o,!1),i=h.bind(null,n,o,!0)}else n=c(t),r=f.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=a(n[r]);o[i].references--}for(var c=s(e,t),u=0;u<n.length;u++){var l=a(n[u]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}n=c}}}},512:function(e){"use strict";e.exports=function(e,t,n,r){var i=self||window;try{try{var o;try{o=new i.Blob([e])}catch(t){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),c=new i[t](s,n);return a.revokeObjectURL(s),c}catch(r){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new i[t](r,n)}}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),n.nc=void 0;var r={};return function(){"use strict";n.d(r,{default:function(){return pf}});var e=require("three");function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.containerId=t||"",this.timeouts={},this.intervals={},this.limit={_default:50,_loadStatus:1e8,_processLoadingTime:1e8,_operationInterval:1e8,_delayDataReported:1e8,_keepSending:1e8},this.duration={_default:40,_resize:1,_getCtx:1,_tabPage:1,_drawRect:1,_loaded:10,_dxfProgress:10,_move:50,_scale:30,_mouseMove:30,_keepSending:30,_screen:100,_touristTips:100,_high:300,_click:300,_lightTree:1,_createLight:500,_textureEdit:1500,_reconnect:1e3,_query:5e3,_videoDownload:2e3,_heart:2e4,_startHeart:6e5,_loadStatus:5e3,_processLoadingTime:1e3,_operationInterval:250,_delayDataReported:6e4,_touch:300,_contextMenu:300}},t=[{key:"getTimeout",value:function(e){return e="".concat(e,"_").concat(this.containerId||""),this.timeouts[e]}},{key:"getInterval",value:function(e){return e="".concat(e,"_").concat(this.containerId||""),this.intervals[e]}},{key:"clearTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){var t=this;(e="".concat(e,"_").concat(this.containerId||""))?(clearTimeout(this.timeouts[e]),this.timeouts[e]=null):Object.keys(this.timeouts).forEach((function(e){t.timeouts[e]&&(clearTimeout(t.timeouts[e]),t.timeouts[e]=null)}))}))},{key:"clearInterval",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){var t=this;(e="".concat(e,"_").concat(this.containerId||""))?(clearInterval(this.intervals[e]),this.intervals[e]=null):Object.keys(this.intervals).forEach((function(e){t.intervals[e]&&(clearInterval(t.intervals[e]),t.intervals[e]=null)}))}))},{key:"setTimeout",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.duration._default;e="".concat(e,"_").concat(this.containerId||""),this.timeouts[e]=setTimeout(t,n)}))},{key:"setInterval",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.duration._default,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.limit._default,i=arguments.length>4?arguments[4]:void 0;e="".concat(e,"_").concat(this.containerId||"");var o=!!r;this.intervals[e]=setInterval(o?function(){t(),0==--r&&i&&i()}:t,n)}))}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),s={F:{desc:["前","front"],dir:"z",coefficient:1},A:{desc:["后","rear"],dir:"z",coefficient:-1},L:{desc:["左","left"],dir:"x",coefficient:-1},R:{desc:["右","right"],dir:"x",coefficient:1},T:{desc:["上","top"],dir:"y",coefficient:1},B:{desc:["下","bottom"],dir:"y",coefficient:-1}},c={"厨房":"#ff8400","卫生间":"#00c4ff","书房":"#ffe600","客房":"#009966","主卧":"#009966","房间":"#009966","阳台":"#ff6600","走廊":"#CC3366","餐厅":"#FFCC00","客厅":"#006699","办公":"#006699"},u={drawInstance:null,skybox:null,selectedObjects:{},transformMode:"",selectMode:1,disableSelect:!1,clipping:{type:0},navigation:0,gui:{},dbName:"webgl_model_".concat((new Date).getTime()),selectedFeatureId:{value:-1},hiddenIfcFeatureIds:{},selectedIfcFeatureIds:{},selectedGltfFeatureIds:{},hiddenGltfFeatureIds:{},selectedIFCIds:{},gpuPicker:null,centerTarget:{x:0,y:0,z:0},selectComTarget:null,roamingMode:0,clipPosition:null,measureData:[],destroy:function(){var e=this;Object.keys(this.gui).forEach((function(t){var n;null===(n=e.gui[t])||void 0===n||n.destroy()})),this.selectedObjects={},this.clipping.type=0,this.selectedIFCIds={},this.selectComTarget=null,this.hiddenIfcFeatureIds={},this.selectedIfcFeatureIds={},this.selectedGltfFeatureIds={},this.hiddenGltfFeatureIds={},this.hiddenGltfFeatureIds={},this.clipPosition=null,this.measureData=[],this.measure=!1}},l=(n(119),{OST_Columns:{type:"柱",major:"建筑"},"柱":{type:"柱",major:"建筑"},OST_Windows:{type:"门窗",major:"建筑"},OST_Doors:{type:"门窗",major:"建筑"},"门":{type:"门窗",major:"建筑"},"窗":{type:"门窗",major:"建筑"},IfcDoor:{type:"门窗",major:"建筑"},IfcWindow:{type:"门窗",major:"建筑"},OST_CurtainWallPanels:{type:"幕墙",major:"建筑"},OST_CurtaSystem:{type:"幕墙",major:"建筑"},OST_CurtainWallMullions:{type:"幕墙",major:"建筑"},"幕墙":{type:"幕墙",major:"建筑"},IfcPlate:{type:"幕墙",major:"建筑"},IfcCurtainWall:{type:"幕墙",major:"建筑"},IfcMember:{type:"幕墙",major:"建筑"},OST_Stairs:{type:"楼梯",major:"建筑"},OST_Ramps:{type:"楼梯",major:"建筑"},OST_StairsRailing:{type:"楼梯",major:"建筑"},"楼梯":{type:"楼梯",major:"建筑"},IfcStairFlight:{type:"楼梯",major:"建筑"},IfcRailing:{type:"楼梯",major:"建筑"},IfcStair:{type:"楼梯",major:"建筑"},IfcRampFlight:{type:"楼梯",major:"建筑"},OST_HVAC_Zones:{type:"其他",major:"建筑"},ST_Mass:{type:"其他",major:"建筑"},OST_RasterImages:{type:"其他",major:"建筑"},ST_PlumbingFixtures:{type:"其他",major:"建筑"},OST_Sprinklers:{type:"其他",major:"建筑"},ST_Topography:{type:"其他",major:"建筑"},OST_Site:{type:"其他",major:"建筑"},ST_Furniture:{type:"其他",major:"建筑"},OST_FurnitureSystems:{type:"其他",major:"建筑"},ST_Rooms:{type:"其他",major:"建筑"},OST_Planting:{type:"其他",major:"建筑"},ST_Casework:{type:"其他",major:"建筑"},OST_Entourage:{type:"其他",major:"建筑"},ST_MEPSpaces:{type:"其他",major:"建筑"},OST_Roads:{type:"其他",major:"建筑"},ST_Areas:{type:"其他",major:"建筑"},fcFurnishingElement:{type:"其他",major:"建筑"},IfcBuildingElementProxy:{type:"其他",major:"建筑"},fcSpace:{type:"其他",major:"建筑"},IfcCovering:{type:"其他",major:"建筑"},fcSite:{type:"其他",major:"建筑"},IfcGrid:{type:"其他",major:"建筑"},fcBuildingElementPart:{type:"其他",major:"建筑"},OST_StructuralFraming:{type:"梁",major:"结构"},OST_StructuralFramingSystem:{type:"梁",major:"结构"},Beams:{type:"梁",major:"结构"},Beam:{type:"梁",major:"结构"},OST_StructuralTruss:{type:"梁",major:"结构"},"梁":{type:"梁",major:"结构"},IfcBeam:{type:"梁",major:"结构"},OST_Floors:{type:"板",major:"结构"},OST_Roofs:{type:"板",major:"结构"},FootPrintRoof:{type:"板",major:"结构"},OST_Ceilings:{type:"板",major:"结构"},OST_StructuralStiffener:{type:"板",major:"结构"},IfcSlab:{type:"板",major:"结构"},IfcRoof:{type:"板",major:"结构"},OST_StructuralColumns:{type:"柱",major:"结构"},"结构柱":{type:"柱",major:"结构"},IfcColumn:{type:"柱",major:"结构"},OST_StructureWalls:{type:"剪力墙",major:"结构"},"剪力墙":{type:"剪力墙",major:"结构"},IfcWallStandardCase:{type:"剪力墙",major:"结构"},IfcWall:{type:"剪力墙",major:"结构"},OST_StructuralFoundation:{type:"基础",major:"结构"},"基础":{type:"基础",major:"结构"},OST_ShaftOpening:{type:"其他",major:"结构"},OST_Parts:{type:"其他",major:"结构"},OST_AreaRein:{type:"其他",major:"结构"},OST_PathRein:{type:"其他",major:"结构"},OST_StructConnections:{type:"其他",major:"结构"},OST_FabricReinforcement:{type:"其他",major:"结构"},OST_FabricAreas:{type:"其他",major:"结构"},OST_DetailComponents:{type:"其他",major:"结构"},OST_FabricationParts:{type:"其他",major:"结构"},OST_GenericModel:{type:"其他",major:"结构"},"排风":{type:"排风系统",major:"暖通"},"通气":{type:"排风系统",major:"暖通"},"送风":{type:"送风系统",major:"暖通"},"给风":{type:"送风系统",major:"暖通"},"回风":{type:"回风系统",major:"暖通"},OST_DuctCurves:{type:"其他",major:"暖通"},OST_DuctLinings:{type:"其他",major:"暖通"},OST_DuctFitting:{type:"其他",major:"暖通"},OST_DuctAccessory:{type:"其他",major:"暖通"},OST_DuctInsulations:{type:"其他",major:"暖通"},OST_DuctTerminal:{type:"其他",major:"暖通"},"给水":{type:"给水系统",major:"给排水"},"泄水":{type:"给水系统",major:"给排水"},"卫生":{type:"给水系统",major:"给排水"},"中气":{type:"给水系统",major:"给排水"},"软化":{type:"给水系统",major:"给排水"},OST_SpecialityEquipment:{type:"给水系统",major:"给排水"},"排水":{type:"排水系统",major:"给排水"},"补水":{type:"排水系统",major:"给排水"},"污水":{type:"排水系统",major:"给排水"},"废水":{type:"排水系统",major:"给排水"},"压力":{type:"排水系统",major:"给排水"},"空调":{type:"排水系统",major:"给排水"},Pipe:{type:"排水系统",major:"给排水"},"雨水":{type:"雨水系统",major:"给排水"},"消防":{type:"消防系统",major:"给排水"},OST_SecurityDevices:{type:"消防系统",major:"给排水"},OST_FireAlarmDevices:{type:"消防系统",major:"给排水"},OST_PipeCurves:{type:"其他",major:"给排水"},OST_PlaceHolderPipes:{type:"其他",major:"给排水"},OST_PipeAccessory:{type:"其他",major:"给排水"},OST_PipeInsulations:{type:"其他",major:"给排水"},OST_PipeFitting:{type:"其他",major:"给排水"},IfcFlowFitting:{type:"其他",major:"给排水"},IfcFlowSegment:{type:"其他",major:"给排水"},IfcDistributionControlElement:{type:"其他",major:"给排水"},OST_LightingFixtures:{type:"照明系统",major:"电气"},OST_LightingDevices:{type:"照明系统",major:"电气"},"照明":{type:"照明系统",major:"电气"},OST_CableTray:{type:"电缆桥架",major:"电气"},OST_CableTrayFitting:{type:"电缆桥架",major:"电气"},"电缆":{type:"电缆桥架",major:"电气"},OST_Conduit:{type:"线管系统",major:"电气"},OST_ConduitFitting:{type:"线管系统",major:"电气"},OST_Wire:{type:"线管系统",major:"电气"},OST_Lines:{type:"线管系统",major:"电气"},"线管":{type:"线管系统",major:"电气"},OST_ElectricalFixtures:{type:"电器设备",major:"电气"},OST_ElectricalEquipment:{type:"电器设备",major:"电气"},OST_TelephoneDevices:{type:"电器设备",major:"电气"},OST_NurseCallDevices:{type:"电器设备",major:"电气"},OST_DataDevices:{type:"电器设备",major:"电气"},OST_MechanicalEquipment:{type:"电器设备",major:"电气"},"电器":{type:"电器设备",major:"电气"},IfcFlowTerminal:{type:"其他",major:"电气"},OST_Walls:{type:"墙",major:"建筑"},OST_PlumbingFixtures:{type:"卫浴",major:"机电"},OST_Topography:{type:"地形",major:"建筑"},OST_BuildingPad:{type:"建筑地坪",major:"建筑"},OST_Casework:{type:"橱柜",major:"建筑"},OST_Cornices:{type:"墙饰条",major:"建筑"},OST_EdgeSlab:{type:"楼板边缘",major:"建筑"},OST_Fascia:{type:"封檐板",major:"建筑"},OST_Furniture:{type:"家具",major:"建筑"},OST_Mass:{type:"体量",major:"建筑"},OST_Parking:{type:"停车场",major:"建筑"},OST_RailingHandRail:{type:"栏杆扶手",major:"建筑"},OST_RailingSupport:{type:"支座",major:"建筑"},OST_RailingTopRail:{type:"顶部扶栏",major:"建筑"},OST_StairsLandings:{type:"楼梯平台",major:"建筑"},OST_StairsStringerCarriage:{type:"支撑",major:"建筑"},BuildingPad:{type:"建筑地坪",major:"建筑"},CableTray:{type:"桥架",major:"建筑"},Ceiling:{type:"天花板",major:"建筑"},DirectShape:{type:"内建模型",major:"建筑"},Duct:{type:"风管",major:"暖通"},Element:{type:"其他",major:"建筑"},ExtrusionRoof:{type:"平屋顶",major:"建筑"},FaceWall:{type:"面墙",major:"建筑"},Floor:{type:"楼板",major:"建筑"},ModelText:{type:"模型文字",major:"建筑"},Part:{type:"零件",major:"建筑"},PipeInsulation:{type:"管道保温层",major:"给排水"},Railing:{type:"栏杆",major:"建筑"},RoofBase:{type:"屋顶基类",major:"建筑"},Stairs:{type:"楼梯",major:"建筑"},TopographySurface:{type:"地形",major:"建筑"},TopRail:{type:"栏杆顶",major:"建筑"},Wall:{type:"墙",major:"建筑"},WallFoundation:{type:"墙",major:"建筑"}}),h=n(512),f=n.n(h);function d(){return f()('/*! For license information please see tree.worker.js.LICENSE.txt */\n!function(){var e=function(){function e(e,n,r){return(n=function(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(){"use strict";n=function(){return r};var e,r={},a=Object.prototype,o=a.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",c=u.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,o=Object.create(a.prototype),u=new k(r||[]);return i(o,"_invoke",{value:R(e,n,u)}),o}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",h="executing",m="completed",g={};function b(){}function x(){}function I(){}var N={};f(N,s,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(M([])));E&&E!==a&&o.call(E,s)&&(N=E);var j=I.prototype=b.prototype=Object.create(N);function L(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,n){function r(a,i,u,s){var l=p(e[a],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==t(f)&&o.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,u,s)}),(function(e){r("throw",e,u,s)})):n.resolve(f).then((function(e){c.value=e,u(c)}),(function(e){return r("throw",e,u,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,t){function o(){return new n((function(n,a){r(e,t,n,a)}))}return a=a?a.then(o,o):o()}})}function R(t,n,r){var a=v;return function(o,i){if(a===h)throw Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var s=D(u,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===v)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var l=p(t,n,r);if("normal"===l.type){if(a=r.done?m:y,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=m,r.method="throw",r.arg=l.arg)}}}function D(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,D(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a \'"+r+"\' method")),g;var o=p(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function U(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function M(n){if(n||""===n){var r=n[s];if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var a=-1,i=function t(){for(;++a<n.length;)if(o.call(n,a))return t.value=n[a],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(t(n)+" is not iterable")}return x.prototype=I,i(j,"constructor",{value:I,configurable:!0}),i(I,"constructor",{value:x,configurable:!0}),x.displayName=f(I,c,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,f(e,c,"GeneratorFunction")),e.prototype=Object.create(j),e},r.awrap=function(e){return{__await:e}},L(P.prototype),f(P.prototype,l,(function(){return this})),r.AsyncIterator=P,r.async=function(e,t,n,a,o){void 0===o&&(o=Promise);var i=new P(d(e,t,n,a),o);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(j),f(j,c,"Generator"),f(j,s,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},r.values=M,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(U),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,a){return u.type="throw",u.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),U(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;U(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},r}function r(e,t,n,r,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,o){var i=e.apply(t,n);function u(e){r(i,a,o,u,s,"next",e)}function s(e){r(i,a,o,u,s,"throw",e)}u(void 0)}))}}var o,i,u,s=4186316022,l=[s,781010003,2655215786,3242617779,919958153,1307041759],c=function(){var e=a(n().mark((function e(t){var r,a,s=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=s.length>1&&void 0!==s[1]&&s[1],a={tree:{elementId:!0,uuid:!0,name:!0,familyName:!0,majorParentUuid:!0,floorParentUuid:!0,typeParentUuid:!0,systemUuid:!0},attrs:{name:!0,uuid:!0}},o=new self.zango.Db(t,1,a),e.next=6,o.collection("tree");case 6:return i=e.sent,e.next=9,o.collection("attrs");case 9:if(u=e.sent,!r){e.next=13;break}return e.next=13,o.drop();case 13:return e.abrupt("return",!0);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),f=function(){o.close(),self.close()},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=[];try{if("其他"in e){var a=e["其他"];delete e["其他"],e["其他"]=a}if("其它"in e){var o=e["其它"];delete e["其它"],e["其它"]=o}return p(e,r,t,n,0),r}catch(t){return console.error("属性解析失败",t,e),{}}},p=function(e,n,r,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;for(var i in e)if("object"!=t(e[i])||"value"in e[i]){var u=void 0;u="object"===t(e[i])?{name:e[i].name||i,value:e[i].value,type:e[i].type||"NORMAL"}:{name:i,value:e[i],type:a?"CATEGORY":"NORMAL"},"revit_id"===i&&(u.value=r),o>0?n.push(u):n.push({name:i,children:[u]})}else{var s=[];p(e[i],s,r,a,o+1),Object.keys(s).length&&n.push({name:i,children:s}),"revit_id"===i&&s.forEach((function(e){e.value=r}))}},v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];for(var a in e)r.push(e[a]);var i=h(r);return new Promise((function(e){u.insert({uuid:"ifcAttr",data:r}).finally((function(){console.log("ifc属性保存完成"),o.close();var a=[];n?(r.filter((function(e){return 3124254112===e.type})).forEach((function(e){var n,o;a.push({floorParentUuid:"root",uuid:e.expressID,name:(null===(n=e.Name)||void 0===n?void 0:n.value)||"",modelId:t,isIFC:!0,attributes:{familyName:(null===(o=e.Name)||void 0===o?void 0:o.value)||""}});var i=r.find((function(t){return t.RelatingStructure&&t.RelatingStructure.value==e.expressID}));i&&i.RelatedElements.forEach((function(n){var o=r.find((function(e){return e.expressID==n.value}));if(o){var i,u,s=r.find((function(e){return e.RelatingObject&&e.RelatingObject.value==o.expressID}));a.push({floorParentUuid:e.expressID,uuid:s?"".concat(e.expressID,";").concat(o.expressID):o.expressID,expressId:o.expressID,featureId:o.expressID,name:(null===(i=o.Name)||void 0===i?void 0:i.value)||"",modelId:t,attributes:{familyName:(null===(u=o.Name)||void 0===u?void 0:u.value)||""},isIFC:!0,isLeaf:!s}),s&&s.RelatedObjects.forEach((function(n){var i,u,s=r.find((function(e){return e.expressID==n.value}));a.push({floorParentUuid:"".concat(e.expressID,";").concat(o.expressID),uuid:s.expressID,expressId:s.expressID,featureId:s.expressID,name:(null===(i=s.Name)||void 0===i?void 0:i.value)||"",modelId:t,attributes:{familyName:(null===(u=s.Name)||void 0===u?void 0:u.value)||""},isIFC:!0,isLeaf:!0})}))}}))})),e({res:a,project:i})):e({res:a,project:i})}))}))},y=function(e,t){var n,r,a,o=e.find((function(e){return e.expressID==t})),i={uuid:o.expressID,type:"ifc",properties:{"Element Specific":{Guid:{value:null===(n=o.GlobalId)||void 0===n?void 0:n.value},IfcEntity:{value:self.IFCTypes?self.IFCTypes[o.type]:o.type},Name:{value:null===(r=o.Name)||void 0===r?void 0:r.value},ObjectType:{value:null===(a=o.ObjectType)||void 0===a?void 0:a.value},Tag:{value:o.Tag?o.Tag.value:""}}}};return l.forEach((function(t){e.filter((function(e){return e.type==t&&e.RelatedObjects&&e.RelatedObjects.find((function(e){return e.value==o.expressID}))})).forEach((function(t){var n=Object.keys(t).find((function(e){return e.startsWith("Relating")}));if(n){var r=t[n].value,a=e.find((function(e){return e.expressID==r}));a&&a.Name&&a.HasProperties&&(i.properties[a.Name.value]={},a.HasProperties.forEach((function(t){var n=e.find((function(e){return e.expressID==t.value}));n.Unit&&console.log(JSON.stringify(n.Unit)),i.properties[a.Name.value][n.Name.value]={value:n.NominalValue?n.NominalValue.value:"",unit:n.Unit||""}})))}}))})),i},h=function(e){var t,n,r,a,o,i,u,s=e.find((function(e){return 103090709==e.type})),l=e.find((function(e){var t;return 1451395588==e.type&&"XC_DrawingInfo"==(null==e||null===(t=e.Name)||void 0===t?void 0:t.value)})),c={};null!=l&&l.HasProperties&&(null==l||l.HasProperties.forEach((function(t){var n=e.find((function(e){return e.expressID==t.value}));n&&(c[null==n?void 0:n.Name.value]=null==n?void 0:n.NominalValue.value)})));var f=(null==s||null===(t=s.RepresentationContexts)||void 0===t||null===(n=t.WorldCoordinateSystem)||void 0===n?void 0:n.Location.Coordinates)||[];return{name:(null==s||null===(r=s.Name)||void 0===r?void 0:r.value)||"未知",guid:null==s||null===(a=s.GlobalId)||void 0===a?void 0:a.value,location:{x:(null===(o=f[0])||void 0===o?void 0:o.value)||0,y:(null===(i=f[1])||void 0===i?void 0:i.value)||0,z:(null===(u=f[2])||void 0===u?void 0:u.value)||0},xcDrawingInfo:c}},m=function(e,t){var n={},r=e.filter((function(e){return t.includes(""+e.expressID)})),a=e.find((function(e){return 639542469==e.type})),o={};return r.forEach((function(t){var r,i,u;if(o[t.expressID]={uuid:t.expressID,Guid:null===(r=t.GlobalId)||void 0===r?void 0:r.value,IfcEntity:self.IFCTypes?self.IFCTypes[t.type]:t.type,Name:null===(i=t.Name)||void 0===i?void 0:i.value,ObjectType:null===(u=t.ObjectType)||void 0===u?void 0:u.value,tzProperties:{}},"Revit"!==a.ApplicationIdentifier.value){var l,c,f,d,p,v;n[(null===(l=t.ObjectType)||void 0===l?void 0:l.value)||(null===(c=t.Name)||void 0===c?void 0:c.value)]=n[(null===(f=t.ObjectType)||void 0===f?void 0:f.value)||(null===(d=t.Name)||void 0===d?void 0:d.value)]||{};var y=n[(null===(p=t.ObjectType)||void 0===p?void 0:p.value)||(null===(v=t.Name)||void 0===v?void 0:v.value)];e.filter((function(e){return e.type==s&&e.RelatedObjects&&e.RelatedObjects.find((function(e){return e.value==t.expressID}))})).forEach((function(n){var r=Object.keys(n).find((function(e){return e.startsWith("Relating")}));if(r){var a=n[r].value,i=e.find((function(e){return e.expressID==a&&"天正属性"==e.Name.value}));i&&i.Name&&i.HasProperties&&(o[t.expressID].tzProperties={},i.HasProperties.forEach((function(n){var r=e.find((function(e){return e.expressID==n.value}));r.Unit&&console.log(JSON.stringify(r.Unit)),o[t.expressID].tzProperties[r.Name.value]={value:r.NominalValue?r.NominalValue.value:"",unit:r.Unit||""},r&&r.NominalValue&&void 0!==r.NominalValue.value&&(y[r.Name.value]=y[r.Name.value]||{values:new Set},y[r.Name.value].type=y[r.Name.value].type||Object.prototype.toString.call(r.NominalValue.value).slice(8,-1),y[r.Name.value].values.add(r.NominalValue.value))})))}}))}})),{res:o,filters:n}};self.onmessage=function(){var t=a(n().mark((function t(r){var a,o,s,l,p,g,b,x,I,N,w,E,j,L,P,R,D,O,U,k,M,T,A,S,_,$,G,B,C,F;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=r.data,o=a.type,s=a.data,l=a.libPath;try{!self.zango&&importScripts(l+"/zangodb.min.js")}catch(e){self.postMessage({type:"error",message:"zangoDB 库引入失败,请检查decoderPath: ".concat(l+"/zangodb.min.js")}),self.close()}t.t0=o,t.next="createDB"===t.t0?5:"saveTree"===t.t0?17:"getAttributeData"===t.t0?22:"getFeatureIdByGuid"===t.t0?28:"getIfcProjectInfo"===t.t0?32:"getAttributeDatas"===t.t0?37:"getNodeListByUuid"===t.t0?44:"getComponentByUuid"===t.t0?49:"getNodeListByParentUuid"===t.t0?57:"isExistWithKeyword"===t.t0?62:68;break;case 5:return t.prev=5,t.next=8,c(s,!0);case 8:self.postMessage({type:"createDBResult",data:s.length}),f(),t.next=16;break;case 12:t.prev=12,t.t1=t.catch(5),self.postMessage({type:"error",message:t.t1}),f();case 16:return t.abrupt("break",68);case 17:return t.next=19,c(s.dbName);case 19:if(console.time("保存构件树时间"),"ifc"==s.modelType)try{v(s.data,s.modelId,s.ifcTree).then((function(e){var t=e.res,n=e.project;t.length>0?i.insert(t).then((function(e){self.postMessage({type:"saveTreeResult",data:{num:t.length,project:n}})})).finally((function(){console.timeEnd("保存构件树时间"),f()})):(self.postMessage({type:"saveTreeResult",data:{num:t.length,project:n}}),console.timeEnd("保存构件树时间"),f())}))}catch(e){console.timeEnd("保存构件树失败"),f()}else null!==(p=s.data)&&void 0!==p&&p.length?i.insert(s.data).then((function(e){self.postMessage({type:"saveTreeResult",data:s.data.length})})).finally((function(){var e;s.extra&&(e=s.extra)?fetch(e).then((function(t){t.json().then((function(t){var n=t.objects,r=t.categoryProperties;n.components.forEach((function(e){var t="".concat(e.typec,"_").concat(e.typename).replace(/\\s/g,""),n=null==r?void 0:r.find((function(e){return e.categoryName.replace(/\\s/g,"")==t}));n&&(e.groupedProperties=n.groupedProperties||{},e.construction=n.construction||{})})),u.insert(t.objects.components).then((function(){f()})).finally((function(){window.URL.revokeObjectURL(e)}))}))})).catch((function(t){window.URL.revokeObjectURL(e),f()})):f(),console.timeEnd("保存构件树时间")})):(self.postMessage({type:"saveTreeResult",data:0}),f());return t.abrupt("break",68);case 22:return t.next=24,c(s.dbName);case 24:return((g=s.uuid)+"").length>45&&(g=g.slice(0,45)),u.findOne({$or:[{uuid:g},{uuid:"ifcAttr"}]}).then((function(e){var t,n;if(e)if("ifcAttr"!=e.uuid){var r="";if(null!=e&&null!==(t=e.construction)&&void 0!==t&&t.totalThickness&&null!=e&&e.groupedProperties["构造"])for(var a in null==e?void 0:e.groupedProperties["构造"])if(a.match(/厚度/)){var o,i=Math.round((null==e?void 0:e.groupedProperties["构造"][a])/(null==e||null===(o=e.construction)||void 0===o?void 0:o.totalThickness));r=1e3===i?"m":1===i?"mm":""}var u=(null==e||null===(n=e.construction)||void 0===n?void 0:n.constructionLayers)||[],s=e.groupedUserData,c=e.groupedProperties,f=d(s,e.revitId),p=d(c,e.revitId,!0);f.forEach((function(e){var t=p.find((function(t){return t.name==e.name}));t&&t.children.forEach((function(t){e.children.find((function(e){return e.name==t.name}))||e.children.push(t)}))})),self.postMessage({type:"getAttributeDataResult",data:{name:e.name,revitId:e.revitId,property:f,tableProperties:u,unit:r}})}else{try{!self.IFCTypes&&importScripts(l+"/ifc/ifc-types.js")}catch(e){console.warn("获取ifc类型文件失败")}var v=y(e.data,g);self.postMessage({type:"getAttributeDataResult",data:v})}else self.postMessage({type:"getAttributeDataResult",data:null})})).finally((function(){f()})).catch((function(e){self.postMessage({type:"error",message:e})})),t.abrupt("break",68);case 28:return t.next=30,c(s.dbName);case 30:return u.findOne({uuid:"ifcAttr"}).then((function(e){var t="";if(e){var n=e.data.find((function(e){var t;return(null===(t=e.GlobalId)||void 0===t?void 0:t.value)==s.guid}));t=n?n.expressID:""}self.postMessage({type:"getFeatureIdByGuidResult",data:t})})).finally((function(){f()})).catch((function(e){self.postMessage({type:"error",message:e})})),t.abrupt("break",68);case 32:return t.next=34,c(s.dbName);case 34:return b={},u.find({uuid:{$eq:"ifcAttr"}}).toArray().then((function(e){e&&(b=h(e[0].data),self.postMessage({type:"getIfcProjectInfoResult",data:b}))})).finally((function(){f()})).catch((function(e){self.postMessage({type:"error",message:e})})),t.abrupt("break",68);case 37:return t.next=39,c(s.dbName);case 39:return x=s.uuids,I=[],N={},u.find({$or:[{uuid:{$in:x}},{uuid:"ifcAttr"}]}).toArray().then((function(e){if(e[0])if("i